• Post Reply Bookmark Topic Watch Topic
  • New Topic

Null pointer Exception  RSS feed

 
iyven koh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have written my client by using apache soap API and web service methods in .NET. the server return "Null Exception" when i try to call the method by using org.apache.messanging send method. it works fine if i use HTTP GET but not for HTTP Post.Anybody has idea why it is so? i believe the problem lies in the server but i can't figure out where the problem is.
please help!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be more information in the server log files that can pinpoint where the NPE is thrown.
Bill
 
iyven koh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a server log where to trace the soap request and response. when i check the log there's no record. the client receive the null exception before it send out the request. Below is the client code:
--------------------------------------------------------------------------
Document docReq = xdb.parse(new InputSource(new StringReader( param ) ));
Vector content = new Vector();
content.add(docReq.getDocumentElement());
requestBody.setBodyEntries(content);
env.setBody( requestBody );

message.send( getEndPoint(), SOAPActionURI, env );
System.out.println("send soap request"); //line A
soapMsg = message.receive();
-------------------------------------------------------------------------
line A is not printed out and receive the null exception.
env,getEndPoint(),SOAPActionURI is not null.
any advise?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you saying there is no stack trace anywhere?
Edit: Ok. I just realized you posted the exception as a new thread...
[ September 16, 2003: Message edited by: Lasse Koskela ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AHA!
I have a server log where to trace the soap request and response. when i check the log there's no record. the client receive the null exception before it send out the request.

Your first message indicated it was the server sending the exception - tch!
You should debug the client like any Java application - check all the parts that go into the statement that throws the NPE and use System.out.println frequently.
It can help to directly monitor exactly what is sent to the server - I wrote a utility to do this for my SOAP book. You can download it by going to
this page - the download is at the bottom.
Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!