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.
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:
If the Connect Service Bus runtime to be installed remotely with the default settings:
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:
Selecting the described option in the Visual Studio configuration wizard to create the LOB Target opens:
We now follow the this set of steps:
1.Selet Next on the first image of the Wizard
2.Typpe 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.
3. 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.
4. 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:
a. Fixed Username: Simplest form, using a username and password stored on the server.
b. Fixed Windows Credentials: Use Windows credentials stored on the server.
c. Custom SOAP Header: The client sends the username and password through a header of a SOAP message.
d. 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.
5.Click Next, and reach the window where we have to specify the URL for sending LOB target, wich 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:
6. Select Create and you will see a summary page:
Click on next and if all was corrrectly 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 edpoint 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 step 6:
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.
Rui Pedro Machado