How do I convert a coldfusion invoke web service to a php invoke web service

How would i convert this cold fusion code to a php code i have tried several things but to no result
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<cfset WSDL_URL = "http://reiwa.com/cfc/webservice.cfc?wsdl">
Get 10 Residential Rental Listing IDs for Agency 11002, Branch 0
<cfinvoke webservice="#WebServiceApplication_WSDL_URL#"
method="getAgencyListingNumbers"
returnvariable="DataReturned">
<cfinvokeargument name="rowsrequired" value="10" />
<cfinvokeargument name="search_type" value="RESSALE" />
<cfinvokeargument name="agencyno" value="11002" />
<cfinvokeargument name="branchno" value="0" />
<cfinvokeargument name="days_back" value="0" />
</cfinvoke>
<cfset myXml = xmlParse(DataReturned)>
<cfdump var="#myXml#">
</body>
</html>

Open in new window

woodsy51Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Beverley PortlockCommented:
What is this supposed to do in Coldfusion? What would the user see?
0
woodsy51Author Commented:
Hi,
this should show a 10 row list of the agents property listings id's
you could use agents  id of 13451
0
Beverley PortlockCommented:
Is there supposed to be a database somewhere? It seems to me that you are trying to do something like this (I've made up field and table names)



<?php
 
// Create DB connection
//
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password') or die('Could not connect: ' . mysql_error());
mysql_select_db('my_database') or die('Could not select database');
 
 
// Simple fetch of agency listings
//
function getAgencyListingNumbers( $agentId ) {
 
    $rs = @mysql_query("select * from agentsPropertyTable where agentId='$angentId' limit 10 ");
    if ( $rs ) 
        while ( $rw = @mysql_fetch_array($rs, MYSQL_ASSOC ) ) {
             echo $rw['propertyName'] . " " . $rw['proprtyPrice'] . "<br/>";
        }
 
}
 
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php getAgencyListingNumbers( 13451 ); ?>
</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

woodsy51Author Commented:
the data base is a feed from the realestste portal "webservice"
http://reiwa.com/cfc/webservice.cfc?wsdl

what we are trying to do is list the property numbers
0
Beverley PortlockCommented:
I wasn't sure how Coldfusion accesses its database, so I thought I would ask. I'm not a whiz at SOAP or XML, but I think what you need to do is to use something like CURL (or possibly fopen() ) to retrieve the data and then parse the XML locally. There are some notes at http://devzone.zend.com/node/view/id/1713#Heading4 about using SAX which, if I'm reading it right would load and parse the XML for you.

Something like this  $dom->load("http://reiwa.com/cfc/webservice.cfc?wsdl");

0
woodsy51Author Commented:
thanks i will give it a go
0
woodsy51Author Commented:
Thanks but did not get the gig
cheers
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.