Hi,
The following is from
www.xyzws.com. I suggest you go to this website and read JAX-RPC section, you will understand.
Steps of coding and building Dynamic Proxy Client
1. Generate Service Endpoint Interface Class
1) runs wscompile with the -import option
2) reads the wsdl file provided by the Web service and generates the service endpoint interface class
2. Create Client Code
1. Creates a Service object
Service helloService = serviceFactory.createService(helloWsdlUrl,
new QName(nameSpaceUri, serviceName));
1) Service object is a factory for proxies
2) Service object itself is created from ServiceFactory object
3) Parameters of createService()
4) URL of the WSDL file
5) QName object
2. Create a proxy with a type of the service endpoint interface
dynamicproxy.HelloIF myProxy = (dynamicproxy.HelloIF)helloService.getPort(
new QName(nameSpaceUri,portName),
dynamicproxy.HelloIF.class);
1) HelloIF.class is generated by wscompile (at compile time)
2) The port name (HelloIFPort) is specified by the WSDL file
3. Compile Client Code with Service Endpoint Interface class CLASSPATH
4. Package Client to a jar file with SEI class.
[ March 06, 2007: Message edited by: ruijin yang ]