According to the DOM spec: (see the javadoc for org.w3c.dom.Node) concatenation of the textContent attribute value of every child node, excluding COMMENT_NODE and PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the node has no children.
Thus, this is working per spec, although it does suck. That said, starting with SAAJ 1.2, the SAAJ model extends the DOM model. Thus, ANY utility you having for printing a DOM should work. Dan On Wednesday 17 October 2007, Cencio wrote: > Hi all, > > 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 -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
