Thursday, 22 September 2011

Creating MultiPart MessageTpe in BizTalk

MultiPart Message: is Message with multipart part in it. Example we can have one message input to “Receive Shape” of orchestration and which indeed has multiple message.

Here we have InputMsg as multipart message.It’s Message Type is “MulitpartMsg.MutipartType_1”. Which has three types of message (Num1, Num2, Num3) in it all are defined as type int.The int type is for this sample only you can define it as any DataType or schema.


The receive shape (Receive_1) has message “InputMsg” which is of type Multi-Part message types.

Then I published this Orchestration as Web service using “BizTalk Web Publishing Wizard”.The Published WebService when opened in Browser.Shows Multipart-Message as input parameter to method “Operation_1”

Then I have created a test application to test my Webservice. I added web service as web reference to my application & then called method Operation_1 (Num1, Num2, Num3) and passed multipart message parameter value and got the desired output.
//Create an instance of the proxy  
            MultipartMsg_Service_Port_1 wsProxy = new MultipartMsg_Service_Port_1();
            Int32 intSum;
            //Call the numeric operation
            intSum = wsProxy.Operation_1(10, 10, 20);

No comments:

Post a Comment