That works! Just 2 questions: the output also include <?xml version="1.0" encoding="utf-8"?> i have to manually remove it or there is some utility that do it for me?
The getTextContent() work fine or should output what i expected? I would use saaj interface so future port to another saaj implementation is more easy... Thx for ur help James Mao wrote: > > 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 >> > > -- View this message in context: http://www.nabble.com/Get-SOAPEnvelope-as-String-tf4639292.html#a13251033 Sent from the cxf-user mailing list archive at Nabble.com.
