ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubble, Christopher" <CHRISTOPHER.L.HUB...@saic.com>
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?

Chris

-----Original Message-----
From: Scott Nichol [mailto:snicholnews@scottnichol.com]
Sent: Monday, September 27, 2004 1:49 PM
To: soap-user@ws.apache.org
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" <CHRISTOPHER.L.HUBBLE@saic.com>
To: <soap-user@ws.apache.org>
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
run
> any methods from the client, I get a NPE returned.  The method on the
server
> is the default empty stub.  This is the soap message that I'm sending.  
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>  <soapenv:Body>
>   <nsl:addClientToMCUConnection
> soapenv:encodingStyle="http://schemas.xml.soap.org/soap/encoding/"
> xmlns:nsl="urn:com.saic.dcts.nci.websvc">
>    <spaceID xsi:type="xsd:int">42</spaceID>
>    <clientIP xsi:type="xsd:string">10.0.0.1</clientIP>
>    <mcuIP xsi:type="xsd:string">10.0.0.2</mcuIP>
>   </nsl:addClientToMCUConnection>
>  </soapenv:Body>
> </soapenv:Envelope>
> 
> TIA for any help.
> 
> Chris
> 
> 

Mime
View raw message