What is a LOB target?

A LOB target is our local system business line (Line-Of-Business) and it´s respective operations, for example SQL Server can be viewed as a local LOB system and a  Select and Insert  it´soperations and is exposed to client applications (it is integrated in them). Specifically a LOB target controls the connection to the LOB system URI (mssql ://SQLBIZTALK:1433//basededados), its operations (insert, select, update, delete ...) and the connection credentials (username and password).

This LOB target can be used by multiple LOB systems and is stored in a  LOB relay. This LOB relay is as it was said the URL that allows the connection to the cloud (Azure) using the Service Bus Relays. It is also a repository of multiple LOB targets.

Creating the LOB target

The creation of a target LOB SQL assumes that you have the Windows Azure SDK EAI and EDI Labs installed and configured on your machine.

So the process starts by configuring a server in ServiceBus Connect Servers located in Server Explorer in Visual Studio:


By selecting Add Server a dialog box in which we have to specify only the path to the file ManagementService.svc, from the IIS Manager, appears.


The pathways normally used by IIS are:
  • If the Service Connect bus runtime be installed locally with the default settings:
    • http://localhost:8080/SBConnect/ManagementService.svc/
    • https://localhost:8080/SBConnect/ManagementService.svc/
  • If the Connect Service Bus runtime to be installed remotely with the default settings:
  • http://ServerName:8080/SBConnect/ManagementService.svc/
  • https://ServerName:8080/SBConnect/ManagementService.svc/

In my case the option would be https://localhost:8080/SBConnect/ManagementService.svc/ because im working locally.

With the address configured, we get the following expansion in ServiceBus Server in Visual Studio:

 
We can see that the server was filled with the LOB Types that are installed, using the LOB client libraries on the machine, remember that. NET framework 4 install SQL Server LOB type automatically.

We now start to configure the target SQL LOB. Clicking the right mouse button in SQL within SQL LOB Types  we select Add SQL Target.


Selecting the described option in the Visual Studio configuration wizard  to create the LOB Target opens:


We now follow the this set of steps:
  • Select Next on the first image of the Wizard
  • Type in the data to access your SQL database that we want, providing the name server, the instance of SQL Server and the name of the database (Catalog). Leave the option Use Windows credentials credentials checked.
  • In the next window of the Wizard we specify the operations that we want to provide the system we want to achieve. In my case i will choose for example the insert operation into the database and to select from database.
  • We click Next and reach the page of runtime security, in which we define how the server will authenticate the target LOB when a message arrives from a client. The options are:
    • Fixed Username: Simplest form, using a username and password stored on the server.
    • Fixed Windows Credentials: Use Windows credentials stored on the server.
    • Custom SOAP Header: The client sends the username and password through a header of a SOAP message.
    • Message-Credential: The client sends the username and password through a security-WS (Web Services Security) header of the message.
    • Let's choose the option Fixed Windows credential, providing the user name and password of the windows as well as the domain of the local network.
  • Click Next, and reach the window where we have to specify the URL for sending LOB target, which means the path to the location in the cloud where the messages will be sent.

We can select a URL to a LOB relay (Provides connectivity for our LOB targets using the Service Bus Connect) existing or create a new one, let's choose the option to create new and we have to specify:

  • Namespace: namespace name given to the portal created AppFabric azure
  • Issuer Name: name of the owner of the namespace azure
  • Issuer Key: key provided by the specified namespace for azure
  • Relay Path: path to lob relay that will store the LOB targets
  • Sub-path: this is the only field in which one can give any value (significant) , is where the LOB target is stored  and distinguishes this LOB target from other existing LOB in the relay.

The first three values ​​can be found in the portal Azure AppFabric, located at the following address -> https://portal.appfabriclabs.com/Default.aspx and in the following location:

  • In the portal page, we select the namespace we want to associate with the target LOB and click on view inside the groupbox Default Key, as we see in red.
  • Selecting view, we get the following dialog box where you can check the values ​​you want, my issuer key is hidden (personal data) as expected.
  • Continuing the configuration of the target LOB, fill requested values​​:
  • Select Create and you will see a summary page:

  • Click on next and if all was correctly done, get a success window.

WARNING : One of the most common mistakes when setting a LOB target is using a namespace created in conventional Azure portal (Azure Platform), in which case the domain of our namespace would be Namespace.servicebus.windows.net instead of Namespace. servicebus.appfabriclabs.com as well as management endpoint URL would be namespace-sb.accesscontrol.windows.net  instead of Namespace-sb.appfabriclabs.com, this change will cause an error AppFabric because it can not resolve the address of azure namespace and the following message will be displayed when we select Create in the previous step:


With this final warning we finish the tutorial to create a LOB target and we are able to transmit messages via cloud for this SQL Server database.

Thanks,
Rui Pedro Machado
 
I was recruited by Sandro Pereira!

See Also

Another important place to find a huge amount of Windows Azure BizTalk Services related articles is the TechNet Wiki itself. The best entry point is Windows Azure BizTalk Services resources on the TechNet Wiki.

If you are also looking for BizTalk Server related articles, the best entry point is BizTalk Server Resources on the TechNet Wiki.