base64 encoded element within message?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > base64 encoded element within message?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    base64 encoded element within message?  
Mike


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-24-05 10: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 i
t
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






[ Post a follow-up to this message ]



    Re: base64 encoded element within message?  
Scott Colestock


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-24-05 10: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
>







[ Post a follow-up to this message ]



    Re: base64 encoded element within message?  
Mike


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-24-05 10: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... 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:36 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register