Reputation: 1749
How to import an Apache Axis2 sample project into eclipse ? I tried to import the project named pojo, but no success.. What folder to import??? It seems that normal importing method doesn't work here.
Upvotes: 1
Views: 940
Reputation: 2230
Create a new dynamic web project in Eclipse (You need to have Eclipse J2EE version)
Copy the sample pojo source code from the AXIS2_HOME\sample directory to the dynamic web project source code directory
Create a new Webservice from Eclipse
Select Bottom Up and Select the AddressBookService in the package sample.addressbook.service
Make sure you select Axis, and the Project name. Also check the Client options as below,
Click Finish
Move the client code to the client project PojoClient (AddressBookADBClient in package sample.addressbook.adbclient
Refactor the package name and methods to fit the stub automatically generated
I have made 3 changes Modified the package name to match the stubs
1) //import sample.addressbook.stub.AddressBookServiceStub;
import sample.addressbook.service.AddressBookServiceStub;
Modified the method name to match the stubs
2)//addEntry.setArgs0(entry);
addEntry.setEntry(entry);
Modified the method name to match the stubs
3) //findEntry.setArgs0("Abby Cadabby");
findEntry.setName("Abby Cadabby");
One final change in the service, since i was not able to get the test it.
I made the entries variable to static
private static HashMap entries = new HashMap();
All Set response from SOAP UI
Response from Client Java Code
Upvotes: 1