Wednesday, March 31, 2010

HandlingUnType Message In BizTalk

In SOA pattern we have to work with different kind of xml or XSD’s. On origin of those XSD we create our receive message in our workflow. I have found BizTalk server very good in handling business progression and other prototype. BizTalk has strongly type message that mean it is associated with schema namespace define in the project. Now question is that how we handle a XSD without any Namespace given in the XSD or XML coming towards BizTalk server. Let take an example: My client do not want to add namespace in his request xml he want me to check the request at my BizTalk end, to cater this I have two solutions.
(1) I can create a filter on receive location at BizTalk end recommended for large xml.
(2) I can handle it within the work flow, recommended for small request by client. I mean small xml type.



Here I am exploring the second technique which I like it most. To accomplish this work within workflow or Orchestration we have to follow the following steps.
(a) Make a receive shape of xml type with XmlInput message.




(b) Create an XSD which is unique from its Namespace at BizTalk end and promote all values of this XSD which you are maintaining at BizTalk end.



(c) Use Conditions tool , and Check the nputMessage(BTS.MessageType) in the orchestration and assign them to the relevant internal XDS.



(d) Use Message Assignment operator and assign all the values from xml to your internal XSD which is already having a promoted fields.


Now after this assigning a content of xml to our internal message , we can do further process as per our requirement.

In this blog I have used a technique for handling untyped message in BizTalk. Hope this may clarify your concept and may help you.

Make life easy :)

No comments:

Post a Comment