• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to unmarshall the webservice response

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 http://example.com/main/ and simpleInfo:simpleResponse_Type is defined in some other xsd called import.xsd with the namespace http://example.com/import/

and when we ran JAXB bindings on main.xsd using maven plugin, it generated a class com.example.import.simpleResponseType.java

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


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

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

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic