Hello Christian!
Thankyou very much for your swift response, and you are indeed correct!
I added the 'wrapArrays="true"' to the ant task and everything generated
as expected and now my messages are full of extra nilable elements and
work just fine with no changes to my processing code at all! A direct
upgrade - great!
Thankyou Sir, and much respect to you.
Regards,
Tim
PS: Maybe it would be worth setting 'wrapArrays="true"' by default,
because in my case when set to false WSDL2Java actually created
non-compilable code in one case, and in the others forced me to change
alot of the message processing code? Or is my usage an exception to
normal usage?
Christian Schmitz wrote:
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