<?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>Jeff Douglas - Technology, Coding and Bears... OH MY! &#187; PHP</title>
	<atom:link href="http://blog.jeffdouglas.com/category/technology/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jeffdouglas.com</link>
	<description>Get your head out of your #@! and into the clouds!</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:04:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Using PHP to call an Apex Web Service</title>
		<link>http://blog.jeffdouglas.com/2009/04/05/using-php-to-call-an-apex-web-service/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-php-to-call-an-apex-web-service</link>
		<comments>http://blog.jeffdouglas.com/2009/04/05/using-php-to-call-an-apex-web-service/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 02:54:44 +0000</pubDate>
		<dc:creator>Jeff Douglas</dc:creator>
				<category><![CDATA[Apex]]></category>
		<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Salesforce]]></category>

		<guid isPermaLink="false">http://blog.jeffdouglas.com/?p=639</guid>
		<description><![CDATA[I had the &#8216;pleasure&#8217; the other day of integrating Drupal with Salesforce.com using PHP. I didn&#8217;t want to write all of my SOQL queries and business logic in my PHP scripts so I whipped up a quick Apex class and exposed it as a web service. I found a great blog post by Scott Hemmeter [...]]]></description>
			<content:encoded><![CDATA[<p>I had the &#8216;pleasure&#8217; the other day of integrating Drupal with Salesforce.com using PHP. I didn&#8217;t want to write all of my SOQL queries and business logic in my PHP scripts so I whipped up a quick Apex class and exposed it as a web service. I found a <a href="http://sfdc.arrowpointe.com/2008/12/05/calling-apex-web-services-from-php/" target="_blank">great blog post by Scott Hemmeter</a> that really helped me out calling the service with PHP so I thought I would share the code and other observations.</p>
<p>First you will need to download the <a href="http://wiki.developerforce.com/index.php/PHP_Toolkit" target="_blank">PHP Toolkit</a>. The toolkit contains all of the PHP code necessary to make web service calls against your org. Please note that the contained Partner and Enterprise WSDLs are for Production/Developer orgs, so if you are running against a Sandbox, you will need to download the appropriate WSDL from that Sandbox.</p>
<p>For this example, I took my <a href="http://blog.jeffdouglas.com/2009/02/24/returning-contacts-and-leads-with-custom-wrapper-class/" target="_blank">Person wrapper class</a> and exposed it as a web serivce. It exposes a method that allows you to search for Contacts and Leads by email address and returns a List of generic Person objects.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&nbsp;
global <span style="color: #000000; font-weight: bold;">class</span> PersonService <span style="color: #009900;">&#123;</span>
&nbsp;
    global <span style="color: #000000; font-weight: bold;">class</span> Person <span style="color: #009900;">&#123;</span>
&nbsp;
        webservice <span style="color: #003399;">String</span> id<span style="color: #339933;">;</span>
        webservice <span style="color: #003399;">String</span> firstName<span style="color: #339933;">;</span>
        webservice <span style="color: #003399;">String</span> lastName<span style="color: #339933;">;</span>
        webservice <span style="color: #003399;">String</span> company<span style="color: #339933;">;</span>
        webservice <span style="color: #003399;">String</span> email<span style="color: #339933;">;</span>
        webservice <span style="color: #003399;">String</span> phone<span style="color: #339933;">;</span>
        webservice <span style="color: #003399;">String</span> sObjectType<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    webService <span style="color: #000000; font-weight: bold;">static</span> List<span style="color: #339933;">&lt;</span>person<span style="color: #339933;">&gt;</span> searchByEmail<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> email<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// list of Person objects to return</span>
        List<span style="color: #339933;">&lt;</span>person<span style="color: #339933;">&gt;</span> people <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> List<span style="color: #339933;">&lt;</span>person<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// issue the sosl search</span>
        List<span style="color: #339933;">&lt;</span>list<span style="color: #339933;">&lt;</span>sobject<span style="color: #339933;">&gt;&gt;</span> searchResults <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>FIND <span style="color: #339933;">:</span>email IN EMAIL FIELDS RETURNING
            Contact <span style="color: #009900;">&#40;</span>Id, Account.<span style="color: #003399;">Name</span>, Email, Phone, FirstName, LastName<span style="color: #009900;">&#41;</span>,
            Lead <span style="color: #009900;">&#40;</span>Id, Company, FirstName, LastName, Email, Phone<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// cast the results by sObjec type</span>
        List<span style="color: #339933;">&lt;</span>contact<span style="color: #339933;">&gt;</span> contacts <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>contact<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span>searchResults<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        List<span style="color: #339933;">&lt;</span>lead<span style="color: #339933;">&gt;</span> leads <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>List<span style="color: #339933;">&lt;</span>lead<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span>searchResults<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// a each contact found as a Person</span>
        <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>contacts.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            Person p <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">id</span> <span style="color: #339933;">=</span> contacts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Id</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">firstName</span> <span style="color: #339933;">=</span> contacts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">FirstName</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">lastName</span> <span style="color: #339933;">=</span> contacts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">LastName</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">company</span> <span style="color: #339933;">=</span> contacts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Account</span>.<span style="color: #003399;">Name</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">email</span> <span style="color: #339933;">=</span> contacts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Email</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">phone</span> <span style="color: #339933;">=</span> contacts<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Phone</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">sObjectType</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Contact'</span><span style="color: #339933;">;</span>
            people.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// a each lead found as a Person</span>
        <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span> i<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>i<span style="color: #339933;">&lt;</span>leads.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            Person p <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Person<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">id</span> <span style="color: #339933;">=</span> leads<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Id</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">firstName</span> <span style="color: #339933;">=</span> leads<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">FirstName</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">lastName</span> <span style="color: #339933;">=</span> leads<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">LastName</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">company</span> <span style="color: #339933;">=</span> leads<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Company</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">email</span> <span style="color: #339933;">=</span> leads<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Email</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">phone</span> <span style="color: #339933;">=</span> leads<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #006633;">Phone</span><span style="color: #339933;">;</span>
            p.<span style="color: #006633;">sObjectType</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Lead'</span><span style="color: #339933;">;</span>
            people.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #003399;">System</span>.<span style="color: #006633;">debug</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Returning people: '</span><span style="color: #339933;">+</span>people<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">return</span> people<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Log into Salesforce.com and donwload the WSDL file for the PersonService class (Setup -&gt; Develop -&gt; Apex Classes). Also, make sure the profile calling the Web servcie has access to this class.</p>
<p>The PHP page looks like the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #339933;">&lt;?</span>PHP
&nbsp;
require_once <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sfdc/SforcePartnerClient.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
require_once <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sfdc/SforceHeaderOptions.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Salesforce.com credentials</span>
$sfdcUsername <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR-USERNAME&quot;</span><span style="color: #339933;">;</span>
$sfdcPassword <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR-PASSWORD&quot;</span><span style="color: #339933;">;</span>
$sfdcToken <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;YOUR-SECURITYTOKEN&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// the email address to search for. could also use a post/get variable</span>
$searchEmail <span style="color: #339933;">=</span> <span style="color: #0000ff;">'phpblogtest@noemail.com'</span><span style="color: #339933;">;</span>
&nbsp;
$sfdc <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SforcePartnerClient<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// create a connection using the partner wsdl</span>
$SoapClient <span style="color: #339933;">=</span> $sfdc<span style="color: #339933;">-&gt;</span>createConnection<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sfdc/partner.wsdl.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$loginResult <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// log in with username, password and security token if required</span>
    $loginResult <span style="color: #339933;">=</span> $sfdc<span style="color: #339933;">-&gt;</span>login<span style="color: #009900;">&#40;</span>$sfdcUsername, $sfdcPassword.$sfdcToken<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> $e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    global $errors<span style="color: #339933;">;</span>
    $errors <span style="color: #339933;">=</span> $e<span style="color: #339933;">-&gt;</span>faultstring<span style="color: #339933;">;</span>
    echo <span style="color: #0000ff;">&quot;Fatal Login Error &lt;b&gt;&quot;</span> . $errors . <span style="color: #0000ff;">&quot;&lt;/b&gt;&quot;</span><span style="color: #339933;">;</span>
    die<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// setup the SOAP client modify the headers</span>
$parsedURL <span style="color: #339933;">=</span> parse_url<span style="color: #009900;">&#40;</span>$sfdc<span style="color: #339933;">-&gt;</span>getLocation<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
define <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_SFDC_SERVER_&quot;</span>, substr<span style="color: #009900;">&#40;</span>$parsedURL<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'host'</span><span style="color: #009900;">&#93;</span>,<span style="color: #cc66cc;">0</span>,strpos<span style="color: #009900;">&#40;</span>$parsedURL<span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'host'</span><span style="color: #009900;">&#93;</span>, <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
define <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_WS_NAME_&quot;</span>, <span style="color: #0000ff;">&quot;PersonService&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
define <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_WS_WSDL_&quot;</span>, <span style="color: #0000ff;">&quot;sfdc/&quot;</span> . _WS_NAME_ . <span style="color: #0000ff;">&quot;.wsdl.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
define <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_WS_ENDPOINT_&quot;</span>, <span style="color: #0000ff;">'https://'</span> . _SFDC_SERVER_ . <span style="color: #0000ff;">'.salesforce.com/services/wsdl/class/'</span> . _WS_NAME_<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
define <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;_WS_NAMESPACE_&quot;</span>, <span style="color: #0000ff;">'http://soap.sforce.com/schemas/class/'</span> . _WS_NAME_<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
$client <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapClient<span style="color: #009900;">&#40;</span>_WS_WSDL_<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$sforce_header <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SoapHeader<span style="color: #009900;">&#40;</span>_WS_NAMESPACE_, <span style="color: #0000ff;">&quot;SessionHeader&quot;</span>, array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sessionId&quot;</span> <span style="color: #339933;">=&gt;</span> $sfdc<span style="color: #339933;">-&gt;</span>getSessionId<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
$client<span style="color: #339933;">-&gt;</span>__setSoapHeaders<span style="color: #009900;">&#40;</span>array<span style="color: #009900;">&#40;</span>$sforce_header<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
echo _SFDC_SERVER_.<span style="color: #0000ff;">&quot;br&quot;</span><span style="color: #339933;">;</span>
echo _WS_NAME_.<span style="color: #0000ff;">&quot;br&quot;</span><span style="color: #339933;">;</span>
echo _WS_WSDL_.<span style="color: #0000ff;">&quot;br&quot;</span><span style="color: #339933;">;</span>
echo _WS_ENDPOINT_.<span style="color: #0000ff;">&quot;br&quot;</span><span style="color: #339933;">;</span>
echo _WS_NAMESPACE_.<span style="color: #0000ff;">&quot;p&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// call the web service via post</span>
    $wsParams<span style="color: #339933;">=</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'email'</span><span style="color: #339933;">=&gt;</span>$searchEmail<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    $response <span style="color: #339933;">=</span> $client<span style="color: #339933;">-&gt;</span>searchByEmail<span style="color: #009900;">&#40;</span>$wsParams<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// dump the response to the browser</span>
    print_r<span style="color: #009900;">&#40;</span>$response<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// this is really bad.</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> $e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    global $errors<span style="color: #339933;">;</span>
    $errors <span style="color: #339933;">=</span> $e<span style="color: #339933;">-&gt;</span>faultstring<span style="color: #339933;">;</span>
    echo <span style="color: #0000ff;">&quot;Ooop! Error: &lt;b&gt;&quot;</span> . $errors . <span style="color: #0000ff;">&quot;&lt;/b&gt;&quot;</span><span style="color: #339933;">;</span>
    die<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">?&gt;</span></pre></td></tr></table></div>

<p>The PHP page should look something like the following:</p>
<p><img class="alignnone size-full wp-image-648" title="php-webservice" src="http://jeffdonthemic.files.wordpress.com/2009/04/php-webservice.png" alt="php-webservice" width="544" height="182" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeffdouglas.com/2009/04/05/using-php-to-call-an-apex-web-service/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
