Re: Return an array of objects

From: Mariano Garcia <>
Date: Thu, 08 Sep 2005 13:02:44 +0200


Some problems were founded and solved, but I have some problems yet :S.
I think the problem is the generation of the wrapper classes from my

I'm using a rpc/literal model, so each message part should be mapped to
a Java type, but it is not. These are the classes I get when I use

        * SCIBWebServiceService (service)
        * SCIBWebService (service interface)
        * SCIBWebService_Impl (service interface impl)
        * SCIBWebService_getAlarms_ResponseStruct (wrapper class generated for
getAlarms response)
        * SCIBWebService_getAlarms_RequestStruct (wrapper class generated for
getAlarms request)

The problem is the interface generated returns a SOAPElement object, and
it should return a SCIBWebService_getAlarms_ResponseStruct class. Do you
know why?

I have read this in an ibm article:

"In the case of literal mapping, each message part is mapped to a Java
type, [...]. If no such mapping exists, the message part is represented
using a javax.xml.soap.SOAPElement Java class. An example for this
mapping is a complex type containing attributes. Since no standard
mapping is defined for attributes, this complex type is represented as a

But all the complext types are mapped. Am I forgetting something?

My types:

<complexType name="ArrayOfAlarm">
        <restriction base="soap-enc:Array">
        <attribute ref="soap-enc:arrayType" wsdl:arrayType="impl:Alarm[]"/>

<complexType name="Alarm">
        <element name="id" type="xsd:int"/>
        <element name="str" type="xsd:string"/>
<complexType name="getAlarmsResponse">
      <element name="alarmList" type="impl:ArrayOfAlarm"/>

Mariano García González :: Analista Programador

Entel IT Consulting, SA
Tlf. 91 567 07 36
Mobile. 619 08 70 90