Forums Register Login

unable to invoke a method on my SOAP service

+Pie Number of slices to send: Send
Hi,
I am new to web services.
I have tomcat5.0 server running on my m/c.
I tried deploying my first helloservice and was successful.
But when i tried to call that service it gives me the following error.

Hello SOAP Client
Fault Occurred (details follow):
Fault Code: SOAP-ENV:Server.BadTargetObjectURI
Fault String: Unable to resolve target object: com.pspl.soap.SoapService
Fault Occurred. No greeting for you!

following is my classpath detail.
CLASSPATH=c:\jars\xerces.jar;c:\jars\activation.jar;c:\jars\mail.jar;c:\jars\soa
p.jar;c:\jars\xercesImpl.jar;e:\junit3.8.1\junit.jar;C:\soap

I have service class file at location c:\soap.
I think i have set all the classpath correctly. Even though its unable to find SoapService.
Please help me..
+Pie Number of slices to send: Send
What is the endpoint URL you are using? Is that endpoint listed as being available in the AXIS web app? Are the classes that implement it properly installed on the server?
+Pie Number of slices to send: Send
following is the code i am using for calling the deployed service.

// Create SOAP RPC Call Object
Call call = new Call ( );
// Set Encoding Style to standard SOAP encoding
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
// Set Object URI and Method Name
call.setTargetObjectURI ("urn:examples:helloservice");
call.setMethodName ("sayGreeting");
// Set Method Parameters
Parameter param = new Parameter("name", String.class,
firstName, Constants.NS_URI_SOAP_ENC);
Vector paramList = new Vector ( );
paramList.addElement (param);
call.setParams (paramList);
// Set the URL for the Web Service
URL url = new URL ("http://localhost:8070/soap/servlet/rpcrouter");
// Invoke the Service
Response resp = call.invoke (url, "");
// Check for Faults
if (!resp.generatedFault( )) {
// Extract Return value
Parameter result = resp.getReturnValue ( );
String greeting = (String) result.getValue( );
return greeting;
}
else {
// Extract Fault Code and String
Fault f = resp.getFault( );
String faultCode = f.getFaultCode( );
String faultString = f.getFaultString( );
System.err.println("Fault Occurred (details follow):");
System.err.println("Fault Code: "+faultCode);
System.err.println("Fault String: "+faultString);
return new String ("Fault Occurred. No greeting for you!");
}

there is a service deployed with urn "urn:examples:helloservice"
+Pie Number of slices to send: Send
i am non using AXIS. its a normal java client
+Pie Number of slices to send: Send
That answers the first of my questions. What about the other two?
I once met a man from Nantucket. He had a tiny ad
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1661 times.
Similar Threads
SOAPFault
tomcat classpath problem
compiling servlets under Tomcat 4.0
Returning custom types
Unsupported response content type "text/html", must be: "text/xml".
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:27:43.