Defining a web service interaction using XML to retrieve data from and send data to a Web Service
Web Service is an interface available to Data Connector applets. Using the Web Service interface in a Data Connector, you can get data from and send data to an external web service. For more information about a Data Connector applet, see Data Connector applet.
When you use a Data Connector applet to exchange data with a web service, you can either define the web service interaction using XML yourself or use a template. For information about using a template, see Using a template to retrieve data from and send data to a Web Service.
How do I define a web service interaction to exchange data with a web service?
If you have no templates available in your account or you do not want to use any existing templates, you can define a web service interaction yourself.
To use a Data Connector applet to define a web service interaction, perform the following steps:
Create a Data Connector applet. For information about creating an applet, see Creating an applet. A new Data Connector applet appears.
In Interface in the Interface section, click Web Service. The Action and Web Service Interaction sections appear.
Optionally select the applet that the call is routed to if the interface fails in the Interface Failure list.
In the Action list in the Action section select Call Web Service.
The Web Service Interaction section appears, containing the Interaction Definition text field which contains template XML.Template Interaction Definition
<ApiInteraction> <Request> <Url></Url> <Method></Method> <Headers> <Header> <Key></Key> <Value></Value> </Header> </Headers> <Body><![CDATA[ ]]></Body> </Request> <Response> <Type></Type> <ResponseCodeDestination></ResponseCodeDestination> <Fields> <Field> <Locator></Locator> <Destination></Destination> <DataType></DataType> </Field> </Fields> </Response> </ApiInteraction>Use the template XML as a basis for your web service interaction.
Define where you want to send the request and the information you want to send in the request:Define what you want to do with the response:
Optionally test the contents of the Interaction Definition field in the Interaction Definition Test section. For information, see Testing your web service interaction definition.
In the Successful Action list click the applet that the interaction is routed to next.
To save your changes, click Update. When you save your changes, the content of the Interaction Definition field is validated. Any errors appear at the top of the page and the applet is not saved until you correct the errors and click Update again.
If the request is successful (we receive a response), the interaction is routed to the applet in Successful Action.
If the request fails (we do not receive a response), the interaction is routed to the applet in Interface Failure.
For general assistance, please contact Customer Support.
For help using this documentation, please send an email to docs_feedback@vonage.com. We're happy to hear from you. Your contribution helps everyone at Vonage! Please include the name of the page in your email.