}
}
private void sendResponse(OutputStream outputStream, CommonMessageContext msgContext, boolean isFault) throws SOAPException, IOException
{
MessageAbstraction resMessage = msgContext.getMessageAbstraction();
String wsaTo = null;
// Get the destination from the AddressingProperties
AddressingProperties outProps = (AddressingProperties)msgContext.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND);
if (outProps != null && outProps.getTo() != null)
{
AddressingConstantsImpl ADDR = new AddressingConstantsImpl();
wsaTo = outProps.getTo().getURI().toString();
if (wsaTo.equals(ADDR.getAnonymousURI()))
wsaTo = null;
}
if (wsaTo != null)
{
log.debug("Sending response to addressing destination: " + wsaTo);
new SOAPConnectionImpl().callOneWay((SOAPMessage)resMessage, wsaTo);
}
else
{
resMessage.writeTo(outputStream);
}
}