This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes JAXWS client generating incorrect request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAXWS client generating incorrect request" Watch "JAXWS client generating incorrect request" New topic

JAXWS client generating incorrect request

Vijay Ganapathy

Joined: May 23, 2012
Posts: 13
I've a wsimport generated class from a WSDL as follows:

I'm pasting the schema from the comments in the generated class.

Obviously as you can see from the above schema, the element name is Errors and it will contain sub elements of type of ArrayOfErrorDetail which is nothing but a List<ErrorDetail>. The ErrorDetail is POJO which has a errorCode, errorType and errorMessage.

SOAPUI generates the request as :

while the JAXWS client generates the request as:

I'm creating the ArrayOfErrorDetail object as follows in my code:

And the ArrayOfErrorDetail object is this way:

What am I doing wrong? Please help.
It is sorta covered in the JavaRanch Style Guide.
subject: JAXWS client generating incorrect request
Similar Threads
wsimport command error --Undefined symbol or complex type
Axis, missing qualified name in root element
Trouble with adding elements properly
Axis WSDL2Java's Error: reference but not defined
Unable to generate xml using jaxb classes