Hello all!
I just tried to generate Java client code from a WSDL with WSDL2Java
(Axis2 1.3). My WSDL has an element "strings" defined as:
<xsd:element name="strings" type="tns:ArrayOfStringsType"/>
<xsd:complexType name="ArrayOfStringsType">
<xsd:sequence>
<xsd:element name="item" type="xsd:string"
maxOccurs="unbounded" minOccurs="0">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
Suppose I have an operation whose response message output part refers to
"strings" element, using the "-uw" option of WSDL2Java I would expect
the following method to be generated:
public String[] myOperation(...){...}
Instead, the following method is generated:
public ArrayOfStringsType myOperation(...){...}
In other words, the ArrayOfStringsType complex type is not unwrapped.
This happens also if you have complex types with fields that are an
array of something. For instance, suppose you have a complex type AType
with the following fields:
- name: xsd:string
- strings: tns:ArrayOfStringsType
the generated AType wrapper has the following methods:
- public String getName() / public void setName(String)
- public ArrayOfStringsType getStrings() / public void
setStrings(ArrayOfStringsType)
while I would expect the second getter/setter pair to be:
- public String[] getStrings() / public void setStrings(String[])
Is there a way to obtain the unwrapping of arrays with Axis2? Or should
I edit the generated code manually?
Thanks in advance!
--
Mauro Molinari
Software Developer
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]