<?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>Wed, 19 Jun 2013 03:15:34 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Eirik Hoem's Blog: Setting xsi:type for objects sent over SOAP (inheritance)]]></title>
      <guid>http://www.phpdeveloper.org/news/9822</guid>
      <link>http://www.phpdeveloper.org/news/9822</link>
      <description><![CDATA[<p>
<i>Eirik Hoem</i> has <a href="http://blog.eirikhoem.net/index.php/2008/03/17/setting-xsitype-for-objects-sent-over-soap-inheritance/">posted a tip</a> for all of the PHP SOAP developers out there - a method for setting the xsi:type correctly for objects sent in the message.
</p>
<blockquote>
I spent quite some time looking for info on how to specify the xsi:type for the objects, and I finally came across <a href="http://no.php.net/manual/en/function.soap-soapvar-construct.php">SoapVar</a>. I created a base class which the SOAP classes extended. A method called pack is responsible for setting xsi:type.
</blockquote>
<p>
In <a href="http://blog.eirikhoem.net/index.php/2008/03/17/setting-xsitype-for-objects-sent-over-soap-inheritance/">his example</a>, he creates a BaseClass to work from and builds a createCustomer class on top of it, defining a setCustomer function inside. When the new Person is created, a new Customer is too complete with the correctly formatted type on the object.
</p>]]></description>
      <pubDate>Wed, 19 Mar 2008 10:26:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Web Services Blog: Payload the Way You Want with PHP5 built-in SOAP]]></title>
      <guid>http://www.phpdeveloper.org/news/9531</guid>
      <link>http://www.phpdeveloper.org/news/9531</link>
      <description><![CDATA[<p>
The PHP Web Services blog has a <a href="http://phpwebservices.blogspot.com/2008/01/payload-way-you-want-with-php5-built-in.html">helpful hint</a> on getting a custom SOAP request all ready to go:
</p>
<blockquote>
How do you get this [custom] XML to be output by the SoapClient?
</blockquote>
<p>
Using the SoapVar method and a few newly created objects, making a custom structure is simple. It's just a matter of encoding the object and setting it with the base() method in the <a href="http://www.php.net/soap">PHP SOAP extension</a>. Check out <a href="http://phpwebservices.blogspot.com/2008/01/payload-way-you-want-with-php5-built-in.html">the blog post</a> for an example of both the custom XML and the code to produce it.
</p>]]></description>
      <pubDate>Wed, 30 Jan 2008 15:00:31 -0600</pubDate>
    </item>
  </channel>
</rss>
