use of javax.xml.ws.soap.AddressingFeature in project narayana by jbosstm.
the class ATInteropClient 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) {
ParticipantService service = getParticipantService();
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;
}
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) {
SoapFaultService service = getSoapFaultService();
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;
}
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 W3CEndpointReference endpoint, final MAP map, final String action) {
SoapFaultService service = getSoapFaultService();
org.jboss.jbossts.xts.soapfault.SoapFaultPortType port = service.getPort(endpoint, org.jboss.jbossts.xts.soapfault.SoapFaultPortType.class, new AddressingFeature(true, true));
BindingProvider bindingProvider = (BindingProvider) port;
Map<String, Object> requestContext = bindingProvider.getRequestContext();
MAP requestMap = AddressingHelper.outboundMap(requestContext);
if (action != null) {
map.setAction(action);
}
AddressingHelper.installCallerProperties(map, requestMap);
String to = requestMap.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);
*/
AddressingHelper.configureRequestContext(requestContext, to, action);
return port;
}
use of javax.xml.ws.soap.AddressingFeature in project narayana by jbosstm.
the class BAInteropClient 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) {
ParticipantService service = getParticipantService();
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 no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
customHandlerChain.add(new WSAddressingClientHandler());
*/
/*
* 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());
bindingProvider.getBinding().setHandlerChain(customHandlerChain);
Map<String, Object> requestContext = bindingProvider.getRequestContext();
map.setAction(action);
AddressingHelper.configureRequestContext(requestContext, map, to, action);
return port;
}
use of javax.xml.ws.soap.AddressingFeature in project cxf by apache.
the class DispatchOpTest method testResolveOperationWithSourceAndWSA.
@Test
public void testResolveOperationWithSourceAndWSA() throws Exception {
ServiceImpl service = new ServiceImpl(getBus(), getClass().getResource(WSDL_RESOURCE), SERVICE_NAME, null, new AddressingFeature());
Dispatch<Source> disp = service.createDispatch(PORT_NAME, Source.class, Service.Mode.PAYLOAD);
disp.getRequestContext().put(MessageContext.WSDL_OPERATION, OP_NAME);
disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ADDRESS);
d.setMessageObserver(new MessageReplayObserver(RESP_RESOURCE));
BindingOperationVerifier bov = new BindingOperationVerifier();
((DispatchImpl<?>) disp).getClient().getOutInterceptors().add(bov);
Document doc = StaxUtils.read(getResourceAsStream(REQ_RESOURCE));
DOMSource source = new DOMSource(doc);
Source res = disp.invoke(source);
assertNotNull(res);
BindingOperationInfo boi = bov.getBindingOperationInfo();
assertNotNull(boi);
assertEquals(OP_NAME, boi.getName());
}
Aggregations