aspose file tools*
The moose likes Web Services and the fly likes NullPointerException and createFault() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "NullPointerException and createFault() " Watch "NullPointerException and createFault() " New topic
Author

NullPointerException and createFault()

Dhananjay Inamdar
Ranch Hand

Joined: Jan 27, 2003
Posts: 130
Hello All,

I am using Axis 1.4 webService in my application, which is in production on JDK 1.4. Everything was working fine till today. Today I have added one method, which is taking String as input parameter and when I am invoking that method from client, I am getting following error



I have already verified that while calling this method, my String input parameter is not null.

Initially client was sending user�s ID to the webService. At that time I have added following method in webservice and it was working fine



Now due to some of the business requirement change, client is sending me user�s email address, so I have added following method in webservice and this is not working



The control even goes to the first line of this method; it is failing immediately on invocation. I have verified all generated stubs and other source files and every where this method has proper signature and everything.

If you have any idea, how to solve this error then please do let me know.

Thanks in advance!


Just like you, struggeling to get the right solutions!<br /> <br />Sun Certified Java Programmer 1.5<br /> <br />Target - SCWCD
Dhananjay Inamdar
Ranch Hand

Joined: Jan 27, 2003
Posts: 130
Hello All,

While posting my question, I made a samll mistake. In the last paragraph of question I have mentioned that

The control even goes to the first line of this method; it is failing immediately on invocation.

Please not that control is not goes to the method, so read it as follows

The control even DOESN'T goes to the first line of this method; it is failing immediately on invocation.

Thanks
Dhananjay Inamdar
Ranch Hand

Joined: Jan 27, 2003
Posts: 130
Hello All,

If you have any solution to my problem, then please do let me know.
This is urgent!

Thanks in advance!
vikram karne
Ranch Hand

Joined: Jun 05, 2007
Posts: 34
Hi Dhananjay

Looking at what you are facing your call is not going to your delegate class itself from which your Webservice must be called. what it means it that there is a problem with the client side implementation or the parameter you are passing is wrong or the SOAP request is not happening properly.

See your implementation in the Facade whether you are doing any operation before the method call. It may be that your code is falling or validation is going wrong before the call itself. Use of a primitive datatype like Sring should not cause any problems since all versions of Axis support it.

Regards
Vikram K
Dhananjay Inamdar
Ranch Hand

Joined: Jan 27, 2003
Posts: 130
Hello All,

The problem got solved, but with wiered solution.

After trying many options, then I just commented all the implementation of webService and returned hardcode 'true' from the delegate itself. After building an application, application called the method properly till delegate.

Then I have un-commented implementation and again build the source code. This time everything worked fine.

I know this is not a solution and it will not work for anyother. But I am posting it as my experience.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NullPointerException and createFault()