Hello:
I have published a webservice in tomcat with axis1.4 with the following configurations: and have attached the service as well the complex class:
 <service name="TestArrayRPC" provider="java:RPC">
     <namespace>http://testarray.webservice.savvion.com</namespace>
     <parameter name="allowedMethods" value="*"/>
     <parameter name="scope" value="request"/>
     <parameter name="className" value="com.savvion.ws.TestArray"/>
<beanMapping languageSpecificType="java:com.savvion.ws.WSItem" xmlns:ns="http://testarray.webservice.savvion.com"; qname="ns:WSItem"/>
 </service>

<service name="TestArrayWrap" provider="java:RPC" style="wrapped" use="literal">
      <namespace>http://testarray.webservice.savvion.com</namespace>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="scope" value="request"/>
      <parameter name="className" value="com.savvion.ws.TestArray"/>
<beanMapping languageSpecificType="java:com.savvion.ws.WSItem" xmlns:ns="http://testarray.webservice.savvion.com"; qname="ns:WSItem"/>
 </service>

<service name="TestArrayDoc" provider="java:RPC" style="document" use="literal">
      <namespace>http://testarray.webservice.savvion.com</namespace>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="scope" value="request"/>
      <parameter name="className" value="com.savvion.ws.TestArray"/>
<beanMapping languageSpecificType="java:com.savvion.ws.WSItem" xmlns:ns="http://testarray.webservice.savvion.com"; qname="ns:WSItem"/>
</service>

1.. The service TestArrayRPC runs fine with RPC/encoded type
2. The service TestArrayDoc gives problems with all the setxxxMethods as shown below for setIntegerArray
         AxisFault
faultCode: {http://xml.apache.org/axis/}Client
faultSubcode:
faultString: No such operation 'i1'
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}hostname:chennai

No such operation 'i1'
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
   at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
   at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.savvion.bo.doc.TestArrayDocSoapBindingStub.setIntegerArray(TestArrayDocSoapBindingStub.java:674) at com.savvion.bo.doc.TestArrayServiceTestCase.test7TestArrayDocSetIntegerArray(TestArrayServiceTestCase.java:168)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at junit.framework.TestCase.runTest(TestCase.java:216)
   at junit.framework.TestCase.runBare(TestCase.java:188)
   at junit.framework.TestResult$1.protect(TestResult.java:150)
   at junit.framework.TestResult.runProtected(TestResult.java:168)
   at junit.framework.TestResult.run(TestResult.java:153)
   at junit.framework.TestCase.run(TestCase.java:179)
   at junit.framework.TestSuite.runTest(TestSuite.java:173)
   at junit.framework.TestSuite.run(TestSuite.java:168)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

3. The service TestArrayWrap shows problem for only one method - setIntegerArray as below
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Found character data inside an array element while deserializing
faultActor:
faultNode:
faultDetail:
   {http://xml.apache.org/axis/}hostname:chennai

org.xml.sax.SAXException: Found character data inside an array element while deserializing at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
   at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
   at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
   at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
   at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.savvion.bo.wrap.TestArrayWrapSoapBindingStub.setIntegerArray(TestArrayWrapSoapBindingStub.java:548) at com.savvion.bo.wrap.TestArrayServiceTestCase.test7TestArrayWrapSetIntegerArray(TestArrayServiceTestCase.java:168)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at junit.framework.TestCase.runTest(TestCase.java:216)
   at junit.framework.TestCase.runBare(TestCase.java:188)
   at junit.framework.TestResult$1.protect(TestResult.java:150)
   at junit.framework.TestResult.runProtected(TestResult.java:168)
   at junit.framework.TestResult.run(TestResult.java:153)
   at junit.framework.TestCase.run(TestCase.java:179)
   at junit.framework.TestSuite.runTest(TestSuite.java:173)
   at junit.framework.TestSuite.run(TestSuite.java:168)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

I generated the stubs with the junit test case with only the package name and testcase options.

I'm using axis 1.4

Could someone suggest me what I should look for.

Thanks,
Ravi

package com.savvion.ws;

public class WSItem {
    private String name = "abc";
    private long id = 100;
    /**
     * @return the id
     */
    public long getId() {
        return id;
    }
    /**
     * @param id the id to set
     */
    public void setId(long id) {
        this.id = id;
    }
    public WSItem(){
        
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    
    
}
package com.savvion.ws;

public class TestArray {
    
    private WSItem[] wsitem;

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub

    }
    
    public TestArray(){
        
    }
    
    public WSItem[] getArray(){
        WSItem[] items = new WSItem[2];
        items[0] = new WSItem();
        items[1] = new WSItem();
        return items;
    }
    
    public WSItem getItem(){
        return new WSItem();
    }
    
    public String[] getStringArray(){
        System.out.println(" in getString array " );
        return new String[] {"abc", "def"};
    }
    
    public void setStringArray(String[] str){
        System.out.println(" in setString array " + str);
    }
    
    public String getString(){
        System.out.println(" in getString  " );
        return "efg";
    }
    
    public void setString(String str){
        System.out.println(" in setString " + str);
    }
    
    public int[] getIntArray(){
        System.out.println("in get int[] ");
        return new int[]{1,2};
    }
    
    public int getInt(){
        System.out.println("in get int ");
        return 3;
    }
    
    public void setIntArray(int[] i){
        System.out.println("in set int[] " + i);
    }
    
    public void setInt(int i){
        System.out.println("in set int " + i);
    }
    
    public boolean[] getBoolArray(){
        System.out.println(" in getbool array " );
        return new boolean[] {true, false};
    }
    
    public void setBoolArray(boolean[] bool){
        System.out.println(" in setboolean array " + bool );
    }
    
    public boolean getBool(){
        System.out.println(" in getbool  " );
        return true;
    }
    
    public void setBool(boolean bool){
        System.out.println(" in setbool" + bool );
    }
    
    public Integer[] getIntegerArray(){
        System.out.println("in getInteger[] " );
        return new Integer[]{new Integer(1), new Integer(2)};
    }
    
    public void setIntegerArray(Integer[] i){
        System.out.println("in setInteger[] " + i);
    }
    
    public Integer getInteger(){
        System.out.println("in getInteger " );
        return new Integer(4);
    }
    
    public void setInteger(Integer i){
        System.out.println("in setInteger " + i);
    }
    
    public Boolean[] getBooleanArray(){
        System.out.println(" in getBoolean array " );
        return new Boolean[] {new Boolean(true), new Boolean(false)};
    }
    
    public void setBooleanArray(Boolean[] bool){
        System.out.println(" in setBoolean array " + bool);
    }
    
    public Boolean getBoolean(){
        System.out.println(" in getBoolean  " );
        return new Boolean(true);
    }
    
    public void setBoolean(Boolean bool){
        System.out.println(" in setBoolean " + bool);
    }

}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to