WEB_SERVICES_25oct06
843790Oct 25 2006 — edited Nov 22 2006Using SOAP with Tomcat
SOAP-ENV:Server.BadTargetObjectURI
--------------------------------------------------------------------------------
I too have this reoccurring problem � Have any of the individuals who have experienced this problem found a solution yet?
I have carefully followed through O'Reilly's �Hello SOAP!� example step by step.
I deploy the Client Code without any problems as my service shows up on the list of deployed services:
Typing �java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter list� into the command-line yields:
Deployed Services:
urn:examples:helloservice
However, when I try to test the client I get the following error:
Hello SOAP Client
Fault Occurred (details follow):
Fault Code: SOAP-ENV:Server.BadTargetObjectURI
Fault String: Unable to resolve target object:
Fault Occurred. No greeting for you!
After this I modify the client code to use port 8070 so that I may use the TCPTunnelGui tool to view my actual SOAP conversation.
To invoke this TCPTunnelGui Tool I type the following into the command line:
�java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080�
I then try to test my client again and get the following SOAP messages within the TCPTunnelGui tool
From localhost:8070 :
POST /soap/servlet/rpcrouter HTTP/1.0
Host: 127.0.0.1:8070
Content-Type: text/xml; charset=utf-8
Content-Length: 464
SOAPAction: ""
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:sayHello xmlns:ns1="urn:examples:HelloService" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<firstName xsi:type="xsd:string">maj</firstName>
</ns1:sayHello>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
& From localhost:8080 :
HTTP/1.0 500 Internal Server Error
Content-Type: text/xml; charset=utf-8
Content-Length: 486
Set-Cookie: JSESSIONID=trk0yz6te1;Path=/soap
Date: Thu, 01 Aug 2002 17:23:16 GMT
Server: Tomcat Web Server/3.3.1 Final ( JSP 1.1; Servlet 2.2 )
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Server.BadTargetObjectURI</faultcode>
<faultstring>Unable to resolve target object: </faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>