<?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>blog.joaomorais.com &#187; Webservices</title>
	<atom:link href="http://blog.joaomorais.com/tag/webservices/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.joaomorais.com</link>
	<description>Blog about software development, personal projects and development tools.</description>
	<lastBuildDate>Mon, 10 Apr 2017 02:26:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to use NTLM authentication with NuSOAP?</title>
		<link>http://blog.joaomorais.com/how-to-use-ntlm-authentication-with-nusoap/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-use-ntlm-authentication-with-nusoap</link>
		<comments>http://blog.joaomorais.com/how-to-use-ntlm-authentication-with-nusoap/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 23:46:22 +0000</pubDate>
		<dc:creator>João Morais</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[NTLM]]></category>
		<category><![CDATA[NuSOAP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[SugarCRM]]></category>
		<category><![CDATA[Webservices]]></category>

		<guid isPermaLink="false">http://blog.joaomorais.com/?p=573</guid>
		<description><![CDATA[For a couple of weeks I&#8217;ve been implementing Webservices to feed resources on a SugarCRM project that I&#8217;m working on. As you may know SugarCRM provides NuSOAP, which is a SOAP Toolkit for PHP that brings some extra functionalities to SOAP implementation provided by PHP. Today I had to use NTLM authentication method, unfortunately it [...]]]></description>
				<content:encoded><![CDATA[<p>For a couple of weeks I&#8217;ve been implementing <a title="Webservices on Wikipedia" href="http://en.wikipedia.org/wiki/Webservices">Webservices</a> to feed resources on a <a title="SugarCRM - Commercial Open Source CRM" href="http://www.sugarcrm.com">SugarCRM</a> project that I&#8217;m working on. As you may know <a title="SugarCRM - Commercial Open Source CRM" href="http://www.sugarcrm.com/">SugarCRM</a> provides <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a>, which is a <a title="SOAP on Wikipedia" href="http://en.wikipedia.org/wiki/SOAP">SOAP</a> Toolkit for PHP that brings some extra functionalities to <a title="PHP Soap Implementation" href="http://www.php.net/soap">SOAP implementation</a> provided by PHP.</p>
<p>Today I had to use NTLM authentication method, unfortunately it isn&#8217;t supported by <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> yet, but I&#8217;ve found that if you combine <a title="Client URL Request Library" href="http://www.php.net/curl">cURL</a> with <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> you can get through without a problem.</p>
<p><span id="more-573"></span>So here is the solution I came up with:</p>
<p>First of all I&#8217;ve upgraded <a title="NuSOAP - SOAP Toolkit for PHP" href="http://sourceforge.net/projects/nusoap/">NuSOAP</a> to it&#8217;s latest version which is 0.7.3 (the one provided by <a title="SugarCRM - Commercial Open Source CRM" href="http://www.sugarcrm.com/">SugarCRM</a> didn&#8217;t supported <a title="Client URL Request Library" href="http://www.php.net/curl">cURL</a> yet), then I wrote something similar to the code below.</p>
<pre class="brush:php">&lt;?php

$wsdl = 'http://project/file.php?wsdl';

$client = new nusoap_client($wsdl, true);
$client-&gt;setCredentials('', '', 'ntlm');
$client-&gt;setUseCurl(true);
$client-&gt;useHTTPPersistentConnection();
$client-&gt;setCurlOption(CURLOPT_USERPWD, 'auth_username:auth_password');

?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.joaomorais.com/how-to-use-ntlm-authentication-with-nusoap/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
