This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebService Invocaton Error using DII

 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Environment : jdk1.5+Apache axis1.4+Tomcat6.0

Hello Frens,


I am able to make Client stub and able to invoke service using stub methods.

But when I am trying to change my code for DII inocation , it throwing me exception like below:

********************************Exception**************************


Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at client.DIIClient.main(DIIClient.java:37)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:37)
at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43)
... 3 more
Caused by: org.apache.commons.logging.LogConfigurationException: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 7 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:374)
... 8 more




I am pasting the code snap here ,

*******************Actual code ,*****************



Service service=new Service();
Call call=(Call)service.createCall();
call.setTargetEndpointAddress(new URL("http://localhost:8080/axis/services/SimpleServiceSOAP"));
call.setOperationStyle(Style.DOCUMENT);
//call.setOperation("Add");
Vector responseElement=(Vector)call.invoke(new SOAPBodyElement[] {new SOAPBodyElement(makeAddRequest())});
SOAPBodyElement result=(SOAPBodyElement)responseElement.get(0);
System.out.println( "Reponse : "+result.getAsDOM().getTextContent());


**************makeAddRequest()*******************

The Sole purpose of this method is to make add Soap request for the call.

*******************************************************



Please some one guide me where i am wrong, as i am trying to learn axis, please guide me i am missing somthing for proper invocation.


Please repond me ,

Thanks .


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic