}
// Write wsa:From
if (getFrom() != null)
{
EndpointReferenceImpl epr = (EndpointReferenceImpl)getFrom();
epr.setRootQName(ADDR.getFromQName());
SOAPElement soapElement = factory.createElement(epr.toElement());
soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
soapHeader.addChildElement(soapElement);
}
// Write wsa:ReplyTo
if (getReplyTo() != null)
{
EndpointReferenceImpl epr = (EndpointReferenceImpl)getReplyTo();
epr.setRootQName(ADDR.getReplyToQName());
SOAPElement soapElement = factory.createElement(epr.toElement());
soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
soapHeader.addChildElement(soapElement);
}
// Write wsa:FaultTo
if (getFaultTo() != null)
{
EndpointReferenceImpl epr = (EndpointReferenceImpl)getFaultTo();
epr.setRootQName(ADDR.getFaultToQName());
SOAPElement soapElement = factory.createElement(epr.toElement());
soapElement.removeNamespaceDeclaration(ADDR.getNamespacePrefix());
soapHeader.addChildElement(soapElement);
}
appendRequiredHeader(soapHeader, ADDR.getActionQName(), getAction());