You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2002/09/10 16:28:00 UTC
DO NOT REPLY [Bug 12480] New: -
WSDL complextype containing sequence generates BAD Java class
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12480>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12480
WSDL complextype containing sequence generates BAD Java class
Summary: WSDL complextype containing sequence generates BAD Java
class
Product: Axis
Version: current (nightly)
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: WSDL processing
AssignedTo: axis-dev@xml.apache.org
ReportedBy: agrawal@lucent.com
This used to work properly in beta 2 (not sure about beta 3), but broken in RC1.
If the WSDL contains something like:
<xsd:complexType name='TpAddressSet'>
<xsd:sequence>
<xsd:element
name='TpAddressSet'
type='osaxsd:TpAddress'
minOccurs='0'
maxOccurs='unbounded' />
</xsd:sequence>
</xsd:complexType>
The Java class generated would have a setTpAddress() which doesn't initialize
the array properly.
The one that works looks like:
private org.csapi.wsdl.TpAddress[] tpAddressSet;
public void setTpAddressSet(int i, org.csapi.wsdl.TpAddress value) {
if (this.tpAddressSet == null ||
this.tpAddressSet.length <= i) {
org.csapi.wsdl.TpAddress[] a = new org.csapi.wsdl.TpAddress[i + 1];
if (this.tpAddressSet != null) {
for(int j = 0; j < this.tpAddressSet.length; j++)
a[j] = this.tpAddressSet[j];
}
this.tpAddressSet = a;
}
this.tpAddressSet[i] = value;
}
The CURRENT one looks like:
private org.csapi.wsdl.TpAddress[] tpAddressSet;
public void setTpAddressSet(int i, org.csapi.wsdl.TpAddress value) {
this.tpAddressSet[i] = value;
}