{
WSAddressingClientHandler wsHandler = new WSAddressingClientHandler();
SOAPMessageContextJAXWS context = new SOAPMessageContextJAXWS();
context.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, new Boolean(true));
context.put(BindingProvider.SOAPACTION_URI_PROPERTY, "inputAction");
context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, new SOAPAddressingPropertiesImpl());
context.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, new SOAPAddressingPropertiesImpl());
MessageFactory factory = MessageFactory.newInstance();
SOAPMessage soapMsg = factory.createMessage();
context.setMessage(soapMsg);
wsHandler.handleMessage(context);
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)context.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);