Setting up an XML Webservice
In this article, you'll learn how to set up a webservice to send data formatted as XML
After reading this article you will know:
-
How to create a webservice that posts XML
XML can be used to transfer data between applications. To be able to send XML data from your Betty Blocks application, you'll need a webservice. Go to webservices through the tool menu in the Builder Bar.
Setting up the webservice
Create a new webservice for your XML. Instead of selecting the JSON option at the request content-type, keep it on other. For the response content-type, select the XML or other option, both work in most cases.
These settings are required when setting one up:
-
Name: The name of the webservice
-
Protocol: Is the receiving end using HTTP or HTTPS?
-
Host: The domain that the webservice will use in the request
Your webservice should look something like the following:
Setting up the endpoint
Create a new endpoint for your webservice. Change the HTTP method to a POST method and fill in a name and path. At the bottom of the form, you’ll find a dropdown for template. Select New to create your own XML template. Rename it to your liking and create the XML body. It should look something like the following:
Add an endpoint to the Webservice. (Top right subview). Insert at least:
-
Name: The name of the endpoint.
-
Http method: What kind of request is used in the Webservice.
-
Path: The path of the Webservice. (example.com/path).
-
Template: Select
New
for an empty template, or select an existing SOAP template.
Setting up the XML body
The XML will be placed in the template of the endpoint. Give a small description, place the XML and hit save.

Testing the webservice
After you have successfully created your webservice Endpoint, you can test it by clicking the Run Test button in the top right corner of your webservice endpoint. This should look something like the following:
