Sands Hakimi
Sands Hakimi

Reputation: 1

Consume Web Service in Drupal?

Trying to understand which of the better modules to use for my page's specific need. Services module is popular, but that seems more for providing service, where the Web Service Client is good for consuming a web service.

Here's the requirement:

On the web page, I've got a form whose fields (location, service areas, region, indicators, etc) are to be built dynamically and some are selectable based on other selections. (So choosing worldwide would make Hubzone 8A not appear.)

Another team built the SOAP web service, it sits on another server outside the web server. What they delivered to me is a URL to invoke, basically an XML file:

http://webserviceurl.com:52901/navigator/NavigatorServices?wsdl

(Obviously, I just can't use the Feeds module to import the XML manually, right? The whole point of the web service approach is that as the data in the web service is updated, the Process form will by dynamic.)

So I'm really at the beginning of this. Need some guidance.

Upvotes: 0

Views: 884

Answers (2)

Pierre Buyle
Pierre Buyle

Reputation: 4873

PHP provides a SOAP API. So you can simply create a module using this API (and Drupal Form API).

Upvotes: 0

vitorsdcs
vitorsdcs

Reputation: 692

Web Service Client and SOAP Client are the ones that should do the work for you.

If you find it difficult to understand how to use them, you can simply use nuSOAP library + some PHP code inside a module. This article provides a good tutorial about providing and consuming Web Services using nuSOAP.

Upvotes: 1

Related Questions