<?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>Jonathan Wijaya Loe&#039;s blog &#187; zend</title>
	<atom:link href="http://blog.jloe.net/tag/zend/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jloe.net</link>
	<description>A blog about technology blogging, tips and tricks, troubleshooting, and step by step tutorial with specialties in Microsoft .NET, C#, Zend, and PHP. Also includes wonderful and inspiring stories and jokes.</description>
	<lastBuildDate>Mon, 02 May 2011 00:05:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Image Manipulation in PHP</title>
		<link>http://blog.jloe.net/2009/06/22/image-manipulation-in-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=image-manipulation-in-php</link>
		<comments>http://blog.jloe.net/2009/06/22/image-manipulation-in-php/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:49:17 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[image manipulation]]></category>
		<category><![CDATA[image processing]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php_gd2]]></category>
		<category><![CDATA[php_imagick]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[wampserver]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=665</guid>
		<description><![CDATA[Sometimes there is a need to do simple image manipulation for certain web projects. Take for example a popular site called Flickr. Flickr is an image hosting site that allows online community to store pictures for others to view. And for some cases some uploaders may have big image files and hence a site like [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes there is a need to do simple image manipulation for certain web projects. Take for example a popular site called <a title="Click to go to Flickr" href="http://www.flickr.com/" target="_blank">Flickr</a>. Flickr is an image hosting site that allows online community to store pictures for others to view. And for some cases some uploaders may have big image files and hence a site like Flickr definitely needs some image processing to reduce the actual image into a smaller dimension, hence smaller file size, to allow quick view before actually downloading the actual size.</p>
<p>I&#8217;ve been working with <a title="Click to check about Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> quite sometime for web projects. I found it&#8217;s quite interesting to find that Zend Framework does not have any class to perform image manipulation even though a proposal for Zend_Image had been submitted to Zend community as a wrapper of existing PHP interfaces: <a title="Click to read more about GD." href="http://www.boutell.com/gd/" target="_blank">GD</a> and <a title="Click here to read about ImageMagick" href="http://www.imagemagick.org/" target="_blank">ImageMagick</a> but unfortunately <a title="Zend_Image proposal" href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+Proposal+-+Davey+Shafik" target="_blank">the proposal</a> was not considered.</p>
<p><!--adsense#az-edeal-->And for your information, GD which stands for &#8216;Gif Draw&#8217; is a standard PHP installation, unlike ImageMagick. If you wish to utilize these libraries, you need to have php extensions called php_gd2 and php_imagick respectively installed and enabled on the web server.</p>
<p>The noticeable difference between GD and ImageMagick is that GD simply does not support image format like <a title="Click to check more about TIFF" href="http://en.wikipedia.org/wiki/Tagged_Image_File_Format" target="_blank">TIFF</a> (Tagged Image File Format). If TIFF is not your issue then go for GD. And if you wish to make your development easier, you may be interested to use <a title="Click to download Thumbnail class" href="http://www.ajaxray.com/blog/2008/09/12/image-manipulation-in-zend-framework-with-php-thumbnailer-class-v20/" target="_blank">Thumbnail class</a> by our fellow developer. But if you&#8217;re looking into ImageMagick I&#8217;m going to show you the steps (from <a title="Click here to see the original post." href="http://sg.php.net/manual/en/imagick.setup.php" target="_blank">another site</a>) on how to install ImageMagick on your Windows web server as Windows installation is a bit tricky since &#8220;pecl install imagick&#8221; does NOT work properly.</p>
<ol>
<li>Download and install ImageMagick software from <a href="http://www.imagemagick.org/script/binary-releases.php#windows" target="_blank">http://www.imagemagick.org/script/binary-releases.php#windows</a>.</li>
<li>Download pecl-5.2-dev.zip (choose the version relevant to your PHP) from <a href="http://snaps.php.net/win32/" target="_blank">http://snaps.php.net/win32/</a></li>
<li>Copy php_imagick.dll from the archive you&#8217;ve downloaded to your PHP extension folder.</li>
<li>Add the following line to php.ini (in the extensions section):<br />
extension=php_imagick.dll</p>
<p>or on <a href="http://www.wampserver.com/en/" target="_blank" title="Click to go to WampServer official site">WampServer</a> click WampServer icon on taskbar, go to PHP &gt; php.ini and add the above entry.</li>
<li>Restart your server.</li>
<li>Try this example script below to verify your installation.
<pre name="code" class="php">header('Content-type: image/tif');

$image = new Imagick('example.tif');
// Create thumbnail for the specified image file.
$image-&gt;thumbnailImage(100, 0);

echo $image;</pre>
<p>The script should display the image thumbnail with a maximum width of 100 pixels.</li>
</ol>
<p>If you find the above steps are difficult to follow you may want to download php_imagick.dll <a title="Click to download" href="../wp-content/uploads/2009/06/php_imagick.zip">here</a> and start from step 3. And if you need help with these libraries, check the manual pages for <a title="Click to see the manual page." href="http://us3.php.net/manual/en/ref.image.php" target="_blank">GD</a> and <a title="Click to see the manual page." href="http://us3.php.net/manual/en/book.imagick.php" target="_blank">ImageMagick</a>.</p>
<p>Lastly if you find this post helpful, kindly leave your rating below to indicate that this post is really useful and at the same time let others know about this post. And if your wish to let other communities know about this post kindly click the sociable icons below. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/06/22/image-manipulation-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and Easy Way to Create Model Class in PHP</title>
		<link>http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quick-and-easy-way-to-create-model-class-in-php</link>
		<comments>http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/#comments</comments>
		<pubDate>Wed, 20 May 2009 15:59:17 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=511</guid>
		<description><![CDATA[Ever experienced a boring and time-consuming task where you have to create a new class for your model object: declaring list of variables and creating the getter and setter functions? &#8220;Always&#8221; is my answer. Imagine if you have a long list of variables. &#8220;Shoot! NOT AGAIN&#8221; may be the first exclamation came out from you. [...]]]></description>
			<content:encoded><![CDATA[<p>Ever experienced a boring and time-consuming task where you have to create a new class for your model object: declaring list of variables and creating the getter and setter functions? &#8220;Always&#8221; is my answer. Imagine if you have a long list of variables. &#8220;Shoot! NOT AGAIN&#8221; may be the first exclamation came out from you. And for the sake of a good software design, the creation of these functions is essential. Blessed if you have excellent <a title="Click to find out more" href="http://en.wikipedia.org/wiki/Integrated_development_environment" target="_blank">IDE</a> to generate these for you.</p>
<p>So far I&#8217;ve been working with some IDEs out there like Microsoft Visual Studio (including Express edition), Eclipse for PHP, Zend Studio, and PHP Designer, and to me Visual Studio is the most developer-friendly IDE. But this task is still repetitive to me and personally I am into the notion of DRY (Don&#8217;t Repeat Yourself).</p>
<p>Well, I finally found a way to resolve this in <strong>PHP</strong> and I&#8217;m going to share this. The code is extended based on a sample file from <a title="Click to read more." href="http://framework.zend.com/docs/quickstart" target="_blank">Zend QuickStart</a>.</p>
<pre name="code" class="php">
/**
 * This class is a helper class that allows developer to
 * create an object model easily by simply inheriting and
 * declaring their desired variables as public in the child class
 * and seamlessly creates a pair of getter and setter functions.
 */
class JLoe_Model_Object
{
  /**
   * The regular expression for get method name.
   *
   * @var string
   */
  const REGEX_GET = '/get.*/';

  /**
   * The regular expression for set method name.
   *
   * @var string
   */
  const REGEX_SET = '/set.*/';

  /**
   * Get the value of a property with method syntax.
   *
   * Map method calls to get and set the declared public variables.
   * This is used to help to create magic get and set functions seamlessly.
   *
   * @param  string $method method name
   * @param  mixed  $param  parameter values to be passed
   * @return property value or this object
   */
  public function __call( $method, $param )
  {
    // Check whether it's a get or set method, else throw exception
    if ( preg_match( self::REGEX_GET, $method ) ) {
      $isGet = true;
      $propName = str_replace( 'get', '', $method );
    }
    elseif ( preg_match( self::REGEX_SET, $method ) ) {
      $isGet = false;
      $propName = str_replace( 'set', '', $method );
    }
    else { throw new JLoe_Model_Exception( 'Invalid method' ); }

    // Check whether property name exists
    $propName = ucfirst( $propName );
    if ( ! property_exists( $this, $propName ) ) {
      throw new JLoe_Model_Exception( 'Invalid method' );
    }

    // Perform respective method call
    if ( $isGet ) { return $this-&gt;$propName; }
    else
    {
      $this-&gt;$propName = $param[0];
      return $this;
    }
  }

  /**
   * Map variable access onto the underlying method representation.
   *
   * Allow to map the variable access with the respective get method.
   *
   * @param  string $name the property name to access
   * @return mixed value depending on the underlying method called
   */
  public function __get( $name )
  {
    $method = 'get' . $name;
    if ( ('mapper' == $name) || !method_exists($this, $method) )
    {
      throw new JLoe_Model_Exception( 'Invalid property' );
    }
    return $this-&gt;$method();
  }

  /**
   * Map variable access onto the underlying method representation.
   *
   * Allow to map the variable access with the respective set method.
   *
   * @param  string $name the property name to access
   * @return instance of the inherited class
   */
  public function __set( $name, $value )
  {
    $method = 'set' . $name;
    if ( ('mapper' == $name) || !method_exists($this, $method) )
    {
      throw new JLoe_Model_Exception( 'Invalid property' );
    }
    $this-&gt;$method( $value );
  }
}
</pre>
<p>And with this, you can code your model class with just a few lines. Here goes a sample.</p>
<pre name="code" class="php">
class Quot_Model_Quote extends JLoe_Model_Object
{
  /**
   * Quote id.
   *
   * @var int
   */
  public $Id;

  /**
   * The quote
   *
   * @var string
   */
  public $Quote;

  /**
   * Tags for this quote.
   *
   * @var array
   */
  protected $_tags;
  public function getTags() { return $this-&gt;_tags; }
  public function setTags( $tags )
  {
    // Put your own logic here
    $this-&gt;_tags = $tags;
  }
}
</pre>
<p><!--adsense#co-1-->Here if you wish to allow other class to access it via its variable name, getter, or setter functions, you just need to declare the variable as public as depicted on line 8 and 15. On the other hand, if you wish to limit access to a variable, you can always declare the variable as protected and create your desired getter or setter functions associated with the variable as shown on line 22 to 27.</p>
<p>And now you may access the class as follows.</p>
<pre name="code" class="php">
$quote = new JLoe_Model_Quote();

$quote-&gt;Id   = $id;
$quote-&gt;Name = $name;
$quote-&gt;Tags = $tags;
// You may also use this
$quote
  -&gt;setId( $id )
  -&gt;setName( $name )
  -&gt;setTags( $tags )

$id   = $quote-&gt;Id;
$name = $quote-&gt;Name;
$tags = $quote-&gt;tags;
// Similar with
$id   = $quote-&gt;getId();
$name = $quote-&gt;getName();
$tags = $quote-&gt;getTags();
</pre>
<p>It&#8217;s that easy. Now I can write my model class quickly and easily for other PHP projects. Yey! <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read Remote Content or File using Zend</title>
		<link>http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=read-remote-content-or-file-using-zend</link>
		<comments>http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/#comments</comments>
		<pubDate>Tue, 05 May 2009 11:33:00 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=333</guid>
		<description><![CDATA[Today I was looking around for sample to read a remote file in PHP or even better using Zend. Well there are quite a few good samples that demonstrate the use of native PHP functions: fopen, file_get_contents, or curl but I hardly find examples using Zend. Perhaps it&#8217;s just not my luck. But the good [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was looking around for sample to read a remote file in PHP or even better using Zend. Well there are quite a few good samples that demonstrate the use of native PHP functions: fopen, file_get_contents, or curl but I hardly find examples using Zend. Perhaps it&#8217;s just not my luck. But the good thing is I managed to write my own code using Zend upon reading through few samples from <a href="http://framework.zend.com/manual/en/zend.controller.response.html">Zend documentation</a>. Here goes the code.<span id="more-333"></span></p>
<pre name="code" class="php">
/**
 * Read the remote file and send the content as the response
 *
 * @author Jonathan Loe
 * @date   May 05 2009
 */
protected function readAndSendRemoteContent( $url )
{
  // Set the configuration parameters
  $config = array( 'adapter' =&gt; 'Zend_Http_Client_Adapter_Socket' );

  // Instantiate a client object
  $client = new Zend_Http_Client( $url, $config );
  $response = $client-&gt;request();

  $this-&gt;getResponse()
    -&gt;setHeader( 'Content-type', $response-&gt;getHeader( 'Content-type' ) )
    -&gt;appendBody( $response-&gt;getRawBody() )
    -&gt;sendResponse();
}
</pre>
<p>First line of code is to set the adapter as Zend_Http_Client_Adapter_Socket. Next line is to specify the remote url along with the adapter set in the config and make the request. My last code is to send whatever was received and send it to the client as a response with the same &#8216;Content-type&#8217;. $this refers to the instance of the Zend controller class.</p>
<p>It&#8217;s that simple hey? <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>PS: If you&#8217;re looking for other samples which demonstrate use of the native functions. Here are a few links you may be interested in.</p>
<p>Links:</p>
<ul>
<li><a href="http://www.php-mysql-tutorial.com/wikis/php-tutorial/reading-a-remote-file-using-php.aspx" target="_blank">Reading a Remote File Using PHP</a></li>
<li><a href="http://www.humanumbrella.com/2007/12/08/how-to-download-a-remote-file-in-php-and-then-save-it/" target="_blank">How to download a remote file in php and then save it</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Start SOAP with Zend Framework</title>
		<link>http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=start-soap-with-zend-framework</link>
		<comments>http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 01:37:51 +0000</pubDate>
		<dc:creator>Jonathan Loe</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[wampserver]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[wsdl]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend_soap_client]]></category>
		<category><![CDATA[zend_soap_server]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=139</guid>
		<description><![CDATA[SOAP? Hang on.. This is not the soap you probably first think of from your daily life. This is the SOAP in Information Technology term. Sorry but don't mean to discriminate anyone out there ;)]]></description>
			<content:encoded><![CDATA[<p>SOAP? Hang on.. This is not the soap you probably first think of from your daily life. This is the SOAP in Information Technology term. Sorry but don&#8217;t mean to discriminate anyone out there <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>For readers who have no idea what SOAP is. Here&#8217;s a short explanation about SOAP as defined by <a title="What is SOAP?" href="http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci214295,00.html" target="_blank">TechTarget</a>.</p>
<blockquote><p>SOAP (Simple Object Access Protocol) is a way for a program running in one kind of operating system (such as Windows 2000) to communicate with a program in the same or another kind of an operating system (such as Linux) by using the World Wide Web&#8217;s Hypertext Transfer Protocol (HTTP)and its Extensible Markup Language (XML) as the mechanisms for information exchange.</p></blockquote>
<p>Here I will share my step-by-step guide on how to start your SOAP application using PHP and Zend as your Model View Controller (MVC) framework. First, I have the following application and framework installed. But I will not explain in detail about them in this post.</p>
<ul>
<li><a title="WampServer" href="http://www.wampserver.com/" target="_blank">WampServer</a></li>
<li><a title="Zend Framework" href="http://framework.zend.com/download" target="_blank">Zend Framework 1.7.5</a></li>
</ul>
<p>To start, first you need to enable a php extension called <em>php_soap</em>. In WampServer, this module has been pre-installed but you need to enable the module by the following steps.</p>
<ol>
<li>Click WampServer icon on the tray.</li>
<li>Select PHP &gt; PHP Extension.</li>
<li>And finally click php_soap to enable it.</li>
</ol>
<p>Then, we create a simple class called <em>Models_Writer</em> which has a function <em>write</em> that returns the specified string to the calling function.</p>
<pre name="code" class="php">
class Models_Writer
{
  /**
   * Return the specified text
   *
   * @param string $string
   * @return string
   */
  public function write( $string )
  {
    return $string;
  }
}
</pre>
<p>Followed by a simple action function called <em>wsdlAction</em> which renders generated <em>WSDL</em> for the class <em>Models_Writer</em> using <em>Zend_Soap_AutoDiscover</em>. Hey hey stop! what the heck is <em>WSDL</em>?. In short,</p>
<blockquote><p>WSDL or Web Services Description Language is an XML-based language that provides a model for describing Web services.</p></blockquote>
<p>Follow this <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language">link</a> on wikipedia to help you along with what exactly is WSDL.</p>
<p>Moving on&#8230;</p>
<pre name="code" class="php">
/**
 * Render the WSDL
 */
public function wsdlAction()
{
  $wsdl = new Zend_Soap_AutoDiscover();
  $wsdl-&gt;setUri( APP_URL . '/index/' );
  $wsdl-&gt;setClass( 'Models_Writer' );
  $wsdl-&gt;handle();
  exit;
}
</pre>
<p><!--adsense#az-edeal-->As shown on line 7, <em>APP_URL</em> is to be replaced with the url of the application (ie. http://localhost/). You may define <em>APP_URL</em> inside <em>bootstrap.php</em> for global use. Function <em>setUri</em> is used to define the url used as the server. In this example, the <em>indexAction</em> is used to serve as the Soap server. And to verify the generated <em>WSDL</em> is correct, use your browser and type http://localhost/index/wsdl<strong><span style="text-decoration: underline;">/</span></strong> with the assumption that all Action functions in this example will be coded inside <em>IndexController</em> class. This url should returns with the correct <em>WSDL</em>. Please take note of the url though, that it must end with a backslash &#8216;/&#8217;.</p>
<p>And if browser returns with an error message below.</p>
<pre name="code" class="html">
XML Parsing Error: XML or text declaration not at start of entity
</pre>
<p>Please make sure there isn&#8217;t any trailing spaces before the <em>&lt;?php</em> and after <em>?&gt;</em> in your php file.</p>
<p>Next, we shall look at the code to create your Soap server.</p>
<pre name="code" class="php">
/**
 * Serve as the web service
 */
public function indexAction()
{
  $server = new Zend_Soap_Server( APP_URL . '/index/wsdl/' );
  $server-&gt;setClass( 'Models_Writer' );
  $server-&gt;handle();
  exit;
}
</pre>
<p>The above code instantiates <em>Zend_Soap_Server</em> with the url to the generated <em>WSDL</em> and set the class as <em>Models_Writer</em> and finally quits upon handling the request. Ok, now the <em>indexAction</em> is ready to serve as a Soap server.</p>
<p>Finally, to make sure that the server is handling the request correctly, let&#8217;s create the Soap client that makes a Soap request to the server.</p>
<pre name="code" class="php">
/**
 * Client to request from web service
 */
public function clientAction()
{
  $client = new Zend_Soap_Client( APP_URL . '/index/wsdl/' );
  $response = $client-&gt;write( 'hello world' );
  var_dump( $response );
  exit;
}
</pre>
<p>The above code first instantiates <em>Zend_Soap_Client</em> with the specified url to the <em>WSDL</em>. Line below then calls the function <em>write</em> from the server. Here, you were probably wondering where in the code have we specified the server url. Well, if you recall the previous code when we first created the <em>WSDL</em>, we has actually specified the Soap server url. As a result, Soap client is able to know the server url from the <em>WSDL</em>.</p>
<p>Now try access http://localhost/index/client/, the page should return you with the following line:</p>
<pre name="code" class="html">
string(11) "hello world"
</pre>
<p>Phew! it&#8217;s along explanation for a simple task. My arms are getting cramped now. I hope you are following well with my explanation. If not, well, I have a sample file you can <a href="http://blog.jloe.net/wp-content/uploads/2009/04/jloe-soap.zip">download</a> and test it on your local. I hope it works well. If not, let me know of your encounter.</p>
<p>Well, while experimenting this I have a stumbling block which I managed to find a solution to it. Here goes the encounter.</p>
<p>If you encounter the following error message:</p>
<pre name="code" class="html">
Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:wampbinphpphp5.2.8
includesZendSoapWsdl.php on line 94
Fatal error: Call to undefined method domdocument::loadXML() in C:wampbinphpphp5.2.8
includesZendSoapWsdl.php on line 95
</pre>
<p>You need disable <em>php_domxml</em> on your WampServer.</p>
<p>I hope I give enough information. Feel free to give your feedback. If you find this post useful, please help leave your rating below. Thanks! Happy coding! <img src='http://blog.jloe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Source:</p>
<ul>
<li><a target="_blank" href="http://electrotek.wordpress.com/2008/04/19/soap-web-service-with-zend-framework/">SOAP web service with Zend Framework</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

