Thursday, September 29, 2011

Install and Run Windows 8 on Mac 10.7 Lion using VMware Fusion

There's a loud buzz for Windows 8 Developer preview released recently. Thought of giving it a try on my Macbook. Following are a few steps:
  • Download the windows 8 developer preview from the Windows Dev Center.
  • Launched the newly bought VMware Fusion 4.
  • Command+N to open the New Virtual Machine Assistant.
Fig. 1

  • Click continue without a disc.
  • Check Use operating system installation disc or image.
    Fig. 2
  • Choose operating system Windows and Version Windows 7 x64
Fig. 3
  • Click Finish and it will ask for saving the VM.
Fig. 4

  • Click on the play button on the VM and it will start the windows 8 installation.
Fig. 5


Fig. 6

Fig. 7 Personalize screen


Fig.8 Preparing your PC screen

Fig. 9 Post Login Start Screen

  • After the complete Windows Install, tried VMware tools and to my utter surprise they installed like charm.
Fig.10 VMware Tools installation

Overall, a different UI for the start and nice options. The mac trackpad just  works well too with the swipe gesture showing the way around.

Tuesday, September 27, 2011

How to use Oracle Stored Proc with XMLType parameters in BizTalk 2010


Had a scenario in one of my projects where in we need to pass XMLType as input parameter and output parameter to a oracle stored procedure. So find some excerpts of the POC in this post.
Following are a few steps that I followed:
1) Created stored procs with XMLType as the input and output parameters.
Fig.1 Oracle Stored Procedure with XMLType parameters

2) Creating the schema's for the Oracle Stored Procedure using the Consume Adapter Service.

Fig.2 Consume Adapter Service

3) Following is the schema generated for the Oracle stored procedure.

Fig.3 BizTalk Auto Generated Schema

4) Created a simple orchestration for picking up the Request File and sending to the Oracle Stored Proc using the auto generated WCF request response port(This gets generated during the Consume Adapter Service).

Fig.4 Sample Orchestration

5) Sample file used for testing is as follows.
Fig.5 Sample File containing XMLType data as a String

6) Sample response file containing the response from the Oracle Stored Proc.

Fig. 6 Response File returned by Oracle Stored Procedure.
Overall, a couple of things to notice that while for using ambientTransactions we need to use a TNS alias. XMLtype is taken as a string so have to take care of the data that goes in the input. Reserved XML characters like '<', '>'. must be replaced with their entity.representations (&lt; and &gt;)

Thursday, September 15, 2011

Microsoft WebMatrix

Have really been intrigued recently by this brand new web development tool from Microsoft that supposedly includes everything we need for our website development including some built in templates. The thing I like most is the open source web applications that we can use to start the website development. And last but not the least, its FREE. More can be found at microsoft/web/. Will be posting more on this. 

.Net Framework 4.5 Developer Preview

With .Net Framework 4.5 Developer Preview, wondering whats in store for BizTalk Server 2010, an R2 update or a vNext. Would be posting more on the new features specially WCF.

Wednesday, September 14, 2011

BizTalk Server 2010 Administrator Training Kit

BizTalk Server 2010 Administrator Training Kit and VHD are great resources for learning about BizTalk Server 2010 administration and can be downloaded from the Microsoft site here. It also provides an option of downloading a Virtual Machine.

Sunday, September 11, 2011

BizTalk Mapper tip to add multiple one to one links from source to destination.

To avoid mapping elements one to one from a source to destination schemas one by one we can use the tip/trick of pressing the Shift Key and then dragging the link from the record node of source schema to the record node of destination schema. As soon as we drop the link the mapper will give us options to select link by structure, link by name and mass copy.
Fig. 1 BizTalk Mapper Tip/Trick.
 Some more BizTalk Mapper Keyboard Shortcuts are available on MSDN here. I often use the ones for search and indicative match.

Friday, September 9, 2011

BizTalk Server 2010 ESB Training Kit and VHD

BizTalk Server 2010 ESB Training Kit and VHD are great resources for learning about ESB Toolkit in BizTalk Server 2010 can be downloaded from the Microsoft site here. It also provides an option of downloading a Virtual Machine.

Copy Name of Element from source to destination in a BizTalk Map

Was question in the forums regarding copying the elements name from a source schema to the destination flat files first row and the values to the other rows.
Following Fig.1 depicts the process by which we can copy the name of the element to a destination node's value. clink on the link and go to Link properties Source Links and change the value to Copy name.

Fig.1 Copy Name of element




















BizTalk XML validator in Decode Stage of the pipeline component

Was a query in the forums about the requirement of using the XML validator component in the decode stage of the receive pipeline component. So thought would do a small test. The XML validator is designed to work in any stage of the pipeline component, except the disassemble and assemble stages. The XML Validator component validates the message against the specified schema or schemas, and if the message does not conform to these schemas, the component raises an error and Messaging Engine places the message in the suspended queue. However, the XML validator does not disassemble the message and if it is used alone in the pipeline component decode stage, the pipeline component might end up being a pass through. To follow up the XML validator in the decode stage we need to have the XML Disassembler component in disassemble stage to actually parse the XML
Fig. 1 is the receive pipeline configuration.
Fig.1 Receive pipeline component

To check the XML validator, tried three failure cases.


  • Different XML


A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 

 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "Pipeline " Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: The element 'XMLSample' in namespace 'http://SandboxSchemas.XMLSample' has invalid child element 'FirstNam'. List of possible elements expected: 'FirstName'.  
  • Incorrect data type in one of the elements.
A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 
 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "Pipeline " Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: The 'Number' element has an invalid value according to its data type.  

  • Different XML Namespace
A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 
 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "Pipeline " Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: The 'http://SandboxSchemas.XMLSample:XMLSampl' element is not declared.  



  • A valid xml but not conforming to the schema.
A message received by adapter "FILE" on receive location "RcvLocSampleXML" with URI "D:\Workspace\Bali\SampleXML\Inbound\*.xml" is suspended. 
 Error details: There was a failure executing the receive pipeline: "SampleXML.SampleXMlRcvPipe, SampleXML, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5a23cf5fc2674b2a" Source: "XML disassembler" Receive Port: "RcvPortSampleXML" URI: "D:\Workspace\Bali\SampleXML\Inbound\*.xml" Reason: No Disassemble stage components can recognize the data.   

Tuesday, September 6, 2011

Cumulative update package 2 for BizTalk Server 2010 and BizTalk Adapter Pack 2010

Cumulative update package 2 for BizTalk Server 2010 and BizTalk Adapter Pack 2010 were released recently.

An Information about BizTalk Server Hotfixes article, which I feel should always be read before we apply the CU packages. 

BizTalk conditional mapping of repeatable records

Was a question in one of the msdn forums, that when mapping repeatable record elements based on a condition to elements of the same record in the destination schema after using the looping functoid, the loop runs only once. In the example in Fig. 1, in the source schema Root1, PHRoot, Record1 and Record2 are all unbounded and in the destination schema RecordDest is also unbounded. Based on element Root1Ele's and Field1's value we need to map Field3 to either FieldGW or FieldLen in the destination. Instinctively we would try to use the looping functoid in such scenarios, but in fact it is not required.

Fig 1. BizTalk conditional mapping scenario
The following was the test sample source and test result.

Source:
<ns0:Root1 xmlns:ns0="http://LoopFunctoid.Schema1">
 <Root1Ele>Root1Ele_0</Root1Ele>
 <PHRoot>
 <FieldRoot>PH</FieldRoot> 
 <Record1>
 <Field1>GW</Field1> 
 <Field2>Field2_0</Field2> 
 </Record1>
 <Record2>
 <Field3>101</Field3> 
 <Field4>Field4_0</Field4> 
 </Record2>
 </PHRoot>
<PHRoot>
 <FieldRoot>PH</FieldRoot> 
 <Record1>
 <Field1>LEN</Field1> 
 <Field2>Field2_0</Field2> 
 </Record1>
 <Record2>
 <Field3>202</Field3> 
 <Field4>Field4_0</Field4> 
 </Record2>
 </PHRoot>
 </ns0:Root1>

Test Result:
<ns0:Root2 xmlns:ns0="http://LoopFunctoid.Schema2">
 <RecordDest>
 <FieldGW>101</FieldGW> 
 <FieldEle>Root1Ele_0</FieldEle> 
 </RecordDest>
 <RecordDest>
 <FieldLen>202</FieldLen> 
 <FieldEle>Root1Ele_0</FieldEle> 
 </RecordDest>
 </ns0:Root2>

BizTalk Table Looping and Table Extractor used for mapping constant values

In this sample, have used table looping functoid and table extractor functoid to create two records with different constant values. The requirement is to create two destination records RecordDest with FieldGW having two constant values viz. 'ABC' and 'DEF', without any link from the source schema.


<ns0:Root2 xmlns:ns0="http://LoopFunctoid.Schema2">

 <RecordDest>
  <FieldGW>ABC</FieldGW> 
  </RecordDest>
  <RecordDest>
  <FieldGW>DEF</FieldGW> 
  </RecordDest>
  </ns0:Root2>

We can achieve this using the table looping and table extractor functoids as depicted in the Fig.1
Fig.1
Following are the configurations of the table looping and table extractor functoids.
Fig.2 Table Looping Functoid Configuration

Fig.3 Table Looping Functoid Configuration

Fig.4 Table Extractor Functoid configuration

BizTalk Server 2010 VHD

Finally, we have a BizTalk Server 2010 VHD available for download here.