Search in sources :

Example 1 with SoapFaultService

use of org.jboss.jbossts.xts.soapfault.SoapFaultService in project narayana by jbosstm.

the class SoapFaultClient method getSoapFaultPort.

private static org.jboss.jbossts.xts.soapfault.SoapFaultPortType getSoapFaultPort(final MAP map, final String action) {
    SoapFaultService service = getSoapFaultService();
    SoapFaultPortType port = service.getPort(org.jboss.jbossts.xts.soapfault.SoapFaultPortType.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();
    if (action != null) {
        map.setAction(action);
    }
    AddressingHelper.configureRequestContext(requestContext, map, to, action);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) SoapFaultService(org.jboss.jbossts.xts.soapfault.SoapFaultService) SoapFaultPortType(org.jboss.jbossts.xts.soapfault.SoapFaultPortType) BindingProvider(javax.xml.ws.BindingProvider)

Example 2 with SoapFaultService

use of org.jboss.jbossts.xts.soapfault.SoapFaultService in project narayana by jbosstm.

the class SoapFaultClient method getSoapFaultPort.

private static org.jboss.jbossts.xts.soapfault.SoapFaultPortType getSoapFaultPort(final W3CEndpointReference endpoint, final MAP map, final String action) {
    SoapFaultService service = getSoapFaultService();
    org.jboss.jbossts.xts.soapfault.SoapFaultPortType port = service.getPort(endpoint, org.jboss.jbossts.xts.soapfault.SoapFaultPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    Map<String, Object> requestContext = bindingProvider.getRequestContext();
    MAP requestMap = AddressingHelper.outboundMap(requestContext);
    if (action != null) {
        map.setAction(action);
    }
    AddressingHelper.installCallerProperties(map, requestMap);
    String to = requestMap.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);
        */
    AddressingHelper.configureRequestContext(requestContext, to, action);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) SoapFaultPortType(org.jboss.jbossts.xts.soapfault.SoapFaultPortType) SoapFaultService(org.jboss.jbossts.xts.soapfault.SoapFaultService) BindingProvider(javax.xml.ws.BindingProvider) MAP(org.jboss.ws.api.addressing.MAP)

Aggregations

BindingProvider (javax.xml.ws.BindingProvider)2 AddressingFeature (javax.xml.ws.soap.AddressingFeature)2 SoapFaultPortType (org.jboss.jbossts.xts.soapfault.SoapFaultPortType)2 SoapFaultService (org.jboss.jbossts.xts.soapfault.SoapFaultService)2 MAP (org.jboss.ws.api.addressing.MAP)1