aspose file tools*
The moose likes Web Services and the fly likes WebService Client - Unexpected SubElement Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "WebService Client - Unexpected SubElement Exception" Watch "WebService Client - Unexpected SubElement Exception" New topic
Author

WebService Client - Unexpected SubElement Exception

Logeswaran Radhakrishnan
Greenhorn

Joined: Apr 20, 2010
Posts: 13
Hi,


I am new to WebServices and i am using axis2-1.4.1 Version of Axis to generate stubs from the WSDL file. The WSDL file when tested with the SoapUI gives the expected response but when i tried for the same response using the webservice client it shows the unexpected subelement exception .

Two service methods are

and the generated WSDL file is


and the client class looks like this


and the generated exception is

and the generated stub class is


Help me out to solve this issue.

Thanks in advance.

Regards,
Logeswaran
Ben Linus
Greenhorn

Joined: Mar 02, 2010
Posts: 15
What is the exact request you are using to test in SOAPUI?

This usually means you are passing in a request element that the XSD does not expect.
Naren Chivukula
Ranch Hand

Joined: Feb 03, 2004
Posts: 576

Hi Logeswaran,
Unexpected subelement idReturn

From your WSDL, there is no element defined as "idReturn". Unless you define it in WSDL, Axis will not understand this when processing stub generation logic. Have you created any service which returns id? For me it seems, WSDL in not inline with your service. You may have to re-look at your service.


Cheers,
Naren
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebService Client - Unexpected SubElement Exception
 
Similar Threads
org.apache.axis2.AxisFault: http
Web Services using AXIS 2
Axis2 Http Header
org.apache.axis2.AxisFault: http
Confused on the code implementation generated by the Axis2 Code Generator.