Element soapXML = XmlUtils.createElement(doc, SoapConstants.ENVELOPE_QNAME);
//
// add WS-Addressing headers
//
MessageHeaders headers = new MessageHeaders(destination, action);
//
// if there's a source EPR, we can provide a wsa:From
//
if (source != null)
headers.setFromAddress(source);
Element headersXML = headers.toXML(doc);
soapXML.appendChild(headersXML);
//
// add all of the non-WS-A SOAP headers
//