Search in sources :

Example 16 with AddressingFeature

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

the class InteropClient method getParticipantPort.

// 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 ParticipantPortType getParticipantPort(MAP map, String action) {
    Sc007Service service = getSc007Service();
    ParticipantPortType port = service.getPort(ParticipantPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    String to = map.getTo();
    List<Handler> customHandlerChain = new ArrayList<Handler>();
    /*
         * we need to add the coordination context handler in the case where we are passing a
         * coordination context via a header element
         */
    customHandlerChain.add(new CoordinationContextHandler());
    /*
         * we no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
		customHandlerChain.add(new WSAddressingClientHandler());
         */
    bindingProvider.getBinding().setHandlerChain(customHandlerChain);
    Map<String, Object> requestContext = bindingProvider.getRequestContext();
    map.setAction(action);
    map.setFrom(getInitiator());
    AddressingHelper.configureRequestContext(requestContext, map, to, action);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) ParticipantPortType(com.jboss.transaction.wstf.webservices.sc007.generated.ParticipantPortType) CoordinationContextHandler(com.jboss.transaction.wstf.webservices.handlers.CoordinationContextHandler) ArrayList(java.util.ArrayList) CoordinationContextHandler(com.jboss.transaction.wstf.webservices.handlers.CoordinationContextHandler) Handler(javax.xml.ws.handler.Handler) BindingProvider(javax.xml.ws.BindingProvider) Sc007Service(com.jboss.transaction.wstf.webservices.sc007.generated.Sc007Service)

Example 17 with AddressingFeature

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

the class WSATClient method getCompletionInitiatorPort.

public static CompletionInitiatorPortType getCompletionInitiatorPort(final W3CEndpointReference endpointReference, String action, MAP map) {
    final CompletionInitiatorService service = getCompletionInitiatorService();
    final CompletionInitiatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, CompletionInitiatorPortType.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 18 with AddressingFeature

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

the class WSATClient method getCompletionCoordinatorRPCPort.

public static CompletionCoordinatorRPCPortType getCompletionCoordinatorRPCPort(final W3CEndpointReference endpointReference, String action, MAP map) {
    final CompletionCoordinatorRPCService service = getCompletionCoordinatorRPCService();
    final CompletionCoordinatorRPCPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, CompletionCoordinatorRPCPortType.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 19 with AddressingFeature

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

the class WSATClient method getCoordinatorPort.

// fetch ports when we have NO endpoint
public static CoordinatorPortType getCoordinatorPort(String action, MAP map) {
    final CoordinatorService service = getCoordinatorService();
    final CoordinatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, CoordinatorPortType.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 20 with AddressingFeature

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

the class WSATClient method getParticipantPort.

public static ParticipantPortType getParticipantPort(final W3CEndpointReference endpointReference, String action, MAP map) {
    final ParticipantService service = getParticipantService();
    final ParticipantPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, ParticipantPortType.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)

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 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 InputStream (java.io.InputStream)2