You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by PASQUER Arnaud DSI/SIFAC <ar...@francetelecom.com> on 2004/01/20 14:44:45 UTC

problem with message style and SOAPBodyElement signature

Hi all,
 
I've still having trouble getting document-style SOAP calls to work in Axis with SOAPBodyElement [] myService (SOAPBodyElement [] bodies) :


SOAPFactoryImpl soapFactory=new SOAPFactoryImpl();
Name a=soapFactory.createName("A","icar","URI");
SOAPBodyElement bodyElement=new SOAPBodyElement (a);
SOAPElement b=bodyElement.addChildElement("B");
numClient.addTextNode("b");
SOAPElement c=bodyElement.addChildElement("C");
c.addTextNode("c");
SOAPBodyElement [] soapBodyElement = new SOAPBodyElement[1];
soapBodyElement[0]=bodyElement;
Vector elems = (Vector) call.invoke(soapBodyElement);

->java.lang.Exception: Body not found.

and log.debug(XMLUtils.ElementToString(soapBodyElement[0].getAsDOM())) :
<icar:A mlns:icar="URI"><icar:B>b</icar:B><icar:C>c</icar:C></icar:A>

and here's what my SOAP request looks like (from TCPMonitor):

...
SOAPAction: "" Content-Length: 417  <?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><icar:A xmlns:icar="URI"><icar:B>b</icar:B><icar:C>c</icar:C></icar:A> </soapenv:Body>
</soapenv:Envelope>


Why my body is not found?