ArrayStoreException when a thick java client invokes Webservice

Discussion in 'Java' started by Yogi, Oct 31, 2007.

  1. Yogi

    Yogi Guest

    Hi,

    I am invoking the webservices hosted by AR system mid-tier.
    It is developed using Axis according to BMC.
    WSDL2Java tool is used to genereate Java Stubs, holders and holder
    types.
    The webservice returns array of custom objects.

    *Following is the piece of code which invokes the webservice.*

    Service service = new Service();
    Call call = (Call) service.createCall();
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
    call.setOperationName(new
    javax.xml.namespace.QName("urn:SPD_Issue_Management",
    "OpGetList"));
    call.addParameter("Qualification",
    org.apache.axis.Constants.XSD_STRING,
    javax.xml.rpc.ParameterMode.IN);
    call.addParameter("startRecord",
    org.apache.axis.Constants.XSD_STRING ,
    javax.xml.rpc.ParameterMode.IN);
    call.addParameter("maxLimit",
    org.apache.axis.Constants.XSD_STRING ,
    javax.xml.rpc.ParameterMode.IN);
    QName qnStudent = new QName("urn:SPD_Issue_Management",
    "getListValues");
    QName qnStudentArr = new QName("urn:SPD_Issue_Management",
    "GetListOutputMap");
    call.registerTypeMapping(GetListOutputMapGetListValues.class,
    qnStudent ,
    new org.apache.axis.encoding.ser.BeanSerializerFactory (
    GetListOutputMapGetListValues.class, qnStudent ),
    new org.apache.axis.encoding.ser.BeanDeserializerFactory(
    GetListOutputMapGetListValues.class,
    qnStudent ));
    call.registerTypeMapping(GetListOutputMapGetListValues[].class,
    qnStudentArr ,
    new org.apache.axis.encoding.ser.ArraySerializerFactory(),
    new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
    //set the Qname of array of Student as return type
    call.setReturnType (qnStudentArr);
    GetListOutputMapGetListValues [] _resp =
    (GetListOutputMapGetListValues
    [])call.invoke(new Object[]{strQualification,"1","50"});

    *Following is the WSDL definiton for the webservice:*
    **

    <wsdl:eek:peration name="OpGetList">
    <soap:eek:peration soapAction="urn:SPD_Issue_Management/OpGetList"
    style="document"/>
    <wsdl:input>
    <soap:header message="s0:ARAuthenticate" part="parameters"
    use="literal">
    </soap:header>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:eek:utput>
    <soap:body use="literal"/>
    </wsdl:eek:utput>
    </wsdl:eek:peration>

    I am using the following libraries:
    axis.jar
    axis-ant.jar
    activation.jar
    commons-discovery-0.2.jar
    commons-logging-1.0.4.jar
    jaxrpc.jar
    log4j-1.2.8.jar
    mailapi.jar
    saaj.jar
    wsdl4j-1.5.1.jar
    xercesImpl.jar
    xml-apis.jar

    Regards

    Yogaraj.
     
    Yogi, Oct 31, 2007
    #1
    1. Advertising

  2. Yogi

    Roedy Green Guest

    On Wed, 31 Oct 2007 18:25:46 -0000, Yogi <> wrote,
    quoted or indirectly quoted someone who said :

    >I am invoking the webservices hosted by AR system mid-tier.
    >It is developed using Axis according to BMC.
    >WSDL2Java tool is used to genereate Java Stubs, holders and holder
    >types.
    >The webservice returns array of custom objects.


    You left out a description of your problem or a question.
    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Oct 31, 2007
    #2
    1. Advertising

  3. Yogi

    Yogi Guest

    On Oct 31, 4:41 pm, Roedy Green <>
    wrote:
    > On Wed, 31 Oct 2007 18:25:46 -0000, Yogi <> wrote,
    > quoted or indirectly quoted someone who said :
    >
    > >I am invoking the webservices hosted by AR system mid-tier.
    > >It is developed using Axis according to BMC.
    > >WSDL2Java tool is used to genereate Java Stubs, holders and holder
    > >types.
    > >The webservice returns array of custom objects.

    >
    > You left out a description of your problem or a question.
    > --
    > Roedy Green Canadian Mind Products
    > The Java Glossaryhttp://mindprod.com


    Oops. I have not included the problem.
    The exception occured is ArrayStoreException when I invoke the Axis
    webservice.
     
    Yogi, Oct 31, 2007
    #3
  4. Yogi

    Roedy Green Guest

    On Wed, 31 Oct 2007 18:25:46 -0000, Yogi <> wrote,
    quoted or indirectly quoted someone who said :

    >Hi,
    >
    >I am invoking the webservices hosted by AR system mid-tier.
    >It is developed using Axis according to BMC.
    >WSDL2Java tool is used to genereate Java Stubs, holders and holder
    >types.
    >The webservice returns array of custom objects.
    >
    >*Following is the piece of code which invokes the webservice.*


    You make people's job much easier if:

    1. you post some runnable code so they can see the exception.
    see http://mindprod.com/jgloss/sscce.html

    2. you point to the line where the exception occurred.

    All I can do is send to you http://mindprod.com/jgloss/array.html
    to help you understand what an ArrayStoreException is if you don't
    already know.

    --
    Roedy Green Canadian Mind Products
    The Java Glossary
    http://mindprod.com
     
    Roedy Green, Nov 3, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Russ
    Replies:
    1
    Views:
    586
    =?Utf-8?B?Q2hhcmxlcyBDaGVu?=
    Nov 29, 2004
  2. Adam Lipscombe
    Replies:
    5
    Views:
    754
    Richard Corfield
    Apr 24, 2004
  3. Benoit
    Replies:
    0
    Views:
    462
    Benoit
    Aug 11, 2004
  4. Mango
    Replies:
    0
    Views:
    526
    Mango
    Jan 9, 2005
  5. Mich
    Replies:
    5
    Views:
    547
Loading...

Share This Page