I'm using CMBase.php from version 1.2.3.
Curl is installed and working correctly.
I tried 2 of my servers, one using Ubuntu with PHP 5.x and one using FreeBSD with PHP 4.x. In both cases it returned a HTTP Status Code 400 error.
I tried nusoap.php instead of CMBase.php, but that results in sending a different XML request to the API. In this case the API said my ClientID was wrong, which can be related to the different-looking XML request. Nusoap.php is easy when there's a WSDL available for the API, but there isn't.
I am under the impression that the SOAP functions aren't working correctly right now, because the REST API is working fine.
Anyone care to comment?
This is my DebugInfo.
CampaignMonitor Object ( [url]=> http://api.createsend.com/api/api.asmx [soapAction] => http://api.createsend.com/api/ [api] => xxx [campaign_id] => [client_id] => xxx [list_id] => [method] => soap [curl] => 1 [curlExists] => 1 [debug_level] => 1 [debug_request] => xxx xxx March newsletter March newsletter John Smith email@example.com firstname.lastname@example.org http://www.campaignmonitor.com/uploads/templates/previews/template-1-left-sidebar/index.html http://www.campaignmonitor.com/uploads/templates/previews/template-1-left-sidebar/textversion.txt xxxxxx [debug_response] => [debug_url] => http://api.createsend.com/api/api.asmx [debug_info] => Array ( [url]=> http://api.createsend.com/api/api.asmx [http_code] => 400 [header_size] => 206 [request_size] => 1182 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.309189 [namelookup_time] => 0.060786 [connect_time] => 0.183386 [pretransfer_time] => 0.183518 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => 0 [upload_content_length] => 0 [starttransfer_time] => 0.309124 [redirect_time] => 0 [headers_sent] => Array (  => User-Agent: CMBase URL Handler 1.5  => Content-Type: text/xml; charset=utf-8  => SOAPAction: "http://api.createsend.com/api/Campaign.Create" ) ) [show_response_headers] => 0 )
Note: API keys and ID are replaced with xxx
Please guys, let me know if you're listening!! I have 8 clients waiting for the Campaign.Create feature and you're ignoring my topics and emails. Give me a sign of life.
Thanks for your questions, and apologies for the delay in replying.
Firstly you can find the WSDL at:
Secondly if you're going to use NuSOAP, my advice would be to use 0.72 - we have had a lot of customers with 0.73 dramas.
Having said that, it's difficult to say exactly why you'd be getting a 400 error (often the result of malformed XML) without seeing the way you're handling the calling code. I notice you've got a support request open, so we'll try and resolve things through that means. You should hear from me soon.
It's a bit belated, but for the record, i made the mistake of forgetting to encode the urls, resulting in 400 error.