You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Detelin Yordanov (JIRA)" <ji...@apache.org> on 2010/06/29 16:00:50 UTC

[jira] Created: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Standalone Axis2 server cannot handle multipart http requests
-------------------------------------------------------------

                 Key: AXIS2-4756
                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
             Project: Axis2
          Issue Type: Bug
          Components: kernel, transports
    Affects Versions: 1.5.1, nightly
            Reporter: Detelin Yordanov


When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".

Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: MultiPartHttpTest.zip

A sample Maven/Eclipse project with a JUnit test that demonstrates the problem.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:48 AM:
-------------------------------------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.

      was (Author: detyo):
    This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.




  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: patch.txt

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip, patch.txt
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: MultiPartHttpTest.zip

A sample Maven/Eclipse project with a JUnit test that demonstrates the problem.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: FileUploadService.aar

A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: MultiPartHttpTest.zip

A sample Maven/Eclipse project with a JUnit test that demonstrates the problem.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: FileUploadService.aar

A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov commented on AXIS2-4756:
-----------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.





> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov commented on AXIS2-4756:
-----------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.





> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:48 AM:
-------------------------------------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.

      was (Author: detyo):
    This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.




  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: MultiPartHttpTest.zip

A sample Maven/Eclipse project with a JUnit test that demonstrates the problem.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: FileUploadService.aar

A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883549#action_12883549 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:02 AM:
-------------------------------------------------------------------

A sample web service that can be used to demonstrate the problem - deploy to a standalone Axis2 server and invoke it with multipart REST request.

      was (Author: detyo):
    A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.
  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov commented on AXIS2-4756:
-----------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.





> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:48 AM:
-------------------------------------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.

      was (Author: detyo):
    This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.




  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: MultiPartHttpTest.zip

A sample Maven/Eclipse project with a JUnit test that demonstrates the problem.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov commented on AXIS2-4756:
-----------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.





> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: patch.txt

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip, patch.txt
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:48 AM:
-------------------------------------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.

      was (Author: detyo):
    This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.




  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883549#action_12883549 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:02 AM:
-------------------------------------------------------------------

A sample web service that can be used to demonstrate the problem - deploy to a standalone Axis2 server and invoke it with multipart REST request.

      was (Author: detyo):
    A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.
  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov commented on AXIS2-4756:
-----------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.





> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883549#action_12883549 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:02 AM:
-------------------------------------------------------------------

A sample web service that can be used to demonstrate the problem - deploy to a standalone Axis2 server and invoke it with multipart REST request.

      was (Author: detyo):
    A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.
  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: patch.txt

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip, patch.txt
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: FileUploadService.aar

A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: patch.txt

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip, patch.txt
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883549#action_12883549 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:02 AM:
-------------------------------------------------------------------

A sample web service that can be used to demonstrate the problem - deploy to a standalone Axis2 server and invoke it with multipart REST request.

      was (Author: detyo):
    A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.
  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: FileUploadService.aar

A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Detelin Yordanov updated AXIS2-4756:
------------------------------------

    Attachment: patch.txt

> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip, patch.txt
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883569#action_12883569 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:48 AM:
-------------------------------------------------------------------

This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.

      was (Author: detyo):
    This can be solved by providing custom implementation of org.apache.commons.fileupload.RequestContext that supports handling of an AxisHttpRequest.

Afterwards, the following simple modifications will do the trick:

1. When serving a request, the HTTPWorker will need to set the AxisHttpRequest in the MC
2. The MultipartFormDataBuilder will check for an AxisHttpRequest if it does not find an HttpServletRequest and will use the custom "AxisHttpRequestContext" implementation to extract the multipart parameters.

I created a patch, but it was mean for Axis2 1.4.1 and it is not very appropriate for Axis2 1.5 since the http transport classes are moved to a separate module and the MultipartFormDataBuilder is not able to reference them anymore.
As a workaround I provided a new MultipartFormDataBuilder in the http transport module, which extends the one in axis2 kernel.

If running Axis2 standalone , users will need to specify that one in the axis2.xml, e.g.:

<messageBuilders>
   ...
    <messageBuilder contentType="multipart/form-data" class="org.apache.axis2.transport.http.MultipartFormDataBuilder"/>
</messageBuilders>

Is should be possible to use some factory mechanism to avoid having two MultipartFormDataBuilder implementations. But this would require some design changes which I will leave to you.




  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar, MultiPartHttpTest.zip
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (AXIS2-4756) Standalone Axis2 server cannot handle multipart http requests

Posted by "Detelin Yordanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4756?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883549#action_12883549 ] 

Detelin Yordanov edited comment on AXIS2-4756 at 6/29/10 10:02 AM:
-------------------------------------------------------------------

A sample web service that can be used to demonstrate the problem - deploy to a standalone Axis2 server and invoke it with multipart REST request.

      was (Author: detyo):
    A sample web service that can be used to demonstrate the problem - when invoked with multipart REST request.
  
> Standalone Axis2 server cannot handle multipart http requests
> -------------------------------------------------------------
>
>                 Key: AXIS2-4756
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4756
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel, transports
>    Affects Versions: 1.5.1, nightly
>            Reporter: Detelin Yordanov
>         Attachments: FileUploadService.aar
>
>
> When running a standalone Axis2 server and a multipart Http request is received, the org.apache.axis2.builder.MultipartFormDataBuilder will throw an exception: "Cannot create DocumentElement without HttpServletRequest".
> Reason for this is that the Axis2 Http server wraps the incoming http request into an AxisHttpRequest and there is no HttpServletRequest available.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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