<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1046094" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1046094</link>
    <description></description>
    <language>en</language>
          <item>
    <title>This is another client</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1248042</link>
    <description> &lt;p&gt;This is another client exception - before the request is even sent off to to the service.&lt;/p&gt;
&lt;p&gt;The getDataProvider() method is expecting an AuthHeader object - whether that is constructed by the client code by you passing connection information, or needed to be constructed and passed by you is unclear.  Hopefully the documentation helps a bit more with this?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy.&lt;/p&gt;
 </description>
     <pubDate>Fri, 26 Mar 2010 13:04:12 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1248042 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>HI Shaggy, thanks for the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1248039</link>
    <description> &lt;p&gt;HI Shaggy, thanks for the reply.&lt;/p&gt;
&lt;p&gt;Yes, you were correct in thinking advertiserID was that parameter I changed as you mention with no luck.&lt;br /&gt;
I think I am also having issues with Authentication now as it states in the error below:&lt;/p&gt;
&lt;p&gt;Fatal error: Uncaught SoapFault exception: [soap:Client] System.Web.Services.Protocols.SoapException: No credentials specified Ã  sas.api.DataProviderFactory.getDataProvider(AuthHeader credentials) dans c:\smart_ws_test\v21\App_Code\Sas\api.cs:ligne 75 Ã  Service.GetCampaigns(Int32 AdvertiserID) dans c:\smart_ws_test\v21\App_Code\Service.cs:ligne 248 in &#039;path to page:39 Stack trace: #0 [internal function]: SoapClient-&amp;gt;__call(&#039;GetCampaigns&#039;, Array) #1 &#039;path to page(39): SoapClient-&amp;gt;GetCampaigns(Array) #2 {main} thrown in&#039;path to page&#039; on line 39&lt;/p&gt;
&lt;p&gt;I have tried creating SOAP headers for credentials with no luck:&lt;/p&gt;
&lt;p&gt;$headerbody = array(&#039;UserName&#039;=&amp;gt;$login,&#039;Password&#039;=&amp;gt;$password);//Create Soap Header.&lt;br /&gt;
$header = new SOAPHeader($ns, &#039;AuthHeader&#039;, $headerbody);&lt;br /&gt;
$client = new SoapClient($ns.&#039;/v21/service.asmx?wsdl&#039;);&lt;br /&gt;
//set the Headers of Soap Client.&lt;br /&gt;
$client-&amp;gt;__setSoapHeaders($header);&lt;br /&gt;
$result = $client-&amp;gt;GetCampaigns(array(&#039;AdvertiserID&#039;=&amp;gt;&#039;655289&#039;));&lt;br /&gt;
echo var_dump($result);&lt;/p&gt;
 </description>
     <pubDate>Thu, 25 Mar 2010 15:02:19 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1248039 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>That&#039;s a run time error, not</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1248038</link>
    <description> &lt;p&gt;That&#039;s a run time error, not an authentication error.  The code believes you&#039;re missing a property: &#039;AdvertiserID&#039;.  I don&#039;t see you setting that property anywhere, unless this is it:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$params = array(&amp;#039;655289&amp;#039;);&lt;br /&gt;$result = $client-&amp;gt;GetCampaigns($params);&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;I have no idea what the API is like, but maybe it is expecting a hash instead?:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$result = $client-&amp;gt;GetCampaigns(array(&amp;#039;AdvertiserID&amp;#039;=&amp;gt;&amp;#039;655289&amp;#039;));&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy&lt;/p&gt;
 </description>
     <pubDate>Thu, 25 Mar 2010 14:37:55 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1248038 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Hi Shaggy,
This is my error</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1248035</link>
    <description> &lt;p&gt;Hi Shaggy,&lt;/p&gt;
&lt;p&gt;This is my error now:&lt;/p&gt;
&lt;p&gt;Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn&#039;t &#039;AdvertiserID&#039; property in &#039;path to page&#039;:15 Stack trace: #0 [internal function]: SoapClient-&amp;gt;__call(&#039;GetCampaigns&#039;, Array) #1 /&#039;path to page&#039; (15): SoapClient-&amp;gt;GetCampaigns(Array) #2 {main} thrown in &#039;path to page&#039;  on line 15&lt;/p&gt;
&lt;p&gt;and this is now my code:&lt;/p&gt;
&lt;p&gt;$login = &#039;username&#039;;&lt;br /&gt;
$password = &#039;password&#039;;&lt;/p&gt;
&lt;p&gt;$client = new SoapClient(&quot;wsdl service&quot;, array(&#039;login&#039;=&amp;gt;$login,&#039;password&#039;=&amp;gt;$password));&lt;/p&gt;
&lt;p&gt;$params = array(&#039;655289&#039;);&lt;/p&gt;
&lt;p&gt;$result = $client-&amp;gt;GetCampaigns($params);&lt;/p&gt;
&lt;p&gt;print_r($result);&lt;/p&gt;
&lt;p&gt;Still no luck&lt;/p&gt;
 </description>
     <pubDate>Thu, 25 Mar 2010 12:28:11 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1248035 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>What do you mean &#039;is not</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1248010</link>
    <description> &lt;p&gt;What do you mean &#039;is not authenticating&#039;?  What responses / error messages are you receiving?&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy.&lt;/p&gt;
 </description>
     <pubDate>Wed, 24 Mar 2010 19:44:00 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1248010 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I am still having issues</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1247995</link>
    <description> &lt;p&gt;I am still having issues trying to logon to the service: See the code I have already and it is not authenticating:&lt;/p&gt;
&lt;p&gt;$username = &#039;username&#039;;&lt;br /&gt;
$password = &#039;password&#039;;&lt;br /&gt;
$client_email = &#039;&#039;;&lt;br /&gt;
$useragent = &#039;user agenct&#039;;&lt;br /&gt;
$developer_token = &#039;&#039;;&lt;br /&gt;
$application_token = &#039;&#039;;&lt;/p&gt;
&lt;p&gt;$namespace = &#039;domain url&#039;;&lt;/p&gt;
&lt;p&gt;// setup a SOAP client, and assign the authentication headers to $client&lt;br /&gt;
$client = new SOAPClient(&quot;service URL&#039;,array(&#039;trace&#039; =&amp;gt; true));&lt;br /&gt;
$user = new SOAPHeader($namespace, &#039;login&#039;, $username);&lt;br /&gt;
$password = new SOAPHeader($namespace, &#039;password&#039;, $password);&lt;br /&gt;
//$useragent = new SOAPHeader($namespace, &#039;useragent&#039;, $useragent);&lt;br /&gt;
//$token = new SOAPHeader($namespace, &#039;developerToken&#039;, $developer_token);&lt;br /&gt;
//$client_email = new SOAPHeader($namespace, &#039;clientEmail&#039;, $client_email);&lt;br /&gt;
$headers = array($user, $password);&lt;br /&gt;
$client-&amp;gt;__setSOAPHeaders($headers);&lt;/p&gt;
&lt;p&gt;// setup parameters to pass&lt;br /&gt;
//$params-&amp;gt;advertiserID = 65598;&lt;/p&gt;
&lt;p&gt;try {&lt;br /&gt;
	// make the call to the API&lt;br /&gt;
	$variations = $client-&amp;gt;getCampaigns(65598);&lt;br /&gt;
} catch (SOAPFault $exception) {&lt;br /&gt;
	var_dump($client-&amp;gt;__getLastRequest());&lt;br /&gt;
	var_dump($client-&amp;gt;__getLastRequestHeaders());&lt;br /&gt;
	var_dump($exception);&lt;br /&gt;
	exit;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;// again, normally we&#039;d do something useful here&lt;br /&gt;
echo &#039;&lt;/p&gt;
&lt;pre&gt;&#039;;
print_r($variations);
echo &#039;&lt;/pre&gt;&lt;p&gt;&#039;;&lt;/p&gt;
 </description>
     <pubDate>Tue, 23 Mar 2010 17:09:04 +0000</pubDate>
 <dc:creator>benf</dc:creator>
 <guid isPermaLink="false">comment 1247995 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Simple Object Access Protocol</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/soap-connection-login-using-api#comment-1247160</link>
    <description> &lt;p&gt;Simple Object Access Protocol is a cross-language method of exchanging data.  I used it quite a bit when I was working with weather data from the NWS.&lt;/p&gt;
&lt;p&gt;PHP has a &lt;a href=&quot;http://php.net/manual/en/book.soap.php&quot;&gt;native library&lt;/a&gt; that you can use, and there is another method I&#039;ve used called &lt;a href=&quot;http://sourceforge.net/projects/nusoap/&quot;&gt;nuSOAP&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically you form an XML request and send it to the SOAP server, and they send you an XML response.  The SOAP protocol defines how the XML is formed in the request and response.  It&#039;s all over HTTP/HTTPS.&lt;/p&gt;
 </description>
     <pubDate>Thu, 11 Feb 2010 17:22:47 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1247160 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
