Hi all,
I have a web service where some of the variables must be optional. I changed the globals definition to include 'attribute (XMLOptional)' as descibed in the manual:--
globals
define
g_ws_gr_complete_in record
bill_of_lading like imp_cst_line.bill_of_lading,
container_no like imp_cst_line.cont_no attribute(XMLOptional),
pack_list_id integer attribute(XMLOptional),
order_no integer attribute(XMLOptional),
payment_ref_no like imp_cst_line.payment_ref_no attribute(XMLOptional),
sap_key string,
del_reason1 like bol_hdr.del_reason1 attribute(XMLOptional),
del_reason2 like bol_hdr.del_reason2 attribute(XMLOptional),
del_reason_code smallint attribute(XMLOptional)
end record,
It compiles fine, but when I get the WSDL, I find that the attributes have been ignored:--
- <wsdl:message name="GR_Completion">
<wsdl:part name="bill_of_lading" type="fjs:GR_Completion_bill_of_lading" />
<wsdl:part name="container_no" type="fjs:GR_Completion_container_no" />
<wsdl:part name="pack_list_id" type="xsd:int" />
<wsdl:part name="order_no" type="xsd:int" />
<wsdl:part name="payment_ref_no" type="fjs:GR_Completion_payment_ref_no" />
<wsdl:part name="sap_key" type="xsd:string" />
<wsdl:part name="del_reason1" type="fjs:GR_Completion_del_reason1" />
<wsdl:part name="del_reason2" type="fjs:GR_Completion_del_reason2" />
<wsdl:part name="del_reason_code" type="xsd:short" />
And when I test with null values, an error is returned:--
dcdev5:D:5.5.6 Development 2.02.06:/home/mark/dcs/mf_int/XWX2IB.4gs/test>fglrun test_client.42r MVDCPT070000055 "" "" "" "" D "MARK TEST" ">
-1
XML Element 'container_no': Element cannot not be null
How do I fix this?
Thanks in advance.