[jboss-user] [JBossWS] - <xsd:any/> binding problem
ragsta
do-not-reply at jboss.com
Fri Mar 2 07:21:55 EST 2007
Hi,
using libraries and tools from Jbossws-1.2.0GA to generate a web service client I found a problem in mapping <xsd:any/> wsdl element.
'llreport the fragment that define the web service response message:
| <s:schema elementFormDefault="qualified" targetNamespace="http://test.it/test">
| ...
| <s:element name="Response" >
| <s:complexType>
| <s:sequence>
| <s:any minOccurs="0" maxOccurs="1" />
| </s:sequence>
| </s:complexType>
| </s:element>
| ...
|
wstools generate for this response a class with this code:
| public class Response
| {
| protected javax.xml.soap.SOAPElement _any;
| public Response(){}
|
| public Response(javax.xml.soap.SOAPElement _any){
| this._any=_any;
| }
| public javax.xml.soap.SOAPElement get_any()
| {return _any ;}
| public void set_any(javax.xml.soap.SOAPElement _any)
| {this._any=_any; }
|
| }
|
when I call the webservice I got a response with this body:
| <soap:Body>
| <Response xmlns="http://test.it/test">
| <root>
| <test>hello</test>
| </root>
| </Response>
| </soap:Body>
|
Now I'm expecting that the -nay variable is filled with the .. element
but what I obtain is this error:
org.jboss.xb.binding.JBossXBRuntimeException: {http://test.it/test}root not found as a child of {http://test.it/test}Response
at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:280)
Please help, I'm going crazy...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024615#4024615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024615
More information about the jboss-user
mailing list