I have a web service I am trying to call using a mainframe integration product (DataDirect Shadow z/Services), but my question is more of a general one. I want to know how an element defined as minOccurs="0" is typically handled. The operation on the 3rd party service I am calling has a complexType element where all of the elements within it are marked minOccurs="0".
Example from WSDL
<xs:element minOccurs="0" name="Request">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="startDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="endDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="requestId" type="tns:ObjectName"/>
<xs:element minOccurs="0" name="reasonCode" type="xs:string"/>
<xs:element minOccurs="0" name="actionType" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="unbounded" name="option" type="xs:string"/>
<xs:element minOccurs="0" name="comments" type="xs:string"/>
<xs:element minOccurs="0" name="Name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The way this service works on the other end, if a value is passed to the service, even if it is null or blank or default, the value will be updated on the 3rd party system. I need a way to OMIT that element in the payload to the service. How is that generally handled? I have tried using C# as a client for this service but the only thing I can find that they provide is the Specified
suffixed variable for non-primitive types, but didn't find a way to omit primitive ones. If I was calling this web service by simply POST
ing the SOAP message to the 3rd party server I could simply omit the XML for the value I did not want to pass, but I am just wondering how different web service client implementations handle this.
If it helps I believe the 3rd party is using Apache Axis and said they could omit the optional arguments.