<?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>anty.info &#187; soap</title>
	<atom:link href="http://www.anty.info/tag/soap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anty.info</link>
	<description>Comments and help on web development.</description>
	<lastBuildDate>Fri, 11 Jun 2010 14:50:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SOAP: Procedure &#8216;foo&#8217; not present</title>
		<link>http://www.anty.info/2008/09/01/soap-procedure-foo-not-present/</link>
		<comments>http://www.anty.info/2008/09/01/soap-procedure-foo-not-present/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 13:04:52 +0000</pubDate>
		<dc:creator>anty</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://www.anty.info/?p=64</guid>
		<description><![CDATA[Recently SOAP kept shouting &#8220;Procedure &#8216;foo&#8217; not present in &#8230;&#8221; at me. I assumed the mistake in my WSDL file, since I knew the function &#8220;foo&#8221; existed. If you get the &#8220;Procedure &#8216;foo&#8217; not present&#8221;-error, too you either: forgot to add the procedure &#8220;foo&#8221; to your SOAP server implementation, or you are using a cached [...]]]></description>
			<content:encoded><![CDATA[<p>Recently SOAP kept shouting &#8220;Procedure &#8216;foo&#8217; not present in &#8230;&#8221; at me.</p>
<p>I assumed the mistake in my WSDL file, since I knew the function &#8220;foo&#8221; existed.</p>
<p>If you get the &#8220;Procedure &#8216;foo&#8217; not present&#8221;-error, too you either:</p>
<ul>
<li><strong>forgot to add the procedure</strong> &#8220;foo&#8221; to your SOAP server implementation, or</li>
<li>you are <strong>using a cached version</strong> of your WSDL file at the server side.</li>
</ul>
<p>I discovered that sometimes a cached WSDL file is used, <em>although</em> you are using this code:<br />
<code class="prettyprint">ini_set(&quot;soap.wsdl_cache_enabled&quot;, &quot;0&quot;);</code><br />
If you aren&#8217;t sure whether you are using a cached version or not, you can either</p>
<ul>
<li><strong>reboot</strong> the server to clean the cache, or</li>
<li><strong>delete</strong> all files in /tmp/ starting with &#8220;wsdl-&#8221; (rm /tmp/wsdl-*)</li>
</ul>
<p>If not a cached WSDL file is causing the problem, you should check if you really have a function &#8220;foo&#8221; in your implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anty.info/2008/09/01/soap-procedure-foo-not-present/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server-side SOAP debugging in PHP</title>
		<link>http://www.anty.info/2008/08/30/server-side-soap-debugging-in-php/</link>
		<comments>http://www.anty.info/2008/08/30/server-side-soap-debugging-in-php/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 12:59:05 +0000</pubDate>
		<dc:creator>anty</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[soap]]></category>

		<guid isPermaLink="false">http://www.anty.info/?p=51</guid>
		<description><![CDATA[Debugging SOAP in PHP can be really time intensive. I found the best practice debugging SOAP is using a log file. I use this code to catch exceptions in the server implementation: $logfilePath = '/path/to/your/logfile.txt'; $debug = true; require_once('Zend/Log.php'); require_once('Zend/Log/Writer/Stream.php'); $writer = new Zend_Log_Writer_Stream(fopen($logfilePath, 'a', false)); $logger = new Zend_Log($writer); try { require_once('MySoapClass.php'); if ($debug) [...]]]></description>
			<content:encoded><![CDATA[<p>Debugging SOAP in PHP can be really time intensive.</p>
<p>I found the best practice debugging SOAP is using a log file. I use this code to catch exceptions in the server implementation:</p>
<p><span id="more-51"></span></p>
<p><code class="prettyprint">$logfilePath = '/path/to/your/logfile.txt';
$debug = true;

require_once('Zend/Log.php');
require_once('Zend/Log/Writer/Stream.php');
$writer = new Zend_Log_Writer_Stream(fopen($logfilePath, 'a', false));
$logger = new Zend_Log($writer);
try {
require_once('MySoapClass.php');
if ($debug) {
ini_set(&quot;soap.wsdl_cache_enabled&quot;, &quot;0&quot;);
}
$server = new SoapServer($wsdl_url);
$server-&gt;setClass('MySoapClass');
$server-&gt;handle();
} catch (Exception $exception) {
if ($debug) {
$logger-&gt;err($exception);
}
throw new SoapFault('MySoapServer', $exception);
}</code></p>
<p>I&#8217;m using <a href="http://framework.zend.com/manual/en/zend.log.html">Zend_Log</a> for the logging part, but you should get the idea.</p>
<p>For faster feedback I&#8217;m tailing the logfile (tail -f /path/to/your/logfile.txt) and use my usual SOAP client to do the requests.</p>
<p>This debugging technique is useful if you get errors like &#8220;looks like we got no XML document&#8221; on the client side.</p>
<p>How do <em>you</em> debug server-side SOAP code?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anty.info/2008/08/30/server-side-soap-debugging-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
