aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Unable to unmarshall the webservice response " Watch "Unable to unmarshall the webservice response " New topic
Author

Unable to unmarshall the webservice response

Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 516
    
    2

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

Regards
KumarRaja

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to unmarshall the webservice response
 
Similar Threads
ws bb1.1: Explanation needed for examples
ws bb1.1: Explanation needed for examples
How to generate JAXB Bindings for the xml element definition which is extending from other xml
The prefix "oxm" for element "oxm:jaxb2-marshaller" is not bound
org.springframework.ws.client.WebServiceTransportException: Method Not Allowed [405]