BizTalk Server Orchestration - Attached Base64 files Biztalk

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > February 2006 > Attached Base64 files Biztalk





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 Attached Base64 files Biztalk
kato

2006-02-03, 5:53 pm

Hello,
I got a XML file with an attached file in writebase64, what I need to
do is to generate an email with the content on the xml file plus the
attach file .
What I did was to generate a Multi part message and is working fine but
my attachement is still on base64 encode.

Here I got the information from the xml file to insert it on the body
of my email
Variable_CategoryID =
xpath(ReqsNewDocument,"string(//*[local-name()='CategoryID'])");
Variable_CategoryName =
xpath(ReqsNewDocument,"string(//*[local-name()='CategoryName'])");
Variable_TypeDoc =
xpath(ReqsNewDocument,"string(//*[local-name()='Description'])");

here is my attached file 'it is a stirng'
Variable_Picture=xpath(ReqsNewDocument,"string(//*[local-name()='Picture'])");

First Message -Body
Msg_Out_Part.MessagePart_1 =new
Microsoft.XLANGs.CustomFormattersSDK.RawString("<html><body><a>TRACS ID
</a>" + Variable_CategoryName + "<br/> <br/> <a> Type Document </a>" +
Variable_TypeDoc + " </body></html>");

Generate a doc with the attachement
Variable_String="<document>" + Variable_Picture + "</document>";
Variable_Document.LoadXml (Variable_String);
Msg_Out_Part.MessagePart_2 =Variable_Document;
SMTPUtils.Part.SetContentType(Msg_Out_Part.MessagePart_1,"text/html");
SMTPUtils.Part.SetFileName(Msg_Out_Part.MessagePart_2,"Documents.pdf");

Msg_Out_Part(SMTP.Subject)="Unit ID - " + Variable_CategoryID;


What I thik I need to do is convert the attachmet string- to binary but
I do not know how
and I do not know add this binary to the xmldocument shoul I use Load
ot xmlLoad?

Any Help will be really appreciate.

Chrlatan

2006-02-06, 5:53 pm

The base64 part can be decrypted using:

byte[] result = Convert.FromBase64(base64string);



"kato" wrote:

> Hello,
> I got a XML file with an attached file in writebase64, what I need to
> do is to generate an email with the content on the xml file plus the
> attach file .
> What I did was to generate a Multi part message and is working fine but
> my attachement is still on base64 encode.
>
> Here I got the information from the xml file to insert it on the body
> of my email
> Variable_CategoryID =
> xpath(ReqsNewDocument,"string(//*[local-name()='CategoryID'])");
> Variable_CategoryName =
> xpath(ReqsNewDocument,"string(//*[local-name()='CategoryName'])");
> Variable_TypeDoc =
> xpath(ReqsNewDocument,"string(//*[local-name()='Description'])");
>
> here is my attached file 'it is a stirng'
> Variable_Picture=xpath(ReqsNewDocument,"string(//*[local-name()='Picture'])");
>
> First Message -Body
> Msg_Out_Part.MessagePart_1 =new
> Microsoft.XLANGs.CustomFormattersSDK.RawString("<html><body><a>TRACS ID
> </a>" + Variable_CategoryName + "<br/> <br/> <a> Type Document </a>" +
> Variable_TypeDoc + " </body></html>");
>
> Generate a doc with the attachement
> Variable_String="<document>" + Variable_Picture + "</document>";
> Variable_Document.LoadXml (Variable_String);
> Msg_Out_Part.MessagePart_2 =Variable_Document;
> SMTPUtils.Part.SetContentType(Msg_Out_Part.MessagePart_1,"text/html");
> SMTPUtils.Part.SetFileName(Msg_Out_Part.MessagePart_2,"Documents.pdf");
>
> Msg_Out_Part(SMTP.Subject)="Unit ID - " + Variable_CategoryID;
>
>
> What I thik I need to do is convert the attachmet string- to binary but
> I do not know how
> and I do not know add this binary to the xmldocument shoul I use Load
> ot xmlLoad?
>
> Any Help will be really appreciate.
>
>

kato

2006-02-06, 5:53 pm

Thanks Chrlatan
Where can I use this statement.
Do I need to create a pipeline component?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com