Search in sources :

Example 21 with AddressingFeature

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

the class WSATClient method getCompletionCoordinatorPort.

public static CompletionCoordinatorPortType getCompletionCoordinatorPort(final W3CEndpointReference endpointReference, String action, MAP map) {
    final CompletionCoordinatorService service = getCompletionCoordinatorService();
    final CompletionCoordinatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, CompletionCoordinatorPortType.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 22 with AddressingFeature

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

the class WSATClient method getCompletionCoordinatorPort.

public static CompletionCoordinatorPortType getCompletionCoordinatorPort(String action, MAP map) {
    final CompletionCoordinatorService service = getCompletionCoordinatorService();
    final CompletionCoordinatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, CompletionCoordinatorPortType.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 23 with AddressingFeature

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

the class TerminationClient method getTerminationParticipantPort.

public static TerminationParticipantPortType getTerminationParticipantPort(MAP map) {
    TerminationParticipantService service = getTerminationParticipantService();
    TerminationParticipantPortType port = service.getPort(TerminationParticipantPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    Map<String, Object> requestContext = bindingProvider.getRequestContext();
    AddressingHelper.configureRequestContext(requestContext, map);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) BindingProvider(javax.xml.ws.BindingProvider)

Example 24 with AddressingFeature

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

the class TerminationClient method getRegistrationPort.

public static TerminationCoordinatorPortType getRegistrationPort(MAP map) {
    TerminationCoordinatorService service = getTerminationCoordinatorService();
    TerminationCoordinatorPortType port = service.getPort(TerminationCoordinatorPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    Map<String, Object> requestContext = bindingProvider.getRequestContext();
    AddressingHelper.configureRequestContext(requestContext, map);
    AddressingHelper.configureRequestContext(requestContext, map);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) BindingProvider(javax.xml.ws.BindingProvider)

Example 25 with AddressingFeature

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

the class WSARJTXClient method getTerminationParticipantPort.

// we use this in situations where we don't have a proper endpoint but we do have caller addressing properties
public static TerminationParticipantPortType getTerminationParticipantPort(InstanceIdentifier identifier, String action, MAP map) {
    final TerminationParticipantService service = getTerminationParticipantService();
    final TerminationParticipantPortType port = PrivilegedServiceHelper.getInstance().getPort(service, 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();
    Element refParam = InstanceIdentifier.createInstanceIdentifierElement(identifier.getInstanceIdentifier());
    map.addReferenceParameter(refParam);
    map.setAction(action);
    AddressingHelper.configureRequestContext(requestContext, map, map.getTo(), action);
    return port;
}
Also used : AddressingFeature(javax.xml.ws.soap.AddressingFeature) Element(org.w3c.dom.Element) 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