This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes WebService Invocaton Error using DII Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "WebService Invocaton Error using DII" Watch "WebService Invocaton Error using DII" New topic
Author

WebService Invocaton Error using DII

ashirvad jain
Ranch Hand

Joined: Nov 09, 2006
Posts: 50
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 .


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: WebService Invocaton Error using DII
 
Similar Threads
java.lang.ExceptionInInitializerError While Connecting to Web Service on Sun Server
Unable to start Tomcat from Eclipse
Initial SessionFactory creation failed.java.lang.ExceptionInInitializerError
log4j missing class
JBoss Seam and JasperReports HELP