[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    Trying to get call.invoke to return a java Double[] object.  Help....
From:       charles.rosa () gm ! com
Date:       2004-10-28 20:21:52
Message-ID: OFDCEFDDEB.BD95CCB0-ON85256F3B.006F9DA9-85256F3B.006FDDB3 () mail ! gm ! com
[Download RAW message or body]

To all,

I am using a web service method that returns a java Double[] object.

I am trying to invoke this method with the following code:

      // Instantiate new Service object
      Service  service = new Service();
      // Instantiate new Call object
      Call     call    = (Call) service.createCall();

      // Set appropriate end point address
      call.setTargetEndpointAddress( new
java.net.URL(this.getWebServiceLocation()) );

      call.setOperationName(new QName("RevenueManagement",
                                      "getVolumeOfModelName"));
      call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.IN);
      call.addParameter("arg2", XMLType.XSD_STRING, ParameterMode.IN);

      call.setReturnType(Constants.XSD_ANY);

      call.registerTypeMapping(Double[].class, new QName("", ""),
                               ArraySerializerFactory.class,
                               ArrayDeserializerFactory.class);

      Double[] modelAward = (Double[]) call.invoke(new Object[] {edsnetId,
                                               modelName});
      return modelAward;

But am getting an exception on the client side saying:
java.lang.ClassCastException

Is there any way to get receive a java Double[] object from a web service?

Thanks, Charlie

-------------------------
Charles H. Rosa, Ph.D.
Staff Research Engineer
General Motors Corporation
R&D and Planning
Mail Code 480-106-359
30500 Mound Rd
Warren, MI 48090-9055
Tel/work/cell: +1 248 670-8389
Fax/work: +1 586 986-0574
Email: charles.rosa@gm.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic