Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a SOAP web service from a Wordpress form?

I have a Wordpress site that I am currently working on and have set up a form with the CformsII plugin but the client would like the form data submitted to a SOAP web service.

I have the SOAP webservice URL and XML data but the CformsII plugin in Wordpress seems to use a standard HTML POST method which I have been told that the SOAP webservicewill not handle.

I have never used or had any experience with SOAP web services before so I am really in need of guidance as to how I can go about submitting form data from a Wordpress site (with or without the CformsII plugin) to a SOAP webservice.

Has anyone achieved this previously or know of any plugin that could help?

like image 346
Andy Smith Avatar asked Jul 05 '11 16:07

Andy Smith


People also ask

How do you call a SOAP web service?

To consume a SOAP Web Service in your application, do the following: In the Logic tab, open the Integrations folder. Right-click the SOAP element and select Consume SOAP Web Service.... In the displayed dialog, specify the location of the Web Service definition (WSDL) and click Consume.


2 Answers

I wish I had a better answer for you, but I'm afraid it'll involve some coding and understanding on SOAP. (Because I couldn't find any WordPress plugins that implemented a generic SOAP client or more specifically a form submitter with SOAP support).

This post author collected a nice group of links that should help get you started: https://wordpress.stackexchange.com/questions/14804/embedding-a-soap-client-into-a-wordpress-plugin

Personally, I use GravityForms for all my projects (but it's a paid plugin). But they provide a nice API and there's a hook called gform_post_submission that I've personally used a lot. (I've "posted" to REST services using that hook).

like image 150
Jared Cobb Avatar answered Oct 18 '22 21:10

Jared Cobb


There is a soap plugin framework for wordpress that allows you to create/expose wordpress behavior as soap api. http://www.amazon.com/dp/B00D1AYIG8 and http://github.com/patrickingle/wp-soap-services

like image 41
PHK Corporation Avatar answered Oct 18 '22 21:10

PHK Corporation