Ok, after poking around without much success, we decided to go with the binary encoding route.
Instead of going to the arrays of structs path, my manager came up with simpler solution - that is: to zip the all the email attachments and send it to CF web service (why didn't i think of that?). Thanks for all your suggestions Cassie. On Jun 1, 1:28 pm, "Cassie Woolley" <[email protected]> wrote: > If you decided to go the binary encoding route, could you not send an array > of strings, or an array of structs if you wanted to include more information > about each attachment? > > I have not tried the approach mentioned in the link you provided but it does > sound more standardised. We only needed to transfer a single PDF file and > it had to be included with some other fairly simple xml data. So it was > part of a small XML packet rather than a number of webservice parameters. > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf > > Of felixt > Sent: Monday, 1 June 2009 1:23 PM > To: cfaussie > Subject: [cfaussie] Re: Building CF webservice that accepts file attachments > > Thanks for that Cassie, > > That's similar with what I have in mind by sending the file(s) as > binary encoded, however my problem with that approach is: the numbers > of attachments is not fixed.. > > If I am not wrong Cassie, with your solution I have to declare a fix > number of attachments on my web service function arguments? > > I was thinking more in the line of > :http://webservices.xml.com/pub/a/ws/2002/08/28/endpoints.htmlas there > seems to be several SOAP standards dealing with attachments. > > Worst scenario, is to accept the whole SOAP message just like a form > submission and then manually parse the message .. not fun. > > On Jun 1, 12:21 pm, "Cassie Woolley" <[email protected]> > wrote: > > I have done it before successfully with PDF files by encoding them to > binary > > then passing them as a string. > > > First by reading the file: > > <cffile action="readbinary" file="#filepath#" variable="objBinaryData" / > > > Then included the base64 string in the XML: > > #ToBase64(objBinaryData)# > > > Then on the other end: > > > <cfset objBinaryData = ToBinary(xmlText) /> > > <cffile action="write" file="#strFileName#" output="#objBinaryData#" /> > > > I don't know if this applies to your problem though as Outlook is > involved. > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] On > Behalf > > > Of felixt > > Sent: Monday, 1 June 2009 12:16 PM > > To: cfaussie > > Subject: [cfaussie] Building CF webservice that accepts file attachments > > > Hi all, > > > Sorry for this newbie-ish question, I've been googling around for > > awhile and couldn't find what I am looking for. > > > We have a ColdFusion web service that accepts emails pushed from > > Outlook. This has worked fine, now boss wants to upgrade the apps so > > that email attachments can be pushed to our web service as well. > > > Now what is the best way to do this in ColdFusion? Would it be as > > simple as adding a new argument on the web service function with > > type="binary"? But then what if the attachment is more than one? > > > The .NET guy that builds the Outlook extension suggested to look into > > DIME, but having googled around I don't see any information to do this > > in ColdFusion (although in Axis specs, they seem to support it). > > > Any suggestions/pointers would be very much appreciated! > > > Cheers, > > > Felix --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---
