Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: xmlnillable reporting variable cant be nil  (Read 13703 times)
Jos? V.
Posts: 58


« on: May 26, 2020, 06:54:53 pm »

Hello,

Im having an issue with the xmlnillable property.

The WSDL Im using explicitly says that the tag can be nillable:
<xsd:element name="processingMessageType" nillable="true" type="xsd:string">

The code produced by fglwsdl does not include the XMLNillable property on the record and then when serializing the xml using  xml.Serializer.StaxToVariable it throws the following error:
Element 'processingMessageType': nil not allowed

This seems to be solved by manually adding the XmlNillable property on the 4gl field but the manual says this shouldn't be needed:
Quote
When getting an XML transformation into BDL, the Web Service engine will not raise an error and the variable is set correctly whether the variable tag is missing or has xsi:nil="true" set. In either case, the BDL variable is set as NULL.
https://4js.com/online_documentation/fjs-fgl-3.10.00-manual-html/#fgl-topics/c_gws_XML_attribute_XMLNillable.html

Is the manual wrong, or am I doing something wrong?

Has fglwsdl any flag that allows XmlNillable to be put in the correct fields?

I attached a small 4gl program that serializes two tags.
* Record ns1addV1Response has the xmlnillable property and works fine.
* Record ns1addV2Response throws the error.
* The xml file has both tags with nil="true"

The test was done with Genero 3.10.

Thank you,
José Virtuoso

* testeXml.4gl (1.02 KB - downloaded 1467 times.)
* teste.xml (0.46 KB - downloaded 1461 times.)
Frank G.
Four Js
Posts: 48


« Reply #1 on: June 09, 2020, 10:17:50 am »

Hi, can you please provide the WSDL file so we can check how the 4GL stub is generated.

Thanks,

Frank
Sisavanh S.
Four Js
Posts: 80


« Reply #2 on: June 09, 2020, 11:29:42 am »

Hi,

That is rather a support case than a question for the forum.
May I suggest you contact your local support center ?
Indeed, we would require the WSDL so we can test the generation of the stub.

Best regards,
Sisa.
Jos? V.
Posts: 58


« Reply #3 on: June 09, 2020, 12:01:12 pm »

I found out the problem!
Due to an enviroment problem I was using fglwsdl 3.0 for generating the stubs which did not included the xmlnillable because Fgl 3.0 does not support this property.

We do use some clients with FGL3.0 and others with FGL3.1 and that caused the enviroment confusion.

With fglwsdl from version 3.1 the xmlnillable property is placed on the stubs and that solves the problem.
Thanks you for the replies!
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines