So, you forgot to check for a fault, did you? ;-)
> // Invoke the call and handle the response.
> Response resp = call.invoke(url, "");
> if (resp.generatedFault()) {
> Fault fault = resp.getFault();
> System.err.println("Generated fault: " + fault);
Yes, the fault means the server does not have the service registered. Do you think
you registered it? Registration can be done with the GUI admin tool, or at the
command line using a deployment descriptor.
Command line deployment looks like this:
a.. java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter deploy DeploymentDescriptor.xml
a..
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: "Liam DeMasi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 05, 2003 4:46 PM
Subject: RE: SOAP getValue() returns NULL
> I have just run the TcpTunnelGui properly and see on the receiving side the
> fault cod and fault string. They are:
> <faultcode>SOAP-ENV:Server.BadTargtObjectURI</faultcode>
> <faultstring>unable to resolve target object: xxx.ClientApp</faultstring>
>
> So does this mean that its not finding the service?
>
>
>
> -----Original Message-----
> From: Scott Nichol [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 05, 2003 4:00 PM
> To: [EMAIL PROTECTED]
> Subject: Re: SOAP getValue() returns NULL
>
>
> TcpTunnelGui is a relay. You change the host:port part of the URL in your
> client to point to it. So, if you start it like
>
> java xxx.TcpTunnelGui 81 localhost 8080
>
> you should change the URL in your client to point to localhost:81 instead of
> locahost:8080.
>
> 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: "Liam DeMasi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 05, 2003 3:42 PM
> Subject: RE: SOAP getValue() returns NULL
>
>
> > I just ran the TcpTunnelGui and nothing appeared on either side, which I
> > guess means that my stuff is not communicating? am I right in thinking
> that?
> >
> > -----Original Message-----
> > From: Scott Nichol [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, August 05, 2003 2:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: SOAP getValue() returns NULL
> >
> >
> > Handling the return from a call is typically done like:
> >
> >
> > // Invoke the call and handle the response.
> > Response resp = call.invoke(url, "");
> > if (resp.generatedFault()) {
> > Fault fault = resp.getFault();
> > System.err.println("Generated fault: " + fault);
> > } else {
> > Parameter result = resp.getReturnValue();
> > Hashtable hash = (Hashtable) result.getValue();
> > System.out.println("keys: " + hash.get("keys"));
> > System.out.println("values: " + hash.get("values"));
> > }
> > Does your NPE occur on the line where you do result.getValue(), or does it
> > occur when you reference the return value, e.g. the hash.get() call in the
> > above code?After reading the code, your next step in debugging is
> typically
> > to run TcpTunnelGui provided with Apache SOAP to capture the messages
> > between the endpoints. I don't recall what the docs look like for
> > TcpTunnelGui, but http://www.scottnichol.com/basicapachesoapcoding.htm
> gives
> > a very basic example of using it.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: "Liam DeMasi" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 05, 2003 1:56 PM
> > Subject: SOAP getValue() returns NULL
> >
> >
> > > I am having a problem with a simple service and client that I have
> > created.
> > > The server and client are both on the same Linux machine.
> > >
> > > The service keeps track of the number of method calls it receives from
> the
> > > client and returns that value. Or at least it should. The problem I am
> > > having is that when I run the client, I get that the Parameter class
> > > getValue() is returning null from the service. The exact error message
> > that
> > > I receive is "Exception in thread 'main' java.lang.NullPointerException
> at
> > > mypackage.io.Program_Name"
> > >
> > > Can you give me any tips on what this problem might be? This is my first
> > > attempt at SOAP.
> > >
> > > thank you.
> > >
> > > Liam A. DeMasi
> > > Atlantic Consulting Services, Inc.
> > > 167 Ave at the Commons, Suite 4
> > > Shrewsbury, NJ 07702
> > > (732) 460-9416 x15
> > > (732) 460-9419 (FAX)
> > > [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> >
>
>