Tuesday, September 19, 2006

New DataSet Fails After BTS 2006 Installation

After BizTalk Server 2006 Installation, if you try to add a new DataSet to your project, and then select to add it to the App_Code folder, you will get an error message saying: “Object reference is not set to an instance of an object.”, and when you press OK to dismiss this modal dialog box, you will the Add New Item window again, and the loop continues.., I searched around but I couldn’t find a solution or anything relevant to this weird problem, I tried to figure out what’s going on, so I will drive you the solution in case you face this problem.

After getting the error message press OK, and then press Cancel for the second Add New Item window, right click the DataSet from the solution explorer, and select “Open With”, you will get the following window, and as you can see the BizTalk Editor (Default) coming at the top, so to open the XSD file properly select DataSet Editor, then the Visual Studio 2005, will open the DataSet in the DataSet Designer and the Toolbox will get populated with the DataSet group; like TableAdapter, Query, Relation, etc..

Open DataSet With, the BizTalk Editor is the Default that's why it fails to add XSS file

Moreover, if you collapse the DataSet node in the solution explorer, you will find the XSS file with the same name of the DataSet, I think this is the reason behind this exception, as the BizTalk Editor is not able to manage such a file.

Note: you can make the DataSet Editor the default application that manages XSD files from the Open With window.

Tuesday, September 05, 2006

XPath Intro

XPath is just a another language that’s built upon XML, XML is the foundation for most of the current enterprise applications, for both data representation/ storage, and for data interchange between systems within same organization which is EAI ( Enterprise Application Integration ), or between heterogeneous or disparate systems that’s B2B ( Business 2 Business ), .NET is using XML everywhere, for saving configurations, for saving solution files, etc.., BizTalk Server 2006 is built upon XML, and Office 2007 is using XML to save files, it’s much more better than before no proprietary format anymore, if you are curious enough, just like me, open any docx or xlsx file after changing its extension to zip, and you will find out that it’s no more than a collection of xml files storing the format and data and everything about the Office 2007 file.
XPath is a language to navigate XML trees, it supports operators, wildcards, and not surprisingly functions, like every language else!, the core of XPath is built upon context , context is simply where you are located within the tree, wherever you are at the tree you will get different results after running your expression, so it’s very important to know your location or the context of the query to better anticipate your result set, so in the following post I am gonna try to give a brief about XPath.

Why do you need XPath?

Very interesting answer, that you should have one answer to, suppose you have the following XML snippet :

<bookstore specialty="novel">
<book style="autobiography">
<author>
<first-name>Joe</first-name>
<last-name>Bob</last-name>
<award>Trenton Literary </award>
</author>
<price>12</price>
</book>
<book style="reference">
<author>
<first-name>Kareem</first-name>
<last-name>Shaker</last-name>
<award>Hopefully getting one soon</award>
</author>
<price>29</price>
</book>
</bookstore>

And you just want to change the price value, first you need to navigate to this node then you can change it, so to navigate to this node you need a Location Path, which is simply your XPath Expression, and surprisingly XPath expression is so similar to URL pattern, in other words to navigate to the price element you would write the following expression :

/bookstore/book/price

So simple isn’t it ?, I guess so, however here you use forward slashes to separate your steps, just like URLs, and each text enclosed between forward slashes is called Location Step, that’s the simplest expression you may need to write, but world is more complex than this, suppose you want to get prices that are greater than 20, you guessed it, you need to write a condition to filter results, in this case the expression is just like the following:

/bookstore/book[price>20]/price

See it’s so simple, you just opened to brackets and you write your condition inside, if you run this expression against the above snippet, you will get second result, as the first price is less than 20, also you should realize that the price element passed between the brackets is the one under the complex type book, and this is what’s meant by context, if you put this expression after the bookstore location step you’d get no matches because the price will be out of context.

Inside the above predicate you can write conditional operators that you are used to, and when you use square brackets and include a condition inside this is called a Predicate, noting that in other situations you use square brackets to path indexes for XPath collection of results, huh ?, yes you’ve got it, you can get results by index from your results, ain’t it nice ?
Also as a brief about functions, you have a bunch of functions available, and few are about navigating recordset, like first, last, etc.., try this expression:

/bookstore/book/author[last()]

This would give the last author element of each and every result returned within the results collection, for the above snippet it’ll give you the 2 authors, but what if you want to get the last author element considering the entire document content, in this case you will need to apply grouping by supplying parentheses, let’s try it:

(/bookstore/book/author)[last()]

As you can see from the above location path, the parentheses imposes precedence for this expression to execute before applying the function, so firstly the engine will get the collection of results then it will apply the function passed within the 2 square brackets, always use parentheses to decide the execution precedence, but the default one is just like most of other languages from left to right.
Interestingly, as mentioned before, you can supply indexes to extract specific elements within results collection, for example to extract the first book element you can write:

/bookstore/book[1]

This would extract the first book element with all its child ones.

Note:
you can get the full xml file from, http://msdn2.microsoft.com/en-us/library/ms256095.aspx, also I’ll try to cover more advanced topics in future posts, that was just an appetizer to get your hands wet with XPath, and I am sure you got tempted!

Thursday, August 31, 2006

BTS 2006 BTSService.odx Missing File

While Installing BizTalk Server 2006, I got one error message about one missing file; that file is :

G:\Msi\Program Files\Developer Tools\BizTalkProjectItems\BTSService.odx,

then I found out that this file is not existent in my CD, I pressed ignore, and resumed installation, however after few days I was developing one BizTalk Application, and I tried to add a new orchestration file, but every time I try to do it I find the left pane empty when I select Orchestrations from the left pane, this error aroused my anger, especially I searched on the Internet to resolve this problem, but it seems no one else got it but me, however I remembered that file I missed while installing BizTalk Server 2006, and fortunately I have another machine where I installed BTS 2006 before and I could add orchestration files, I got this file from the path above, and surprisingly the file size was ZERO !, I think that’s why I couldn’t find it on the ISO image I installed BTS from, I think the ISO creator I have used is not including zero files, I copied the file to the first machine, and luckily it has worked, but the question is that as long as this is a zero sized file, and it’s completely empty, why VS.NET 2005, recreates it upon startup when it’s missing from the BTS developer tools?

Saturday, August 19, 2006

HTTP Receive Adapter Configuration in IIS 5.1

BizTalk 2006 Receive Adapter lets your application accepts XML messages over HTTP protocol, definitely you will need to use the HTTP Receive adapter to use the HTTP channel, for this purpose you will need to create a web application that constructs and posts an XML message to a receive location, if you have gone through consuming the HTTP Receive adapter you would know that you should host the adapter at one web application, basically this application is the main web application that’s posting the XML message to be dispatched by the receive adapter, and this web application will often be an ASP.NET application, for this purpose you will need to use the BizTalkServerIsolatedHost , as the web application or the ASP.NET application, that’s hosting the HTTP Receive adapter, is running in different process other than the BizTalk Process, so the isolated host will be used to give this out-of-process adapter an access to the BizTalk management database, but at the same time the web application should have the enough privileges to be provided to the isolated host to access the BizTalk management database, noting that all other adapters like FILE adapter are running under the BizTalk runtime except SOAP and HTTP adapters, so to be able to post XML messages to the HTTP receive adapter you need to grant your web application the proper identity to access the BizTalk management database.

I suppose that you copied the HTTP Receive adapter BTSHTTPReceive.dll DLL under your web application, this configurations are meant to Windows XP platform, so now you need to set permissions for your web application right from IIS manager MMC, run -> inetmgr, then spot your target web application, right click, select Properties, then from the Virtual Directory tab, set Execute Permissions to Scripts and Executables, and Application Protection to High (Isolated).

One more step is left; you need to configure the HTTP Receive Adapter from Component Services console, open the Component Services Console from Administrative Tools -> Component Services, from the left tree browse to Component Services -> Computers -> My Computer -> COM+ Applications -> IIS-{Default Web Site//Root/WebApplication, WebApplication is just a placeholder for your web application, right click this application, click Properties, select Identity tab, from Account group select System Account, and Interactive user – The current logged on user.

If you don’t set the HTTP Receive Adapter correctly; you will get an error message both in your web application, in case you handle errors, and in Event Log, this is the error message written to the Application Event Log:

The BizTalk HTTP receive adapter failed to initialize itself. Possible reasons:

1) Receive location URL is not created/configured correctly.

2) Receive location is not enabled.

3) HTTP receive adapter is not running under a user that has access to management and message databases.

4) Isolated host instance is not created for HTTP Receive adapter.

As you can see the error you will get most is number 3, and that’s we’ve resolved above.

HTTP Receive Adapter Configuration in IIS 5.1

BizTalk 2006 Receive Adapter lets your application accepts XML messages over HTTP protocol, definitely you will need to use the HTTP Receive adapter to use the HTTP channel, for this purpose you will need to create a web application that constructs and posts an XML message to a receive location, if you have gone through consuming the HTTP Receive adapter you would know that you should host the adapter at one web application, basically this application is the main web application that’s posting the XML message to be dispatched by the receive adapter, and this web application will often be an ASP.NET application, for this purpose you will need to use the BizTalkServerIsolatedHost , as the web application or the ASP.NET application, that’s hosting the HTTP Receive adapter, is running in different process other than the BizTalk Process, so the isolated host will be used to give this out-of-process adapter an access to the BizTalk management database, but at the same time the web application should have the enough privileges to be provided to the isolated host to access the BizTalk management database, noting that all other adapters like FILE adapter are running under the BizTalk runtime except SOAP and HTTP adapters, so to be able to post XML messages to the HTTP receive adapter you need to grant your web application the proper identity to access the BizTalk management database.

I suppose that you copied the HTTP Receive adapter BTSHTTPReceive.dll DLL under your web application, this configurations are meant to Windows XP platform and Internet Information Server 5.1, so now you need to set permissions for your web application right from IIS manager MMC snap-in, run -> inetmgr, then spot your target web application, right click, select Properties, then from the Virtual Directory tab, set Execute Permissions to Scripts and Executables, and Application Protection to High (Isolated).

One more step is left; you need to configure the HTTP Receive Adapter from Component Services console, open the Component Services Console from Administrative Tools -> Component Services, from the left tree browse to Component Services -> Computers -> My Computer -> COM+ Applications -> IIS-{Default Web Site//Root/WebApplication, WebApplication is just a placeholder for your web application, right click this application, click Properties, select Identity tab, from Account group select System Account, and Interactive user – The current logged on user.

If you don’t set the HTTP Receive Adapter correctly; you will get an error message both in your web application, in case you handle errors, and in Event Log, this is the error message written to the Application Event Log:

The BizTalk HTTP receive adapter failed to initialize itself. Possible reasons:

1) Receive location URL is not created/configured correctly.

2) Receive location is not enabled.

3) HTTP receive adapter is not running under a user that has access to management and message databases.

4) Isolated host instance is not created for HTTP Receive adapter.

As you can see the error you will get most is number 3, and that’s we’ve resolved above.

Saturday, July 29, 2006

BizTalk Server 2006 MCTS

Microsoft Certified Technology Specialist, is a new certificate that is focusing on one technology, which makes the path to get a certificate shorter and smarter, the core objective of MCTS is to let you prove your skills and knowledge at one Microsoft Technology, and BizTalk Server 2006 is not an exception.

The BizTalk 2006 MCTS holder,     will have a good understanding about how to design and develop BizTalk applications, creating Messaging architecture including schemas, maps, pipelines, adapters, and last but not least Orchestrations, also the holder will be aware of BRE (Business Rule Engine) usage, Human workflow, short and long term transactions, that was about the design and development of applications.

About the applications management and deployment, you will be aware of how to manage business processes, and how to deploy your applications.

The good news is that it’s only one exam, once you pass it; you become a BizTalk Server Certified, which is a good evidence to your knowledge and implementation, the roadmap to BizTalk MCTS is mentioned below ( as per Microsoft site )

Required Exams for MCTS: BizTalk Server 2006 (One Exam Required)

Courses

Books

Exam 70–235: TS: Developing Business Process and Integration Solutions Using BizTalk Server 2006 (available early 2006)

2933: Developing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006 (available as five-day classroom training in early 2006)2934: Deploying and Managing Business Process and Integration Solutions Using Microsoft BizTalk Server 2006 (available as two-day classroom training in early 2006)

Programming Microsoft BizTalk Server 2006 Core Reference (available early 2006)


 

Wednesday, July 05, 2006

BizTalk 2006 Easy Installation

I have just finished installing BizTalk 2006 on Windows 2003 Enterprise Edition SP1, one of the things that made BizTalk 2004 a real pain was its installation, however installing BizTalk 2006 is a real fun, and it’s straightforward, It’s kind of ( Next, Next, …, Finish ), If you have Internet connection it’s better to let the installation wizard to update all required components through the web, or if you plan to install it to other machine, you can download a cab file and reuse it everywhere else, actually I cannot forget how hard it was to install BizTalk 2004 prerequisites, which made me opt to use VHD image, and I used MS Virtual PC, now it's easy to get it up as the wizard provides a component updater and it's really a one click configuration, how simple !, however to create Groups and get started with BizTalk 2006, if you have SQL Server 2000, you should have SP4 installed to configure BizTalk 2006 from BizTalk Server Configuration.

You can select Basic Configuration and BizTalk Configuration will take after everything, it’s really simple!

You can download SQL Server 2000 Service Pack 4 from here, then you can select the components that most interest you.

After you select Basic Configuration if there is anything incorrect you will get one warning, also to make sure everything is fine, run BizTalk Server 2006 Administration Console; actually it's MMC, from left tree expand BizTalk Server 2006 Administration , then expand BizTalk Group[MachineName:BizTalkMgmtDb], expand Applications node, you will get 2 applications; BizTalk.System, and BizTalk Application 1; this assures that group has been created correctly.

Note: After installing BizTalk 2006 it creates 2 default applications first is BizTalk.System which contains all artifacts required to run built-in applications like Business Activity Services ( BAS ), also it contains some components that are part of BizTalk runtime which is required to each and every BizTalk application, second application is just a default application.

Tuesday, July 04, 2006

Biztalk Cafe Welcome Post

I'm pleased to get my second blog tuned, it's BizTalk Cafe, named after my first 2 years old blog CairoCafe, in this blog I am going to record my thought, suggestions, and experiences about BizTalk Server 2006, hope I add something to BizTalk Geeks !
Cheerios