You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by ramprasad Gottiapati <ra...@rediffmail.com> on 2002/08/06 00:10:42 UTC

Regarding SOAP 2.3 problem

Hi,

Iam just trying to run an sample example using SOAP 2.3 on Tomcat 
4.0 on windows XP.

I could deploy the service using SOAP Admin Console,Even i could 
see the Deployed service,But when iam trying to invoke the service 
using a standalone client..
iam getting an error..

-------------------------------------------------------------

Client Code....

  URL url =new 
URL("http://localhost:8080/soap/servlet/rpcrouter");

   Call call = new Call();
   call.setTargetObjectURI("urn:CallCounterService");
   call.setMethodName("getCount");
       try {
          Response resp = call.invoke(url, "");
          Parameter ret = resp.getReturnValue();
          Object value = ret.getValue();
          System.out.println("Result is " + value);
       }
       catch (SOAPException e) {
          System.err.println("Caught SOAPException (" +
                          e.getFaultCode() + "): " +
                          e.getMessage());
       }
---------------------------------------------------------------------

Exception in thread "main" java.lang.NullPointerException
         at 
org.apache.soap.transport.TransportMessage.read(TransportMessage.java:206)
         at 
org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:382)
         at 
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:309)
         at org.apache.soap.rpc.Call.invoke(Call.java:248)
         at 
javasoap.book.ch4.GetCountApp.main(GetCountApp.java:16)

I could run the "http://localhost:8080/soap/servlet/rpcrouter" 
succussfully....
"SOAP RPC Router
Sorry, I don't speak via HTTP GET- you have to use HTTP POST to 
talk to me."

I have Deployed Soap.war file under %Tomcat_Home%/webapp.

Any help is highly appreciated

Thanks in advance
Ram




Re: Regarding SOAP 2.3 problem

Posted by Scott Nichol <sn...@scottnichol.com>.
Ram,

A useful tool to use at this point is TcpTunnelGui, which operates as a
simple circuit-level proxy to capture the data being sent over the wire.
Run

    java org.apache.soap.util.net.TcpTunnelGui 81 localhost 8080

which start the app listening on port 81 and forwards everything to
localhost:8080.  Change your client to

  URL url = new URL("http://localhost:81/soap/servlet/rpcrouter");

When you build and run the client, TcpTunnelGui will display the data sent
and received.  If these captures do not help you solve the problem directly,
post them to this list for others to provide their experience.

Scott Nichol

----- Original Message -----
From: "ramprasad Gottiapati" <ra...@rediffmail.com>
To: <so...@xml.apache.org>
Cc: <so...@xml.apache.org>
Sent: Monday, August 05, 2002 6:10 PM
Subject: Regarding SOAP 2.3 problem


Hi,

Iam just trying to run an sample example using SOAP 2.3 on Tomcat
4.0 on windows XP.

I could deploy the service using SOAP Admin Console,Even i could
see the Deployed service,But when iam trying to invoke the service
using a standalone client..
iam getting an error..

-------------------------------------------------------------

Client Code....

  URL url =new
URL("http://localhost:8080/soap/servlet/rpcrouter");

   Call call = new Call();
   call.setTargetObjectURI("urn:CallCounterService");
   call.setMethodName("getCount");
       try {
          Response resp = call.invoke(url, "");
          Parameter ret = resp.getReturnValue();
          Object value = ret.getValue();
          System.out.println("Result is " + value);
       }
       catch (SOAPException e) {
          System.err.println("Caught SOAPException (" +
                          e.getFaultCode() + "): " +
                          e.getMessage());
       }
---------------------------------------------------------------------

Exception in thread "main" java.lang.NullPointerException
         at
org.apache.soap.transport.TransportMessage.read(TransportMessage.java:206)
         at
org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:382)
         at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
va:309)
         at org.apache.soap.rpc.Call.invoke(Call.java:248)
         at
javasoap.book.ch4.GetCountApp.main(GetCountApp.java:16)

I could run the "http://localhost:8080/soap/servlet/rpcrouter"
succussfully....
"SOAP RPC Router
Sorry, I don't speak via HTTP GET- you have to use HTTP POST to
talk to me."

I have Deployed Soap.war file under %Tomcat_Home%/webapp.

Any help is highly appreciated

Thanks in advance
Ram




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




Re: Regarding SOAP 2.3 problem

Posted by Scott Nichol <sn...@scottnichol.com>.
Ram,

A useful tool to use at this point is TcpTunnelGui, which operates as a
simple circuit-level proxy to capture the data being sent over the wire.
Run

    java org.apache.soap.util.net.TcpTunnelGui 81 localhost 8080

which start the app listening on port 81 and forwards everything to
localhost:8080.  Change your client to

  URL url = new URL("http://localhost:81/soap/servlet/rpcrouter");

When you build and run the client, TcpTunnelGui will display the data sent
and received.  If these captures do not help you solve the problem directly,
post them to this list for others to provide their experience.

Scott Nichol

----- Original Message -----
From: "ramprasad Gottiapati" <ra...@rediffmail.com>
To: <so...@xml.apache.org>
Cc: <so...@xml.apache.org>
Sent: Monday, August 05, 2002 6:10 PM
Subject: Regarding SOAP 2.3 problem


Hi,

Iam just trying to run an sample example using SOAP 2.3 on Tomcat
4.0 on windows XP.

I could deploy the service using SOAP Admin Console,Even i could
see the Deployed service,But when iam trying to invoke the service
using a standalone client..
iam getting an error..

-------------------------------------------------------------

Client Code....

  URL url =new
URL("http://localhost:8080/soap/servlet/rpcrouter");

   Call call = new Call();
   call.setTargetObjectURI("urn:CallCounterService");
   call.setMethodName("getCount");
       try {
          Response resp = call.invoke(url, "");
          Parameter ret = resp.getReturnValue();
          Object value = ret.getValue();
          System.out.println("Result is " + value);
       }
       catch (SOAPException e) {
          System.err.println("Caught SOAPException (" +
                          e.getFaultCode() + "): " +
                          e.getMessage());
       }
---------------------------------------------------------------------

Exception in thread "main" java.lang.NullPointerException
         at
org.apache.soap.transport.TransportMessage.read(TransportMessage.java:206)
         at
org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:382)
         at
org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.ja
va:309)
         at org.apache.soap.rpc.Call.invoke(Call.java:248)
         at
javasoap.book.ch4.GetCountApp.main(GetCountApp.java:16)

I could run the "http://localhost:8080/soap/servlet/rpcrouter"
succussfully....
"SOAP RPC Router
Sorry, I don't speak via HTTP GET- you have to use HTTP POST to
talk to me."

I have Deployed Soap.war file under %Tomcat_Home%/webapp.

Any help is highly appreciated

Thanks in advance
Ram




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>




--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>