Search in sources :

Example 26 with AddressingFeature

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

the class WSARJTXClient method getTerminationCoordinatorRPCPort.

public static TerminationCoordinatorRPCPortType getTerminationCoordinatorRPCPort(W3CEndpointReference endpointReference, String action, MAP map) {
    final TerminationCoordinatorRPCService service = getTerminationCoordinatorRPCService();
    final TerminationCoordinatorRPCPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, TerminationCoordinatorRPCPortType.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 27 with AddressingFeature

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

the class WSARJTXClient method getTerminationCoordinatorPort.

public static TerminationCoordinatorPortType getTerminationCoordinatorPort(W3CEndpointReference endpointReference, String action, MAP map) {
    final TerminationCoordinatorService service = getTerminationCoordinatorService();
    final TerminationCoordinatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, TerminationCoordinatorPortType.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 28 with AddressingFeature

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

the class ATInteropClient method getInitiatorPort.

public static InitiatorPortType getInitiatorPort(MAP map, String action) {
    InitiatorService service = getInitiatorService();
    InitiatorPortType port = service.getPort(InitiatorPortType.class, new AddressingFeature(true, true));
    BindingProvider bindingProvider = (BindingProvider) port;
    String to = map.getTo();
    /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannot 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) InitiatorService(com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorService) InitiatorPortType(com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorPortType) BindingProvider(javax.xml.ws.BindingProvider)

Example 29 with AddressingFeature

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

the class WSBAClient method getParticipantCompletionCoordinatorPort.

// get ports where we HAVE an endpoint to create the port from
public static BusinessAgreementWithParticipantCompletionCoordinatorPortType getParticipantCompletionCoordinatorPort(W3CEndpointReference endpointReference, String action, MAP map) {
    final BusinessAgreementWithParticipantCompletionCoordinatorService service = getParticipantCompletionCoordinatorService();
    final BusinessAgreementWithParticipantCompletionCoordinatorPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, BusinessAgreementWithParticipantCompletionCoordinatorPortType.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 30 with AddressingFeature

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

the class WSBAClient method getParticipantCompletionParticipantPort.

public static BusinessAgreementWithParticipantCompletionParticipantPortType getParticipantCompletionParticipantPort(W3CEndpointReference endpointReference, String action, MAP map) {
    final BusinessAgreementWithParticipantCompletionParticipantService service = getParticipantCompletionParticipantService();
    final BusinessAgreementWithParticipantCompletionParticipantPortType port = PrivilegedServiceHelper.getInstance().getPort(service, endpointReference, BusinessAgreementWithParticipantCompletionParticipantPortType.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