Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to unmarshall the webservice response

Kumar Raja
Ranch Hand
Posts: 547
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic