SOAP service call from webforms

Not applicable

Hi,

we are trying to integrate our portal with an internal ticket system (via SOAP) for which we need to make few soap service calls from web forms.

through a bit of googling, we figured out we need to write our own module which invokes web services and have the PHP code ready.

Being Drupal noobs, we haven't been able to figure out how to go about doing it. we are not sure how to invoke them on submit from web-forms. any doc links or step-by-step guides will be very useful.

p.s: If SOAP calls require a lot of effort, we are open to create a proxy service via Edge and consume restful endpoint for the same.

Thanks in advance for the help.

-Sathya

0 5 641
5 REPLIES 5

@Sathya , Are you using drupal webform module for forms ?

@Anil Sagar: Yes, we are using durpal webform module. Is there a better approach, if we are heading in the wrong direction?

@Sathya ,

Webforms is fine. Please find steps below to solve your use case.

  • Expose SOAP webservice as REST API using Apigee Edge.
  • Use Drupal Webform rules module to capture webform submissions by create a new rule.
  • Use Rules HTTP Client module to make a http call by defining an action on webform submission event on above rule.

SOAP -> Rest is actually optional. Ideally, Using Rules HTTP client you can make a SOAP request since SOAP is actually xml payload over http.

You can achieve above things without writing custom code, thanks to open source drupal community & above contributed modules. Keep us posted if you see any issues.

@Anil Sagar

Thanks for the instructions. we tried to get going with the above modules, but with little documentation we are kind of stuck. Any doc links on how to do the above?

Also, we found this wsclient module, which has better documentation and helps us send SOAP requests? Any thoughts?

we tried installing the above wsclient module, but see an error asking us to enable PHP SOAP Extension. any pointer on how to enable that in an on-prem environment ?

Apologies for the noob questions and thanks in advance.

@Sathya , You can use any drupal contributed module which ever you are comfortable. You need to check drupal community / drupal.org for additional documentation.