Powered By Blogger

Sunday, August 31, 2014

Creating a flat file schema through a wizard in biztalk


Hi there,



It has been a way long since I wrote my last blog. These days i'm working on a new technology named biztalk which according to me has so far been an interesting endeavour in my tryst with biztalk programing :P . Biztalk is one of the widely used integration tool available in the market which supports extensive B2B & EAI integration developed by microsoft. But I'm not writing this blog to explain what biztalk is and what it does. Here is the link to the brief introduction of biztalk --msdn- BizTalk Introduction .
Rather, i'm here to share the inbuilt capabilities of biztalk artifacts which form the backbone of biztalk runtime architecture i.e adapters,pipelines,orchestration,schemas and maps . It would be impossible for me to briefly introduce all the artifacts in a blog and therefore i decided to go with oneartifact/blog :) ....

Schema is one of the important part of biztalk architecture which i will be discussing here. Basically, a schema is something which creates the structure of a file and that file could be anything ranging from xml to flat files.The extension for schemas in biztalk or any other tool is .xsd (XML Schema Definition). The work of schemas is to define the structure of the message it receives, based on which we can create an instance of the generated xsd file into the format we want. Biztalk supports following type  schemas : -

1.XML schema
2.Flat file schema
3.Envelope schema
4.Property schema

For a biztalk beginner, XML schema and Flat file schema should be of concern so as to grasp the logic behind these two schemas so that we meet with minimum problems while facing complex types of schemas.
I will start with flat file schema and in this whole process would be dicussing in brief flat file schemas.
A flat file is a file which consists of records with no structured relationship and stored data in a plain text file.
Flat file are of two types:-

1. Delimited flat files - Example - 1,Saurav,SoftwareEngineer,sauravsuman007@gmail.com

---  In delimited flat file schema the elements of a record are identified after a delimiter like (,) etc.

2. Positional flat files - Example - 1 Saurav SoftwareEngineer sauravsuman007@gmail.com

--- In positional flat file schema the elements of a record are separated by space and are of fixed length

Creating Flat File Schema through a Wizard :

1. Create a BizTalk project by navigating as shown in the figure




2. Select Empty Biztalk Project under biztalk templates



3. Now open notepad and type the following as shown below


After creating the notepad file, save it with appropriate file name of your choice 

4. Now switch back to visual studio and do the following:-  right click on project ----->add---->new item




5. On add new item dialog, select flat file schema wizard as shown below 



6. On the consecutive page give the path of your instance file name which you created in notepad and name the record name as EMP and click next




7. The next will show you all the record, select only one line of record as shown below. Do not check wrap long lines. 



8. On the next page select delimiter type as your file is a delimiter type.




9.  Proceed further by clicking the next button without modifying anything



10. Select record in element type and click next



11. Keep clicking the next button until you meet up with the screen shown below. Select (,) as child delimtier type and the proceed further by clicking the next button.


12. Proceed further and finish the wizard process. Now open properties of your falatfile schema and browse the file you want to five to give to your input instance filename. Similarly repeat the step for output instance filename.




13. Now validate your schema by right clicking on you schema file and selecting validate schema





14. After valdating schema repeat the step for validating instance. If validation is successful then a xml file instance would be created on the specified output instance file name path. Open your instance by holding the ctrl key and pointing to the path name showm in the output





15. You will find your xml output but this shows only one record.




16. For all records to show do the following as shown below




17. Your final output





 For beginners, it is strongly recommended to first make your schema using the wizard and then try making it manually wherein if in case you get stuck in the process you can quickly switch back to the properties window of schema made through the wizard.

 I hope it was a good read and  look forward to your queries and feedback.

Happy Blogging!!

Saurav Ambastha
Software Engineer @ Agility

Monday, April 1, 2013

Where am I ?


Hi there ,

The day when i took interest in mobile programming, i had no idea that this could one day become my most interesting hobby. It was on 24th march when i built my first successful android app for my sweet niece who was coming to my home for holi.

That app consisted of random pictures of animals which when the user clicked changed the image with a background sound of that animal in the image. Building that application was an easy task than what i was going to build next.

The next idea which was floating in my mind after the completion of my first app was to build an application which would catch the location of the mobile user and that the user can text his/her location to a friend.
This whole idea looked impossible until i came across some useful resource which helped me a lot to build this app.

It took about 3 days to build this app. Here i present some snapshots of my Where am I? android application.


This is the first screen shot. First successful testing  for text message was done
by entering any number to Texting.PhoneNumber() method.

This modification was done keeping in mind that only one number
cannot be embedded  for texting, so i introduced a textbox wherein
the user will enter the number.




This is the final and complete view of Where am I? application.





Now as soon as the user clicks the send button, a text message containing the current address will be sent to the phone number entered in the text box.
Download links of my app will be soon published here once i register myself to a free file hosting site. 
But if you want to download now then you can email me your request on my gmail id-- sauravsuman007@gmail.com. I'll reply you back with a link to download this app.
The next in line is the "Quiz Master" which i hope would revolutionize the way current quiz apps are.

Love,

Saurav Ambastha





  

Monday, November 12, 2012

WEB MATRIX 2 - Web development made easy.


Hi There,

It has been a way long since the last post. To continue with this post which gives a brief introduction on how Micrsoft's Web Matrix 2 has made the world easy for web developers,I would like to highlight a few points about this IDE.

With the key razor tool incorporated, this sleek IDE promises to give a rich, more user friendly look to websites. With supports like adding a database with clicks it has made web development more exciting and a fun to work with.

I couldn't wait to share the bold features of this development tool. The next of lines of this post will help you get an exciting look of its features.

------------------------------------------------------------------------------------------------------------


About



Microsoft WebMatrix is a free, all-in-one, extensible web development application for Windows, developed by Microsoft. WebMatrix lets web developers build websites using built-in templates or popular open source applications, with full support for ASP.NETPHPNode.js and HTML 5.

In 2011, WebMatrix was released to support the large number of open source content management systems and to provide a lightweight web development application for PHP and the new, simplified ASP.NET Web Pages. It focused on a clean, simple user interface allowing web developers to build websites from scratch or by customizing open source web content management systems such as DotNetNukeUmbracoJoomla!Drupal and WordPress, among others.
From 2011 to 2012, WebMatrix 2 Beta and RC releases added support for Node.js, mobile simulators, additional website templates, publishing to Windows Azure Web Sites and more. On September 6th 2012 the official release of WebMatrix 2 went public.
ASP.NET Web Matrix, whose name was the inspiration for WebMatrix, was released in 2003 and later discontinued.
Source:- en.wikipedia.org/wiki/Microsoft_WebMatrix

Having personally used the tool , i got a feeling that this IDE has been built keeping in mind the level of new developers. This tool has a mixed bag of goodies both for new developers and the professionals. 

With the preloaded templates, it allows building sites of various categories by just a few clicks. With support extensions like Tweeter feeds, Blog feeds to websites, it promises to give a more enriched look to websites. To have a glimpse of this IDE, I've shared a few screenshots.


The Home Screen Of Web Matrix 2
                                                 
Quick Start Menu

Building a simple CSHTML site with Web Matrix 2


One of the most useful feature of this IDE is the introduction to Razor syntax.Razor syntax can be embedded in ASP.Net web pages framework. The Razor syntax is light weight tool that doesn't use server controls but instead makes easy to integrate server side code with HTML.

With WebMatrix, all you need is to build and maintain a web application. By using it , a software provider should be able to build a system cheaper and quicker.We look forward to its performance in market , but this product promises well.

Love,

Saurav Ambastha


Links-- http://www.hanselman.com/blog/WebMatrix2FrontEndWebDevelopersTakeNoteASPNETPHPNodejsAndMore.aspx 






Wednesday, August 5, 2009

THE GREAT LITTLE BUNK.

A BIRD'S EYE VIEW OF MY SCHOOL. (click on the photo for a larger image) Bunking is a day to day phenomena and is most popular with the student section.Many of us bunk to satisfy the hunger crumbling in our minds. The hunger could be of many things, for ex. it could be for watching a movie, roaming in a nearby mall,having a stay at friend's house where his/her parents are not there. Before starting my story of the "great little bunk", i would like to introduce the topograph of my school to make this post a bit familiar to you all. My school is situated on the foothills of himalayas (shivallik range), It is 8 k.m.s. down from mussoorie and 28 k.m.s. up from Dehradun. The campus encompasses seven hills and is spread over 250 acres of land. The school was established by the "East Indian Railway" on June 1, 1888 and was taken over by the Indian Railways after Independence. 

It was 24th october, 2006 and we were told that the school administration has decided that we would go to mussoorie this diwali for the the same old monthly trip (here this was a diwali trip). The guys of my class started chatterring within themselves and at the blink of my eyes my friend Suraj Jha came rushing towards me and said - " hey saurav- Me,manish and persie are planning for a bunk to Dehradun this diwali." Hearing this I was semi excited. There were a lot of reasons behind this semi excited state. First, the most cunning problem was that of the roll-call which was taken when we reached Mussoorie. But the roll call depended on the teacher and a less strict teacher would leave this task. The second reason was genuine. I had never in my life bunked to such a great extent and I was scared because if I or any of my friends were caught then we would be booked under strict rules of our school. Suddenly Manish came and said - " what do you think?". I paused for a moment and said " you know what, I'm ready" . Manish sat on my desk and said " listen, this diwali a new film named DON starring shahrukh khan is releasing at prabhat". Amit singh who was sitting behind my desk came and the three of them surrounded me. Manish continued his plan--- " today I shall telephone my brother to book 4 tickets for us". At least the worry of standing in a line was thwarted. It was decided in our meeting that manish would lead us as he was a master in bunking and knew the short-cut to the rajpur road through the dense forests. The same night manish came to me and said " hey saurav, don't forget to take your fancy clothes (CASUALS)." Now since we were not officially touring the doon valley... we had to dress like common citizens and not like school guys. Suraj and Persie came to me with two bags and then we decided to put our so called "fancy clothes" into those two bags. The two bags were moderately heavy and it was decided that randomly we will carry the bags on our way. The next day we all had a routine breakfast and after the breakfast we were all seated at our classroom for the roll-call. Suddenly, Mr. k.kumar (our physics teacher) entered and started taking the roll-call. Seeing him our group's face glowed and we all looked at each other and said-- "yes".... Actually Mr. k.kumar was the teacher we were looking for . He had a habit of taking roll only two times.. the first was right now and the second was when all the guys had arrived from the trip. As soon as he said " now you all can go." We jumped through our bench and desks and manish took us to the back side of the school (near our swimming pool) and told us to be continuously running because we were at that time passing through the staff quarters and if any one of them would see us then he/she would definitely sneak to our teachers. Soon we arrived at a nearby hill (commonly known as 'ganji pahari') and manish informed us that the real journey would start from here. We all changed our clothes to the so called "fancy dress" and quickly submitted the school dress in the two bags. The way we were following was the oldest link between the doon valley and mussoorie. It was made by the britishers when there was no modern way of tranport . At one time it used to be thronged with travellers and people and the daily requirements of goods was transported on the backs of donkeys,goats and horses through this way. But today the way remains empty with little movements of the "the pahari" villagers, who would come with their goats and sheeps for rearing. Our speed throughout the journey was excellent but the sounds of monkeys and other animals kept disturbing me. Manish informed us that we would be taking our first break in a short while. Now when we were speeding ourselves through the jungles we came across a "GRAVE". We paused in front of it for a little pray and there we took our water bottles off from our bags to give ourselves some relief. Persie gave his bag to me as it was my turn to carry the bag. We again gained the same old speed. The reason for this constant speed was due to the slope of the region. The slope was so steep that if we intentionally wanted to stop the slope would carry us forward. On the way,the guys started talking about the haunted stories which Mr. khanna used to tell us about the path we were taking (rajpur-mussoorie).We started to chat about the story of a man who killed himself just before his marriage. His ghost was seen every saturday and he used to stop every passerby asking for a cigar. Thanks God it was not a saturday. we were slowly entering the plains and on our way we came across a no. of villagers who would smile as we passed through them.They smiled because they knew we were bunking. Soon we entered the plains and the main gate where it was written "welcome to rajpur-mussoorie road"---- and there was a old abandoned house where toll tax was collected for using the way. I was just having a look at them then suddenly manish said " look where we have come." I looked back and i could not believe my eyes that we had jumped across two hills in just a span of 30 minutes.Really that sight of amazement in everybody's face was worth watching. Persie pointed "there is our school". It was about 10:30 a.m. and suraj told us to hurry up as the show was bound for 1:30 p.m. and we were still to cover 5-6 k.m. more to reach rajpur from where we would take a 'vikram(auto)' to 'ghantaghar'. We began ourselves and on our way a water storage plant came across. we paused there for a moment and got a bit fresh.After getting fresh we all started and i gave the bag to Amit as it was his turn. Soon we reached rajpur road where a lot of vikrams (autos) were there and we all sat at one of it. It took about 25 minutes to reach ghanta ghar. We reached ghanta ghar at about 12:30 p.m. and quickly rushed to the hall (prabhat) where we were about to watch 'don'. Manish went to his brother who was waiting for us in a nearby sweet shop. Soon he came and gave us the tickets. We all praised Manish for his brilliance otherwise we would have been standing like others in such a long line. The film was rolled as scheduled and we enjoyed the remake of the old 'don' and most of us agreed that this was better than the old one. After watching the movie we all took a halt at a nearby restaurant for some bites. While we were busy manipulating the menu Amit suddenly said " HEY GUYS, PUT YOUR HEADS DOWN". We understood there was something wrong in the message and i was right. Actually it was Mr Dubey who was sitting with two of our friends at a nearby chemist shop.They had come with him for a medical checkup.We quickly left the place and straight away headed for the bus stop. While heading for the bus stop we quickly bought the crackers and other stuffs which came our way. We were waiting at the bus stop for the bus to arrive . But suddenly my face grew pale when i saw Mr. juyal (our sports teacher) who was comfortably seated in his car which had stopped at a signal point and i could clearly see he was looking somewhere towards us. I quickly turned my face and told others to do the same. After 10 minutes of the Mr. juyal's incident our bus arrived. we all quickly boarded the bus and took respective tickets for "kholukhet". We arrived at kholukhet at 5:00 p.m. and from there we had to still trek 5 k.m. more up to reach the school. The reporting time to school was 6:00 p.m. and we quickly changed our dress on our way to the school. we managed to reach our school at 5:45 and found that nobody had arrived from mussoorie. we all took a deep breath and put all the crackers and other stuffs which we had taken from doon in our cupboards and went straight to our dormitory to freshen up.

We all decided to be tight lipped when our other classmates would ask us about the day, we decided that we would lie to them that we wasted our full day at the school sleeping in the dormitory.

After the dinner, I kept thinking of the feat we had achieved and went to bed early thinking and dreaming about the great bunk. 

 love, saurav suman. links http://oakgrove-jharipani.com