<?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>Wapple Blog &#187; REST</title>
	<atom:link href="http://blog.wapple.net/tag/rest/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.wapple.net</link>
	<description>Addicted to Mobile Web</description>
	<lastBuildDate>Wed, 25 Jan 2012 20:51:24 +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>REST assured &#8211; you don&#8217;t need SOAP</title>
		<link>http://blog.wapple.net/rest-assured-you-dont-need-soap/</link>
		<comments>http://blog.wapple.net/rest-assured-you-dont-need-soap/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 09:52:35 +0000</pubDate>
		<dc:creator>Rich Gubby</dc:creator>
				<category><![CDATA[Architect Changelog]]></category>
		<category><![CDATA[Changelog]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Mobile Web Coding Tutorials]]></category>
		<category><![CDATA[Mobile Web Development]]></category>
		<category><![CDATA[Architect]]></category>
		<category><![CDATA[Coding Mobile Web Pages]]></category>
		<category><![CDATA[Mobile Device Detection]]></category>
		<category><![CDATA[Mobile Phone Detection]]></category>
		<category><![CDATA[Mobile Website Development]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[WAPL]]></category>
		<category><![CDATA[Wapple]]></category>
		<category><![CDATA[web services]]></category>

		<guid isPermaLink="false">http://mobilewebjunkie.com/?p=1174</guid>
		<description><![CDATA[Overcoming the barriers of mobile web design and development &#8211; it&#8217;s the tagline of our blog and something that we strive towards each and every day. We&#8217;ve given the development community some amazing tools that allow you to create some fantastic mobile sites and we&#8217;ve created plugins, components and classes that help you at every [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter size-full wp-image-1255" title="soaprest1" src="http://mobilewebjunkie.com/wp-content/uploads/2009/08/soaprest1.jpg" alt="soaprest1" width="498" height="203" /></p>
<p>Overcoming the barriers of mobile web design and development &#8211; it&#8217;s the tagline of our blog and something that we strive towards each and every day.</p>
<p>We&#8217;ve given the development community some amazing tools that allow you to create some fantastic mobile sites and we&#8217;ve created <a href="http://wordpress.org/extend/plugins/wapple-architect//">plugins</a>, <a href="http://bakery.cakephp.org/articles/view/universal-mobilization-with-wapl">components</a> and <a href="http://www.phpclasses.org/browse/package/5491.html">classes </a>that help you at every step.</p>
<p><span id="more-1174"></span>But one thing every Wapple Architect application has in common, is that in order to use it, it must be done via <a href="http://en.wikipedia.org/wiki/SOAP">SOAP</a>.</p>
<p>Or should I say, used to have in common, because this week we&#8217;ve created and released a REST web service for every SOAP call you can make.</p>
<h4>Using Wapple Architect with CURL</h4>
<p>What this means as a developer is that you can choose whichever method you want to communicate with Wapple Architect. If you want to use SOAP, carry on doing what you&#8217;ve always done, but if you want to use REST, use it. And to show how easy that can be, here&#8217;s how you would check if a visitor to your site is mobile or not using PHP and CURL:</p>
<pre class="brush:php">&lt;?php
$headers = '';
foreach($_SERVER as $key =&gt; $val)
{
 $headers .= $key.':'.$val.'|';
}
$postfields = array(
 'devKey' =&gt; 'YOUR_DEV_KEY',
 'headers' =&gt; $headers
);
$c = curl_init();
curl_setopt($c, CURLOPT_URL, 'http://webservices.wapple.net/isMobileDevice.php');
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($c);
curl_close($c);
if($result)
{
 // We're a mobile device! Generate some WAPL and use getMarkupFromWapl.php service!
} else
{
 // Not a mobile device - generate HTML and output to screen.
}
?&gt;</pre>
<p>Once you&#8217;ve established that your visitor is a mobile visitor, you can use the <strong>getMarkupFromUrl.php</strong> or <strong>getMarkupFromWapl.php</strong> services and amend your $postfields array to include the &#8216;url&#8217; or &#8216;wapl&#8217; keys respectively.</p>
<h4>Architect with SOAP or REST</h4>
<p>So if you&#8217;ve looked at using <a href="http://">Wapple Architect</a> before but for one reason or another couldn&#8217;t or wouldn&#8217;t install SOAP, you&#8217;ve now got another option that allows you to mobilize your site or app!</p>
<p>We&#8217;ve already integrated these new services into our <a href="http://">Wapple Architect Mobile Plugin for WordPress</a> so that if you don&#8217;t have SOAP installed on your server, you automatically fall back to using REST. And lets face it, if you&#8217;re on a shared host, getting SOAP installed is not a task to be taken lightly and can be tricky.</p>
<p>What do you think of these new REST services, does it mean you&#8217;ll use Wapple Architect? Do we need even more coverage of web services &#8211; XMLRPC for example? Get in touch and let us know!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.wapple.net/rest-assured-you-dont-need-soap/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<custom_fields><aktt_notify_twitter>no</aktt_notify_twitter></custom_fields>	</item>
	</channel>
</rss>

