Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

Try-It: Creating a SOAP Protocol EndPoint

Boomi’s SOAP services can run as a proxy service for an externally hosted SOAP
service provider. This allows you to manage the external service through Boomi API
management capabilities.

When publishing SOAP processes, AtomSphere generates its own WSDL based on the
Web Services Server Operation. This WSDL includes Boomi-added items including
Boomi namespaces and additional XML elements for the operation object and lists.

In this Activity, we create an API with SOAP Operation by importing a public WSDL.
Then we modernize (convert) from SOAP to REST by copying the SOAP Operation to
REST in the API component.

Create a new folder within your account

In the Component Explorer, click the drop-down arrow next to your API Design folder.

1. Choose New Folder.


2. Enter the folder Name of Section 7: SOAP and click Save to create the folder. Your folder
structure will look like the image on the right.

Create SOAP Connection


1. In the folder Section 7: SOAP create a new Web Services SOAP

Client Connection component named SOAP Calculator. Click Create when done.
2. For this example, you will use an external WSDL from DNE Online. This site provides a

test calculator WSDL definition. In the Connection tab, enter the following:

 WSDL Url: http://www.dneonline.com/calculator.asmx?WSDL


 SOAP Endpoint Url: http://www.dneonline.com/calculator.asmx

Click Save and Close to save the Connection.

OPTIONAL: If using SOAPUI, you may create a new project to confirm that the WSDL is
valid and generate the Request profile.
Create the API Component
1. Click the drop-down arrow next to the Section 7: SOAP folder and select New

Component. Change the Type to API, name the component Calculator. Select API

Type: API Service and click Create.

2. The API Service component opens. Configure the General settings tab. First, add some

data under Published Metadata:

 Published API Title: SOAP in Boomi


 Published Version Number: 1.0
 Published Description: This API is a Demo of SOAP protocol using a calculator service.

Scroll down to the Service Configuration section and then set the Base API

Path to: SOAPcalc/v1. You do not need to add a header.


3. Create the SOAP Operation by importing the WSDL into the API. Click Import an

Endpoint from the upper-right corner of the API Component.

4. Choose Import from an external service URL and click Next.

5. For the External Service URL enter http://www.dneonline.com/calculator.asmx?

WSDL, for the Process Location, choose Section 7: SOAP, and click Next.
6. For the Connection, choose the SOAP Calculator. This is the one you created in the

previous exercise. Click Next.


7. Select at least one operation to import. For this example select Add, click Next, and then

click Next on the Summary window.


8. Click Finish at the bottom of the Creating Components window.

9. Click the SOAP tab. Here you will see the newly created SOAP EndPoint Operation.

Click Save and Close to save the API component and the process(es) created during import.

Boomi has automatically created process(es) for you.


Deploy the API

Package the Components

1. Navigate from the Build tab to Deploy > Packaged Components and click Create Packaged
Component.
2. Expand the Section 7: SOAP folder and click the checkboxes next to Add (along with any other
processes you may have created via import) and the Calculator API Service component.
3. Proceed to the Create Packaged Components: Add Details window and provide version
information for all.
4. Click Create Packaged Component.
5. Once the package has been successfully created, click Deploy.
Deploy the Packaged Components

1. Select Production for the Deployment Environment.


2. Proceed through review windows of the Deployment wizard until your
deployment is complete.
3. Click Close.

Use WSDL from External SOAP Provider (optional)


In certain situations, you may want to change the SOAP endpoint to send requests to Boomi
but keep the WSDL exactly as provided by the externally hosted SOAP service provider,
using Boomi as a proxy. This allows you to manage the external service through Boomi API
management capabilities.

1. To use the WSDL from the External SOAP provider, we need to update the WSDL

Namespace to point to the namespace from the original service provider.

Go to the Build tab. Open the Calculator API Component and go to the SOAP tab.

Expand Advanced Settings, and enter the original WSDL

Namespace: http://www.dneonline.com/calculator.asmx?WSDL

2. Set the SOAP Version to 1.1 and 1.2.


Make sure the SOAP version selected meets your requirements. By default, it is 1.1.
3. Click the checkbox Omit Operation Wrappers so Boomi will send the request payload as

is to the WSDL service provider.

Selecting to omit operation wrappers will not insert the Boomi input and output wrappers in
your WSDL. You should only select this option when your WSDL must remain unchanged in
the API.

5. You downloaded the calculatorWSDL.xml file earlier from the Resources tab of your

course.

6. Upload the Custom WSDL file by clicking Choose a File and follow the prompts to

choose the file you saved to your local drive.


6. A message indicates the WSDL file was uploaded successfully. Click Close.

7. Click Save and Close to update the API.

8. Package and Redeploy the API Component to publish the updates to the component.
Click Close when done.

Test the API by Accessing the Externally Hosted WSDL

9. Now, go to Postman, click the + icon to add a new tab. Set the request to GET. Enter the

WSDL URL path as:

https://c01-usa-west.integrate.boomi.com/ws/soap/SOAPcalc/v1?wsdl

Set the Authorization Type to Basic Auth and enter your Username and Token from the

Shared Web Server panel under Atom Management. Usually it is auto-populated. Click Send.

10. The WSDL definition response appears.


11. NOTE: Another location where you can find the full WSDL URL path is under API

Management > Configure APIs and Applications > Deployed APIs > Calculator - API

Service > View


Now we have setup Boomi as a proxy for an externally hosted SOAP web service. The
request and the WSDL are the same, but the endpoint is hosted on Boomi. And, no Boomi
input and output wrappers appear in the WSDL.
Convert SOAP to REST
Copying a SOAP operation to the REST API in an API component is a simple process,
completed on the SOAP tab of an API component.
1. From Integration Service, go to the Build tab, open the Calculator API Service

component and go to the SOAP tab, click the Actions gear icon, and select Copy to REST.
2. A confirmation appears in the lower-right corner of the process canvas.

Go to the REST tab, expand the Add group, click the Actions gear icon, and select Edit

Endpoint.
3. From the HTTP Method dropdown, change the method from GET to POST. Click Save

and Close to update the API.


4. Update the resource path so it is more RESTful in style. First, open the Calculator API

Service, go to the General tab, edit the Base API Path and replace the Url with v1/number.

5. Now, go to the REST tab, expand the Add group, click the Actions gear icon and,

select Edit Endpoint. Edit the Resource Path field and enter add (lower case).

6. Click Save and Close.

7. Package and Redeploy the API Service component to publish the updates to the

component. Click Close when done.

NOTE: The full URL path is available under API Management > Configure APIs and

Applications > Deployed APIs > SOAP in Boomi - API Service > View. Find the Endpoint

Path at the bottom of the view page and click Copy.


8. To test the API, go to Postman, create a new request. Set the request

to POST and, paste the Endpoint path

(https://c01-usa-west.integrate.boomi.com/ws/rest/v1/number/add/) into the URL Request

field. Set the Authorization Type as Basic Auth. Enter your Username and Token from the

Shared Web Server panel under Atom Management. Usually it is auto-populated.

9. Go to the Body tab, select the raw option.

Copy and paste the following payload as the body of the POST request:

<ns1:Add xmlns:ns1="http://tempuri.org/">

<ns1:intA xmlns:ns1="http://tempuri.org/">123</ns1:intA>

<ns1:intB xmlns:ns1="http://tempuri.org/">321</ns1:intB>

</ns1:Add>
The payload specifies the 2 values to be added; 123 + 321. Let’s submit this and see the

calculator API return the result. Click Send.

10. The response of the Request appears and the result of the calculation is 444 (in other

words 123+321).

11. Click Save to save the Request in Postman.

You might also like