Using the XSLT API from Apigize to transform XML messages

I’d like to build tools for other developers and in the past I created some small tools for BizTalk 2010 and BizTalk 2013 to test your maps. This time I wanted to create something else because nowadays I’m focusing more and more on functionality in Azure. Therefore I created an XSLT API that you can use to transform XML messages with XSLT. The API can also be used to execute BizTalk maps as long you don’t have Custom Functoids.

Prerequisites

The only thing what you have to do is to create account on Apigize.com. Then you get secure and optimized cloud storage for free that is only accessible by yourself. You can upload up to 10 XSLT files without any costs!
On the Register page enter your details and then click on the Register button.

Register an user in apigize.com

Copy the Primary key value from Your subscription details.

User Subscription Details

Note
:
Every API request you make to the Web API must be authenticated by including an Authorization Header with your API Key.
Click on Files API in the Documentation menu to see the operations of the Files API.

API Reference on Apigize website

How to upload a XSLT map?

You can create a XSLT map by using the Visual Studio Enterprise Integration SDK or for example another XSLT tool like MapForce and XMLSpy from Altova.  When you are finished creating the XSLT transformation, you upload the XSLT file into your integration account. 

Use a tool like Postman to call the Files API.
Select POST and enter: https://free.apigize.io/v1/files in the Request URL.
In the Header enter "Ocp-Apim-Subscription-Key" as the key name and your Primary key as the value.

Postman - Headers for FILE API

In the Body select the form-data radio button and then select the file that you want to upload.
Click on the Send button to upload the file.

Postman - Upload a file to my account with Files API

How to create a XSLT transform?

With the XSLT API you can transform an .XML message.
Select POST and enter: https://free.apigize.io/v1/xslt/{XSLT filename} in the Request URL.
In the Header enter "Ocp-Apim-Subscription-Key" as the key name and your Primary key as the value. Also specify the Content-Type and what you want to Accept.

Postman - Headers for XSLT API

In the Body select the raw radio button and then enter the XML message that you want to transform.
Click on the Send button to transform the message.

Postman - Transform an XML message with XSLT API

Conclusion

In this blog post I only showed how to upload a file with the Files API and how to use the XSLT API. Of course there are more operations available on the API’s but these work similar. I want to add even more functionality to the API’s so stay tuned!
Original Post: http://www.ithero.nl/post/2016/12/21/Using-the-XSLT-API-from-Apigize-to-transform-XML-messages.aspx

Popular posts from this blog

DTS package BAM_DM_ResendJournalActivity already exists on server

BizTalk Server Service Pack and cumulative update list

The BAM Portal website Default Web Site is not valid