I’m having a issue related to using nillable="true" and minOccurs="0" attributes on the same element.  When setting these elements to null the placeholder for the element with xsi:nil="true" is only being sent when the element does not have the minOccurs="0" .  I have a example included below to display both the packet sent from axis and the same packet sent using PHP 5.0 distributed SOAP.  Why does axis not sent the place holder for promiseDate since it has the nillable=”true” and the element was set to null? Is this a known bug or a configuration detail?

 

//WSDL for updateJob service
<xsd:complexType name="Job">
<xsd:sequence>
<xsd:element name="promiseDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<xsd:element name="dateSetup" nillable="true" type="xsd:dateTime"/>
</xsd:sequence>
</xsd:complexType>

//Java code for setting attributes for the service
job.setPromiseDate( null );
job.setDateSetup( null );

//Packet sent to Web Service
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<updateJob xmlns="urn://pace2020.com/epace/sdk/UpdateObject">
<job>
<ns15:dateSetup xsi:nil="true" xmlns:ns15="http://pace2020.com/epace/object"/>
</job>
</updateJob>
</soapenv:Body>
</soapenv:Envelope>

 

 

//PHP 5.0 distributed SOAP lib

// code for setting attributes for the service

$existingJob -> promiseDate = null;

$existingJob -> dateSetup = null;

 

//Packet sent to Web Service

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<updateJob xmlns="urn://pace2020.com/epace/sdk/UpdateObject">
<job>

<ns15:promiseDate xsi:nil="true" xmlns:ns15="http://pace2020.com/epace/object"/>
<ns15:dateSetup xsi:nil="true" xmlns:ns15="http://pace2020.com/epace/object"/>
</job>
</updateJob>
</soapenv:Body>
</soapenv:Envelope>

 

 

Jerry DuVal
Pace Systems Group, Inc.
800.624.5999
www.Pace2020.com

 

Reply via email to