Title: XMLSequence serialisation with fields out of order Post by: Lu?s T. on September 30, 2022, 11:33:35 am We ate migrating some webservices from axis (java). With axis it does not complain if the fields come out of order, even if the type is a sequence. That's not what the specification says but it is how it works.
When migrating to GWS, the type generated has the XMLSequence attribute and, if you send a XML request with the fields out of order, the Genero serialisation engine gives an error. Is there any way to make the serialisation engine ignore this error? We thought to use XMLAll instead but it is not compatible with a XMLList as a child, that is something we have a lot. Title: Re: XMLSequence serialisation with fields out of order Post by: Sisavanh S. on October 04, 2022, 03:23:00 pm Hi,
Indeed, XMLAll would have been a good option but unfortunately as you noticed that does not work with XMLList. A solution could be to modify the 4GL generated stub to fit what Axis is doing. Could you provide a test sample to your local support center with the xml sample so they can test and see if there is another solution ? TIA. Best regards, Sisa. Title: Re: XMLSequence serialisation with fields out of order Post by: Lu?s T. on October 11, 2022, 04:42:39 pm Hi,
I attached an example. We have multiple customers using the AXIS versión and they can call the webservices using using different order for the elements of a record. What we really need is support to XMLAll record with XMLList inside. I hope you can find us a solution. Thanks Luis Title: Re: XMLSequence serialisation with fields out of order Post by: Jos? V. on October 13, 2022, 03:52:03 pm Hi,
indeed xmlall does not support xmllist as an element. I tested fglwsdl on a wsdl with one of this cases and it throws an error. It looks like this use case is not supported: <xs:complexType name="agendaIn"> <xs:all> <xs:element maxOccurs="unbounded" minOccurs="0" name="agendaDetail" nillable="true" type="tns:agendaDetail"/> <xs:element minOccurs="0" name="deleteOldRegisters" type="xs:string"/> <xs:element minOccurs="0" name="pronum" type="xs:int"/> </xs:all> </xs:complexType> When generating stubs I get the following error: VALIDATION ERROR (1840) ON FILE 'LeaseProposalService_schema1.xsd' AT LINE 680: Element '{httplement of the set {'0', '1'}. VALIDATION ERROR (1826) ON FILE 'LeaseProposalService_schema1.xsd' AT LINE 680: Element '{httpe. ERROR : Element 'maxOccurs' value must be one in 'All'. Title: Re: XMLSequence serialisation with fields out of order Post by: Lu?s T. on October 13, 2022, 04:02:44 pm Just one clarification.
If Genero supports XMLAll with XMLList we will be able (we hope) to solve our issue, changing all XMLSequence to XMLAll. Another way to solve this, which can be easier for FourJs to implement, is to add a serialization option flags for the xml.Serializer to control if it validates or not the order of elements inj a sequence. This last solution is also better for us as we don't need to modify so much code. |