My name is Warren and I wrote the blog on PHP cloud connectors. One thing I did not point out was I had to adjust the nusoap.php file in the NuSoap library as the encoding that was being used always caused BAD REQUEST.
To test your calls out the best program to use is soapUI. It will allow you to test out XML calls to make sure you have configured your PHP correctly. In the example below I added your xml into soap UI, adjusted the encoding to what I have in my nusoap file and it worked (see below).
I have included my entire NuSoap library here.
Although I have only updated the nusoap.php file. I also updated by blog to reflect what we have discussed here.
Thank you very much for your reply, I am currently testing it - I will come back here and update soon.
Yes, I am able to make API Calls now !
Best of luck with it.
Thanks a lot for this great contribution - it really helped me a lot!
Currently I try develop a cloud connector as well, which should do slightly different things, although I am able to reuse parts of the existing code:
What I like to do is the following:
- Lookup in an other systems API and check which members in the program step have attended an event there
- Get the number of those converted events and pull it back into a custom contact field (if the contact exisits in both systems of course)
Is it possible, using this library also to update/insert Eloqua contacts?
Any idea how to approach this?
Many thanks in advance!
Are you able to connect to the WSDL : ?
Though I am able to connect to the CloudConnector WSDL, I am not able to connect to the Main Web Service Endpoint.
Yes, try to replace the following lines in Warrens original code
//$this->cloudClient = new nusoap_client("https://location.of.eloqua.cloud.wsdl", 'wsdl'); // this was the original line
$this->cloudClient = new nusoap_client("https://secure.eloqua.com/api/1.2/ExternalActionService.svc?wsdl", 'wsdl');
//$this->eloquaClient = new nusoap_client("https://location.of.eloqua.actions.wsdl", 'wsdl'); // this was the original line
$this->eloquaClient = new nusoap_client("https://secure.eloqua.com/API/1.2/Service.svc?wsdl", 'wsdl');
After you done that, make sure that the program in program builder is running at least in test mode (maybe wait some 15 minutes after starting)
Hope that helps
EDIT: Just read the posts your link, so I think the above may not be that helpful - anyway maybe it helps others
Does anyone have an idea / guideline on how to setup a configuration page?
Many thanks - I had a look at this doc already, it provided me a good initial insight, but unfortunalety does not help me with my problem.
My connector is coded in PHP, based on Warrens approach using NuSoap. When I hit the URL on where I have built the programm manually, everything works fine. Members are pulled out of the step, the action gets executed and they move to the next programm step.
Other parameters such as Eloqua login, Step ID etc. I have for the time being hardcoded in my programm.
However when I run the program automated (meaning without manually calling my script URL with the browser, nothing happens). I have attached the configuration of my connector as a screenshot as defined in system management.
What am I doing wrong here?
Another question I have is regarding the configuration settings page, how can I create one - as the one you did in your example?
Is your app set up to continually poll for new members in the step??
Also, Program Builder runs about every 15mins, so in order for anything to happen, you'll have to wait for it to run again.
Yes, it looks for new members in the step and it seems that the API calls work fine.
It just appears like it works whenever I call the file manually, but the program builder seems to be unable to call it.
Could it be that this is because I have all parameters "hard coded" within the code and not in a config settings file?
I am aware of the 15minutes, even long after this time nothing really happens and the program hangs on that particular step.
Your code is likely fine, the problem is that you are waiting for Program Builder to call your app. The way Cloud Connectors work, is that Program Builder puts the members into the step, but then it waits for you to do the work and tell it you're done (marking them Complete). Your program has to constantly be calling (polling) into that step to check for new members. Program Builder does not call your app.
The only time Program Builder will call out to your app is for your configuration screen (when you build one). It does this when you click on the Configure button under Edit Action, but this is just for setting up your step.