Monday, December 19, 2011

Biztalk 2010 R2

BizTalk Server is Microsoft's integration and connectivity server and is one of the most deployed integration servers in the industry. BizTalk Server 2010 was released just over a year ago. Today we are happy to share details on what customers can expect from the next release: BizTalk Server 2010 R2.

BizTalk Server 2010 R2 will focus on three primary themes:

Platform Support – Supporting new and current server and development platforms
Improved B2B – Aligning with industry standards and continuing to invest in performance improvements
Ready for the Cloud – Enabling customers to take advantage of the benefits of cloud computing

BizTalk Server 2010 R2 will be delivered approximately 6 months following the release of Windows Server 8. Release timing for Windows Server 8 is yet to be announced and will be disclosed by the Windows Server team in the future.

In addition to the investments we are making in BizTalk Server 2010 R2, we will continue the tradition of providing regular cumulative updates on a quarterly basis. These include updates to comply with Line-Of-Business (LOB) systems, schema changes, accelerator certifications, and bug fixes.

We believe that with this release we continue to deliver a mature, reliable and stable integration server that honors the trust of the thousands of customers who run their mission critical business processes on BizTalk Server.

Below is the detailed view of the features we are releasing:

New Platforms and Infrastructure
Windows Server 8*
SQL Server 2012*

Increased Developer and IT Productivity
Visual Studio 11* and Windows 8* to develop solutions
In-place migration from BizTalk Server 2010

Extended Platform Integration

DB2 client connectivity to SQL Server,
conversion of commands to T-SQL,
migration of packages to stored procedures
Adapter connectivity to new data sources, including IBM Informix V11 and IBM IMS/DB V11

Agile Alignment to Industry Standards
Regular updates to schemas, accelerators certifications and adapters. Highlights include:
Healthcare: HIPPA 5010 extensions: 2777CA, 999, HL7 2.5.1
Finance: SWIFT SRG 2011 support, SWIFT SRG 2012, SWIFTNet 7.0 (new messaging platform)

Improved Performance and Scalability

HL7 MLLP adapter performance improvements
Better performance with ordered send ports
Enhanced scale out configuration with multiple hosts
Expanded adapter options for faster batch processing

Extend on-premises solutions to the cloud
Easily extend your on-premises BizTalk Server solution to the cloud in a secure manner
Tighter integration of on-premises BizTalk Server applications with Windows Azure Service Bus

Improved Licensing

Adjustments to licensing that are geared towards cloud hosting, including:
Purchase from a hoster on a monthly basis (SPLA)
Register your existing license with a hoster (License Mobility)

Tuesday, April 19, 2011

Insert, Update, Delete, Select operation on table in Oracle database using oracleDbBinding

Insert, Update, Delete, Select operation on table in Oracle 11g Express database using the OracleDbBinding from BizTalk Adapter pack 2010.

Create BizTalk Project and generate schema (‘s)
First, we need the XML schemas, which represent our data source. With proper installation of BizTalk Server 2010 Adapter Pack, you will have a metadata browser built into Visual Studio. NET at your disposal. Create a visual studio BizTalk project. Then you can access the metadata browser from a BizTalk project by right-clicking the project, choosing Add then Generated Items and selecting Consume Adapter Service.



Click Add. This action opens a new window that provides us the interface to connect to, browse, and select database objects for service interaction. The very first thing we need to do here is choose the oracleDBBinding as the service binding, and then configure a connection string. The simplest working connection string consists of an Initial Catalog value for the database, and a valid Server name entry.



Once a satisfactory connection string is defined, the Connect button can be clicked to establish an active connection to the target database. If the connection is successful, one see the category browser with a set of database object categories.



On the root "/" character a range of un-typed generic functions are displayed, which can be exploited. Click on tables and you will see a number of Tables, select Employee.



Click the Delete, Insert, Select and Update statement in available categories and operations. Click the Add button to add the operations.After clicking the Ok button at the bottom, schema (and a single binding file) is added to our associated BizTalk project in Visual Studio.NET.



The binding can be used later, when solution is deployed and ports have to be configured for Oracle 11g Express (i.e. Send Port).

Create message instances
Next step is to generate messages from generated schema, which can be routed from Recieve location in Receive Port to a send port with WCF-OracleDb Adapter (messaging based solution). Generating the messages is easy, by opening first OracleDBBindingHR.Table.EMPLOYEES.xsd in file-editor you can move the desired operation to top, so you can then in Visual Studio generate the next instance for an operation or you can use XML-Editor inside Visual Studio (closing schema, right click and select open with… and then select XML Editor) to move elements around. In end you will have four xml instance for TableOperations, save to file as xml (type all files, encoding UTF-8!).

Update


Insert


Delete


Build and deploy the BizTalk project
Only schemas are required for a messaging only scenario with WCF-Oracle Adapter to perform operations on Oracle database. Therefore after assigning a strong name and application name to BizTalk project it can be build and deployed.

Configure the application
After solution has been deployed it is time to configure the ports. FILE ports are easy and focus here will be configuring the WCF-Oracle Send Port. Through BizTalk Management Console one can browse to OracleTableOperations application and right click the application and select Import Bindings … and navigate to file called WcfSendPort_OracleDBBinding_Custom.bindinginfo.xml, select and click Open. You will notice that a Send Port will be created automatically.



If you look at created send port and configuration you will notice that everything is there. Although having all operations in one action mapping is not going to work. If you try to send message with select statement to BizTalk you will get following error:

The adapter failed to transmit message going to send port "WcfSendPort_OracleDBBinding_HR_Table_EMPLOYEES_Custom" with URL "oracledb://win-8bpntqktj5m:1521/XE/Dedicated". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.InvalidOperationException: An action mapping was defined but BTS.Operation was not found in the message context.

Port RecvPortOracleOpsIn
Type File
Filter - None

Port SendPortOracleOpsOut
Type File
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#SelectResponse
OR
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#InsertResponse
OR
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#UpdateResponse
OR
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#DeleteResponse

Port RecvPortOracleOpsIn
Type WCF-Custom
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#Select

Port WCFSndPort_OracleDBBinding_HR_TABLE_INSERT
Type WCF-Custom
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#Insert

Port WCFSndPort_OracleDBBinding_HR_TABLE_INSERT
Type WCF-Custom
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#Update

Port WCFSndPort_OracleDBBinding_HR_TABLE_INSERT
Type WCF-Custom
Filter - BTS.MessageType == http://Microsoft.LobServices.OracleDB/2007/03/HR/Table/EMPLOYEES#Delete

Change Binding properties
enableBizTalkCompatibilityMode = True
useAmbientTransaction = False

Select Instance


Response


Update Instance


Response


Insert Instance


Response


Delete Instance


Response

Friday, April 8, 2011

Invoke SQL Azure Stored Procedure (in Cloud) using BizTalk WCF-SQL Adapter

This is a hands on lab as how to call a stored procedure in SQL-Azure (in cloud).

If you want to do you will need a Windows Azure Account.

If you do than you can sign in through Azure Management Portal and if you do not have SQL Azure database you can go database in portal and click create a new SQL Database.



You will then go through set of steps (e.g. wizard), where you will have to select subscription and server, region (e.g. North Europe), credentials, firewall rules, database name, edition (web), and size (1 Gb).



So I now have a database in the cloud and I can access it through SQL management studio 2008 R2 on my machine. That’s what I thought, but I got the message below stating I need a firewall rule.



This meant I had to go back to the portal and create a firewall rule for IP address of my local machine or laptop. I dropped the database and started over again. And tried again and yes I could access the database instantly.



Now I needed to create a database with same tables and stored procedure as on-premise version. In SQL Azure you can create a new database by right clicking database and click new database. A script will appear that looks like below that needs to be executed.

CREATE DATABASE ADAPTER_SAMPLES;


This may take a few seconds, but then you have a database. Next step was to execute the script for creating table (just Employee) and stored procedure. I right clicked tables and then new table a new query screen appears where I execute following statements:

CREATE TABLE [dbo].[Employee](
[Employee_ID] [int] IDENTITY(10001,1) NOT NULL,
[Name] [varchar](50) NOT NULL,
[DOJ] [datetime] NULL,
[Designation] [varchar](50) NOT NULL,
[Job_Description] [varchar](max) NULL,
[Photo] [image] NULL,
[Salary] [decimal](18, 2) NOT NULL,
[Last_Modified] [timestamp] NULL,
[Status] [int] NULL CONSTRAINT [DF_Employee_Status] DEFAULT ((0)),
[Address] [xml] NULL,
CONSTRAINT [PK_Employee] PRIMARY KEY CLUSTERED
(
[Employee_ID] ASC
))
GO


Now of course I needed to have some data in there.

INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Jeff Price','Manager',500000)
INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Don Hall','Accountant',40000)
INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Keith Harris','Supervisor',300000)
INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Jim Hance','Admin',200000)
INSERT INTO [Employee]([Name],[Designation],[Salary])VALUES('Andy Jacobs','Accountant',400000)


And the stored procedure by navigate to stored-procedure and right click new new stored procedure. I deleted the preformatted stuff en pasted the code below:

CREATE PROCEDURE [dbo].[ADD_EMP_DETAILS]
-- Add the parameters for the stored procedure here
@emp_name varchar(50),
@emp_desig varchar(50),
@salary decimal(18,2)

AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
INSERT INTO [ADAPTER_SAMPLES].[dbo].[Employee]
([Name]
,[Designation]
,[Salary])
VALUES
(@emp_name
,@emp_desig
,@salary)
SELECT [Employee_ID] FROM Employee where [Employee_ID] = (select IDENT_CURRENT('Employee'))

END
GO


Now that I have got things set up. I now go through same steps to invoke the stored-procedure in SQL Azure using WCF-SQL Adapter.

First I fire up VS2010 and create a new BizTalk project and then through add generated items I choose Consume Adapter Service.



I configured the URI accordingly and click Configure in security tab name of database administrator and then password, URI Properties the InitialCatalog Name and Server and you will get URI like:

mssql://kwtn4rghlk.database.windows.net//ADAPTER_SAMPLES?

Connect and category will appear. You will then select Procedure and add procedure and click OK.

Once that is done then binding and schema’s are generated.



After deploying I imported the binding file accompanied with this sample called WcfSendPort_SqlAdapterBinding_Custom.bindinginfo.xml. Send port will be created and only thing I had to do is adding filter to this send ports. If you go to generated send port and click configure for custom-adapter you will see in general tab and others the details.



One important thing to be noted here is that in binding the useAmbientTransaction has to be set to false! If not you will error message below



You will need to fill in credentials in credential tab! Next step is to add a filter for message type.



When this is done I created a receive location for incoming message that will look like this:



And a send port that will send response message to a folder. Message that will placed in receive folder is:



As a result to follow message is returned:



When I run the follow T-SQL command in SQL Azure I get the following result:



So as you can see I am in there now. I have showed you a way to invoke a stored procedure in SQL Azure using BizTalk Server with a messaging solution.

Monday, January 3, 2011

BizTalk 2010 changes

BizTalk Explorer
The BizTalk Explorer view in Visual Studio is removed in BizTalk Server 2010. You should use the BizTalk Server Administration Console instead.

SQL Adapter
BizTalk Server no longer supports the SQL Adapter. Consider using the Microsoft BizTalk Adapter Pack to achieve the same functionality.

Add Web Reference
The option to use Add Web Reference to consume a Web service within a BizTalk project is removed. In BizTalk Server 2010, you should use the Consume WCF Service Wizard to consume a Web service from a BizTalk project.

EDI Pipeline
Some EDI pipeline properties are fully supported with no feature enhancements in BizTalk Server 2010 but are planned for removal in future versions. The properties are now available as part of the Trading Partner Management user interface in the BizTalk Server Administration console.

EDI Context Properties
The following EDI context properties are deprecated in BizTalk Server 2010.
DestinationPartyID
DestinationPartyName

SOAP Adapter
The SOAP adapter is deprecated in BizTalk Server 2010. You should use the WCF-BasicHttp to communicate with Web services and clients that conform to the WS-I Basic Profile 1.1. To communicate with Web services and clients that conform to WS-*, use the WCF-WSHttp adapter.

BizTalk Web Services Publishing Wizard
The BizTalk Web Services Publishing Wizard, a graphical user interface for communicating with or exposing BizTalk process as Web service, is deprecated. In BizTalk Server 2010, you should instead use the BizTalk WCF Publishing Wizard with the WCF-BasicHttp and WCF-WSHttp adapters to provide Web Services communications.