<?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>Developer Code book &#187; SOAP</title> <atom:link href="http://wordpressapi.com/category/javascript/soap/feed/" rel="self" type="application/rss+xml" /><link>http://wordpressapi.com</link> <description>Wordpressapi.com is focused on Wordpress API, wordpress news, wordpress themes, wordpress plugins, wordpress tips, wordpress tutorials, wordpress design wordpress templates, wordpress breaking news and web-development. We deliver useful information about wordpress,  wordpress latest trends and wordpress techniques, wordpress useful ideas, wordpress innovative approaches and wordpress tools. Social Media news blog covering cool new websites and social networks: Facebook, Google, Twitter, MySpace and YouTube.  The latest web technology news, via RSS daily.</description> <lastBuildDate>Sun, 05 Sep 2010 06:21:54 +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>how to use soap with php</title><link>http://wordpressapi.com/2010/02/23/soap-php/</link> <comments>http://wordpressapi.com/2010/02/23/soap-php/#comments</comments> <pubDate>Tue, 23 Feb 2010 19:43:42 +0000</pubDate> <dc:creator>Sony</dc:creator> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Open source]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[SOAP]]></category> <category><![CDATA[tutorials]]></category> <category><![CDATA[web service]]></category><guid
isPermaLink="false">http://wordpressapi.com/?p=1484</guid> <description><![CDATA[SOAP is a best technology that can help you in developing web services and amazing applications. Many times we heard about soap but we really dont know about what is soap. What is soap? SOAP, the Simple Object Access Protocol, is the powerhouse of web services. It’s a highly adaptable, object-oriented protocol that exists in.....]]></description> <content:encoded><![CDATA[<p>SOAP is a best technology that can help you in developing web services and amazing applications.</p><p>Many times we heard about soap but we really dont know about what is soap.</p><p>What is soap?</p><p><a
href="http://www.w3.org/TR/soap12-part0/">SOAP</a>, the Simple Object Access Protocol, is the powerhouse of web services. It’s a highly adaptable, object-oriented protocol that exists in over 80 implementations on every popular platform, including <a
href="http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptLangGuide/index.html">AppleScript</a>, JavaScript, and Cocoa. It provides a flexible communication layer between applications, regardless of platform and location. As long as they both speak SOAP, a PHP-based web application can ask a C++ database application on another continent to look up the price of a book and have the answer right away. Another <a
href="http://developer.apple.com/internet/applescript/applescripttoperl.html">Internet Developer article</a> shows how to use SOAP with AppleScript and Perl.</p><p>If you want to use the soap then you need to install <strong>libxml </strong>on your server. In your PHP.ini file</p><p>you need to check following setting are available or not if not then put it.<strong> </strong></p><table><tbody><tr
valign="middle"><td
align="left">soap.wsdl_cache_enabled</td><td
align="left">1</td><td
align="left">PHP_INI_ALL</td><td
align="left"></td></tr><tr
valign="middle"><td
align="left">soap.wsdl_cache_dir</td><td
align="left">/tmp</td><td
align="left">PHP_INI_ALL</td><td
align="left"></td></tr><tr
valign="middle"><td
align="left">soap.wsdl_cache_ttl</td><td
align="left">86400</td><td
align="left">PHP_INI_ALL</td><td
align="left"></td></tr><tr
valign="middle"><td
align="left">soap.wsdl_cache</td><td
align="left">1</td><td
align="left">PHP_INI_ALL</td><td
align="left"></td></tr><tr
valign="middle"><td
align="left">soap.wsdl_cache_limit</td><td
align="left">5</td><td
align="left">PHP_INI_ALL</td></tr></tbody></table><p>SOAP is an XML-based web service protocol. The most common external specifications used by a SOAP-based service is WSDL to describe its available services, and that, in turn, usually relies on XML Schema Data (XSD) to describe its data types. In order to &#8220;know&#8221; SOAP, it would be extremely useful to have some knowledge of WSDL and XSD. This will allow one to figure out how to use the majority of SOAP services.</p><p>Here is the basic WSDL Structure</p><pre class="brush: xml;">

&lt;definitions&gt;
 &lt;types&gt;
 …
 &lt;/types&gt;
 &lt;message&gt;
 …
 &lt;/message&gt;
 &lt;portType&gt;
 …
 &lt;/portType&gt;
 &lt;binding&gt;
 …
 &lt;/binding&gt;
 &lt;/definitions&gt;
</pre><p>Filled example:</p><pre class="brush: xml;">
 &lt;xsd:complexType name=&quot;ResultElement&quot;&gt;
 &lt;xsd:all&gt;
 &lt;xsd:element name=&quot;summary&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;xsd:element name=&quot;URL&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;xsd:element name=&quot;snippet&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;xsd:element name=&quot;title&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;xsd:element name=&quot;cachedSize&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;xsd:element name=
 &quot;relatedInformationPresent&quot; type=&quot;xsd:boolean&quot;/&gt;
 &lt;xsd:element name=&quot;hostName&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;xsd:element name=
 &quot;directoryCategory&quot; type=&quot;typens:DirectoryCategory&quot;/&gt;
 &lt;xsd:element name=&quot;directoryTitle&quot; type=&quot;xsd:string&quot;/&gt;
 &lt;/xsd:all&gt;
 &lt;/xsd:complexType&gt;
</pre><p>Soap is nothing but xml format web service to talk with cross domain servers. There are othere ways also to create web services. XML-RPC is good one and that is not to much hard to learn also. Use can use following code in your PHP file.</p><pre class="brush: php;">

// create a soap object
 $Soap_Object = new SoapClient(&quot;http://anywebsite.com/any.wsdl&quot;, array('trace' =&gt; true));

 // setting params to authenticate to web service
 $params_Authenticate = array('username' =&gt; 'username', 'password' =&gt; 'password');

 // authenticate to web service
 $do_login=  $Soap_Object-&gt;login($params_Authenticate);

 // take sesstion id from anywebsite.com
 $your_session_id= $do_login-&gt;loginReturn-&gt;sessionId;

 // Set the query parameters.

 $soap_query = 'select book_id from Time where book = 52435455';
 paramsQry = array('queryString' =&gt; $soap_query);

 // Make a soap call.
 $objResponse = $Soap_Object-&gt;query(paramsQry);

 header('Content-Type: text/xml; ');
 print($Soap_Object-&gt;__getLastRequest());
</pre><p>Soap is nothing but a web service with xml so use PHP functions to create the Soap service. Following graph will help you to understand more and in detail about SOAP.</p><p><a
href="http://wordpressapi.com/files/soap-webservice.gif"><img
class="alignleft size-medium wp-image-1485" title="soap-webservice" src="http://wordpressapi.com/files/soap-webservice-300x153.gif" alt="" width="300" height="153" /></a></p> ]]></content:encoded> <wfw:commentRss>http://wordpressapi.com/2010/02/23/soap-php/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 22/31 queries in 0.114 seconds using disk

Served from: wordpressapi.com @ 2010-09-07 13:21:15 -->