Try this

org.apache.cxf.helpers.XMLUtils.toString(mySOAPMessage.getSOAPPart().getEnvelope())

James


i'm trying to get the SOAPEnvelope content as String. I tryed with

mySOAPMessage.getSOAPPart().getEnvelope().getTextContent()
but the returned string of this envelope

<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>
         <eseguiServizio xmlns="http://spcoop.it/cart/pdd-test";>
            <Richiesta><persona nome="mario" cognome="rossi"></Richiesta>
         </eseguiServizio>
      </soapenv:Body>
   </soapenv:Envelope>

is just

<persona nome="mario" cognome="rossi"/>


It's correct? If is right how can i get the whole envelope as string?
Thx
Lorenzo

Reply via email to