"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

February 22, 2010

Second Biztalk Experiment

My second Biztalk Experiment is calling web services from Biztalk. Source is Link . I got everything about it from link. I am trying it out step by step from a beginner perspective.

Step 1 - To get the WSDL for web service Goto Add->Add Generated Items


Step 2 - Select the option Consume WCF Service

Step 3 - Select Option Metadata files (WSDL and XSD)
Step 4 - Create the webservice as per below code

[WebMethod]
public string ConcatName(string firstName, string lastName)
{
     return firstName + " " + lastName;
}



Host the  web service and add the wsdl

Save and Add the WSL

Step 5 - Under Orchestration View create two messages based on SOAP Request and Response


Step 6 - Create Messages as shown below
Message1

 Message2

Step 7 - Add the following shapes
 Step 8 - Add ports to shapes 

Step 9 - Individual Port configurations
Port1(One Way)

Port2 (Static Request-Response Port)


Port3 (One Way)

Step 8 - Build, Signin, Deploy the Application

Step 9 - While configuring the web service in send port, Configure as below

Step 10 - Mistakes and learnings
• Finding Multi-part messages under orchestration view
• In Port2 configuration– It must be sending a request and receiving a response
• Bind the ports – Specify WCF-BasicHttp and provide URL details
• Restart the host instances

Thanks to priya for correcting my mistakes.. Happy reading..

February 17, 2010

First Biztalk Experiment

I attended Biztalk traning few years back and nothing on top of my head now :). Curious to know biztalk and learn a bit wanted to attempt this example. I created a biztalk project and added orchestration. Dragged few shapes as mentioned in the pic. It looked like this

Dragged a Few Shapes :)
Step 1 - Time for me to get some help and run through this. I took some help from my colleague.
Step 2 - Create a Biztalk Project


Step 3 - Add a Test Schema
Step 4 - Insert Child Element

Step 5 - Validate and generate Instance
Step 6 - Add Orchestration
Step 7 - Add Receive Port. Drag Receive icon from Toolbox and select Activate = true, message = Message_1 from Properties window.
Step 8 - Add Message Schema
Step 9 - Add Port Configuration
Step 10 - Port Configure
Step 11 - Port Binding
Step 12 - Receive Port
Step 13 - Add Expression
Step 14 - Expression Code
Step 15 - Scope it
Step 16 - Add a send Port
Step 17 - Send port config specify Later
Step 18 - Exception Handler for Scope
Step 19 - Specify Exception Type and Exception Name
Step 20 - Add Expression
Step 21 - Add Suspend Shape
Step 22 - Suspend Message
Step 23 - Add Scope and Another Send Port
Step 24 - Add Another Exception for Capturing the exception
Step 25 - Expression Exception
Step 26 - Orchestration
Got the error - use of unconstructed message 'Message_1. I have wrongly put receive shape under scope one. I moved it out of scope1 and corrected picture as below.
Step 27 - Error Corrected
Step 28 - Strong name Key
Step 29 - Application Name Under Deployment
Step 30 - Sign in with Strong key
Deploy the solution. After Deploying You will see it under btsmmc.msc. Biztalk group->Apps->FileCopyExample.
Step 31 - Send Port Create after deploying
Step 32 - Send Port Check XML Transmit
Step 33 - Receive Port - Receive Location properties
Step 34 - Bind Ports and Orcheatration
Step 35 -  I was able to test it successfully for both positive and negative scenarios. For negative scenario,
When first copy folder is Renamed - Error captured in eventlog
Thanks to priya and srinivas for their help. And Now I need to learn a little more deep into biztalk.
  1. PassThru can be used with almost all types of files.
  2. It will not promote properties
  3. It basically provides a way to pass the message right into the MessageBox
  4. The Xml Transmit is used for processing an Xml message and it will promote a few properties from the Xml message.
  5. The XMLTransmit contains the XML Assembler component.

More Reads

WCF-SQL Adapter Stored Procedure


Happy Reading

    TSQL Tip of the day

    Proactively raise an alert if my SQL agent job runs beyond certain time. For Querying Jobs and status you can use below query. From the job running time we can raise alert accordingly

    SELECT DATEDIFF(MINUTE,ja.start_execution_date,GETDATE())
    FROM msdb.dbo.sysjobactivity ja
    INNER JOIN msdb.dbo.sysjobs j ON ja.job_id = j.job_id
    WHERE j.name like '%JOBNAME%'
    AND last_executed_step_date IS NULL

    Related Read - Determine the current status of a SQL Server Agent job

    Happy Reading!!