...
Code Block |
---|
|
<jaxws:endpoint name="helloWorld" address="local://hello" implementor="org.example.HelloServiceImpl"/>
|
Simple Frontend
You can also pass in a local:// address to the server and client factory beans:
Code Block |
---|
|
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();
|
Code Block |
---|
|
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();
|