Magento Connector SOAP Calls

The new Magento Channel Connector support in the latest builds of OroCRM uses the Magento SOAP api to grab customer and order information from a Magento system.

As you'd expect in a "modern" Symfony application (if anyone can call mid-2000s java design patterns modern), there's literally dozens of different class files involved in scheduling and running a synchronization job. Ultimately, the following Symfony app console command is what runs a scheduled job

$ php app/console oro:cron:channels:sync --channel-id=4 -v --env=prod

I was running into some weird behavior with the customer import, and ended up debugging the call all the way down to the SOAP transport layer.

#File: vendor/oro/platform/src/Oro/Bundle/IntegrationBundle/Provider/SOAPTransport.php
public function call($action, $params = [])
{
    if (!$this->client) {
        throw new InvalidConfigurationException("SOAP Transport does not configured properly.");
    }
    $result = $this->client->__soapCall($action, $params);
    return $result;
}    

This is the ultimate method that PHP calls for any SOAP related API method invoked during a Magento channel sync. The object in $this->client is a native PHP Soap object. If you're having trouble with the syncing, dropping some debugging code in here is a good idea.

    if($action == 'customerCustomerList')
    {
        var_dump($params['filters']['complex_filter']);
    }
    $result = $this->client->__soapCall($action, $params);