Hello, usually I have no problem consuming webservices, but this time I don't understand what I do wrongly; before being able to call any method, I should login, passing username and password in the soap headers; and there comes the pain : I try to call it via createboject, cfinvoke or even with cfhttp like mentionned in this post (http://blog.brijeshradhika.com/2011/04/consuming-webservice-using-coldfusion.html), I can't make it work.
The documentation of the webservice provides a php example (see below). Anyone of you guys being able to translate into Coldfusion code? Thanks in advance /* Create the UsernameToken class */ class UsernameToken { public $Username; public $Password; public function __construct($username, $password) { $this -> Username = $username; $this -> Password = $password; } } /* Initialise the SOAP client */ $client = new SoapClient('http://www.thesite.nl/api/thesite.wsdl', array( trace => 1 )); /* Send user authentication headers */ $ut = new UsernameToken('username', 'password'); $soapHeaders[] = new SoapHeader('http://schemas.xmlsoap.org/ws/2002/07/utility/', 'UsernameToken', $ut); $client -> __setSoapHeaders($soapHeaders); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354643 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm