<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 02:17:31 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Danne Lundqvist's Blog: SOAP structures in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11339</guid>
      <link>http://www.phpdeveloper.org/news/11339</link>
      <description><![CDATA[<p>
<i>Danne Lundqvist</i> is <a href="http://www.dotvoid.com/2008/10/soap-structures-in-php/">frustrated with the SOAP functionality</a> that comes native with PHP on one very specific subject - its handling of SOAP structures.
</p>
<blockquote>
Handling SOAP structures in PHP can sometimes be really annoying. If an interface is defined in the WSDL as returning an array I can't be sure that I will get an array. If there is only one element in the array PHP tries to be clever and turn the wanted array into an object which, too me, isn't really smart. I don't know if this is a problem/limitation on the client side, server side or if it is just me doing something stupid in the wsdl.
</blockquote>
<p>
He gives an example of the WSDL that was requested and the differing results from a call that returned one Map item verses several (how the objects were returned). In asking for help, it looks like he got some in the comments - an attribute called SOAP_SINGLE_ELEMENT_ARRAYS that can be added to the configuration array when creating the SoapClient object.
</p>]]></description>
      <pubDate>Tue, 04 Nov 2008 09:33:14 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Eirik Hoem's Blog: Array problems with SOAP and PHP - Updated]]></title>
      <guid>http://www.phpdeveloper.org/news/9790</guid>
      <link>http://www.phpdeveloper.org/news/9790</link>
      <description><![CDATA[<p>
<i>Eirik Hoem</i> has <a href="http://eirikhoem.wordpress.com/2008/03/13/array-problems-with-soap-and-php-updated/">posted an update</a> on a <a href="http://eirikhoem.wordpress.com/2007/05/23/array-problems-with-x-fire-soap-and-php">previous problem</a> he was having when working with SOAP in PHP and its handling of arrays.
</p>
<blockquote>
The scenario was that when an array with only one object was returned over SOAP the array was discarded and pointed straight to the single object.
</blockquote>
<p>
Come to find out, this behavior wasn't a bug, it was <a href="http://bugs.php.net/bug.php?id=36226">a feature</a> - the fix is to add another parameter to the initialization of the SoapClient to add the SOAP_SINGLE_ELEMENT_ARRAYS feature.
</p>]]></description>
      <pubDate>Thu, 13 Mar 2008 10:22:19 -0500</pubDate>
    </item>
  </channel>
</rss>
