Hi, 
   thank you for response to me.
   
   i use extjs upload files to cxf service, the Content-Type is:
multipart/form-data; boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5,
   and then AttachmentDeserializer.readTillFirstBoundary return false; 
   if (!readTillFirstBoundary(stream, boundary)) {
                throw new IOException("Couldn't find MIME boundary: " +
boundaryString);
            }  
 
here is the console debug:
 
ID: 3
Address: /service/upload
Encoding: UTF-8
Http-Method: POST
Content-Type: multipart/form-data;
boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5
Headers: {cookie=[__activedNodeId=120;
JSESSIONID=D5C434726A95290AD1896ACFAE2455B3; saveUserName=true;
userCode=admin], cache-control=[no-cache],
content-type=[multipart/form-data;
boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5], connection=[Keep-Alive],
host=[localhost], Content-Length=[2076647], user-agent=[Shockwave Flash],
Content-Type=[multipart/form-data;
boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5], Accept=[text/*]}
--------------------------------------
2011-04-01 16:07:17,204 INFO
[org.apache.cxf.interceptor.LoggingInInterceptor] - Inbound Message
----------------------------
ID: 3
Address: /service/upload
Encoding: UTF-8
Http-Method: POST
Content-Type: multipart/form-data;
boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5
Headers: {cookie=[__activedNodeId=120;
JSESSIONID=D5C434726A95290AD1896ACFAE2455B3; saveUserName=true;
userCode=admin], cache-control=[no-cache],
content-type=[multipart/form-data;
boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5], connection=[Keep-Alive],
host=[localhost], Content-Length=[2076647], user-agent=[Shockwave Flash],
Content-Type=[multipart/form-data;
boundary=----------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5], Accept=[text/*]}
--------------------------------------
2011-04-01 16:09:04,750 WARN
[org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper] -
WebApplicationException has been caught : Couldn't find MIME boundary:
------------ei4KM7KM7ae0cH2gL6GI3Ij5ae0Ij5
 
 

 
Best regards.
-------------------------------------------------------------
  Sam
陈志平
厦门利德成投资管理有限公司
软件园二期望海路55号A403室
M:189-0600-5517
[email protected]
-------------------------------------------------------------
 


  _____  

发件人: Sergey Beryozkin-5 [via CXF]
[mailto:[email protected]] 
发送时间: 2011年3月31日 19:54
收件人: sam
主题: Re: getting a "* Couldn't find MIME boundary" error when implement a
REST WS to upload files


Hi 

On Thu, Mar 31, 2011 at 7:41 AM, sam <[hidden email]> wrote: 


> Hi 
> I'm trying to implement a REST WS to upload files with CXF 2.3.3 but I'm 
> getting a "* Couldn't find MIME boundary" error and I don't know what's 
> wrong. 
> * 
> This is what I have: 
> First the REST interface: 
> @Produces("text/xml") 
> public interface ImageService { 
>   @POST 
>   @Path("/upload") 
>   @Consumes("multipart/form-data") 
>    Response upload(MultipartBody body); 
> } 
> Then I do a POST with this 
> the jsp code is like: 
> 
>  name: 
> 
>  file: 
> 
> 
> 
> 
> Type some text (if you like): 
> Please specify a file, or a set of files: 
> 
> * 
> * 
> *I get this error * 
> * 
> * 
> * 
> WARN org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper - 
> WebApplicationException has been caught : Couldn't find MIME boundary: 
> Thanks in advance, 
> 
> 
Can you please capture the actual payload, using the tcp trace utility or 
CXF logging feature and send it to me ? 

thanks, Sergey 


> 
> -- 
> View this message in context: 
>
http://cxf.547215.n5.nabble.com/getting-a-Couldn-t-find-MIME-boundary-error-
when-implement-a-REST-WS-to-upload-files-tp4272817p4272817.html <http://cxf.
547215.n5.nabble.com/getting-a-Couldn-t-find-MIME-boundary-error-when-implem
ent-a-REST-WS-to-upload-files-tp4272817p4272817.html?by-user=t> 
> Sent from the cxf-user mailing list archive at Nabble.com. 
> 



-- 
Sergey Beryozkin 

Application Integration Division of Talend <http://www.talend.com
<http://www.talend.com>> >
http://sberyozkin.blogspot.com



  _____  

If you reply to this email, your message will be added to the discussion
below:
http://cxf.547215.n5.nabble.com/getting-a-Couldn-t-find-MIME-boundary-error-
when-implement-a-REST-WS-to-upload-files-tp4272817p4273229.html 
To unsubscribe from getting a "* Couldn't find MIME boundary" error when
implement a REST WS to upload files, click
<http://cxf.547215.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_
by_code&node=4272817&code=c2FtQGxpenNvZnQuY29tfDQyNzI4MTd8LTIxNDA3NzYwOTM=>
here. 



--
View this message in context: 
http://cxf.547215.n5.nabble.com/getting-a-Couldn-t-find-MIME-boundary-error-when-implement-a-REST-WS-to-upload-files-tp4272817p4274968.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to