• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unable to invoke a method on my SOAP service

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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..
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
radhika holani
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"
 
radhika holani
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am non using AXIS. its a normal java client
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That answers the first of my questions. What about the other two?
 
reply
    Bookmark Topic Watch Topic
  • New Topic