Women in Technology

Hear us Roar



Article:
  Using SOAP with Tomcat
Subject:   SOAP
Date:   2002-03-07 12:31:39
From:   moranc
Arghhh! I did everything correctly! Everything worked until I tried to test the client. Then I got this:


The call failed:
Fault Code = SOAP-ENV:Server.BadTargetObjectURI
Fault String = Unable to resolve target object: onjava.CalcService


WHAT'S WRONG???? HELP!!

Full Threads Oldest First

Showing messages 1 through 14 of 14.

  • SOAP
    2004-03-22 20:22:22  hector_durante [View]

    I fix it when i put the server program CalcService.class into the directory TOMCAT_HOME\shared\classes\onjava instead of TOMCAT_HOME\webapps\soap\WEB-INF\classes\onjava\
    and execute java CalcClient 90 98 into the directory TOMCAT_HOME\webapps\soap\WEB-INF\classes\
    note.- the CalcClient.class must be in TOMCAT_HOME\webapps\soap\WEB-INF\classes\onjava\
  • Putting the service, where ? and OS X
    2003-06-24 13:25:24  anonymous2 [View]


    Have the same problem :

    SOAP-ENV:Server.BadTargetObjectURI

    But i don´t like the idea of putting my services inside the soap.war package.

    InRedHat i just put the service on the general classpath of the machine, and it gets called.

    Question: Where is the PROPER place to put the code so tomcat can "see" it ??

    And: Classpaths are samewhat strange in OS X, theres a Extensions link where we should put the programs similar to the JAVA_HOME/jre/lib/ext concept. But i don´t know if Tomcat can see those classes in OS X ...

    Anybody has any clue on this particular one ??

    greetings everybody, from the other side of the world .. !
  • SOAP
    2002-09-10 09:22:29  anonymous2 [View]

    You have to place your classes in sub directories, under Tomcat/classes, relating to their packages.
    • SOAP
      2003-11-14 10:23:38  anonymous2 [View]

      That solved my problem. Many thanks :-)
  • SOAP
    2002-08-22 09:03:52  lelo [View]

    Hy,

    I do step by step and have the same problem, how can i resolve
    thank you

    "The call failed:
    Fault Code = SOAP-ENV:Server.BadTargetObjectURI
    Fault String = Unable to resolve target object: onjava.CalcService"
    • SOAP
      2004-03-22 20:24:56  hector_durante [View]

      I fix it when i put the server program CalcService.class into the directory TOMCAT_HOME\shared\classes\onjava instead of TOMCAT_HOME\webapps\soap\WEB-INF\classes\onjava\
      and execute java CalcClient 90 98 into the directory TOMCAT_HOME\webapps\soap\WEB-INF\classes\
      note.- the CalcClient.class must be in TOMCAT_HOME\webapps\soap\WEB-INF\classes\onjava\
  • SOAP-ENV:Server.BadTargetObjectURI
    2002-08-01 11:06:25  majidbakhsh [View]




    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>


    Any insights into this problem would be greatly appreciated!

    Maj

    • SOAP-ENV:Server.BadTargetObjectURI
      2003-03-30 01:37:25  anonymous2 [View]

      you might not have compiled the source code...and placed a class file of it in the classes directory...try it
      • SOAP-ENV:Server.BadTargetObjectURI
        2008-04-14 02:52:29  Masannat [View]

        an unexpected problem has occurred (there was no SOAP-ENV:body in the xml payload sent by the server,,,,

        this message shows when I send any email,,,
        Please help,,,

        Best regards
  • SOAP
    2002-06-14 13:51:36  thebpc [View]

    I have the same problem here.
    couls you please run the:
    java org.apache.soap.server.ServiceManagerClient
    http://localhost:8080/apache-soap/servlet/rpcrouter query urn:onserver

    and let me know what you get, I see this as a general instalation problem and I want to check on this.
    Thanks Boris
  • SOAP
    2002-05-21 06:50:44  ssdfg [View]

    I have the simular Problem. On a Windows NT machine, and the same envoirement as they descrieb in the text.

    ErrorMessage:

    > java onjava.CalcClient 98 90
    > The call failed:
    > Fault Code = SOAP-ENV:Server
    > Fault String = service 'urn:onjavaserver'
    unknown"

    But if I check the list:
    > java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter list
    > Deployed Services:
    > urm:onjavaserver
    • SOAP
      2002-09-06 05:27:27  memming [View]

      put the class file in the $tomcat/webapps/soap/WEB-INF/classes/
      directory
      • SOAP
        2005-01-11 19:29:41  MuraliAtYashHyd [View]

        Hi,
        I too got the same problem initially. Here you need to compile and put the class files for both the client and services in the $tomcat/webapps/soap/WEB-INF/classes/ directory.

        Hope it definitely helps.

        Murali K
        yash technologies.,
        • SOAP
          2006-07-26 00:07:24  abhijeetrai [View]

          Hi Murali,

          I am getting the same problem

          [faultCode=SOAP-ENV:Server.BadTargetObjectURI] [faultString=Unable to resolve target object: ] [faultActorURI=/soap/servlet/rpcrouter]


          My server classes are running on another machine connected to LAN and are deployed on WebSphere. My client is on my local PC.

          Have tried all the suggestions listed on various groups.

          pls let me know ur suggestions.

          Cheers
          Abhijeet