Search in sources :

Example 1 with EnabledWSTXHandler

use of com.arjuna.mw.wst11.client.EnabledWSTXHandler in project cxf by apache.

the class FirstClient method newInstance.

public static FirstServiceAT newInstance() throws Exception {
    URL wsdlLocation = new URL("http://localhost:8081/Service/FirstServiceAT?wsdl");
    QName serviceName = new QName("http://service.ws.sample", "FirstServiceATService");
    QName portName = new QName("http://service.ws.sample", "FirstServiceAT");
    Service service = Service.create(wsdlLocation, serviceName);
    FirstServiceAT client = service.getPort(portName, FirstServiceAT.class);
    List<Handler> handlerChain = new ArrayList<>();
    JaxWSTxOutboundBridgeHandler txOutboundBridgeHandler = new JaxWSTxOutboundBridgeHandler();
    EnabledWSTXHandler wstxHandler = new EnabledWSTXHandler();
    handlerChain.add(txOutboundBridgeHandler);
    handlerChain.add(wstxHandler);
    ((BindingProvider) client).getBinding().setHandlerChain(handlerChain);
    return client;
}
Also used : QName(javax.xml.namespace.QName) ArrayList(java.util.ArrayList) Service(javax.xml.ws.Service) Handler(javax.xml.ws.handler.Handler) EnabledWSTXHandler(com.arjuna.mw.wst11.client.EnabledWSTXHandler) JaxWSTxOutboundBridgeHandler(org.jboss.jbossts.txbridge.outbound.JaxWSTxOutboundBridgeHandler) JaxWSTxOutboundBridgeHandler(org.jboss.jbossts.txbridge.outbound.JaxWSTxOutboundBridgeHandler) EnabledWSTXHandler(com.arjuna.mw.wst11.client.EnabledWSTXHandler) URL(java.net.URL)

Example 2 with EnabledWSTXHandler

use of com.arjuna.mw.wst11.client.EnabledWSTXHandler in project cxf by apache.

the class SecondClient method newInstance.

public static SecondServiceAT newInstance() throws Exception {
    URL wsdlLocation = new URL("http://localhost:8082/Service/SecondServiceAT?wsdl");
    QName serviceName = new QName("http://service.ws.sample", "SecondServiceATService");
    QName portName = new QName("http://service.ws.sample", "SecondServiceAT");
    Service service = Service.create(wsdlLocation, serviceName);
    SecondServiceAT client = service.getPort(portName, SecondServiceAT.class);
    List<Handler> handlerChain = new ArrayList<>();
    JaxWSTxOutboundBridgeHandler txOutboundBridgeHandler = new JaxWSTxOutboundBridgeHandler();
    EnabledWSTXHandler wstxHandler = new EnabledWSTXHandler();
    handlerChain.add(txOutboundBridgeHandler);
    handlerChain.add(wstxHandler);
    ((BindingProvider) client).getBinding().setHandlerChain(handlerChain);
    return client;
}
Also used : QName(javax.xml.namespace.QName) ArrayList(java.util.ArrayList) Service(javax.xml.ws.Service) Handler(javax.xml.ws.handler.Handler) EnabledWSTXHandler(com.arjuna.mw.wst11.client.EnabledWSTXHandler) JaxWSTxOutboundBridgeHandler(org.jboss.jbossts.txbridge.outbound.JaxWSTxOutboundBridgeHandler) JaxWSTxOutboundBridgeHandler(org.jboss.jbossts.txbridge.outbound.JaxWSTxOutboundBridgeHandler) EnabledWSTXHandler(com.arjuna.mw.wst11.client.EnabledWSTXHandler) URL(java.net.URL)

Aggregations

EnabledWSTXHandler (com.arjuna.mw.wst11.client.EnabledWSTXHandler)2 URL (java.net.URL)2 ArrayList (java.util.ArrayList)2 QName (javax.xml.namespace.QName)2 Service (javax.xml.ws.Service)2 Handler (javax.xml.ws.handler.Handler)2 JaxWSTxOutboundBridgeHandler (org.jboss.jbossts.txbridge.outbound.JaxWSTxOutboundBridgeHandler)2