Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Help on Axis2 Webservice calls

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Angel Loto
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post your client code and complete stack trace ?
 
Angel Loto
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Any idea on the above error? thanks a lot.
 
You don't like waffles? Well, do you like this tiny ad?
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic