While using PHP SOAP as a framework for my PHP TRKD client (this is the approach that was implemented in the PHP coding samples) I noticed that some elements from the request object were not serialized properly.
(We noticed this mostly frequently with the filter for the News service.) Here is an example below.
This object
WebServices_News1_RetrieveHeadlineML1Request Object
(
[HeadlineMLRequest] => WebServices_News1_HeadlineMLRequest Object
(
[TimeOut] =>
[MaxCount] => 10
[StartTime] => 2010-11-24T13:01:41
[EndTime] => 2010-11-25T13:01:41
[Filter] => Array
(
[MetaDataConstraint] => Array
(
[class] => topics
[Value] => GEG
)
)
)
)
would surprisingly serialize into an XML request with an empty Value element:
<env:Body>
<ns1:RetrieveHeadlineML_Request_1>
<ns1:HeadlineMLRequest>
<ns1:TimeOut>0</ns1:TimeOut>
<ns1:MaxCount>10</ns1:MaxCount>
<ns1:StartTime>2010-11-24T13:01:41</ns1:StartTime>
<ns1:EndTime>2010-11-25T13:01:41</ns1:EndTime>
<ns1:Filter>
<ns2:MetaDataConstraint>
<ns2:Value/>
</ns2:MetaDataConstraint>
</ns1:Filter>
</ns1:HeadlineMLRequest>
</ns1:RetrieveHeadlineML_Request_1>
</env:Body>
How can we work around this issue?