EasyCFM.COM ColdFusion Forums / PHP to CFML / PHP Webservice

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: PHP Webservice

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

hockeypfef
12-14-2007 @ 9:51 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 194
Joined: Apr 2006

Does anyone know how to convert this to CFM?

<?php

// Define constants

define('ENDPOINT','https://XXXX.XXX?WSDL');

define('USERNAME','YOURUSERNAME');

define('PASSWORD','YOURPASSWORD');



// Create soap client

$client = new SoapClient(ENDPOINT, array('login'    => USERNAME,

                                         'password' => PASSWORD));



// Gets list of available functions

$result = $client->__getFunctions();


echo "<pre>";

print_r($result);

echo "</pre>";

?>

I got as far as this:
<cfinvoke webservice="https://XXXX.XXX?WSDL"
          method="__getFunctions" username="YOURUSERNAME" password="YOURPASSWORD" returnvariable="theresults">
</cfinvoke>

But something is not right.

Thanks,
Chris
http://www.hockeypFeF.net

waynobweno
12-14-2007 @ 2:25 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Junior Member
Posts: 77
Joined: Oct 2007

<cfhttp method="post" url="https://www.someurl.com">
<cfhttpparam name="username" type="formfield" value="theun">
<cfhttpparam name="password" type="formfield" value="thepw">
</cfhttp>
<cfoutput>#cfhttp.filecontent#</cfoutput>

This is how i consume webservices...

Real Estate CPR
www.realestatecpr.com
Demo: www.realestatecpr.com/demo/
Content=Presentation=Results!!!


Website Designed and Developed by Pablo Varando.