File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Unable to unmarshall the webservice response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Unable to unmarshall the webservice response " Watch "Unable to unmarshall the webservice response " New topic

Unable to unmarshall the webservice response

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 519

Hi All,

We have a schema similar to what given below

and let us assume that the above definition is in main.xsd with namespace and simpleInfo:simpleResponse_Type is defined in some other xsd called import.xsd with the namespace

and when we ran JAXB bindings on main.xsd using maven plugin, it generated a class

now, in our webservice application context, I need to define oxm:jaxb2-marshaller and I have something like below

But the actual xml response looks as below

</Body>Now, since while unmarshalling it encounters <someResponse> instead of <simpleResponseType> , it is throwing exception. Which makes sense ? but JAXB did not generate any and it only generates

Is there any way to fix this problem, by not altering xsd as that is out of our control?



With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Unable to unmarshall the webservice response