J
jjouett
I'm trying to setup an ASPX web page to service requests from an
existing Java Client that posts multi-part data as a way to upload
files, and I can't find a straightforward way to process the request.
multipart/form-data, boundary=012AhbCfFg225929
and using the Request.InputStream to get the content results in the
following string:
-----012AhbCfFg225929\r\ncontent-disposition: form-data;
name="os.arch"\r\n\r\nx86\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="instructionProcessorVersion"\r\n\r\n01.019.0513\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="User_ID"\r\n\r\ncustomer\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="agentVersion"\r\n\r\n1.2.2\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="java.version"\r\n\r\n1.3.1_03\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Order_Filename"\r\n\r\nTSTFILE.TST\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="Full_Filename"\r\n\r\nC:\\Program
Files\\Client\\.\\upload\\TSTFILE.TST\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="instructionAction"\r\n\r\nspotOrderUpload\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="File_Time"\r\n\r\n12:00:14\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="File_Date"\r\n\r\n2006/02/07\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="os.name"\r\n\r\nWindows
2000\r\n-----012AhbCfFg225929\r\ncontent-disposition: form-data;
name="os.version"\r\n\r\n5.1\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Password"\r\n\r\npassword\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Size"\r\n\r\n961\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="file0"; filename="C:\\Program
Files\\Client\\.\\upload\\TSTFILE.TST"\r\nContent-Type:
application/pdf\r\n\r\n"SYS",1,11/11/2005 3:15:05
PM,TSTFILE.TST,1,2,,,,,,,,,,,,,,\r\n"CUS",21,"Joe
User",1,,,,,,,,,,,,,,,,\r\n"ADV",TEST,1,(CNC)
TEST,"TEST",TEST,"Joe","User",TST
TEST,"781-898-6500",,,DODGE,,,,,,"TEST","TEST"\r\n"ORD",0,0,,"3","1",,0,,,,,,,,,,,,\r\n"MED",2,"NUM-A","11/12/2005","11/30/2005",,"NUM
A",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","1",,,,\r\n"MED",2,"NUM-B","11/12/2005","11/30/2005",,"NUM
B",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"DES",1,"DEST-1",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-2",,,"0",,,,,,,,,,,,,,\r\n"ORD",0,0,,"2","1",,0,,,,,,,,,,,,\r\n"MED",3,"SPOT-A","11/12/2005","11/30/2005",,"NUM
A",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"MED",3,"NUM-B","11/12/2005","11/30/2005",,"NUM
B",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"DES",1,"DEST-3",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-4",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-5",,,"0",,,,,,,,,,,,,,\r\n\r\n-----012AhbCfFg225929-----
I could write code to manually parse this string to extract the values
and the uploaded file content, but I was hoping that there was a more
straightforward way, and changing the existing Java client is not an
option Any suggestions would be appreciated.
Thanks in advance
existing Java Client that posts multi-part data as a way to upload
files, and I can't find a straightforward way to process the request.
are empty. The Request.ContentType states the following:From the HttpRequest, the Request.Form and Request.Files collections
multipart/form-data, boundary=012AhbCfFg225929
and using the Request.InputStream to get the content results in the
following string:
-----012AhbCfFg225929\r\ncontent-disposition: form-data;
name="os.arch"\r\n\r\nx86\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="instructionProcessorVersion"\r\n\r\n01.019.0513\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="User_ID"\r\n\r\ncustomer\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="agentVersion"\r\n\r\n1.2.2\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="java.version"\r\n\r\n1.3.1_03\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Order_Filename"\r\n\r\nTSTFILE.TST\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="Full_Filename"\r\n\r\nC:\\Program
Files\\Client\\.\\upload\\TSTFILE.TST\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="instructionAction"\r\n\r\nspotOrderUpload\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="File_Time"\r\n\r\n12:00:14\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="File_Date"\r\n\r\n2006/02/07\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="os.name"\r\n\r\nWindows
2000\r\n-----012AhbCfFg225929\r\ncontent-disposition: form-data;
name="os.version"\r\n\r\n5.1\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Password"\r\n\r\npassword\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data;
name="Size"\r\n\r\n961\r\n-----012AhbCfFg225929\r\ncontent-disposition:
form-data; name="file0"; filename="C:\\Program
Files\\Client\\.\\upload\\TSTFILE.TST"\r\nContent-Type:
application/pdf\r\n\r\n"SYS",1,11/11/2005 3:15:05
PM,TSTFILE.TST,1,2,,,,,,,,,,,,,,\r\n"CUS",21,"Joe
User",1,,,,,,,,,,,,,,,,\r\n"ADV",TEST,1,(CNC)
TEST,"TEST",TEST,"Joe","User",TST
TEST,"781-898-6500",,,DODGE,,,,,,"TEST","TEST"\r\n"ORD",0,0,,"3","1",,0,,,,,,,,,,,,\r\n"MED",2,"NUM-A","11/12/2005","11/30/2005",,"NUM
A",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","1",,,,\r\n"MED",2,"NUM-B","11/12/2005","11/30/2005",,"NUM
B",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"DES",1,"DEST-1",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-2",,,"0",,,,,,,,,,,,,,\r\n"ORD",0,0,,"2","1",,0,,,,,,,,,,,,\r\n"MED",3,"SPOT-A","11/12/2005","11/30/2005",,"NUM
A",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"MED",3,"NUM-B","11/12/2005","11/30/2005",,"NUM
B",":30","P",1,"5",1048,0,"11/11/2005 5:00
PM","EST","0",,,,\r\n"DES",1,"DEST-3",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-4",,,"0",,,,,,,,,,,,,,\r\n"DES",1,"DEST-5",,,"0",,,,,,,,,,,,,,\r\n\r\n-----012AhbCfFg225929-----
I could write code to manually parse this string to extract the values
and the uploaded file content, but I was hoping that there was a more
straightforward way, and changing the existing Java client is not an
option Any suggestions would be appreciated.
Thanks in advance