How to upload a file to a service using HTTP from

Hello,

I’ve created an HTML Form containing . How can I retreave the content of this file in a service ?
(same problem as http://advantage.webmethods.com/article/?id=SR-1-63835004).

The action of this form is a service calling getTransportInfo : I got some information about this service has been called by HTTP but that’s all.

Any idea ?

Thanks

Laurent

In line with the referenced KB article, I do the following:

I get the file, but the problem is the pipeline name is somewhat random, e.g.:

“-----------------------------47162151417169 Content-Disposition: form-data; name”

Within this variable are the parameter name, the file name, and the contents:

“spreadsheet”; filename=“readme.txt”

Content-Type: text/plain

For information about installing, running and configuring Firefox

including a list of known issues and troubleshooting information,

refer to: http://getfirefox.com/releases/" and so on.

Without a known pipline name, I can’t access the string to parse out the names. What am I missing?

Howard

File:

I found a solution based on an Advantage sample named SampleFileUpload.

First, in the pipeline, a field named contentStream is created and it contains all information comming from HTTP (including mime, header, …).

Then, I create a MIME object using CreateMimeData and I get the file content using getBodyPartContent.

Now my conserne is to check if it’s a XML document or a superset (I know I have only to look for the first tag, but perhasp there is a more civilised way).

Laurent

I have been able to get this process to work, with one exception.

As noted earlier in this forum, in the mimeData/headers object in the pipeline there is a random name variable in the 1st position that has a value of the same has its label.

example: ----------------------------47162151417169

When I write the content out to the file it works fine if it is a word doc, excel, or Jpg file but it appends the random tag (----------------------------47162151417169 ) in the end of a text file. type text/plain

Any ideas how to strip this out of the content stream?/

Thanks In Advance,
Paul Gruhn
Yale University
203-432-9541

Paul,
did you solve the tag issue?
Rgs, Michel