WSAddressingFeature wsAddressingFeature = new WSAddressingFeature(); wsAddressingFeature.initialize(client, client.getBus());
public Endpoint createEndpoint() throws BusException, EndpointException { Endpoint ep = super.createEndpoint(); new WSAddressingFeature().initialize(ep, getBus()); return ep; } }
public Endpoint createEndpoint() throws BusException, EndpointException { Endpoint ep = super.createEndpoint(); new WSAddressingFeature().initialize(ep, getBus()); return ep; } }
/** * {@inheritDoc} * * @see org.jboss.wise.core.wsextensions.EnablerDelegate#visitWSAddressing(Object) */ public void visitWSAddressing(Object endpointInstance) throws UnsupportedOperationException { Bus bus = BusFactory.getThreadDefaultBus(); Client client = ClientProxy.getClient(endpointInstance); WSAddressingFeature feature = new WSAddressingFeature(); feature.initialize(client, bus); }
/** * {@inheritDoc} */ @Override protected void initializeProvider(InterceptorProvider provider, Bus bus) { if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "Resolving bus extensions for Request-Callback feature"); } WSAddressingFeature addressing = new WSAddressingFeature(); addressing.setAddressingRequired(true); addressing.initialize(provider, bus); if (LOG.isLoggable(Level.FINE)) { LOG.log(Level.FINE, "Initializing interceptors for Request-Callback feature"); } final RequestCallbackInInterceptor inInterceptor = new RequestCallbackInInterceptor(); final CallbackActionInterceptor cbInterceptor = new CallbackActionInterceptor(); final RequestCallbackOutInterceptor outInterceptor = new RequestCallbackOutInterceptor(); provider.getInInterceptors().add(inInterceptor); provider.getInInterceptors().add(cbInterceptor); provider.getOutInterceptors().add(outInterceptor); } }
add.initialize(p, bus);
wsa.initialize(client, bus); Map<String, Object> context = client.getRequestContext(); context.put(MAPAggregator.ADDRESSING_NAMESPACE, protocol.getWSANamespace());
@Test public void testEchoProviderAsyncDecoupledEndpoints() throws Exception { String requestString = "<echo/>"; Service service = Service.create(serviceName); service.addPort(fakePortName, javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING, "http://localhost:" + PORT + "/SoapContext/AsyncEchoProvider"); Dispatch<StreamSource> dispatcher = service.createDispatch(fakePortName, StreamSource.class, Service.Mode.PAYLOAD, new LoggingFeature()); Client client = ((DispatchImpl<StreamSource>)dispatcher).getClient(); WSAddressingFeature wsAddressingFeature = new WSAddressingFeature(); wsAddressingFeature.initialize(client, client.getBus()); dispatcher.getRequestContext().put("org.apache.cxf.ws.addressing.replyto", "http://localhost:" + CLIENT_PORT + "/SoapContext/AsyncEchoClient"); StreamSource request = new StreamSource(new ByteArrayInputStream(requestString.getBytes())); StreamSource response = dispatcher.invoke(request); assertEquals(requestString, StaxUtils.toString(response)); } }