axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <keithgchap...@gmail.com>
Subject Re: [Axis2] multipart/form-data problem at the RESTFul Service
Date Thu, 06 Dec 2007 15:18:49 GMT
Yes I believe this is a bug and shows the lack of a test case. I'll fix that
and add a test case to the build too. Can you please file a JIRA on this.

Thanks,
Keith.

On Dec 6, 2007 8:09 PM, Takanori Suzuki <takanorig@gmail.com> wrote:

> Hi, I'm using Axis2 1.3.
>
> If a enctype="multipart/form-data request is sent by HTTP POST,
> I get the following exception:
>
> java.lang.ClassCastException: [Ljava.lang.String;
>        at
> org.apache.axis2.builder.BuilderUtil.createSOAPMessageWithoutSchema(
> BuilderUtil.java:183)
>        at org.apache.axis2.builder.BuilderUtil.buildsoapMessage(
> BuilderUtil.java:130)
>        at
> org.apache.axis2.builder.MultipartFormDataBuilder.processDocument(
> MultipartFormDataBuilder.java:56)
>        at org.apache.axis2.transport.TransportUtils.createDocumentElement(
> TransportUtils.java:160)
>        at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:111)
>
>
> It is a MultipartFormDataBuilder bug, isn't it?
>
> MultipartFormDataBuilder
> ------------------------------------------------------------
>    private MultipleEntryHashMap getParameterMap(HttpServletRequest
> request)
>            throws FileUploadException {
>
>        MultipleEntryHashMap parameterMap = new MultipleEntryHashMap();
>
>        List items = parseRequest(new ServletRequestContext(request));
>        Iterator iter = items.iterator();
>        while (iter.hasNext()) {
>            String[] value = new String[1];
>            DiskFileItem diskFileItem = (DiskFileItem) iter.next();
>            value[0] = diskFileItem.getString();
>            parameterMap.put(diskFileItem.getFieldName(), value);
>        }
>
>        return parameterMap;
>    }
> ------------------------------------------------------------
>
> the "value" type is String array.
> But BuilderUtil expect String.
>
>
> -----
> Thanks,
> Takanori
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Mime
View raw message