I am new to Axis. I am using Axis 1 (not Axis2). I am trying to make a simple app work. I created a web project called Axis1 which has two modles namely
Axis1 (which only has META-INF\application.xml) and
Axis1Web. Axis1Web has the source code.
Axis1Web project's WEB-INF\lib contains all the jar files from lib directory of Axis 1 (version 1.4). That is why wsdl2Java generated classes comiple successfully.
Axis1Web\WebContent\WEB-INF\web.xml
Interface in server package:
Implementation in server package:
I copied Calculator.class to C:\Axis. Then I ran the following to generate Java2WSDL.
Generated C:\Axis\claculator.wsdl is:
Next, I ran WSDL2Java
This generated 4 classes in C:\Axis. I copy these 4 classes to org.ncc.client package, changed package name inside the classes, compiled these 4 classes. Classes in client package after successful compiling are shown below:
I create a EAR file out of Axis1 application and successfully deploy it in App Server (WebSphere 6.1
test server that comes bundled with RAD 7.5). The Axis1 application also successfully get started. The console shows that the application (Axis1) and the web module (Axis1Web) is successfully started. I can also view the index.html (placed under Axis1Web\WebContentent\index.html)successfully as:
http://localhost:9081/Axis1Web/index.html
My client code, that I wrote myself to invoke the web service is:
When I run CalcClient on the server (WebSphere test server 6.1, that comes bundled with RAD 7.5) that is already running. When I run the code, I get error as:
When I debug through the code, I get exception thrown from org.ncc.client.Axis1WebSoapBindingStub in line:
The value of _call variable in org.ncc.client.Axis1WebSoapBindingStub (right before attempting to execute the line shown above) is:
Even though the name of the project is Axis, I changed the endpoint to Axis1Web thinking that the source code is in Axis1Web project, not in Axis1. The port number is 9081 (for those who are not familiar with WebSphere) and is correctly specified.
My guess is that I am doing something incorrect while specifying parameters during Java2WSDL, or WSDL2Java.
Or, my client code might be incorrect.
Any help will be appreciated.
Also, I would like it to be running as Axis1 (not Axis2) application. And, I will deploy this application as an EAR file instead of using Axis Admin console.
As such, please foucs your comments with reference to Axis1 and deployment as an EAR file.