Search in sources :

Example 46 with AddressingFeature

use of javax.xml.ws.soap.AddressingFeature in project narayana by jbosstm.

the class WSATClient method getCoordinatorPort.

// fetch ports when we HAVE an endpoint
public static CoordinatorPortType getCoordinatorPort(final W3CEndpointReference endpointReference, String action, MAP map) {
    final CoordinatorService service = getCoordinatorService();
    final CoordinatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, CoordinatorPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    configureEndpointPort(bindingProvider, action, map);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) BindingProvider(javax.xml.ws.BindingProvider)

Example 47 with AddressingFeature

use of javax.xml.ws.soap.AddressingFeature in project narayana by jbosstm.

the class WSATClient method getParticipantPort.

public static ParticipantPortType getParticipantPort(String action, MAP map) {
    final ParticipantService service = getParticipantService();
    final ParticipantPortType port = PrivilegedServiceHelper.getInstance().getPort(service, ParticipantPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    configurePort(bindingProvider, action, map);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) BindingProvider(javax.xml.ws.BindingProvider)

Example 48 with AddressingFeature

use of javax.xml.ws.soap.AddressingFeature in project narayana by jbosstm.

the class WSARJTXClient method getTerminationParticipantPort.

// don't think we ever need this as we get a registration port from the endpoint ref returned by
// the activation port request
public static TerminationParticipantPortType getTerminationParticipantPort(W3CEndpointReference endpointReference, String action, MAP map) {
    final TerminationParticipantService service = getTerminationParticipantService();
    final TerminationParticipantPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    /*
         * 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 requestMap = AddressingHelper.outboundMap(requestContext);
    map.setAction(action);
    AddressingHelper.installCallerProperties(map, requestMap);
    AddressingHelper.configureRequestContext(requestContext, requestMap.getTo(), action);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) BindingProvider(javax.xml.ws.BindingProvider) MAP(org.jboss.ws.api.addressing.MAP)

Example 49 with AddressingFeature

use of javax.xml.ws.soap.AddressingFeature 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)

Example 50 with AddressingFeature

use of javax.xml.ws.soap.AddressingFeature 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) {
    org.jboss.jbossts.xts.soapfault.SoapFaultService service = getSoapFaultService();
    org.jboss.jbossts.xts.soapfault.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) SoapFaultPortType(org.jboss.jbossts.xts.soapfault.SoapFaultPortType) BindingProvider(javax.xml.ws.BindingProvider)

Aggregations

AddressingFeature (javax.xml.ws.soap.AddressingFeature)67 BindingProvider (javax.xml.ws.BindingProvider)35 URL (java.net.URL)18 QName (javax.xml.namespace.QName)13 Test (org.junit.Test)13 Service (javax.xml.ws.Service)8 ArrayList (java.util.ArrayList)7 WebServiceFeature (javax.xml.ws.WebServiceFeature)7 MTOMFeature (javax.xml.ws.soap.MTOMFeature)7 MAP (org.jboss.ws.api.addressing.MAP)5 RespectBindingFeature (javax.xml.ws.RespectBindingFeature)4 LinkedList (java.util.LinkedList)3 DispatchImpl (org.apache.cxf.jaxws.DispatchImpl)3 WSAddressingFeature (org.apache.cxf.ws.addressing.WSAddressingFeature)3 SoapFaultPortType (org.jboss.jbossts.xts.soapfault.SoapFaultPortType)3 CoordinationContextHandler (com.jboss.transaction.txinterop.webservices.handlers.CoordinationContextHandler)2 Sc007Service (com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service)2 WSBinding (com.sun.xml.ws.api.WSBinding)2 ServletAdapterList (com.sun.xml.ws.transport.http.servlet.ServletAdapterList)2 Closeable (java.io.Closeable)2