Hi Tim,
I think my problem discussed on the title "wsdl2java does not generate
class-files for complexTypes" seems to be the same as yours. Try the
--wrapArrays (-w) option when generating the sources.
Regards,
Christian
Tim R J Langford schrieb:
Hello All,
I am upgrading some SOAP clients from Axis 1.2 to Axis 1.3 Final. One
of them upgraded with little effort, just some changes to the code
that processed the new bean convention style generate by WSDL2Java.
The other project is proving very troublesome however.
#1 : Firstly the schema beans appear NOT to generate properly. For
example the following Schema section :
<s:complexType name="RoomStayCandidateType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GuestCounts"
type="s1:GuestCountType" />
<s:element minOccurs="0" maxOccurs="unbounded"
name="RoomAmenity" type="s1:RoomAmenityPrefType" />
</s:sequence>
<s:attribute name="RoomType" type="s:string" />
<s:attribute name="RoomTypeCode" type="s:string" />
<s:attribute name="Quantity" type="s:positiveInteger" />
<s:attribute name="Composite" type="s:boolean" />
</s:complexType>
<s:complexType name="GuestCountType">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
name="GuestCount" type="s1:GuestCountTypeGuestCount" />
</s:sequence>
<s:attribute name="IsPerRoom" type="s:boolean" />
</s:complexType>
<s:complexType name="GuestCountTypeGuestCount">
<s:attribute name="AgeQualifyingCode" type="s:string" />
<s:attribute name="Age" type="s:nonNegativeInteger" />
<s:attribute name="Count" type="s:positiveInteger" />
</s:complexType>
But here WSDL2Java enerates a "RoomStayCandidateType" object that
contains an array of "GuestCountTypeGuestCount" objects as a member.
It does not generate a GuestCountType at all. This of course breaks
the service. The old version of WSDL2Java generated all these classes
as was to be expected, and only messed up setting the action type on
one of the services (whihc was easilly fixed with a code post
processor). I assume this is a bug. The schema seems valid to me.
#2 : Another problem occured in the generated source where a
constructor was created thats calls Object.super() as follows...
public class VendorMessageType implements java.io.Serializable {
private java.lang.String infoType; // attribute
private
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][]
formattedTextType; // attribute
public VendorMessageType() {
}
public VendorMessageType(
org.opentravel.www.OTA._2003._05.FormattedTextSubSectionTypeParagraph[][]
param1,
java.lang.String Title,
org.apache.axis.types.Language Language,
java.lang.String infoType) {
super(
param1,
Title);
this.Language = Language;
this.infoType = infoType;
}
...
etc
...
}
???
When I searched the mailing list I noticed a few possibly similar
questions to this, but no reponse I could act on. Is there any
possibility of fixing these problems? If not is there any method of
fixing/altering the generated source form the old version of Axis
WSDL2Java to work with new 1.3 library? For example could I code to
the correctly generated old 1.1 SOAP beans to get them to work with 1.3?
Thanks very much for your help and time! This has become a real show
stopper, and I got deadlines and a crazy boss!
Tim
--
************************************************************
Besuchen Sie unsere kostenlose Veranstaltung
"Effizientes Prozess- und IT-Management -
Die Verbindung von ARIS mit IT-Infrastrukturen"
am 24.11.2005 in Köln. Anmeldungen unter
http://www.opitz-consulting.de
************************************************************
OPITZ CONSULTING Gummersbach GmbH
Christian Schmitz - Dipl.-Wirtschaftsinformatiker (FH)
Kirchstr. 6 - D-51647 Gummersbach
Telefon (Fax): +49 2261 6001-0 (-1139) - Mobil: +49 170 5545138
http://www.opitz-consulting.de
************************************************************