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 Iv...@bull.it on 2001/04/19 18:05:51 UTC

SOAP deployment error on Tomcat 3.2.1

Hello to everybody,
i need your help in order to solve a problem:
I have installed soap apache 2_1,xerces 1_3_1,javamail 1.2,xml4j 3_1_1, jaf
1.0.1 using Tomcat 3.2.1 so i started utesting it.First of all i' ve
configured as suggested in the installation notes Tomcat the i've tried to
connect to the url http://localhost:8080/soap and everything was working
good i've tried to connect to http://localhost:8080/soap/admin/index.html
and everithing was working good , i wanted to test a sample application so
i've tried to deploy the deployment descriptor, as follow:
The file name is DD.XML:

<?xml version="1.0"?>
<n:service xmlns:n="http://xml.apache.org/xml-soap/deployment"
id="urn:xml-soap-demo-mycalculator">
     <n:provider type="java"
                    scope="Application"
                    methods="getSum">
          <n:java class="MyCalculator" static="true"/>
     </n:provider>

</n:service>

the command i've executed is:

java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter deploy dd.xml

the error is:

[SOAPException: faultCode=SOAP-ENV:Client; msg=A
'http://schemas.xmlsoap.org/soap/envelope/:Fault' element must contain a:
'faultcode' element.; targetException=java.lang.IllegalArgumentException: A
'http://schemas.xmlsoap.org/soap/envelope/:Fault' element must contain a:
'faultcode' element.]
     at org.apache.soap.rpc.Call.invoke(Call.java:244)
     at
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:127)
     at
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java:140)
     at
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:228)
Exception in thread "main"


What do you think about ?

P.S

When i try to call the service that is not deployed from the client ,
 the client :

import java.util.Vector;
import java.net.*;
import org.apache.soap.rpc.*;
import org.apache.soap.*;

public class SimpleSOAPClient {

     public static void main(String[] args) {
          if (args.length != 2) {
               System.err.println("Usage: java SimpleSOAPCLient arg1
arg2");
               System.exit(-1);
          }

          Call call = new Call();
          call.setTargetObjectURI("urn:xml-soap-demo-mycalculator");
          call.setMethodName("getSum");
          call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);

          Vector parms = new Vector();
          parms.addElement(new Parameter("first", int.class, new
Integer(args[0]),
null));
          parms.addElement(new Parameter("second", int.class, new
Integer(args[1]),
null));

          call.setParams(parms);

          try {
               URL url = new URL
("http://localhost:8080/soap/servlet/rpcrouter");

               Response response = call.invoke(url, "");

               if (response.generatedFault()) {
                    Fault fault = response.getFault();
                    System.err.println("Call failed");
                    System.err.println("Code: " + fault.getFaultCode());
                    System.err.println("Description: " +
fault.getFaultString());
               } else {
                    Parameter result = response.getReturnValue();
                    System.out.println("Result is " +
((Integer)result.getValue()).intValue());
               }
          } catch (MalformedURLException mue) {
               mue.printStackTrace();
          } catch (SOAPException se) {
               se.printStackTrace();
          }
     }

}

I receive the some error message.

Where am I going wrong?

Any help is greatly appreciated.



---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: SOAP deployment error on Tomcat 3.2.1

Posted by Rahul Kirthivasan <he...@yahoo.com>.
Hi Ivan,

I thought the Apache SOAP toolkit had a 
problem working with the Xerces 1_3_1
build.
But could somebody please confirm this.

Thanks,
Rahul

--- Ivan.Palmucci@bull.it wrote:
> Hello to everybody,
> i need your help in order to solve a problem:
> I have installed soap apache 2_1,xerces
> 1_3_1,javamail 1.2,xml4j 3_1_1, jaf
> 1.0.1 using Tomcat 3.2.1 so i started utesting
> it.First of all i' ve
> configured as suggested in the installation notes
> Tomcat the i've tried to
> connect to the url http://localhost:8080/soap and
> everything was working
> good i've tried to connect to
> http://localhost:8080/soap/admin/index.html
> and everithing was working good , i wanted to test a
> sample application so
> i've tried to deploy the deployment descriptor, as
> follow:
> The file name is DD.XML:
> 
> <?xml version="1.0"?>
> <n:service
> xmlns:n="http://xml.apache.org/xml-soap/deployment"
> id="urn:xml-soap-demo-mycalculator">
>      <n:provider type="java"
>                     scope="Application"
>                     methods="getSum">
>           <n:java class="MyCalculator"
> static="true"/>
>      </n:provider>
> 
> </n:service>
> 
> the command i've executed is:
> 
> java org.apache.soap.server.ServiceManagerClient
> http://localhost:8080/soap/servlet/rpcrouter deploy
> dd.xml
> 
> the error is:
> 
> [SOAPException: faultCode=SOAP-ENV:Client; msg=A
> 'http://schemas.xmlsoap.org/soap/envelope/:Fault'
> element must contain a:
> 'faultcode' element.;
> targetException=java.lang.IllegalArgumentException:
> A
> 'http://schemas.xmlsoap.org/soap/envelope/:Fault'
> element must contain a:
> 'faultcode' element.]
>      at
> org.apache.soap.rpc.Call.invoke(Call.java:244)
>      at
>
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:127)
>      at
>
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java:140)
>      at
>
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:228)
> Exception in thread "main"
> 
> 
> What do you think about ?
> 
> P.S
> 
> When i try to call the service that is not deployed
> from the client ,
>  the client :
> 
> import java.util.Vector;
> import java.net.*;
> import org.apache.soap.rpc.*;
> import org.apache.soap.*;
> 
> public class SimpleSOAPClient {
> 
>      public static void main(String[] args) {
>           if (args.length != 2) {
>                System.err.println("Usage: java
> SimpleSOAPCLient arg1
> arg2");
>                System.exit(-1);
>           }
> 
>           Call call = new Call();
>          
>
call.setTargetObjectURI("urn:xml-soap-demo-mycalculator");
>           call.setMethodName("getSum");
>          
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> 
>           Vector parms = new Vector();
>           parms.addElement(new Parameter("first",
> int.class, new
> Integer(args[0]),
> null));
>           parms.addElement(new Parameter("second",
> int.class, new
> Integer(args[1]),
> null));
> 
>           call.setParams(parms);
> 
>           try {
>                URL url = new URL
> ("http://localhost:8080/soap/servlet/rpcrouter");
> 
>                Response response = call.invoke(url,
> "");
> 
>                if (response.generatedFault()) {
>                     Fault fault =
> response.getFault();
>                     System.err.println("Call
> failed");
>                     System.err.println("Code: " +
> fault.getFaultCode());
>                     System.err.println("Description:
> " +
> fault.getFaultString());
>                } else {
>                     Parameter result =
> response.getReturnValue();
>                     System.out.println("Result is "
> +
> ((Integer)result.getValue()).intValue());
>                }
>           } catch (MalformedURLException mue) {
>                mue.printStackTrace();
>           } catch (SOAPException se) {
>                se.printStackTrace();
>           }
>      }
> 
> }
> 
> I receive the some error message.
> 
> Where am I going wrong?
> 
> Any help is greatly appreciated.
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> soap-user-unsubscribe@xml.apache.org
> For additional commands, email:
> soap-user-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: SOAP deployment error on Tomcat 3.2.1

Posted by Rahul Kirthivasan <he...@yahoo.com>.
Hi Ivan,

I thought the Apache SOAP toolkit had a 
problem working with the Xerces 1_3_1
build.
But could somebody please confirm this.

Thanks,
Rahul

--- Ivan.Palmucci@bull.it wrote:
> Hello to everybody,
> i need your help in order to solve a problem:
> I have installed soap apache 2_1,xerces
> 1_3_1,javamail 1.2,xml4j 3_1_1, jaf
> 1.0.1 using Tomcat 3.2.1 so i started utesting
> it.First of all i' ve
> configured as suggested in the installation notes
> Tomcat the i've tried to
> connect to the url http://localhost:8080/soap and
> everything was working
> good i've tried to connect to
> http://localhost:8080/soap/admin/index.html
> and everithing was working good , i wanted to test a
> sample application so
> i've tried to deploy the deployment descriptor, as
> follow:
> The file name is DD.XML:
> 
> <?xml version="1.0"?>
> <n:service
> xmlns:n="http://xml.apache.org/xml-soap/deployment"
> id="urn:xml-soap-demo-mycalculator">
>      <n:provider type="java"
>                     scope="Application"
>                     methods="getSum">
>           <n:java class="MyCalculator"
> static="true"/>
>      </n:provider>
> 
> </n:service>
> 
> the command i've executed is:
> 
> java org.apache.soap.server.ServiceManagerClient
> http://localhost:8080/soap/servlet/rpcrouter deploy
> dd.xml
> 
> the error is:
> 
> [SOAPException: faultCode=SOAP-ENV:Client; msg=A
> 'http://schemas.xmlsoap.org/soap/envelope/:Fault'
> element must contain a:
> 'faultcode' element.;
> targetException=java.lang.IllegalArgumentException:
> A
> 'http://schemas.xmlsoap.org/soap/envelope/:Fault'
> element must contain a:
> 'faultcode' element.]
>      at
> org.apache.soap.rpc.Call.invoke(Call.java:244)
>      at
>
org.apache.soap.server.ServiceManagerClient.invokeMethod(ServiceManagerClient.java:127)
>      at
>
org.apache.soap.server.ServiceManagerClient.deploy(ServiceManagerClient.java:140)
>      at
>
org.apache.soap.server.ServiceManagerClient.main(ServiceManagerClient.java:228)
> Exception in thread "main"
> 
> 
> What do you think about ?
> 
> P.S
> 
> When i try to call the service that is not deployed
> from the client ,
>  the client :
> 
> import java.util.Vector;
> import java.net.*;
> import org.apache.soap.rpc.*;
> import org.apache.soap.*;
> 
> public class SimpleSOAPClient {
> 
>      public static void main(String[] args) {
>           if (args.length != 2) {
>                System.err.println("Usage: java
> SimpleSOAPCLient arg1
> arg2");
>                System.exit(-1);
>           }
> 
>           Call call = new Call();
>          
>
call.setTargetObjectURI("urn:xml-soap-demo-mycalculator");
>           call.setMethodName("getSum");
>          
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> 
>           Vector parms = new Vector();
>           parms.addElement(new Parameter("first",
> int.class, new
> Integer(args[0]),
> null));
>           parms.addElement(new Parameter("second",
> int.class, new
> Integer(args[1]),
> null));
> 
>           call.setParams(parms);
> 
>           try {
>                URL url = new URL
> ("http://localhost:8080/soap/servlet/rpcrouter");
> 
>                Response response = call.invoke(url,
> "");
> 
>                if (response.generatedFault()) {
>                     Fault fault =
> response.getFault();
>                     System.err.println("Call
> failed");
>                     System.err.println("Code: " +
> fault.getFaultCode());
>                     System.err.println("Description:
> " +
> fault.getFaultString());
>                } else {
>                     Parameter result =
> response.getReturnValue();
>                     System.out.println("Result is "
> +
> ((Integer)result.getValue()).intValue());
>                }
>           } catch (MalformedURLException mue) {
>                mue.printStackTrace();
>           } catch (SOAPException se) {
>                se.printStackTrace();
>           }
>      }
> 
> }
> 
> I receive the some error message.
> 
> Where am I going wrong?
> 
> Any help is greatly appreciated.
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> soap-user-unsubscribe@xml.apache.org
> For additional commands, email:
> soap-user-help@xml.apache.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org