ibm.com/developerWorks
Presented by developerWorks, your source for great tutorials
The
axis wsdl2java
Ant Task creates Java classes from WSDL files. Notice that
the
wsdl2java
target uses the
axis wsdl2java
task to generate source code in the
gen.client
directory based on the WSDL file found at
http://localhost:8080/axisejb/services/RemoteHelloService?wsdl
. Since you also
specified
testcase="true"
, not only will the
axis wsdl2java
task create the stub
code, it will create a JUnit test case client.
Here is what
axis wsdl2java
task creates in this example.
C:\tutorials\axisEJB\axisEJBHello\gen.client>tree /a /f
C:.
\   localhost
\   axisejb
\   services
|
\   RemoteHelloService
Hello.java
RemoteHelloServiceSoapBindingStub.java
HelloService.java
HelloServiceLocator.java
HelloServiceTestCase.java
The Hello.java should look like the following:
/**
* Hello.java
*
* This file was auto generated from WSDL
* by the Apache Axis WSDL2Java emitter.
*/
package localhost.axisejb.services.RemoteHelloService;
import java.rmi.*;
public interface Hello extends Remote {
public String[] getGreetings() throws RemoteException;
}
The Hello interface follows the convention of JAX RPC. Thus you will implement a
JAX RPC style client later. The
wsdl2java
also generates another interface called
HelloService
. (The code was modified to fit nicely on the screen.) This
HelloService
interface will be used for locating your Web service as follows:
/**
* HelloService.java
*
* This file was auto generated from WSDL
Page 18 of 33
Service enable EJB SessionBeans with the IBM ETTK






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

servlet web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved