• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 249
  • Last Modified:

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

0
woodsy51
Asked:
woodsy51
  • 4
  • 3
1 Solution
 
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now