aspose file tools*
The moose likes Web Services and the fly likes Help on Axis2 Webservice calls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Help on Axis2 Webservice calls" Watch "Help on Axis2 Webservice calls" New topic
Author

Help on Axis2 Webservice calls

Angel Loto
Greenhorn

Joined: Aug 11, 2009
Posts: 5
Hi,
I am new to Axis2. I created a webservice and deployed it to Resin 3.1.9. However, when I tried to access it using the client code that i wrote, i got the following error:
INFO: Deploying module: addressing-1.5 - file:/C:/com/sample/lib/axis2/axis2-
1.5.jar
org.apache.axis2.AxisFault: java.lang.ExceptionInInitializerError
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.j
ava:517)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
OutInAxisOperation.java:371)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO
peration.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
165)
at com.sample.SampleStub.login(SampleStub.java:4545)
at com.sample.login(testAxis2.java:56)
at com.sample.test(testAxis2.java:28)
at com.sample.testAxis2.main(testAxis2.java:23)

What could be causing this error?
Thanks in advance for your valuable help.


Pink Angel
Angel Loto
Greenhorn

Joined: Aug 11, 2009
Posts: 5
Hi,
Anyone knows how to resolve the above error? This is quite urgent. I don't have much resources about axis2 or web service that's why I am just completely relying on forums like these. Need help very badly.
shivendra tripathi
Ranch Hand

Joined: Aug 26, 2008
Posts: 263
Can you post your client code and complete stack trace ?


SCJP 1.5(97%) My Blog
Angel Loto
Greenhorn

Joined: Aug 11, 2009
Posts: 5
Hi,
Here is my client code:
public static void main(String[] args1){
testAxis2 tc = new testAxis2();
EndpointReference targetEPR = new EndpointReference("localhost:90/axis2/services/…);
tc.test();
}

public com.sample.Axis2Authentication login(String uname, String pwd) throws java.rmi.RemoteException { com.sample.SampleStub stub = new com.sample.SampleStub("localhost:90/axis2/services/…);
com.sample.LoginReqDoc loginDoc = com.sample.LoginReqDoc.Factory.newInstance();
com.sample.LoginReq loginReq = com.sample.LoginReq.Factory.newInstance(); loginReq.setUname(uname); loginReq.setPwd(pwd); loginDoc.setLoginReq(loginReq); com.sample.AuthDoc authDoc = stub.login(loginDoc); auth.setSessionId(authDoc.getAuth().getSessionId());
return auth;
}

Here is the complete stacktrace:
Aug 12, 2009 3:29:55 PM org.apache.axis2.deployment.ModuleDeployer deploy
INFO: Deploying module: addressing-1.5 - file:/C:/sample/lib/axis2/axis2-
1.5.jar
org.apache.axis2.AxisFault: java.lang.ExceptionInInitializerError
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.j
ava:517)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
OutInAxisOperation.java:371)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisO
peration.java:417)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(Out
InAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:
165)
at com.sample.SampleStub.login(SampleStub.java:4545)
at com.sample.testAxis2.login(testAxis2.java:48)
at com.sample.testAxis2.test(testAxis2.java:28)
at com.sample.testAxis2.main(testAxis2.java:23)

Angel Loto
Greenhorn

Joined: Aug 11, 2009
Posts: 5
Another thing, I tried deploying one of the axis2 sample service called StockQuoteService to test as well. I am using RESIN 3.1.9. I dropped StockQuoteService.aar at C:\resin\webapps\axis2\WEB-INF\services, started RESIN on a stand alone server (using httpd.exe) .Everything works fine. I was able to access the StockQuoteService's method using this url: http://localhost:8080/axis2/services/StockQuoteService/getPrice?symbol=IBM and got a result in my browser. However, when I started RESIN through our application (start.bat) which uses port 90 instead of port 8080, i got an INTERNAL SERVER ERROR when i tried accessing StockQuoteService's method using this URL: http://localhost:90/axis2/services/StockQuoteService/getPrice?symbol=IBM. Is there any configuration change needed if I would acces Axis2 from our port instead from port 8080?
Angel Loto
Greenhorn

Joined: Aug 11, 2009
Posts: 5
Hi,
Any idea on the above error? thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help on Axis2 Webservice calls
 
Similar Threads
AxisFault
The addressing-1.41.mar module, which is not valid, caused org.apache.axis2.handlers.addressing.Addr
low disk space problem caused by AXIS2 temp files
Axis2-1.5 - Issue
ConnectionException and few Doubts