Posts

Determine incoming message format with Azure Function

When receiving an AS2 message from a third party, you are not always sure what format you are receiving (X12, EDIFACT, XML, Flat File, ...) Specially if you are working with an external EDI service for X400 (like GXS, EDICOM, ...) BizTalk When you use the EDI Disassembler component in a receive location, it determines if you are receiving an EDIFACT or an X12 message. The way it does that is quite easy actually. It looks at the 3 first characters of the message body. ISA = X12 UNA or UNB = EDIFACT In any other case it will throw an error. Logic Apps In Logic Apps, the components for EDIFACT and X12 are not combined in common "EDI" compontens. So we need a way to determine this ourselves in order to use the correct components. To make it fully generic, I also included the option to receive XML and custom Flat File messages. using System.Net; using System.Text.RegularExpressions; public static async Task Run(HttpRequestMessage req, TraceWriter log) { log.I...

Query SAP HANA from BizTalk

Image
ODBC The easiest way to connect to a HANA table or view, is to use ODBC. BizTalk has an ODBC adapter, but to be honest, try to avoid using that to connect to HANA. It's not easy to use and you can't find alot of documentation about it. The best option is to setup a linked server in SQL Server. In the back, it also uses ODBC, but you will be able to query the data with the WCF-SQL adapter which is alot easier. Setup a linked server To be able to connect to HANA, you will need to install the SAP HANA Client. Watch out, there is a 32bit and a 64bit version. Make sure that you get the correct one. You can download this from the SAP support site, but you need an account. So find somebody who has an account and ask them to download the latest version and install it on your SQL server. Second step is to setup a new System DSN in the ODBC Data Source Administrator. In the next screen, enter a relevant name and description, and provide the server and port of your HANA ser...

Azure API Management : Exposing backend SOAP service as REST

Image
A very common scenario for any API management tools is to expose an (older) back end SOAP service as a REST JSON service. In this post I will explain how you can do this in Azure API Management. I'm not an API management expert, this is just my experience. The service The case I will be using is a WCF-basicHttp service hosted on a BizTalk 2010 machine and IIS. The service to list customers in the ERP (SAP). The SOAP request and response look like this. Request <CustomerList xmlns="http://www.mydomain.com/schemas/"> <SalesOrganizations> <SalesOrganization>XXXX</SalesOrganization> </SalesOrganizations> <WebshopRelevant>true</WebshopRelevant> </myp:CustomerList> Response <CustomerListResponse xmlns="http://www.mydomain.com/schemas/"> <Customer> <CustomerNumber>0000000001</CustomerNumber> <SalesOrganization>XXXX</SalesOrganization> <Lastname>Customer 1...

Receive invalid xml through WCF adapter

Image
Recently I had a small project that involved getting exchange rate data from the website of the Central Bank of the Republic of Turkey (CBRT). http://www.tcmb.gov.tr/kurlar/201707/10072017.xml Basically I just needed to do an HTTP GET to a specific URL, and that would give me back an xml with the exchange rate information I needed. So my first thought was to just use a WCF sendport with the webHttpBinding to download this. The first test I make results in the following error message. System.Xml.XmlException: Processing instructions (other than the XML declaration) and DTDs are not supported. Line 2, position 2. When I looked closer at the XML I get back, I saw that it contained a reference to an xsl file to make the file readable through a browser. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="isokur.xsl"?> <Tarih_Date Tarih="07.07.2017" Date="07/07/2017"  Bulten...

Integrating with SuccessFactors

Image
About 2 years ago we started the implementation of SuccessFactors in our company. This is a Saas tool to store all your HR related data with extra modules for recruiting, learning, compensation, ... The company was bought by SAP in 2011 and is sold as a replacement for the SAP HR module on premise. The first meeting we had about integrating it with other applications, the consultants told us everything is very easy. Being a SaaS tool I was expecting some kind or REST API or at least a web service we could use to do the basic CRUD operations. I was quite surprised when the consultant (which was an expert in SuccessFactors integration) started talking about CSV and SFTP. The first impression I had after that meeting was "Is this really the only way we can integrate with a modern SaaS tool?" Since we were on a really short timeline and had no experience ourselves, we trusted the consultants and went ahead with the implementation. My colleague and I couldn't believe t...

First Post

Hi, My name is Tim D'haeyer. I've been working with BizTalk and integration for almost 10 years now. I'm currently working as Integration Platform Coördinator at Puratos (We produce ingredients for bakery, patisserie and chocolate) I'll be blogging about things I work on during my projects. So you can expect real life scenarios that hopefully help you in your own projects. Some of the topics you can expect here are EDI SAP SuccessFactors XSLT (Just because I like it ☺) And hopefully many more I hope you enjoy my posts and you can always contact me personally if you have questions or requests. Kind Regards Tim