BizTalk MSMQ - Help Needed
Hello Friends,
I am new in Biztalk server 2004. I need a solution for my project.
Below I give my problem, Please give me a good solution for me.
I have a C# application. It has an upload page. If user uploads a XML file,the C# application reads it and send this to MSMQ as a Message.
The code is below.
StreamReader sr = new StreamReader(Path);
string str;
str = sr.ReadToEnd();
System.Messaging.Message mm = new System.Messaging.Message();
mm.Formatter = new ActiveXMessageFormatter();
mm.Body = str.ToString();
mm.Label = UserID;
mq.Send(mm);
I create a Orchestration with receive and send ports. The receive ports looks message from the MSMQ using MSMQ adapter. then I use schemas and maps to transfer the Message. After that, I use a file adapter for save the final message to a folder.
Every thing works fine. My problem is, I want to identify the User who uploads the file. In C# application I set the label for the message as USERID.
I want to save the name of the output file is [userid].xml.
I use %SourceFileName% and MsgOut(FILE.ReceivedFileName) to rename the output file. But how to get the userid from the C# application and set the file name. I cant able to access MSMQT.Label in Expression Editor. Because I use MSMQ adapter. Please give me a good solution.
The main problem is identify the user who uploads the file.
Thanks,
Nallasivan
|