Page 1 of 1
Soap integration with php for LetMC
Posted: Tue Aug 07, 2012 6:12 am
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.
Re: Soap integration with php for LetMC
Posted: Wed Aug 08, 2012 2:11 pm
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.
Re: Soap integration with php for LetMC
Posted: Thu Aug 09, 2012 6:53 am
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?
Re: Soap integration with php for LetMC
Posted: Thu Aug 09, 2012 1:12 pm
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.