final ClientProviderHandler callbackHandler = new ClientProviderHandler(
errorTransfer, messageTransfer, callbackMap);
final Endpoint ep = CallContext.createCallbackEndpoint(
callbackHandler, wsdlLocation);
callbackEndpoint = ep;
JmsUriConfigurator cConfigurator = JmsUriConfigurator.create(ep);
ep.publish(cConfigurator.getJmsAddress());
// 2. Create a client
final Dispatch<StreamSource> dispatcher = service.createDispatch(
portName, StreamSource.class, Service.Mode.PAYLOAD);
CallContext.setupDispatch(dispatcher, ep);
JmsUriConfigurator configurator = JmsUriConfigurator.create(dispatcher);
configurator.configureDispatch(dispatcher);
if (mep == REQUEST_CALLBACK_ENFORCED) {
final QName opName = new QName(serviceName.getNamespaceURI(), operation);
CallContext.enforceOperation(opName, dispatcher);
}