You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Harshad Nanal <ha...@mahindrabt.com> on 2001/05/06 10:38:07 UTC

Re: BadTargetObjectURI

I had similiar problem. It is due to classpath only. 
Please check the classpath in the command prompt whne you start tomcat
and put your classfiles in one of the directory say (if dir1 is in
classpath) in dir1\hello\HelloService.class

Let us know if u succeed.
Harshad

Ryan Winkler wrote:
> 
> I've just been putting the .class file where I'd keep any other java code on
> a Tomcat context... <context>/WEB-INF/<package>/<class file>.  In this case,
> it is <soap context>/WEB-INF/hello/HelloServer.class.  I've tried moving the
> .class file around, including to a directory in the classpath
> (/opt/tomcat/classes/), but with no luck.  Any other ideas?
> 
> -----Original Message-----
> From: Erastus Z. Allen [mailto:erastus.allen@neuralware.com]
> Sent: Monday, May 07, 2001 5:44 PM
> To: soap-user@xml.apache.org
> Subject: RE: BadTargetObjectURI
> 
> In your classpath used by your server (Tomcat?), if HelloServer.class is in
> /foo/hello/HelloServer, is /foo/hello in your CP or just /foo ?
> 
> Should be just /foo methinks, then the server should find the class?
> 
> -----Original Message-----
> From: Ryan Winkler [mailto:Ryanw@i-link.net]
> Sent: Monday, May 07, 2001 7:09 PM
> To: 'soap-user@xml.apache.org'
> Subject: BadTargetObjectURI
> 
> OK, either I'm having a really "stupid" day (it is Monday, after all...), or
> there needs to be a little better troubleshooting in the Apache SOAP docs...
> 
> Here is the problem:
> In response to my Call.invoke(), I get the following fault:
> Code:  SOAP-ENV:Server.BadTargetObjectURI
> String: Unable to resolve target object: hello.HelloServer
> 
> What am I overlooking???
> 
> I have HelloServer.class in <soapcontext>/WEB-INF/classes/hello/.
> 
> When I query the server to be certain my code is deployed, I get the
> following:
> java org.apache.soap.server.ServiceManagerClient
> http://<soapcontext>:80/soap/servlet/rpcrouter query urn:Hello
> <isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
> id="urn:Hello">
>         <isd:provider type="java" scope="Application" methods="sayHelloTo">
>                      <isd:java class="hello.HelloServer" static="false"/>
>             </isd:provider>
> </isd:service>
> 
> My client code involving the Call is:
>  Call call = new Call();
>  call.setTargetObjectURI("urn:Hello");
> 
>  call.setMethodName("sayHelloTo");
>  call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> 
>  Vector params = new Vector();
> 
>  params.addElement(new Parameter("name",String.class,name,null));
>  call.setParams(params);
> 
>  //Invoke the call
> 
>  Response resp = null;
> 
>  try
> 
>  {
> 
>      resp = call.invoke(url,"");
>  }
> <etc.>
> 
> Thanks :)
> 
> -Ryan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org