<?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>Web development &#187; Score</title>
	<atom:link href="http://sourcecodemoney.com/tag/score/feed/" rel="self" type="application/rss+xml" />
	<link>http://sourcecodemoney.com</link>
	<description>Use source code for money</description>
	<lastBuildDate>Mon, 21 Nov 2011 12:03: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>SOAP PHP example</title>
		<link>http://sourcecodemoney.com/soap-php-example/php-code/</link>
		<comments>http://sourcecodemoney.com/soap-php-example/php-code/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 13:31:32 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[PHP code]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Current]]></category>
		<category><![CDATA[Documentation]]></category>
		<category><![CDATA[Element Name]]></category>
		<category><![CDATA[Goal Scorers]]></category>
		<category><![CDATA[Input Message]]></category>
		<category><![CDATA[Input Operation]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Output Message]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[Php Example]]></category>
		<category><![CDATA[Score]]></category>
		<category><![CDATA[Simple Object Access Protocol]]></category>
		<category><![CDATA[Soap]]></category>
		<category><![CDATA[Soap Example]]></category>
		<category><![CDATA[Soap Php Example]]></category>
		<category><![CDATA[Soap Php Sample]]></category>
		<category><![CDATA[Soap Protocol]]></category>
		<category><![CDATA[Soap Sample]]></category>
		<category><![CDATA[Soapclient]]></category>
		<category><![CDATA[Web Access]]></category>
		<category><![CDATA[Web Service]]></category>
		<category><![CDATA[Wsdl]]></category>
		<category><![CDATA[Xs]]></category>

		<guid isPermaLink="false">http://sourcecodemoney.com/?p=26</guid>
		<description><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		This article will show how to do web service using SOAP (Simple Object Access Protocol). You can use SOAP using your PHP. It is usually enabled by default. You can check whether you have SOAP in your phpinfo setting. For the example we will be using this WSDL. You can see that it have the [...]]]></description>
			<content:encoded><![CDATA[		<link href="http://sourcecodemoney.com/wp-content/plugins/diggme/css.css" rel="stylesheet" type="text/css" />
		<div id="diggbutton"><a href="http://digg.com/submit?phase=2&amp;url=http://sourcecodemoney.com/soap-php-example/php-code/"><img src="http://sourcecodemoney.com/wp-content/plugins/diggme/digg.png"></a></div><p>This article will show how to do web service using SOAP (Simple Object Access Protocol). You can use SOAP using your PHP. It is usually enabled by default. You can check whether you have SOAP in your phpinfo setting.</p>
<p>For the example we will be using <a rel="nofollow" href="http://euro2008.dataaccess.eu/footballpoolwebservice.wso?WSDL" target="_blank">this</a> WSDL. You can see that it have the <strong><em>TopGoalScorers </em></strong>operation:</p>
<p><strong><em>&lt;operation name=&#8221;TopGoalScorers&#8221;&gt;<br />
&lt;documentation&gt;<br />
Returns an array with the top N goal scorers and their current score. Pass 0 as TopN and you get them all.<br />
&lt;/documentation&gt;<br />
&lt;input message=&#8221;tns:TopGoalScorersSoapRequest&#8221;/&gt;<br />
&lt;output message=&#8221;tns:TopGoalScorersSoapResponse&#8221;/&gt;<br />
&lt;/operation&gt;</em></strong></p>
<p>And the operation have the input message:</p>
<p><strong><em>&lt;message name=&#8221;TopGoalScorersSoapRequest&#8221;&gt;<br />
&lt;part name=&#8221;parameters&#8221; element=&#8221;tns:TopGoalScorers&#8221;/&gt;<br />
&lt;/message&gt;</em></strong></p>
<p>The input operation have one parameter from the element &#8220;<strong><em>TopGoalScorers</em></strong>&#8220;. The parameter is <strong><em>iTopN </em></strong>which have int value.</p>
<p><strong><em>&lt;xs:element name=&#8221;TopGoalScorers&#8221;&gt;<br />
&lt;xs:complexType&gt;<br />
&lt;xs:sequence&gt;<br />
&lt;xs:element name=&#8221;iTopN&#8221; type=&#8221;xs:int&#8221;/&gt;<br />
&lt;/xs:sequence&gt;<br />
&lt;/xs:complexType&gt;<br />
&lt;/xs:element&gt;</em></strong></p>
<p>The return value from the output message is <em><strong>ArrayOftTopGoalScorer</strong></em>:</p>
<p><em><strong>&lt;xs:element name=&#8221;TopGoalScorersResponse&#8221;&gt;<br />
&lt;xs:complexType&gt;<br />
&lt;xs:sequence&gt;<br />
&lt;xs:element name=&#8221;TopGoalScorersResult&#8221; type=&#8221;tns:ArrayOftTopGoalScorer&#8221;/&gt;<br />
&lt;/xs:sequence&gt;<br />
&lt;/xs:complexType&gt;<br />
&lt;/xs:element&gt;</strong></em></p>
<p><em><strong>&lt;xs:complexType name=&#8221;ArrayOftTopGoalScorer&#8221;&gt;<br />
&lt;xs:sequence&gt;<br />
&lt;xs:element name=&#8221;tTopGoalScorer&#8221; type=&#8221;tns:tTopGoalScorer&#8221; minOccurs=&#8221;0&#8243; maxOccurs=&#8221;unbounded&#8221; nillable=&#8221;true&#8221;/&gt;<br />
&lt;/xs:sequence&gt;<br />
&lt;/xs:complexType&gt;</strong></em></p>
<p>The return element is <em><strong>tTopGoalScorer, </strong></em>have two value <strong><em>sName </em></strong>(string)<strong><em> and </em></strong><strong><em>iGoals</em></strong> (int).</p>
<p><strong><em>&lt;xs:complexType name=&#8221;tTopGoalScorer&#8221;&gt;<br />
&lt;xs:sequence&gt;<br />
&lt;xs:element name=&#8221;sName&#8221; type=&#8221;xs:string&#8221;/&gt;<br />
&lt;xs:element name=&#8221;iGoals&#8221; type=&#8221;xs:int&#8221;/&gt;<br />
&lt;/xs:sequence&gt;<br />
&lt;/xs:complexType&gt;</em></strong></p>
<p>So the code will be:</p>
<div id="code">$client = new SoapClient(&#8220;http://euro2008.dataaccess.eu/footballpoolwebservice.wso?WSDL&#8221;);</p>
<p>$params = array(&#8216;iTopN&#8217; =&gt; 3);</p>
<p>result = $client-&gt;TopGoalScorers($params);</p>
<p>print_r($result-&gt;TopGoalScorersResult);</p></div>
]]></content:encoded>
			<wfw:commentRss>http://sourcecodemoney.com/soap-php-example/php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

