use of com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorPortType in project narayana by jbosstm.
the class BAInteropClient method getInitiatorPort.
public static InitiatorPortType getInitiatorPort(MAP map, String action) {
InitiatorService service = getInitiatorService();
InitiatorPortType port = service.getPort(InitiatorPortType.class, new AddressingFeature(true, true));
BindingProvider bindingProvider = (BindingProvider) port;
String to = map.getTo();
/*
* we no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
List<Handler> customHandlerChain = new ArrayList<Handler>();
customHandlerChain.add(new WSAddressingClientHandler());
bindingProvider.getBinding().setHandlerChain(customHandlerChain);
*/
Map<String, Object> requestContext = bindingProvider.getRequestContext();
map.setAction(action);
AddressingHelper.configureRequestContext(requestContext, map, to, action);
return port;
}
use of com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorPortType in project narayana by jbosstm.
the class InitiatorClient method sendResponse.
/**
* Send a response.
* @param map The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
public void sendResponse(final MAP map) throws SoapFault, IOException {
InitiatorPortType port = BAInteropClient.getInitiatorPort(map, responseAction);
port.response();
}
Aggregations