|
Page Edited :
CXF20DOC :
Local Transport
Local Transport has been edited by Dan Diephouse (Jun 18, 2007). Content:OverviewCXF includes a "local" transport. This transport allows you to send messsages more efficiently inside a JVM. The messages will serialized and piped from one endpoint to another. The local transport supports URIs of the structure "local://{endpoint_name}" where {endpoint_name} is any set of characters. To use the local transport you simply need to set your address to a local URI. ExamplesJAX-WSThis code shows how to publish on a local endpoint: import javax.xml.ws.Endpoint;HelloServiceImpl serverImpl = new HelloServiceImpl(); Endpoint.publish("local://hello", serverImpl); Or with XML: <jaxws:endpoint name="helloWorld" address="local://hello" implementor="org.example.HelloServiceImpl"/>
Simple FrontendYou can also pass in a local:// address to the server and client factory beans: import org.apache.cxf.frontend.ServerFactoryBean; ServerFactoryBean sf = new ServerFactoryBean(); sf.setAddress("local://hello"); sf.setServiceBean(new HelloServiceImpl()); sf.setServiceClass(HelloService.class); // Optionally specify the service interface sf.create(); import org.apache.cxf.frontend.ClientProxyFactoryBean; ClientProxyFactoryBean cf = new ClientProxyFactoryBean(); cf.setAddress("local://hello"); cf.setServiceClass(HelloService.class); // Optionally specify the service interface HelloService h = (HelloService) cf.create(); |
Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request
Unsubscribe or edit your notifications preferences
Unsubscribe or edit your notifications preferences
