BTW, what is the purpose of the simple frontend server? Is it ever
intended to see production use, or is it primarily for newbies who are
not necessarily servlet-container knowledgeable? I wonder if we could
get rid of it and have people start using servlet containers/Java app
servers from day one instead.
Thanks,
Glen
Am Donnerstag, den 26.07.2007, 04:15 -0400 schrieb Daniel Kulp:
> > > ----------
> > > 1. Generate jaxws frontend client server code and wsdl from Jaxws
> > > conformed classes
> > > 2. Generate simple frontend client server code and wsdl from Pojo
> > > class . Tool can generate and compile interface class or impl class
> > > the server and client side needed
> > > from the user provided classes.
> > >
> > > Server code :
> > > =========
> > > public class Server {
> > > protected Server() throws
> > > Exception { System.out.println("Starting Server");
> > > Object implementor = new
> > > GreeterImpl();
> > > String address =
> > > "http://localhost:9000/SoapContext/SoapPort";
> > >
> > > Endpoint.publish(address, implementor);
> > > }
> > >
> > > public static void main(String
> > > args[]) throws Exception {
> > > new Server();
> > > System.out.println("Server
> > > ready..."); Thread.sleep(5 * 60 * 1000); System.out.println("Server
> > > exiting"); System.exit(0);
> > > }
> > > }
> > >
> > > Client code :
> > > ========
> > > ...
> > > SOAPService ss = new
> > > SOAPService(wsdlURL, SERVICE_NAME);
> > > Greeter port = ss.getSoapPort();
> > > port.sayHi();
> > > ...............
> > >
> > > 2. simple frontend :
> > > Server code
> > > =========
> > > ServerFactoryBean svrBean = new
> > > ServerFactoryBean();
> > >
> > > svrBean.setBus(CXFBusFactory.getDefaultBus());
> > >
> > > svrBean.setAddress("http://localhost:8080/Hello");
> > >
> > > svrBean.setTransportId("http://schemas.xmlsoap.org/wsdl/http/");
> > >
> > > svrBean.setBindingId("http://schemas.xmlsoap.org/soap/");
> > > svrBean.setServiceBean(new
> > > GreeterImpl());
> > >
> > > svrBean.getServiceFactory().setDataBinding(new AegisDatabinding());
> > > svrBean.setStart(true);
> > > svrBean.create();
> > > System.out.println("Server started");
> > >