How to Integrate Web Services with Microsoft BizTalk in Five Actions

Apr 1, 2014 12:00:00 AM

How to Integrate Web Services with Microsoft BizTalk in Five Actions

As we mentioned before, in our latest release (1303) of Business Integration Solutions for Dynamics AX we shipped To-Increase Web Service Studio. This solution gives customers a very simple and flexible tool to create web services that interact with Microsoft Dynamics AX 2012, without worrying about all the technical details. In today’s scenario, I show you how to integrate web services created in Web Service Studio easily with an application such as Microsoft BizTalk. We take five steps to integrate the SalesOrder web service with a BizTalk application that can read sales order information from AX and can use the same web service to post sales orders to AX.

It takes a short sequence of five simple steps to integrate web services with Microsoft BizTalk 2013:

  1. Select a tutorial web service in Web Service Studio.
  2. Look up the WSDL file on the website.
  3. Create a BizTalk project in Visual Studio.
  4. Deploy and configure the application.
  5. Test the application.

Select a Tutorial Web Service in Web Service Studio

To select a web service open Business integration solutions/Common/Web service/Web services

For this scenario we will use the SalesOrder web service which is part of the prebuilt project Tutorial Web Service Studio.

5 Web Service Biztalk 1

This web service supports both the get and post operations, which means that it can be used to retrieve sales orders from AX and to insert new sales orders into AX. The web service consists of the order header, the order lines, and the item details on a line.

Use the Read option on the development tab page to verify the XML output for one order or multiple orders of a customer.

5 Web Service Biztalk 2

Look up the WSDL File on the Website

Open the following address in your browser: http://localhost:8080/Webservice and open the SalesOrder WSDL document. Copy the address from the address bar to your clipboard.

Create a BizTalk Project in Visual Studio

Launch Visual Studio 2012 and create a new project called SalesOrder for a BizTalk Server application. A sample project is located in folder VisualStudioBizTalk in the To-Increase installation folder.

Right-click on the SalesOrder project and click on the Add > Add Generated Items context menu.

Click on Consume WCF Service and on the Add button in the screen below.

5 Web Service Biztalk 3

Paste the SalesOrder WSDL from your clipboard URL field and click on the Get button.

This will generate the BizTalk schemas to consume the web service. Along with schemas, the wizard will create an empty orchestration, port types, and binding files to create the BizTalk send ports.

Deploy and Configure the Application

Right-click on the project properties and click on the tab Deployment. Specify the Application Name as SalesOrder and Build and Deploy the solution.

Now, switch to the BizTalk Server Administration Console. Here you need to configure the send ports and receive ports.

Import the sample bindings that are available on the demo vpc in the folder BizTalk. You can import these on the application SalesOrder. Right-click on the SalesOrder node, and select Import > Bindings… to load them. The msi file is available in the same folder, for when you want to import the full application.

When you choose to configure the ports of the application yourself, please read the Web Service Studio Installation Instruction document and follow the detailed instructions in chapter 3.

When done, enable the send ports and the receive port and start the application.

Test the Application

Because the settings of the application are changed, the host instance needs to be restarted. Otherwise the changes will not be effective at runtime. In the Web Service Studio Installation Instruction document two XML files are mentioned. Create these files and drop them in the In folder. BizTalk will construct the SOAP message for the web methods and sends to web service, get web response messages, and route them to OUT or Error folders as per the subscription filters.

To learn more about Web Service Studio please visit this page or contact us.

Share this message
About Author
Arend Post

Arend Post

Solution Architect for Microsoft Dynamics AX Arend helps To-Increase customers and the partners supporting them gain the highest possible value from their investment in Microsoft Dynamics AX by means of continuous enhancements in To-Increase’s Business Integration Solutions. Before Arend began working at To-Increase, he spent many years as a principal software engineer, project manager, and principal technical consultant at such companies as Infor and SSA Global.

Get In Touch

Related Blogs

Nov 27, 2019 8:15:55 AM
Nov 15, 2019 7:52:18 AM
Oct 31, 2019 9:54:07 AM