Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can you please help me out ....  RSS feed

Anjana Chowdary
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am facing this error from couple of days.

//This is the Exception i am getting while running client class.

Generated fault:
Fault Code = SOAP-ENV:Server.BadTargetObjectURI
Fault String = Unable to resolve target object:

Simply I am listing out the things i have done to run this WS.

// Service prg
package hello;
public class HelloWorld{

String getMessage(){
return "Hello world";
//client prg

import org.apache.soap.SOAPException;
import org.apache.soap.Constants;
import org.apache.soap.Fault;
import org.apache.soap.rpc.Call;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;

public class Client
public static void main(String[] args) throws Exception

URL url = null;
String name = null;
// Build the call.

url = new URL("http://localhost:8085/soap/servlet/rpcrouter");
Call call = new Call();

// Invoke the call.
Response resp = null;
resp = call.invoke(url, "");
catch( SOAPException e )
System.err.println("Caught SOAPException (" + e.getFaultCode() + "): " + e.getMessage());

// Check the response.
if( !resp.generatedFault() )
Object value = resp.getReturnValue();

Fault fault = resp.getFault();
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + fault.getFaultCode());
System.out.println (" Fault String = " + fault.getFaultString() );
catch(Exception e)

-> I set up class path with all these info..
%TOMCAT_HOME%\common\lib\activation.jar; and

-> I created service prg as jar file with the name of helloworld.jar and placed in class path.
-> I am using the Apache SOAP Admin to deploy the service.
If run the following commands, working fine..

1) http://localhost:8085/soap/servlet/rpcrouter.
2) java orgapache.soap.server.ServiceManagerClient http://localhost:8085/soap/servlet/rpcrouter list.

-> I am using the same machine as a client and server.

if any one know about the solution, could u please reply me..
waiting for reply...

Thanks in advance,

[ July 26, 2006: Message edited by: Anjana Chowdary ]
[ July 26, 2006: Message edited by: Anjana Chowdary ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!