I suggest you use provider="java:RPC" and specify style="wrapped".
It will produce a document/literal service that performs like an RPC service.

Anne

On 9/2/05, #CHEN XINJUN# <[EMAIL PROTECTED]> wrote:
Hi Rogério,

I am fairly new to Axis. Could you tell me what if I use RPCHandler?
Mine service deployment descriptor is like

<deployment name="defaultServerConfig"
    xmlns=" http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
    xmlns:xsd=" http://www.w3.org/2001/XMLSchema">

    <service name="codsig/organizer" provider="Handler" use="literal" style="document">
        <parameter name="className" value=" core.services.organizer.impl.Organizer"/>
        <wsdlFile>share/schema/codsig/organizer/Organizer_service.wsdl</wsdlFile>
        <parameter name="allowedMethods" value="*"/>
        <parameter name="handlerClass" value="org.globus.axis.providers.RPCProvider"/>
        <parameter name="scope" value="Application"/>
        <parameter name="providers" value="GetRPProvider"/>
        <parameter name="loadOnStartup" value="true"/>
    </service>

</deployment>


As you see, if you use doc/lit style, how to return complex types? Any changes? In fact I even cannot pass input parameter. And this problem stuck me for more than 2 weeks already.

Could you help?

Regards,
Xinjun



-----Original Message-----
From: Rogério Luz [mailto:[EMAIL PROTECTED] ]
Sent: Wed 2005-8-31 23:07
To: [email protected]
Subject: Re: Return type for complex types

Hi Uppili

  Try to create a wsdd like this:



        <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java " <http://xml.apache.org/axis/wsdd/providers/java"> >
            <service name="YourWebServiceName" provider="java:RPC">
                <parameter name="className" value="your.package.ClassName"/>
                <parameter name="allowedMethods" value="*"/>
                <beanMapping qname="myNS:YourBean" xmlns:myNS="urn:ClassName" languageSpecificType="java:your.package.YourBean"/>
            </service>
        </deployment>



  Deploy it then try this in your client code:



          QName qnYourBeanName = new QName("urn:ClassName", "YourBean");
          QName qnYourBeanArr = new QName("urn:ClassName", "ArrayOf_ClassName");
          call.registerTypeMapping(YourBean.class, qnYourBeanName ,
                            new org.apache.axis.encoding.ser.BeanSerializerFactory(YourBean.class, qnYourBeanName ),
                            new org.apache.axis.encoding.ser.BeanDeserializerFactory(YourBean.class, qnYourBeanName ));

           call.registerTypeMapping(YourBean[].class, qnYourBeanNameArr ,
                            new org.apache.axis.encoding.ser.ArraySerializerFactory(),
                            new org.apache.axis.encoding.ser.ArrayDeserializerFactory());

           YourBean[] yba = (YourBean[]) call.invoke( new Object[] {});


  This should work.
  Any problem let me know.

Best Regards,

Rogério Luz


On 8/30/05, Uppili Srinivasan <[EMAIL PROTECTED]> wrote:

        Hi everyone,



        I searched the recent archives for an answer to the problem I am having
        but could not find one. Any help would be greatly appreciated.=20



        I have a wrapped service which returns TestObject[] where TestObject is
        a bean with a just a String property.



        The WSDD entry for that is



        <service name=3D"Test" style=3D"wrapped">



          <parameter name=3D"className" =

        value=3D" com.questerra.webservices.Test"/>



          <parameter name=3D"allowedMethods" value=3D"*"/>



          <beanMapping qname=3D"myNS:TestObject"

        xmlns:myNS=3D"http://webservices.questerra.com"

        languageSpecificType=3D"java:com.questerra.webservices.TestObject"/>



        </service>





        I don't have any problems in calling the service but am having problems
        in parsing the response. If the service returns only one object in the
        array and



        if I do the following in my client, I don't get any exceptions



              QName    qnArr         =3D new QName("
        http://webservices.questerra.com <http://webservices.questerra.com/> ",
        "doTestResponse" );

              call.setOperationStyle("wrapped");

              call.registerTypeMapping(TestObject[].class, qnArr,

                            new
        org.apache.axis.encoding.ser.ArraySerializerFactory(),

                            new
        org.apache.axis.encoding.ser.ArrayDeserializerFactory());

              call.setOperationName( "doTest" );

              call.setReturnType(qnArr);





        But if the service returns more than one object, I am getting an AXIS
        fault as follows:



        faultCode:

        { http://schemas.xmlsoap.org/soap/envelope/}Server.userException
        < http://schemas.xmlsoap.org/soap/envelope/%7dServer.userException <http://schemas.xmlsoap.org/soap/envelope/%7dServer.userException> >



        faultSubcode:



        faultString: java.lang.ArrayStoreException



        faultActor:



        faultNode:



        faultDetail:





        { http://xml.apache.org/axis/}stackTrace:java.lang.ArrayStoreException
        < http://xml.apache.org/axis/%7dstackTrace:java.lang.ArrayStoreException <http://xml.apache.org/axis/%7dstackTrace:java.lang.ArrayStoreException > >




                    at

        org.apache.axis.utils.JavaUtils.convert(JavaUtils.java:472)



                    at org.apache.axis.client.Call.invoke (Call.java:2580)



                    at org.apache.axis.client.Call.invoke(Call.java:2347)



                    at org.apache.axis.client.Call.invoke(Call.java:1804)





        Thanks much in advance for any help in resolving this issue[Uppili
        Srinivasan] .



        Uppili











Reply via email to