BizTalk: “Package does not contain compatible branch patch”

BizTalk: “Package does not contain compatible branch patch”

BizTalk: “Package does not contain compatible branch patch”

You may have encountered the error message “Package does not contain compatible branch patch” while installing Microsoft BizTalk Server 2013 R2 CU2.

If yes, than you have installed the Swift Accelerator with Swift Message Pack. The only workaround was to uninstall all the Swift Components, run the CU2 Update and install again the Swift Components.

This was really a nightmare and Microsoft brought finally out the Microsoft BizTalk Server 2013 R2 CU3 🙂

KB Issue : https://support.microsoft.com/en-us/kb/3163970

Microsoft BizTalk Server 2013 R2 CU3 : https://support.microsoft.com/en-us/kb/3158677

Advertisements

BizTalk: “Package does not contain compatible branch patch”

BizTalk: “Package does not contain compatible branch patch”

BizTalk: “Package does not contain compatible branch patch”

You may have encountered the error message “Package does not contain compatible branch patch” while installing Microsoft BizTalk Server 2013 R2 CU2.

If yes, than you have installed the Swift Accelerator with Swift Message Pack. The only workaround was to uninstall all the Swift Components, run the CU2 Update and install again the Swift Components.

This was really a nightmare and Microsoft brought finally out the Microsoft BizTalk Server 2013 R2 CU3 🙂

KB Issue : https://support.microsoft.com/en-us/kb/3163970

Microsoft BizTalk Server 2013 R2 CU3 : https://support.microsoft.com/en-us/kb/3158677

Advertisements

MQRC 2072 – Transactional issue

MQRC 2072 – Transactional issue

MQRC 2072 – Transactional issue

Hello,

You may have issues with the IBM MQ Client 7.5 and 8.0 together with BizTalk 2013 / 2013 R2 with Transactional Support set to true. You are getting an MQRC 2072 and you can see a lot of errors / warnings in the Event Log. This is actually a code defect in the 7.5.0.3 / 7.5.0.4 and 8.0.0.2 client.

IBM has worked on fixing this issues : http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg1IT07469

The issue is finally fixed in the following IBM MQ Clients :

  • 7.5.0.6
  • 8.0.0.4

Best Regards,

Advertisements

MQRC 2072 – Transactional issue

MQRC 2072 – Transactional issue

MQRC 2072 – Transactional issue

Hello,

You may have issues with the IBM MQ Client 7.5 and 8.0 together with BizTalk 2013 / 2013 R2 with Transactional Support set to true. You are getting an MQRC 2072 and you can see a lot of errors / warnings in the Event Log. This is actually a code defect in the 7.5.0.3 / 7.5.0.4 and 8.0.0.2 client.

IBM has worked on fixing this issues : http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg1IT07469

The issue is finally fixed in the following IBM MQ Clients :

  • 7.5.0.6
  • 8.0.0.4

Best Regards,

Advertisements

Using IBM MQ 8 Client together with BizTalk 2013/2013 R2

Using IBM MQ 8 Client together with BizTalk 2013/2013 R2

Using IBM MQ 8 Client together with BizTalk 2013/2013 R2

Hello folks,

When IBM released the IBM MQ 8 Client, there was no way to use it with BizTalk because the client was compiled in C++ 2012 and BizTalk 2013/2013 R2 still uses an older C++ Runtime. Officially this is not supported by Microsoft, but it works. Microsoft actually supports only IBM MQ Client 7.1 and 7.5 together with BizTalk Host Integration Server 2013 (MQSC). After some discussions with IBM and after some month, IBM decided to ship with its package also the C++ dlls compiled in 2005 Runtime.

IBM Article : https://www-01.ibm.com/support/knowledgecenter/#!/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030490_.htm

The C++ 2005 Runtime dlls are available in IBM MQ Client 8.0.0.2 : http://www-01.ibm.com/support/docview.wss?uid=swg24037500

Best Regards,

Steve

Advertisements

Using IBM MQ 8 Client together with BizTalk 2013/2013 R2

Using IBM MQ 8 Client together with BizTalk 2013/2013 R2

Using IBM MQ 8 Client together with BizTalk 2013/2013 R2

Hello folks,

When IBM released the IBM MQ 8 Client, there was no way to use it with BizTalk because the client was compiled in C++ 2012 and BizTalk 2013/2013 R2 still uses an older C++ Runtime. Officially this is not supported by Microsoft, but it works. Microsoft actually supports only IBM MQ Client 7.1 and 7.5 together with BizTalk Host Integration Server 2013 (MQSC). After some discussions with IBM and after some month, IBM decided to ship with its package also the C++ dlls compiled in 2005 Runtime.

IBM Article : https://www-01.ibm.com/support/knowledgecenter/#!/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q030490_.htm

The C++ 2005 Runtime dlls are available in IBM MQ Client 8.0.0.2 : http://www-01.ibm.com/support/docview.wss?uid=swg24037500

Best Regards,

Steve

Advertisements

BizTalk Summit 2015 – London: Day 2

BizTalk Summit 2015 – London: Day 2

After a relaxing 9-hour flight on a surprisingly empty plane, and a  week to re-adjust to the UTC-0700 time zone, I am finally back home in the Pacific Northwest of the United States and ready to record all of the happenings of Day 2 of the BizTalk Summit in London. This post has been delayed as I have been without my Surface Pro since arriving home — the power adapter was destroyed in transit.

If you haven’t already read codit’s write-up of day 2, I highly recommend giving that a read as well so that you can get a few different perspectives.

Hybrid Integration with BizTalk Server 2013 R2

The morning started off with back-to-back sessions from fellow Integration MVPs, beginning with Steef-Jan Wiggers who demonstrated how BizTalk Server 2013 R2 can be used to implement hybrid integration solutions (without relying on things that are currently in preview).

To get a flavor of his demo, you can check out his sample code here, and a wiki write-up over here. Ultimately, his session was a refreshing look at how we can deal with present challenges using presently available software.

I stole this image from the BizTalk 360 photo stream on Facebook because it looked really serious and epic, until you catch the background. It just goes to show that a good sense of humor really is something to be treasured when dealing with the insane world of integration.

From 17 Seconds to Sub-Second Processing with BizTalk Server

Johan Hedberg took the stage next to walk through how he was able to take one integration from 17s all the way down to 0.95s, and how one might apply the same optimizations.

The optimizations that he applied were:

  • Reduce MsgBox hops (Call Orchestration vs. Send shape where possible) to provide a 7s improvement
  • Consider your Level/Layer of re-use (Avoid calling BizTalk process through external interface, and round-trip through send/receive port) to provide a 5s improvement
  • Use Caching to provide a 0.6s improvement
  • Optimize your logical flow (respond to caller as soon as you can, potentially before all work is done) to provide a 0.6s improvement
  • Consider your Host Settings (specifically reducing the polling interval from 500ms to 50ms) to provide a 1.6s improvement
  • Inline Sends (using code to send the message, rather than routing to send port) to provide a 0.3s improvement [Although, I’m personally not sure that it’s worth the cost of giving up everything a Send Port gives you most of the time, so use with caution)
  • Optimize instrumentation (find out where time is being spent). In this case, he mentioned that he discovered a database call being made where indexes weren’t being fully utilized. No sense doing a table scan where an index scan will do. Use the index Luke! This provided a 0.9s improvement
  • Optimize persistence points, providing a 0.05s improvement at this point.

I really enjoyed his talk, mainly because I’ve been through these things while beating integrations into shape to eek out the last little bit of raw performance, and it was nice to see the process all laid out and broken down in terms of numbers gained at each step.

If you want to see the talk for yourself, he gave the talk again as part of an #IntegrationMonday talk.

Sandro Pereira Annoys Tord

Sandro was up next with a list of tips for both BizTalk Server Administrators and BizTalk Server Developers. Here’s the list:

Tip #1 – Trying to annoy Tord: PowerShell!

Sandro started by weaving a tale involving famed commercial actor turned BizTalk Administrator Tord Glad Nordahl. In this tale, a developer unwittingly annoyed their BizTalk Administrator with mindless EventLog entries written out for every single event and action that occurred during normal processing. Rather than requiring code to change, or bad habits to die, the smart BizTalk Administrator used PowerShell to clean up and redirect the entries to a dedicated log. The script behind the legend is now available for download.

Tip #2 – What RosettaNet, ESB, and UDDI have in common?

They’re backed by databases that aren’t backed up by default. The second tip is then to ensure that these are included in your BizTalk backups.

Tip #3 – BizTalk MarkLog Tables

By default, every 15 minutes a string is stored in the table. Microsoft Terminator tool helps curb the growth within these tables, but requires stopping your entire environment. The solution here is a custom stored procedure to handle all of the clean-up work

Tip #4 – WCF-SAP Adapter supports 64-bit?

Yes. Just make sure that you install all the pre-reqs correctly, and you’ll be set.

Tip #5 – Take control of your environment: Tracking Data

If, as an administrator, you’re receiving MSI packages from your developers with full tracking enabled all over the place within the application, don’t fret, but instead take control of your environment by automating the tracking settings (again using PowerShell).

Tip #6,7 – Single Pipeline for Debatch/XML Validation/FF Encode

To combine tips 6 and 7, if you’re doing XML Validation, XML Debatching, FF Decoding, etc… You may not need to create a pipeline per-message type. Instead creating a generic pipeline and setting the properties in the BizTalk Server Administration console (rather than inside Visual Studio) can save you some heartache and suffering.

Tip #8 – Request-Response CBR with LOB operations

You don’t need orchestrations to use LOB Adapters (but you do need to promote BTS.Operation property for action mapping on the send side). One thing that I liked here, was that rather than creating a pipeline component that by code or configuration “hard-coded” an action in for the BTS.Operation, the solution presented guessed it from the root node of the message – pretty smart.

This is actually one of the things that I used to demo in the BizTalk Server Developer Immersion class if the question was ever posed, and one of the things that is now directly included as part of the core materials for the BizTalk Server Developer Deep Dive class. Yes, I am being shameless with those plugs, because I love our new Deep Dive class.

This is one of those things that provides a real Take the Red Pill moment when you show it to a BizTalk Developer who has been doing it the hard way for a few years.

Tip #9 – Creating custom pipeline components

Here is where my notes start to break down. I typed “custom pipeline components” but what follows are notes about custom functoid development. So either I missed a tip, or I mistyped. I will retain it as written here, and leave it up for you to determine.

So what was the tip in my notes? If you’re building out a custom functoid (see what I mean?), create custom inline functoids whenever possible. This will avoid the need to deploy a bunch of runtime artifacts, since the script itself is inlined in the map. Beautiful, and excellent tip with which to end the talk.

Tord Will Not Be Shaken… By Power BI

Tord was next to the stage for his 30 minute tour of Power BI. I think he introduced it in the right way – at least I felt like it addressed where I was at with the technology. I’ve always been scared of BI, probably unnecessarily – ever since that defining moment as a young developer being exposed to the horror that was a raw, naked, MDX query. When I saw Power BI demoed for the first time, it looked amazing and absolutely incredible – with MDX queries hidden behind plain English, pretty graphs leaping off of dash boards. It looked great. Because it looked great, and computers aren’t really magic, that must mean that there is hard work and lots of technologies to learn behind the scenes, right?

That was the angle that Tord took, as even he was looking at it skeptically, thinking there was going to be a lot of stuff to learn just to get started. However, during his talk, he proved that this wasn’t the case, and showed just how easy it really can be to get up and running with Power BI.

So where’s the BizTalk tie-in? He was using Power BI against data gathered by BAM, because it really is just data in a database at the end of the day. A really beautiful way to tie it all together (and certainly more modern looking than the BAM portal).

Since I’ve bulleted pointed everything else, here’s some bullet points for you on Power BI (really selling points when it comes down to it):

  • Free access to Power BI designer
  • Easy to use web interface
  • Works on any platform
  • Loved by management
  • Like Azure Services, it’s cheap (10 USD per month, per user)

On the Origin of Microservices – Charles Young Connects Past to Present

For me it’s a personal treat to be able to hear Charles Young speak, and luckily I got the opportunity at the 2015 BizTalk Summit in London. He’s the Donald Knuth of EAI, and always serves to bring the larger picture to developers (myself included) who tend to have myopic tendencies driven by the lust for shiny things.

So how would he introduce himself? “I am an EAI dinosaur. I’ve been doing it for years, and years, and years, and we either evolve, or obviously we atrophy or whatever”. Of course, we all know what whatever is. Poor dinos (except for the raptors in Jurassic Park – they had it coming).

His talk walked through the evolution from n-tier architectures of the 90’s to Alistair Cockburn’s Hexagonal Architecture (to which BizTalk Server closely aligns, and shares terminology with, though pre-dating the architecture), all the way through Microservices Architecture.

He saw as driving forces of this evolution the aspiration for:

  • Simplicity in addressing complex requirements
  • Velocity (speed of delivering solutions)
  • Evolution (see above)
  • Democratization

On Microservices, “[they are] essentially based very consciously on hexagonal architecture. It’s the idea of taking your application domain and ensuring that the way you implement services within the application domain are very fine grained […]. Microservice principles are based on the notion that the services that we tended to build in the middle tier have tended to be monolithic, which isn’t quite exactly what is being built, but in terms of how it is packaged and hosted, maybe. There’s a lot of chunky services that cover lots of concerns which can be problematic. The idea is to decompose the monolith into fine grained services […]. [It is] the new new fine grained SOA approach for a modern audience. But just because Microservices is the new buzzword doesn’t mean that we should leave our brain at the door and forget what we know about building complex integrations”

As he expanded out to iPaaS and Microservices, he mentioned that he has a problem with most of the iPaaS platforms today (e.g., MABS), where the full integration / mediation workflow is emitted up to the cloud as a monolithic thing which makes no proper separation of concerns (e.g., Itinerary containing a bridge with VETR flow). However, with App Service, he sees a change of direction in which we don’t have to use Logic Apps, for example, to use API Apps – the capabilities are no longer tightly coupled to the workflow.

I must admit, his session was so packed full of essential and incredible content, that I was unable to take notes fast enough to capture it all. He doesn’t waste a lot of words, and still succeeds to use lots of them.

If you want a better view into his brain right now, as he’s processing the change in the industry, read through his latest series of posts on architecture (Part 1, Part 2, Part 3).

Announcing The Migration Factory

Next up was Jon Fancy and Dan Probert, to completely blow my mind. At first, it seemed that their talk was going to be providing tips to migrate BizTalk solutions to Azure App Service. Instead they announced that they had created an automated service to do just that.

I thought it was a joke. I thought they were going to have a fake announcement, and then resolve it with, “of course, automated migration will never be possible, so here’s a checklist that you will need to manually go through”. But this was not the case. Indeed, they were announcing, and DEMONSTRATED a working migration service that was able to take a BizTalk Server application and migrate it over to Logic App form on Azure App Service. Good show!

I was so thrown off by this that I couldn’t get my camera up fast enough and ended up with some wonderful candid pictures of my shirt, my shoes, and the floor.

Best of all, you can sign-up today. I’m still in shock over this one.

API Management with Kent Weare and Tomasso Groenendijk

The next set of talks were a coordinated effort between Kent Weare and Tomasso Groenendijk.

Kent introduced the topic of APIs by showing their power in modern business (e.g., Uber – the largest hired ride company that owns no cars, Facebook – the largest media company that produces no content) to enable the exchange of data which is where the real value lies. He likened APIs to a doorway for your business, which with the help of API Management gets a bouncer. Why a bouncer? Because they handle similar concerns:

  • Authentication / authorization
  • Policy enforcement
  • Analytics
  • Engagement

So what’s the Red Pill moment that API Management delivers to a BizTalk Server developer who is keen on exposing BizTalk endpoints directly to end consumers with whatever format the end consumer wants? Of course, we still have to think about security, enrollment, governance, visibility, etc…

 

Kent followed through with a nice end to end demo of API Management being applied to a car insurance purchasing scenario with a shiny Windows Store app front-end.

Next up was Tomasso.

I always get excited when I see Tomasso, because I know that I’m in the same room as one of the few human beings that shares the same passion for the ESB Toolkit as I. He’s also probably the only person I know who has ever implemented IExtenderStyle (so rare, it’s not even Google-able, though Bing makes an effort) – that shows that he really takes pride in his work.

He demonstrated what it looks like to put API management in front of the ESB Toolkit on-premises, which adds the benefit of message repair thanks to the ESB Exception Management Framework. For an added bonus he demonstrated the message repair being done through the BizTalk360 ESB Portal.

Power BI to replacing the BAM Portal, and BizTalk360 to replacing the ESB Portal demoed in the same day to the same audience? Yes! I’m really looking forward to seeing more modern looking front-ends for BizTalk installations in the wild as a result.

Nino Brings it Home

Nino closed out the conference with his talk on his own personal journey as a developer that led to the thing that is currently eating up his free development time – JitGate.

So how did he get to that point? He started out riding the roller coaster of integration technologies through to the present era (shedding hair and resolve along the way), until he had a realization – what he really wanted out of integration he got from file-based integration:

  • Simple to manage
  • Fast to use
  • Polymorphic
  • Adaptable
  • Serializable
  • Fully extensible
  • Persistent
  • Multi-platform
  • Scalable
  • Reliable

From there he set out to use the tools provided by Azure to build out an integration framework that gave him those same benefits. The result was JitGate – Just-in-time integration.

So does this mean he’s announcing an App Service killer? Not necessarily. It means that Azure is an enabler. It has the power as a platform to do integration, and to handle insane loads. You don’t have to use Microsoft’s solution for doing it, you can use the same technologies that they’re using and build your own that is just as capable.

In a way, this is similar to what we had with BizTalk Server – built on top of .NET since 2004. .NET and SQL were always available to any developer who wanted to build something similar to BizTalk.

I don’t want to minimize what Nino has built here though. It is truly impressive and something that sadly, I can’t really capture here. It’s one of those things that you have to see demoed. Stay tuned to his blog for a post with full details and a video of it in action.

What’s Next?

Well it looks like Microsoft has announced Azure Service Fabric, which appears to be a re-branding of Azure Pack and promises to bring the world of Azure App Service on-premises. There are certainly exciting times ahead.

I’ll be at Build 2015 next week in San Francisco, CA to learn all that I can about that, and then the following week will be back in Kirkland, WA teaching the first run of our Cloud-Based Integration Using Azure App Service class.

I hope to see some of you along the way, and if you’re going to the BizTalk Boot Camp 2015 event, y’all better tweet everything so I can get a glimpse of it too!

Upcoming speaking engagements in April

Upcoming speaking engagements in April

In my last post I created some awareness on the upcoming BizTalk Summit in London, 13 and 14th of April. This event will be the biggest Microsoft integration focussed summit in Europe. Microsoft BizTalk product group, Microsoft Integration MVP and veterans will speak about integration, Azure and API Management.This event is once again, like the previous two events, being organized by BizTalk360 in conjunction with Microsoft and the BizTalk Product group. There are various reasons you can think to attend like for instance described in the blog post by one of the speakers Sandro Pereira.

My topic is on Hybrid connectivity and more specifically what BizTalk Server 2013 R2 platform offers today. You can read the details below.

Hybrid Solutions with the current BizTalk Server 2013 R2 platform

The IT world has changed with the rise of the internet (cloud). Google, Amazon and Microsoft offer a variety of services in the cloud for storage to applications. Besides them there are a ton of other vendors selling software as a service (SaaS), or provide a dedicated service for instance Drop Box offering storage on demand. This means that integrating on premise, cloud services and software will generate a new demand. Enterprises will now face these challenges as they will need to integrate their on premise systems that are not likely to move to the cloud like SAP with cloud services or solutions. The latest BizTalk Server release 2013 R2 offers capabilities to full fill the demand for a new hybrid type of integration solution. In this talk various hybrid integration scenario’s will be discussed and how you can leverage Microsoft BizTalk Server 2013 R2 to build these solutions.

After this event, I will the week after travel to Sweden for Swedisch User Group event in Gothenburg and Stockholm. I am invited by Johan Hedberg to join him on stage to talk about API Management, on-premise (Sentinet) and Azure API Management.

The last stop for me in April will be the BizTalk Bootcamp in Charlotte, US. Two years I was invited to come over and talk, but was unable to make it. However, this time I will be there! I will speak on similar topics like the London event, with probability to do other talks on API management and BizTalk extensibility. The event is being organized by Mandi Ohlinger who works for Microsoft and is responsible for a lot of the technical content that you find on Azure BizTalk Services and BizTalk Server. This is a free event and registration is necessary!

See you on the road on any of these events.

Steef-Jan

Bigger, better, louder: BizTalk Summit 2015 London

Bigger, better, louder: BizTalk Summit 2015 London

April 13-14 London the BizTalk Summit 2015, the third time this event is organized by the world renowned BizTalk monitoring product: BizTalk360. Integration has it’s momentum now, as the IT-landscape has changed completely with the evolution of the cloud, growth of devices and being connected to everything and anything. Information Technology has reached a completly new level, where we as people are connected and consume tons of data to process and interpret.

Connectivity has become key to enable us to be connected. This means applications, systems and services need to integrate (communicate) with each other to exchange data. Data that resides in multiple places. We will not see all data move to the cloud. Reasons are privacy, regulations and divers laws. This is another main driver for integration as data needs to be pushed around.

In London you will hear and learn about Microsoft’s evolving (cloud) application platform, Microsoft Azure with its numerous services, BizTalk Server the on-premise integration product, currently in it’s 9th release. Microsoft Product Group, Microsoft Integration MVP’s and a few secret guest speakers will unleash interesting, intruiging presentations. One of these will be a presentation by myself.

All the speakers like to see all of you, who care about integration and like to meet us and Microsoft to share our devotion to current and evolving platform. You can register now for the early-bird price until 15th of March.

See you there!

Steef-Jan

BizTalk Server 2013 R2 Integration with Cloud API Last.fm

BizTalk Server 2013 R2 Integration with Cloud API Last.fm

In previous post I described a way to consume a public Rest API using the BizTalk WCF-WebHttp adapter in combination with JSON-decoder, which is a new component with the BizTalk Server 2013 R2 edition. Now I like to mix things up a bit and consume a different API that is public. That is you can use this API from Last.fm. This is an online music discovery service that gives you personalised recommendations based on the music you listen to. To use the API of this service you need to registering yourself first. Because when you call of one of the methods of the API you need to stick in an api_key as one of the parameters of your request. This is not uncommon as various cloud API’s have this kind of mechanism.

Scenario

I have the following scenario, where I have built a client application (still one of those old fashioned guys that use window forms). The client application have the following functionality:

  • Get information of an artist.
  • Get the top albums from the artist.

Information and top albums can be obtained through calling the Last.fm API artist methods. The client will via BizTalk call these API methods. Similar as in my previous post calling the Airport Service to retrieve its status. Below you find an overview of the scenario.

The communication with the internal endpoint in this scenario will be SOAP/XML. The endpoint is hosted in a two way receive port (request/response). It exposes schemas for two operations: GetArtistInfo and GetTopAlbums. The request message will subsequently be mapped to a REST call to the service indicating that the expected response format is Json or default xml. BizTalk will decode the response into XML, so that it is published as an XML message in the MessageBox in case the response message is Json (GetArtistInfo) otherwise it will be just received by the adapter (GetTopAlbums). The receive port will subscribe on that message so it will be routed back as response to the client that on his turn renders it in the UI (Form). This scenario shows that BizTalk acts as a broker and protocol mediator (SOAP/XML –> REST/JSON –> SOAP/XML or SOAP/XML –> REST/XML –> SOAP/XML) between internal client and the external Last.fm API.

The solution of the described scenario consists of the following parts that will be discussed in the subsequent paragraphs:

  • Exposing schema’s for internal service exposing an operation to client application that will consume the service.
  • Creating a custom receive pipeline to enable decoding of Json message to xml (see previous post).
  • Configuration of a Send Port with the Web-Http adapter (or binding if you like), send and receive.
  • Demonstrating the solution.

Exposing schema’s as service

To support both calls from the client to the Last.fm API the request schema’s are as follows:


Both request schemas look the same expect for the root name. These could be consolidated to one schema, nevertheless I choose to keep each method call isolated. Both schema contain promoted properties. The elements need to be promoted to variable mapping later when configuring the send port with WCF-WebHttp adapter to support dynamic URL mapping.

The response for the GetArtistInfo will be Json and therefore I will use the postman application in Google Chrome:

Here you can see that for calling the API you need a method parameter, artist name, api_key and format. However, the format is optional. By default XML will be returned when no format has been specified. The Json response can be used as instance for creating an XSD using the JSON Schema Wizard in Visual Studio BizTalk templates. The schema looks like:

Similar approach will be used to get an instance of the response to the GetTopAlbums call. This schema will be based on XML. Having the schemas enabled me to create an internal service that exposes two methods.

Once I have the internal service up and running the next part is to create a custom pipeline for receiving the Json response from the GetArtistInfo API method call. The Json decoder will be specified to serialize that response into XML. For the GetTopAlbums no specific custom pipeline is necessary. The schemas and custom pipeline will be deployed to BizTalk runtime.

Creating and configuring the Send Port with the Web-Http adapter

To be able to communicate with the Last.fm API and call both methods I will need to have two send ports configured with the WCF-WebHttp adapter. The Last.fm API doesn’t require authentication other than supplying the api_key as a parameter in call tp any of the API methods. In the general tab of the WCF-WebHttp Transport properties the address of the service can be specified (URI). Besides the address I need to specify here the HTTP Method (GET) and perform a URL mapping.

The URL mapping will be interesting as I need to add a few parameters to my REST call.

http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=Metallica&api_key=<your last fm api_key>&format=json
My HTTP Method and URL Mapping will look like:
<BtsHttpUrlMapping><Operation Method=”GET” Url=”/?method={method}&amp;artist={artist}&amp;api_key={api_key}&amp;format=json”/></BtsHttpUrlMapping>

Interesting thing in this URL mapping is that & is and &amp;. If you try to just use the & you will run into an error like depicted below:

Next I click Edit… to do the variable mapping i.e. map the parameters to promoted properties of my incoming request message.

Variable is mapped to the property namespace that defines the API_KEY, ARTIST and METHOD.
The general tab is important for specifying the address, method and URL mapping. The other tabs are:

  • The Binding tab provides you the ability to configure the time-out and encoding-related properties.
  • The Security tab provide you the ability to define the security capabilities of the WCF-WebHttp send port.
  • The Behaviour tab provides you the ability to configure the endpoint behavior for the send port.
  • The Proxy tab provides you the ability to configure the proxy setting for the WCF-WebHttp send port.
  • The Messages tab provides you the ability to specify how the message is sent to the REST interface.

Note: In this scenario we only use GET operation of the Last.fm API service. Based on the verb you have to specify in the Suppress Body for Verbs the GET, because a payload is not required for this operation. Since BizTalk sends out messages with a payload this needs to suppress!
For further details on configuration settings for these tabs see MSDN article How to Configure a WCF-WebHttp Send Port.

Test the solution

Now building the client to call the Last.fm API methods indirectly via BizTalk was quite some work. I wanted to render the information nicely in a Windows Form. When I enter an artist name and click GetInfo then a request will be send to BizTalk routed to the send port that communicates with Lastfm API and request info of the band Metallica.

The response of the message is nicely rendered in the above form. When I click TopAlbums another request is sent to a different send port that send to a different Last.fm API method.

If we look at the traffic between BizTalk Server and Last.fm using Netmon I can examine what goes over the wire.

This blog has demonstrate how fairly easy it is to consume a Json message with BizTalk Server 2013 R2 after invoking a Rest API. And how I was able to leverage an API from Last.fm. The cool thing is that BizTalk Server 2013 R2 is capable to communicate with tons of REST API’s out there in the cloud with the WCF-WebHttp adapter. And with JSON support things get less complex. I haven’t tried communicating with an API that requires Basic- or OAuth authentication. I probably will have to do some custom coding using behavious like explained in the blog post from Quicklearn.

Cheers,

Steef-Jan