ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubble, Christopher" <>
Subject RE: SOAP NPE Error
Date Mon, 27 Sep 2004 17:46:54 GMT
Actually, all I'm doing is calling my method.  And it appears not to be a
problem with the SOAP message itself.  I'm converting an existing servlet
over to SOAP, and had appended the info in the web.xml file to the web.xml
file in axis.  When I removed the newly appended info, the NPE went away.
Any suggestions for converting an existing servlet over to WSDL and SOAP?


-----Original Message-----
From: Scott Nichol []
Sent: Monday, September 27, 2004 1:49 PM
Subject: Re: SOAP NPE Error

>From your description, I take it that your service method looks like

void addClientToMCUConnection(int spaceID, String ClientIP, String mcuIP) {}

My guess is that your client is doing something like 

      if (resp.generatedFault()) {
        Fault fault = resp.getFault ();
      } else {
        Parameter ret = resp.getReturnValue();

I believe that for a method returning void, the variable ret above will be
null.  As such, if you try to "do something" with it, i.e. dereference it,
you will get an NPE.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Hubble, Christopher" <>
To: <>
Sent: Monday, September 27, 2004 1:31 PM
Subject: SOAP NPE Error

> I'm using a wsdl to set up my web service.  However, whenever I try and
> any methods from the client, I get a NPE returned.  The method on the
> is the default empty stub.  This is the soap message that I'm sending.  
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:xsd=""
> xmlns:xsi="">
>  <soapenv:Body>
>   <nsl:addClientToMCUConnection
> soapenv:encodingStyle=""
> xmlns:nsl="urn:com.saic.dcts.nci.websvc">
>    <spaceID xsi:type="xsd:int">42</spaceID>
>    <clientIP xsi:type="xsd:string"></clientIP>
>    <mcuIP xsi:type="xsd:string"></mcuIP>
>   </nsl:addClientToMCUConnection>
>  </soapenv:Body>
> </soapenv:Envelope>
> TIA for any help.
> Chris

View raw message