You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by se...@paneurolife.lu on 2003/05/20 16:22:13 UTC

Deployment Probleme - Tomcat 4.1.24 - Soap 2.3.1

Hello,

I have a probleme with the deployment of my webservice.

--> I have deployed a webservice with this XML file:

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:ExchangeRate">
      <isd:provider type="java" scope="Application" methods="dollar_calc">
            <isd:java class=" ExchangeRate.ExchangeService" />
      </isd:provider>

<isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener>
</isd:service>

--> I have put my file ExchangeService.class in the directory
<TOMCAT_DIR>\webapps\soap\WEB-INF\classes\ExchangeRate

--> I have created a Client Class and call them whith this command :
java -classpath
<TOMCAT_DIR>\webapps\soap\WEB-INF\classes\;<DIR>\javamail-1.3\mail.jar;<DIR>\jaf-1.0.2\activation.jar
 ExchangeRate.ExchangeClient 122

I have this error message :
The call failed:
Fault Code = SOAP-ENV:Server.BadTargetObjectURI
Fault String =Unable to resolve target object : ExchangeRate/Exchange
Service

This the code of my Client Class:

package ExchangeRate;
import java.io.*;
import java.net.*;
import java.util.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;

public class ExchangeClient {
    public static void main(String[] args) throws Exception
    {
       // URL references the rpcrouter
       URL url = new URL("http://localhost:8080/soap/servlet/rpcrouter");
       Double amount = new Double(args[0]);

       //Generate and set the parameter
       Vector params = new Vector();
       params.addElement(new Parameter("amount",Double.class, amount, null
));

       // Generating the call.
       Call call = new Call();
       call.setTargetObjectURI("urn:ExchangeRate");
       call.setMethodName("dollar_calc");
       call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
       call.setParams (params);

       //Invoking the call: the action URI should be blank, as the -
       //XML-SOAP RPC router doesn?t need it.
       Response resp = call.invoke(url, "" );

       // Checking the response.
       if ( resp.generatedFault() ) {
           Fault fault = resp.getFault ();
           System.out.println("The call failed: ");
           System.out.println("Fault Code = " + fault.getFaultCode());
           System.out.println("Fault String ="+ fault.getFaultString());
       }
       else {
           Parameter result = resp.getReturnValue();
           System.out.println(result.getValue());
       }
    }
}

And finnaly, this is the state of my classpath:

<DIR>\soap-2_3_1\lib\soap.jar;<DIR>\xerces-2_4_0\xercesImpl.jar;<DIR>\xerces-2_4_0\xmlParserAPIs.jar;<DIR>\javamail-1.3\mail.jar;<DIR>\jaf-1.0.2\activation.jar


Can you help me?

Thanks

Sébastien Miélot







The contents of this E-mail are confidential and may contain privileged information to the sole intended recipient at the E-mail address to which it has been addressed. It may not be disclosed to our used by anyone other than the addressee, nor may it be copied or forwarded in any way without the consent of the sender.
The sender hereby make no representation as to the accuracy, completeness for a particular purpose of the information provided in this E-mail. No binding commitment from the sender may be inferred by means of E-mail communications.
Please note that the sender accepts any responsibility for viruses and it is your responsibility to scan the E-mail and attachments (if any). 
If received in error, please reply by mail to the sender or contact the sender by phone (+352) 45 67 301, and then delete it from your system.