Soap integration with php for LetMC

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lettie_dude
Forum Commoner
Posts: 65
Joined: Thu Dec 07, 2006 10:10 am

Soap integration with php for LetMC

Post by lettie_dude »

Hi

Has anyone done any integration using the LetMC soap Property Search Service? I have a client using them and they provide an asp API but don't have an official script for php. So was hoping someone may have created something I can adapt for my purposes.

Any assistance much appreciated.
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: Soap integration with php for LetMC

Post by tr0gd0rr »

Soap integration is usually really simple in PHP. Checkout the SoapClient class and its examples. Basically, for their GetBranches function:

Code: Select all

$client = new SoapClient($url, $options);
$branches = $client->GetBranches(array('strClientID'=>'123'));
If the api has complex specifications, I recommend using Zend_Soap_Client. But it looks like LetMC should work with the built-in SoapClient class.
lettie_dude
Forum Commoner
Posts: 65
Joined: Thu Dec 07, 2006 10:10 am

Re: Soap integration with php for LetMC

Post by lettie_dude »

Thanks for the response tr0gd0rr.

I have a basic script they have supplied that is unsupported as they seem to favour .asp. The only problem is I am getting an error when it runs.

System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object. at Cuba.Portal.PropertySearchService.SearchProperties(String strClientID, String strBranchID, Int32 nMaxResults, String strAreaID, Decimal nRentMinimum, Decimal nRentMaximum, Int32 nMaximumTenants) in pathtofile\PropertySearchService.cs:line 317

The line of code it is referring to is

Code: Select all

<wsdl:operation name="SearchProperties">
<wsdl:input message="tns:SearchPropertiesSoapIn"/>
<wsdl:output message="tns:SearchPropertiesSoapOut"/>
</wsdl:operation>
Any idea why this error is coming up?
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: Soap integration with php for LetMC

Post by tr0gd0rr »

Is that an error that displays on their site? It doesn't look like a php error and it says `PropertySearchService.cs:line 317`. Maybe they can tell you what the error is? My guess is that the values that you are passing are not coming through with the proper data type.
Post Reply