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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/