Apr 15, 2020 12:26 AM
(This post was last modified: Apr 16, 2020 10:42 AM by Mr. Crowbar.
Edit Reason: Clearer code
)
Hello i'm making a CRM kinda project and i would like to sync it with a website that uses XmlRpc API i have no previous experience with this so if someone could help me it would be nice! I have a documentation of the API buts it's in PHP and i need it in c# for my application Part of the API is bellow and i have the full documentation if someone could help me with this. (sorry about any typos, English is not my native language.)
Thanks!
PHP Code
<?php
ini_set('display_errors', 1);
//$client = new xmlrpc_client('http://webservices.xaaxax.axax/listingSync/v1_0');
$client = new Zend_XmlRpc_Client('http://webservices.xaxaxa.xaax/listingSync/v1_0');
$appkey = 'xxxx';
$brokerid = null;
$username = 'Txxxx';
$password = 'xxaxax';
$newListingStruct = array(
'location' => array(
'geographyId' => '3011',
'displayAddress' => 'yes',
'geocodeType' => 'exact',
'latitude' => '9.012345',
'longitude' => '1.123456',
'streetAddress' => array(
'gr' => 'διεύθυνση...',
'en' => 'address...'
),
'zip' => '12531'
),
'propertyDetails' => array(
'category' => 'commercial',
'fullBathrooms' => '1',
'halfBathrooms' => '1',
'livingArea' => '55',
'lotSize' => '102',
'propertyType' => 'other commercial',
'rooms' => '1',
'yearBuilt' => '2001'
),
'listingDetails' => array(
'brokerListingID' => 'A571',
'closingPrice' => '110000',
'currency' => 'eur',
'dateAvailable' => '16/8/2009',
'dateSold' => '14/12/2009',
'description' => array(
'gr' => 'περιγραφη...',
'en' => 'description...'
),
'exchangeScheme' => 'yes',
'exchangeSchemePercentage' => '6.8',
'holidayHome' => 'no',
'initialPrice' => '150000',
'listingType' => 'for sale',
'price' => '125000',
'published' => 'yes',
'publishedTSM' => 'yes',
'publishedBrokerSite' => 'yes',
'shortTermLetting' => 'no',
'status' => 'active',
'newDevelopment' => 'yes'
),
'links' => array(
'landingPageURL' => 'http://www.spitogatos.gr',
'virtualTourURL' => 'http://www.youtube.com/?v=iajsdErwWqf'
),
'detailedCharacteristics' => array(
'airConditioning' => 'yes',
'alarm' => 'yes',
'attic' => 'yes',
'balcony' => 'no',
'buildingCoefficient' => '4.9',
'cableReady' => 'yes',
'corner' => 'no',
'elevator' => 'no',
'facade' => 'no',
'fireplace' => 'no',
'floorNumber' => '7',
'freightElevator' => 'no',
'furnished' => 'yes',
'furredCeiling' => 'yes',
'garage' => 'no',
'garden' => null,
'heatingMedium' => 'thermal accumulator',
'heatingController' => 'autonomous',
'current' => 'three phase',
'energyClass' => 'bp',
'internalStairs' => 'no',
'loadingDock' => null,
'penthouse' => 'yes',
'petsAllowed' => null,
'playroom' => null,
'residentialArea' => 'no',
'roadType' => 'asphalt',
'satelliteReceiver' => 'no',
'secureDoor' => 'yes',
'solarWaterHeating' => 'no',
'storageSpace' => 'no',
'swimmingPool' => 'no',
'view' => 'no',
'withinCityPlan' => 'yes',
'zoning' => 'residential',
'employeeLastName' => 'PartnerLastName'
)
);
$listingNewID = $client->call('sync.newListing', array(
$appkey,
$brokerid,
$username,
$password,
$newListingStruct
));
file_put_contents("test.txt", $listingNewID, FILE_APPEND);
?>Thanks!


![[Image: 2eb99610.gif]](https://i.ibb.co/55SJhvG/2eb99610.gif)