Hi,

Coud you please help me return the content of an xsd:any structure to a 
webservice client. I have no problem sending data using a similar structure but 
cannot get anything outbound. My JBoss server is a 4.0.2.

I am using document/literal with types that look like this


  |             <xs:element name="elementsIn">
  |                     <xs:complexType>
  |                             <xs:sequence>
  |                                     <xs:any maxOccurs="unbounded"/>         
                        
  |                             </xs:sequence>
  |                     </xs:complexType>
  |             </xs:element>
  | 
  |             <xs:element name="elementsOut">
  |                     <xs:complexType>
  |                             <xs:sequence>
  |                                     <xs:any maxOccurs="unbounded"/>         
                        
  |                             </xs:sequence>
  |                     </xs:complexType>
  |             </xs:element>
  | 

The operation "execute" takes elemntsIn and returns elementsOut.

As expected jwsp generates two classes ElementsIn and ElementsOut that both 
have a methods of signature:

  | public javax.xml.soap.SOAPElement[] get_any();
  | public void set_any(javax.xml.soap.SOAPElement[] _any);
  | 

The execute operation looks like this

  | public ElementsOut execute(ElementsIn elementsIn) throws RemoteException {
  | 
  |     //do various things to get a DOM Document
  | 
  |     MessageFactory messageFactory = MessageFactory.newInstance();
  |     SOAPMessage message = messageFactory.createMessage();
  |     SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();            
  | 
  |     SOAPElement[] ret = new SOAPElement[1];
  |     ret[0] = envelope.getBody().addDocument(DOMDocument);
  | 
  |     ElementsOut out = new ElementsOut();
  |     out.set_any(ret);
  |     return out;
  | }
  | 

No exception is thrown and I have verified that "ret" contains data but the 
SOAP envelope is empty:


  | Message
  | <?xml version="1.0" encoding="UTF-8"?>
  | <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  |  <soapenv:Body>
  |   <ns1:elementsOut xmlns:ns1="umy-namespace"/>
  |  </soapenv:Body>
  | </soapenv:Envelope>
  | 

ElementsOut does not seemed to be serialized correctly. 
Any Idea?

Thanks.

Bruno

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3878656#3878656

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3878656


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to