You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Adrian C <ad...@gmail.com> on 2007/10/30 18:50:12 UTC
local transport & ws-addressing
I don't seem to be able to set ws-addressing for my local transport. Is there
something that I am am doing wrong?
Bus bus = BusFactory.getDefaultBus();
LocalTransportFactory localTransport = new LocalTransportFactory();
DestinationFactoryManager dfm =
bus.getExtension(DestinationFactoryManager.class);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http",
localTransport);
dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http",
localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat",
localTransport);
dfm.registerDestinationFactory("http://cxf.apache.org/transports/local",
localTransport);
ConduitInitiatorManager extension =
bus.getExtension(ConduitInitiatorManager.class);
extension.registerConduitInitiator("http://cxf.apache.org/transports/local",
localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http",
localTransport);
extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http",
localTransport);
extension.registerConduitInitiator("http://cxf.apache.org/bindings/xformat",
localTransport);
ApplicationContext ctx =
WebApplicationContextUtils.getWebApplicationContext(getServletContext());
ObjectManagementV1Impl impl =
(ObjectManagementV1Impl)ctx.getBean("ObjectManagementV1Impl");
ServerFactoryBean sf = new ServerFactoryBean();
sf.setAddress("local://ObjectManagementV1");
sf.getFeatures().add(new WSAddressingFeature());
sf.setServiceBean(impl);
sf.getInInterceptors().add((AbstractSoapInterceptor)ctx.getBean("auditingin.interceptor"));
sf.getInInterceptors().add((AbstractSoapInterceptor)ctx.getBean("pa.interceptor"));
sf.getInInterceptors().add((AbstractSoapInterceptor)ctx.getBean("api.interceptor"));
sf.setServiceClass(ObjectManagementV1.class); // Optionally specify
the service interface
sf.create();
ClientProxyFactoryBean cf = new ClientProxyFactoryBean();
cf.setAddress("local://ObjectManagementV1");
cf.getOutFaultInterceptors().add(new SoapActionOutInterceptor());
cf.setServiceClass(ObjectManagementV1.class); // Optionally specify
the service interface
cf.getFeatures().add(new WSAddressingFeature());
objectManagement = (ObjectManagementV1) cf.create();
--
View this message in context: http://www.nabble.com/local-transport---ws-addressing-tf4719686.html#a13492388
Sent from the cxf-user mailing list archive at Nabble.com.