BizTalk Server Orchestration - base64 encoded element within message?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > May 2005 > base64 encoded element within message?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author base64 encoded element within message?
Mike

2005-05-24, 5:57 pm

Hi,

Can anyone provide info on the best way to base64 a specific element in an
outbound message? I need to read in the contents of a file, base64 encode it
and place it inside a message that I will be constructing in an
orchestration. The entire message is not encoded, just this one element.
Should I write a custom C# component to do this or does BizTalk offer a
better alternative?

Thanks in advance for any feedback.

Michael

Scott Colestock

2005-05-24, 5:57 pm

Sure, if you have the contents of the file in a string (and the element in
the destination available as a distinguished field), you can do something
like the following.
(Choose your encoding.)

myMsg.Mybase64Field = System.Convert.ToBase64String(
System.Text.Encoding.UTF8.GetBytes(myString));

Scott Colestock
www.traceofthought.net


"Mike" <Mike@discussions.microsoft.com> wrote in message
news:768614BD-B985-4F67-9044-EB6CA5243A37@microsoft.com...
> Hi,
>
> Can anyone provide info on the best way to base64 a specific element in an
> outbound message? I need to read in the contents of a file, base64 encode
> it
> and place it inside a message that I will be constructing in an
> orchestration. The entire message is not encoded, just this one element.
> Should I write a custom C# component to do this or does BizTalk offer a
> better alternative?
>
> Thanks in advance for any feedback.
>
> Michael
>



Mike

2005-05-24, 5:57 pm

Thank you Scott...that worked perfectly.

Michael


"Scott Colestock" wrote:

> Sure, if you have the contents of the file in a string (and the element in
> the destination available as a distinguished field), you can do something
> like the following.
> (Choose your encoding.)
>
> myMsg.Mybase64Field = System.Convert.ToBase64String(
> System.Text.Encoding.UTF8.GetBytes(myString));
>
> Scott Colestock
> www.traceofthought.net
>
>
> "Mike" <Mike@discussions.microsoft.com> wrote in message
> news:768614BD-B985-4F67-9044-EB6CA5243A37@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com