I have just started to learn how to use this amazing module. and I have set up a working SOAP request with Rules that receives the information. The request only use one single field, but the response is quite complicated and nested, and Rules have helped me quite a lot in this case.

Event:
- After a webform has been submitted

Actions:
- Create a data structure
- Use web service description
- Show a message on the site (PHP)

But what I would like to do is just make a simple HTML form, and make the request, and then receive the information. Could someone point me in the right direction how to do this, would be appreciated.

Comments

Patrick Danielsson’s picture

Issue summary: View changes
dman’s picture

The framework you will find in the wsclient_tester form does pretty much that.
Have a look at the function wsclient_tester_prepare_request_callback($form, $form_state)

Get form inputs, wrap it in args to service, make the call, and output the results in whatever format you prefer.

The tester there is going to be a little more abstract than you need (as the tester allows all sorts of unknown input and outputs) but it's got all you need.

nageshkayagurala’s picture

Project: Web service client » Webform
Version: 7.x-1.x-dev » 8.x-4.x-dev
Priority: Normal » Critical

SOAP service call from webforms
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 upon pressing submit button.

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.

dman’s picture

Priority: Critical » Normal

@nageshkayagurala - your support request is a new issue, unrelated to the original question.

It sounds like you should be looking at using 'Rules' for triggering what you want. WSClient structure was originally built with strong rules integration.
* WHEN a webform is submitted
* THEN create a web service request
* WITH parameters from the webform, and
* EXECUTE that request

(However, I've not had the chance to try making that work, and don't have any test cases for that to share, sorry)

fenstrat’s picture

Status: Active » Closed (outdated)

Closing to clear out the old Webform 8.x-4.x branch. See #2827845: [roadmap] YAML Form 8.x-1.x to Webform 8.x-5.x.

kumkum29’s picture

Hello dman,

I reopen this post because I encounters the same problem: I want create automaticaly a form depending a Soap webservice (to display this form on a node). I have searched a simply solution without success.

Can you explain how to proceed with the mentionned function in #2? For me, your help is precious to resolve my problem. How to pass the url of the webservice & the operation ? How to render the form in my node ?...

Thanks.

P.S. this question is related to the wsclient module. So, I posts my question in the issues of this module.

kumkum29’s picture

Status: Closed (outdated) » Active
kumkum29’s picture

Status: Active » Closed (outdated)