public SOAPEnvelope build(SOAPMessage soapMessage, Element domEnv) throws SOAPException
{
SOAPPartImpl soapPart = (SOAPPartImpl)soapMessage.getSOAPPart();
SOAPEnvelopeImpl soapEnv = new SOAPEnvelopeImpl(soapPart, (SOAPElementImpl)soapFactory.createElement(domEnv, false), false);
DOMUtils.copyAttributes(soapEnv, domEnv);
NodeList envChildNodes = domEnv.getChildNodes();
for (int i = 0; i < envChildNodes.getLength(); i++)
{
Node child = envChildNodes.item(i);
short childType = child.getNodeType();
if (childType == Node.ELEMENT_NODE)
{
String elName = child.getLocalName();
if ("Header".equals(elName))
{
buildSOAPHeader(soapEnv, (Element)child);
}
else if ("Body".equals(elName))
{
buildSOAPBody(soapEnv, (Element)child);
}
else
{
log.warn(BundleUtils.getMessage(bundle, "IGNORE_ENVELOPE_CHILD", elName));
}
}
}
return soapEnv;
}