Hi,

The WADL fragment :
            <resource path="/abc/def">
                <method name="GET" id="lookupABC">
                    ......
                    <response status="200">
                        <representation 
mediaType="multipart/mixed;type=application/xml" />
                    </response>
                </method>
            </resource>

And code in the implement class:

public Response lookupABC(String str) {
...
List<Attachment> atts = new LinkedList<Attachment>();
return Response.ok(new MultipartBody(atts, true)).build();
}

This exception will be thrown when atts.size() = 0. (no any attachment).  After 
debug into the cxf code (2.6.2), on (line 189):
            Attachment root = (Attachment)handlers.get(0);
In the org.apache.cxf.jaxrs.ext.MessageContextImpl,  which use get() without 
any check.

Is it a MessageContextImpl issue?  Or is there another way to return multipart 
but with no any attachment response?

Thanks.
Xilai

Reply via email to