|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
{ Comments on this entry are closed }
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
|
||||||||||
{ Comments on this entry are closed }
I decided to write a simple kick start tutorial for WCF-SQL Adapter for beginners.
In this tutorial where I just perform single operation insert. A simple BizTalk solution which read a value from file location and insert this value into table.
First of all I create a very simple category table. Which hold two fields. As
USE [Experiments]
GO
/****** Object: Table [dbo].[CategoryWar] Script Date: 03/25/2012 22:12:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CategoryWar](
[ID] [int] IDENTITY(1,1) NOT NULL,
[CategoryName] [nvarchar](255) NOT NULL,
CONSTRAINT [PK_CategoryWar] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Now I create a new solution with Name WCF_SQLAdapter. You can use as you like.
On solution explore, I right click on add and then select generate items.
Then select consumerAdapterServices as follow.
Select SQLBinding from Consume Adapter Services Wizard. Like as
Then click on Configure Button new popup windows like that
Inter the Sql server Name. And Database Name in Initial Catalog. And press save button. Now URI look like as
Click on test button to verify the connection established. If connection is successful. Then Category section will below the connected button will populate as select from table all possible option appears at right side as follow.
Some Schemas and bind files generated as follow. Open schema name with
TableOperation.dbo.CategoryWar.xsd
Now we create one more schema, which will used as input to BizTalk solution. Like as
Now I create a map for send value from input schema to Request input message.
I used source input schema. And output schema I used to insert schema from TableOperation.dbo.CategoryWar.xsd. Map will be like
After that I create new Orchestration with name InputProcessOrchestation.odx.
I create three message with One for input message, and two with Insert Request Method and one for Insert response. Orchestation will be look like as
It is very simple orchestration, which reading input from file location transform it into request message. And request response call to WCF-SQL adapter and received message drop in other location.
For wcf-sql call I created send request port with specify later option. Remember the name of operation will be the same which will describe in binding. You can later change it. When I deploy the solution I found three ports on BizTalk console. I created two file ports one for receiving input and second for droping output. I import the binding which is created at the time of consuming the SQL Adpater. It will as
Generate instance form input schema and modify it and drop. This solution is works fine for me. You can download solution from here.
{ Comments on this entry are closed }
During the testing of BizTalk application, which read data from MSMQ. I have to write small C# routine, this routine send data to MSMQ. If you have no knowledge about MSMQ, Please read My Post on this here.
http://www.biztalkhq.com/what-is-msmq-and-how-to-configure-it-on-windows-7/
To Send File on MSMQ you have to include the dll System.Messaging in your C# or Vb.net application. To Simplest code is as follow.
public void FileToMSMQ(string FilePath, string MsmqName)
{
//FilePath =@”e:test.xml”;
//MsmqName= @".private$testQue";
System.Messaging.MessageQueue _TheQueue = new System.Messaging.MessageQueue(MsmqName);
System.IO.FileStream _FileStream = new System.IO.FileStream(FilePath, System.IO.FileMode.Open);
Message _Message = new Message();
_Message.BodyStream = _FileStream;
_Message.Label = System.IO.Path.GetFileName(FilePath);
_Message.Priority = MessagePriority.Normal;
_TheQueue.Send(_Message);
}
You can down sample code from here
{ Comments on this entry are closed }
Microsoft Message Queue (MSMQ):
MSMQ is a messaging protocol that allows applications running on separate servers/processes to communicate in a failsafe manner. A queue is a temporary storage location from which messages can be sent and received reliably, as and when conditions permit. Queues are used to receive and send the Messages.
To Install MSMQ, Go to Control Panel -> Add Remove Program -> Add Windows Component and select “Message Queuing”

Install MSMQ – Microsoft Messaging Queue
{ Comments on this entry are closed }
Today during testing and redeploying the BizTalk 2006 application, I got this error.
Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Unable to install the assembly into the Global Assembly Cache.
Exception: A file load exception occurred while attempting to install the assembly into the Global Assembly Cache. This error may occur if the assembly is delay signed, or if assembly was renamed after creating/signing
Only solution to this problem was to close the visual studio solution and then reopen solution, this solved temporally. Issue appears again after second or third deployment.
After doing google, I followed these steps to remove this error.
• I have to clear the temp files at machine. For this purpose I typed %temp% at run and it opened the temporary folder. Clear all directory alternatively we can get temp directory similar to following address “ X:Documents and SettingsUserNameLocal SettingsTempBT.
• Full stop the application at BizTalk console. And stop the BizTalk host instance on application is running. Then uninstall the previous/ current versions of dll from GAC and redeploy the application. If you got error message on uninstalling the assembly error “Cannot Uninstall as it is being used by another process”, then stop the host instance, close all applications and try again. If you still cant delete the dll, restart the PC.
• Check if the project is using any reference path that does not exist. ( For this, go to project properties -> Select Reference Paths -> Delete any References that doesn’t Exist)
{ Comments on this entry are closed }
Article reference from : http://technologyandleadership.com/three-schema-design-approaches/
In a project where multiple schemas are created it is critical to decide which namespace design approach is suitable for the project: (1)should we give each schema a different targetNamespace, (2)should we give all the schemas the same targetNamespace or (3)should some of the schemas have no targetNamespace. To make this critical design decision, let me illustrate the three schema design approaches in this article.
1. Give each schema a different targetNamespace
2. If required to re-use another schema in the current schema we need to import it
Benefits
1. Maximise the re-use of the types with separate namespaces
2. Namespace mapped to domain specific service
3. It would be easier to model all the domain-specific types in separate files with individual namespaces
4. Easier to understand
Drawbacks
1. There will be a large number of namespaces to manage
2. There will be a large number of namespaces to import
3. The granularity of the types in import would depend on the types defined and exposed in a particular domain-specific XSD
1. Give all schemas the same targetNamespace
2. As the schemas have the same targetNamespace, the method of accessing components is “include”.
Benefits
1. No need to either import a service or schemas
Drawbacks
1. Need to handle Name collisions
2. Generate code in a single Java package, for a service
3. chances for redundant types
4. does not allow for domain-specific namespaces
Give the main schema a targetNamespace and give no targetNamespace to the supporting schemas. The no-namespace schemas will take-on the targetNamepspace of the main schema.
Benefits
1. In this scheme, schemas are able to blend in with the main schemas that use them
2. Ability to provide application-specific namespace to the schema
Drawbacks
If the schema <include>s multiple no-namespace schemas then there will be a chance of name collisions. In fact, the schema may end up not being able to use some of the no-namespace schemas because their use results in name collisions with other Chameleon components
The most widely used schema design approach is heterogeneous schema design approach. Let me illustrate this with an example.
Step1: Create a schema file named Books.xsd
<!-- to store book information with targetNamespace declared as tns:Books-->
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="tns:Books"
elementFormDefault="unqualified">
<xsd:complexType name="Book">
<xsd:sequence>
<xsd:element name="Author" type="xsd:string"/>
<xsd:element name="Title" type="xsd:string"/>
<xsd:element name="Price" type="xsd:double"/>
<xsd:element name="Quantity" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Step2: Create another schema file Sales.xsd
<!-- to store the sales information with targetNamespace declared as tns:Sales-->
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="tns:Sales"
elementFormDefault="unqualified">
<xsd:complexType name="Sales">
<xsd:sequence>
<xsd:element name="Customer" type="xsd:string"/>
<xsd:element name="Region" type="xsd:string"/>
<xsd:element name="TransactionStatus" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Step3: Import the two schema files in Catalog.xsd file
<!--using the Heterogeneous namespace design approach--> <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:b="tns:Books" xmlns:s="tns:Sales" xmlns:ns1="tns:Catalog" targetNamespace="tns:Catalog" elementFormDefault="unqualified"> <xsd:import namespace="tns:Books" schemaLocation="Books.xsd"/> <xsd:import namespace="tns:Sales" schemaLocation="Sales.xsd"/> <xsd:element name="Catalog"> <xsd:complexType> <xsd:sequence> <xsd:element name="Payment"> <xsd:complexType> <xsd:sequence> <xsd:element name="CustomerID" type="xsd:integer"></xsd:element> <xsd:element name="PaymentType" type="xsd:string"></xsd:element> <xsd:element name="Currency" type="xsd:string"></xsd:element> <xsd:element name="ShippingAddress" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="Book" type="b:Book" maxOccurs="unbounded"/> <xsd:element name="Sales" type="s:Sales" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema>
{ Comments on this entry are closed }
You know that BAM is used to gather statistics from your BizTalk application. What you probably don’t know is that:
· You can collect BAM data from your non-BizTalk applications such as external .NET components that BizTalk calls into.
· Tracking profile editor (TPE) is not the only way to collect data you can use a set of APIs available in the Microsoft.BizTalk.Bam.EventObservation namespace to read and write directly into the BAMPrimaryImport database.
Check out some of the links here:
· http://www.developer.com/net/net/article.php/11087_3587296_2
· http://blogs.msdn.com/keithlim/archive/2006/02/02/522649.aspx
· http://blogs.msdn.com/keithlim/archive/2006/03/08/545851.aspx r
Original Article : http://geekswithblogs.net/benny/archive/2007/06/14/113219.aspx
{ Comments on this entry are closed }
In my current project, there are 50 operations on each port. It is very difficult and time consuming to create fault on every port operation and then add exception handler for every fault message. This solution is not so comprehensive that if fault message is of different type what you made on each port
For example I selected “BTS.Soap_envelope_1__1.Fault on each operation,
than orchestration goes in suspended mode and process left uncompleted.
After too much search if found following exception type.
Its works wonder if any fault message return my orchestration process is not break.
Pros: Normal exception caught and Orchestration completes its process.
Con: suspended instance of orchestration still visible at BizTalk admin with message “The instance completed without consuming all of its messages. The instance and its unconsumed messages have been suspended.”
{ Comments on this entry are closed }
Whenever you create new schema in visual studio or open the exiting one in BizTalk application you find similar window.
This screen shot is taken form http://msdn.microsoft.com/en-us/library/aa559175%28v=bts.70%29.aspx.
{ Comments on this entry are closed }