<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LAMPlights &#187; wsdl</title>
	<atom:link href="http://www.hermanradtke.com/blog/tag/wsdl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hermanradtke.com</link>
	<description>Personal anecdotes from my experiences using the LAMP stack</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:14:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Zend_Soap_AutoDiscover and eAccelerator</title>
		<link>http://www.hermanradtke.com/blog/zend_soap_autodiscover-and-eaccelerator/</link>
		<comments>http://www.hermanradtke.com/blog/zend_soap_autodiscover-and-eaccelerator/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 05:14:13 +0000</pubDate>
		<dc:creator>Herman Radtke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eaccelerator]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[zendframework]]></category>

		<guid isPermaLink="false">http://www.hermanradtke.com/blog/?p=255</guid>
		<description><![CDATA[The Zend Framework ships with SOAP functionality and one especially neat class called Zend_Soap_AutoDiscover.  This class uses a comment docblock to auto-generate a WSDL at runtime.  I won't go into the details how it works here, but you can check the Zend Framework documentation for an example.  When using this class at work, I noticed [...]]]></description>
			<content:encoded><![CDATA[<p>The <a class="zem_slink" title="Zend Framework" rel="homepage" href="http://framework.zend.com/">Zend Framework</a> ships with <a class="zem_slink" title="SOAP" rel="wikipedia" href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> functionality and one especially neat class called Zend_Soap_AutoDiscover.  <a href="http://framework.zend.com/"><img class="alignright" title="Zend Framework Logo" src="http://framework.zend.com/images/logo_small.gif" alt="" width="123" height="23" /></a>This class uses a comment docblock to auto-generate a <a class="zem_slink" title="Web Services Description Language" rel="wikipedia" href="http://en.wikipedia.org/wiki/Web_Services_Description_Language">WSDL</a> at runtime.  I won't go into the details how it works here, but you can check the <a href="http://framework.zend.com/manual/en/zend.soap.autodiscovery.html">Zend Framework documentation</a> for an example.  When using this class at work, I noticed the WSDL would not always generate correctly.  After a lot of digging around, I found the cause: eAccelerator.</p>
<p><span id="more-255"></span></p>
<p>eAccelerator is an opcode cache.  An opcode cache saves the compiled version of a script so <a class="zem_slink" title="PHP" rel="homepage" href="http://www.php.net/">PHP</a> does not have to parse it again.  eAccelerator also<a href="http://eaccelerator.net/ticket/229"> strips out comments</a> from the script by default.  That means once your script gets cached, the Zend_Soap_AutoDiscover class has no way of correctly auto-generating the WSDL.</p>
<p><a href="http://eaccelerator.net/"><img class="alignnone" title="eAccelerator logo" src="http://eaccelerator.net/chrome/common/eaccelerator.png" alt="" width="247" height="33" /></a></p>
<p>Fortunately, there are some easy solutions to this problem.  The easiest is to configure eAccelerator 0.9.6 to not strip out the comments.  When compiling eAccelerator, specify the --with-eaccelerator-doc-comment-inclusion switch in the configure script.  Install the new compiled version and make sure to <em>clean</em> out your existing cache directory.</p>
<p>Now if you are running eAccelerator 0.9.5, like me, and are unable to upgrade there is still hope.  eAccelerator comes with some ini settings that allow us to not cache scripts.  Using the eaccelerator.filter setting, we can tell eAccelerator to ignore scripts by filename.  You can set it in your php.ini file or just specify it at runtime:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'eaccelerator.filter'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'!foo/Bar.php !baz.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>With comments preseved, the Zend_Soap_AutoDiscover class will be able to properly generate the WSDL.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/a0294b42-5e52-4c18-a54b-c96c3d9d7afa/"><img class="zemanta-pixie-img" style="border: medium none ; float: left;" src="http://img.zemanta.com/reblog_e.png?x-id=a0294b42-5e52-4c18-a54b-c96c3d9d7afa" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.hermanradtke.com/blog/zend_soap_autodiscover-and-eaccelerator/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

