axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takanori Suzuki" <>
Subject [Axis2] multipart/form-data problem at the RESTFul Service
Date Thu, 06 Dec 2007 14:39:23 GMT
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(
	at org.apache.axis2.builder.BuilderUtil.buildsoapMessage(
	at org.apache.axis2.builder.MultipartFormDataBuilder.processDocument(
	at org.apache.axis2.transport.TransportUtils.createDocumentElement(
	at org.apache.axis2.transport.TransportUtils.createSOAPMessage(

It is a MultipartFormDataBuilder bug, isn't it?

    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);
            value[0] = diskFileItem.getString();
            parameterMap.put(diskFileItem.getFieldName(), value);

        return parameterMap;

the "value" type is String array.
But BuilderUtil expect String.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message