Invalid values in u0093Read Outbound Deliveryu0094 response?
<b>Issue:</b> The <a href="http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=1B491BE4E28711DB2B24000F20DAC9EF&fragID=&packageid=DBBB6D8AA3B382F191E0000F20F64781&context=&iv=">Read Outbound Delivery</a> service (<b>ECC_OUTBOUNDDELIVERY000QR</b>)
generates a response (OutboundDeliveryByIDResponse_sync/OutboundDelivery ) which contains invalid XML values according to their data types.
Following request was sent:
<b>1.</b> The <b><i>DeliveryTerms/OrderCombinationAllowedIndicator</i></b> element contained a value of X, which is an invalid according to its type="Indicator".
<b>2.</b> The<i><b> Item/LastChangeDateTime</b></i> element contained an invalid value of 0000-00-00T00:00:00.
1. The <b>Indicator</b> type, which is essentially a wrapper around xsd:Boolean data type can only contain values: <i>true</i>, or <i>false</i>.
Following are the excerpts from its WSDL type definition:
<xsd:element name="OrderCombinationAllowedIndicator" type="Indicator" minOccurs="0"/> <xsd:simpleType name="Indicator"><xsd:restriction base="xsd:boolean"/></xsd:simpleType>
<b>2.</b> The<i><b> Item/LastChangeDateTime</b></i> element contains an invalid DateTime field value (the nearest valid value would be 0001-01-01T00:00:00.
<xsd:complexType name="DateTime"> <xsd:simpleContent> <xsd:extension base="xsd:dateTime"> <xsd:attribute name="timeZoneCode" type="TimeZoneCode"/> <xsd:attribute name="daylightSavingTimeIndicator" type="xsd:boolean"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType>
The service consumers, who have their data types auto-generated in their proxy classes according to the WSDL, would receive runtime framework errors in their programs. The runtime systems would try to de-Serialize the eSOA response XML into the fields of their .NET or Java Objects; and because of invalid values, just fail to parse them into variables of those types <i>(bool and DateTime).</i>
I was really surprise to observe this interesting phenomenon. It is hard for me to characterize it as a benign bug/overlook. May be I am failing to understand the entire process, and therefore seeking help from <i>eSOA</i> <b>gurus</b> (even at <b>SAP</b>). Following questions instinctively pop up into my mind:
-- Is the XSD Data Type checking being performed at eSOA service output level? If so, did this specific data <i>actually</i> <b>validate</b> in conformance with <b>type</b> declarations within their WSDL?
-- If the data type was boolean in the backend system, how come the value "X" could be stored in that. How is the <b>eSOA</b> server serializer streaming out a value "X" for a boolean field ...??