| Author |
arrayType generation from WSDL element ? maxOccurs="unbound"
|
dileep keely
Ranch Hand
Joined: Jun 28, 2010
Posts: 91
|
|
<xsd:complexType name="data-errors">
<xsd:sequence minOccurs="0" maxOccurs="unbounded" >
<xsd:element name="error-field" type="common:error-field-type" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="data-errors" type="commontypes:data-errors" />
I am able to generate the DataErrors class(WSDL-->JAva) but without arrayType as below:
public DataErrors(ErrorFieldType errorField) {
this.errorField = errorField;
}
public ErrorFieldType getErrorField() {
return errorField;
}
Required to achive:
----------------------
public DataErrors(ErrorField[] errorField) {
this.errorField = errorField;
}
public ErrorField[] getErrorField() {
return errorField;
}
Tried
1) maxOccurs="unbound" but was not able to.
Please suggest me
|
 |
Rudy Gireyev
Ranch Hand
Joined: May 03, 2011
Posts: 39
|
|
|
Try using the -a parameter also called -all parameter when calling wsdl2java and see if that fixes the problem.
|
 |
dileep keely
Ranch Hand
Joined: Jun 28, 2010
Posts: 91
|
|
I got it fixed by using the <xsd:choice>
and
maxOccurs="unbound"
|
 |
Naren Chivukula
Ranch Hand
Joined: Feb 03, 2004
Posts: 542
|
|
Hi Dileep,
You did the right thing. The default value of minOccurs and maxOccurs is 1 and I think you are aware of <xsd:choice> is not related to this solution anyway.
|
Cheers,
Naren (SCJP, SCDJWS and SCWCD)
|
 |
 |
|
|
subject: arrayType generation from WSDL element ? maxOccurs="unbound"
|
|
|