Php – Microsoft CRM 3.0 web service via PHP Soap class

dynamics-crmdynamics-crm-3PHPsoapweb services

I would like to create new contacts and leads using php. I can't quite figure out how to call the methods of the mscrm 3 web service.

The php soap class seems quite simple to use. I am able to connect and authenticate to the crm web service and get a list of available functions however I am unsure how to go about calling them.

I have seen examples for mscrm 4.0 which seem to involve masses of XML including soap headers and envelopes.

I am under the impression that using a soap class bypasses this and will write all the extra xml for me so all I need to do is call a function with an array of parameters?

Am I completely wrong here ?

Has anyone done this with mscrm 3 that can provide some sample code, or perhaps give me a few pointers as how to correctly call the Create() method ?

Best Answer

I have been able to get this working by using Nusoap and after construction the XML message as a series of strings using the send method instead of call. This now works as expected. It seemed that using the call method was returning different XML than what was required by the ms crm 3 web service.