AddressingProperties outProps = builder.newAddressingProperties();
outProps.setTo(builder.newURI("uri:jaxrpc-samples-wsaddressing/TestService"));
outProps.setAction(builder.newURI("http://org.jboss.ws/addressing/stateful/action"));
EndpointReference replyTo = builder.newEndpointReference(new URI(ADDR.getAnonymousURI()));
outProps.setReplyTo(replyTo);
outProps.setMessageID(builder.newURI("urn:uuid:"+ UUIDGenerator.generateRandomUUIDString()));
// Assign a new clientid
if (clientid == null)
{
clientid = "clientid-" + (++maxClientId);
log.info("New clientid: " + clientid);
}
ReferenceParameters refParams = replyTo.getReferenceParameters();
refParams.addElement(getClientIdElement(clientid));
msgContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, outProps);
msgContext.setScope(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, Scope.APPLICATION);
}