We switched from java5 to java6, and also added some axis2 libraries: axis2-saaj-api-1.4.1.jar, axis2-saaj-1.4.1.jar, axiom-api-1.2.7.jar, axiom-dom-1.2.7.jar axiom-imp-1.2.7.jar.
The SoapBody looks like:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><GetEmployeeStatusRequest>
<EffectiveOn>2009-01-01</EffectiveOn>
<Filter>
<Companies>
<CompanyIdentifier>xyz</CompanyIdentifier>
</Companies>
</Filter>
</GetEmployeeStatusRequest></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But the Document extracted from SoapBody only contains the first layer child:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><GetEmployeeStatusRequest/>
The code I'm using to get the document is below:
Document oDoc = oSoapBody.extractContentAsDocument();
DOMSource oDomSource = new DOMSource(oDoc);
StringWriter oStringWriter = new StringWriter();
Result oStreamResult = new StreamResult(oStringWriter);
TransformerFactory oFactory = TransformerFactory.newInstance();
Transformer oTransformer = oFactory.newTransformer();
oTransformer.transform(oDomSource, oStreamResult);
String stBody = oStringWriter.toString();
System.out.println(stBody);
I'm using eclipse debugging mode to step in to see what's inside the SoapBody before it's extracted, and I could find all the other elements.
Could anyone here to help me out? Appreciate for any suggestions!!!