Search in sources :

Example 1 with InitiatorPortType

use of com.jboss.transaction.wstf.webservices.sc007.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 = InteropClient.getInitiatorPort(map, responseAction);
    port.response();
}
Also used : InitiatorPortType(com.jboss.transaction.wstf.webservices.sc007.generated.InitiatorPortType)

Example 2 with InitiatorPortType

use of com.jboss.transaction.wstf.webservices.sc007.generated.InitiatorPortType in project narayana by jbosstm.

the class InteropClient method getInitiatorPort.

public static InitiatorPortType getInitiatorPort(MAP map, String action) {
    Sc007Service service = getSc007Service();
    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);
    map.setFrom(getParticipant());
    AddressingHelper.configureRequestContext(requestContext, map, to, action);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) InitiatorPortType(com.jboss.transaction.wstf.webservices.sc007.generated.InitiatorPortType) BindingProvider(javax.xml.ws.BindingProvider) Sc007Service(com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service)

Aggregations

InitiatorPortType (com.jboss.transaction.wstf.webservices.sc007.generated.InitiatorPortType)2 Sc007Service (com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service)1 BindingProvider (javax.xml.ws.BindingProvider)1 AddressingFeature (javax.xml.ws.soap.AddressingFeature)1