It makes sense that multipart/form-data is only used for requests.
That means that MultipartFormDataBuilder is only used on the server
side for incoming requests and that in order to test
MultipartFormDataFormatter you need to use Axis2 as a client that
generates an outgoing multipart/form-data request.

Andreas

On Wed, Oct 19, 2011 at 13:11, Sagara Gunathunga
<sagara.gunathu...@gmail.com> wrote:
> Hi devs,
>
> I'm thinking to write a sample that utilize MultipartFormDataFormatter
> class for serialization. I manged to invoke MultipartFormDataBuilder
> by sending a multipart/form-data request and service method also
> executed properly but it alleyways return a response with a
> application/xml type. This is because we have following code segment
> on RESTUtil class.
>
> if (HTTPConstants.MEDIA_TYPE_X_WWW_FORM.equals(messageType) ||
>
> HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA.equals(messageType)) {
>                msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
>
> HTTPConstants.MEDIA_TYPE_APPLICATION_XML);
>            }
>
> As you can see there is no way to invoke MultipartFormDataFormatter. I
> also doubt about practical usage of MultipartFormDataFormatter but
> since we have this formatter with Axis2 need to find a way to use it.
>
> If anyone have experience on this please update.
>
>
> Thanks  !
>
> --
> Sagara Gunathunga
>
> Blog      - http://ssagara.blogspot.com
> Web      - http://people.apache.org/~sagara/
> LinkedIn - http://www.linkedin.com/in/ssagara
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-dev-h...@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to