You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Hiranya Jayathilaka <hi...@gmail.com> on 2015/07/10 06:46:12 UTC

Re: CORS Supprt in Axis2

This might be a useful feature addition to Synapse as well. When you're done with the Axis2 implementation, perhaps you can take a look at the Synapse pass-thru transport as well.

Thanks,
Hiranya

On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:

> +1 for adding CORS support.
> 
> 
> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>> Hi Devs,
>> I recently happened to call a Axis2Service with AJAX post method. Then there was an "Access-Control-Allow-Origin Error". When I was digging through the path, I came to know about CORS (Cross Origin Resource Sharing) spec [1] .
>> 
>> User agents commonly apply same-origin restrictions to network requests. These restrictions prevent a client-side Web application running from one origin from obtaining data retrieved from another origin, and also limit unsafe HTTP requests that can be automatically launched toward destinations that differ from the running application's origin.
>> 
>> To overcome this issue , I implemented an axis2 handler which the implementation is very specific to my use case. It handles the preflight request.
>> 
>> In Axis2 , have we implemented CORS Spec? If not what about providing CORS support with Axis2?
>> Since I already have the implementation, I can make it more generic and add to Axis2.
>> 
>> [1] http://www.w3.org/TR/cors/
>> 
>> Thanks,
>> Asanka
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
> 

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


Re: CORS Supprt in Axis2

Posted by Deepal jayasinghe <de...@gmail.com>.
Hi Asanka,

Any updates ?

Deepal
> Hi Devs,
> How about implementing this as an Axis2 module. That will allow user 
> to have the feature if user prefers. And we can re-use it for synapse 
> as well.
>
> Thanks,
> Asanka
>
> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka 
> <hiranya911@gmail.com <ma...@gmail.com>> wrote:
>
>     This might be a useful feature addition to Synapse as well. When
>     you're done with the Axis2 implementation, perhaps you can take a
>     look at the Synapse pass-thru transport as well.
>
>     Thanks,
>     Hiranya
>
>     On Jul 9, 2015, at 5:27 AM, T. Allen <bif@verizon.net
>     <ma...@verizon.net>> wrote:
>
>>     +1 for adding CORS support.
>>
>>
>>     On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>     Hi Devs,
>>>     I recently happened to call a Axis2Service with AJAX post
>>>     method. Then there was an "Access-Control-Allow-Origin Error".
>>>     When I was digging through the path, I came to know about CORS
>>>     (Cross Origin Resource Sharing) spec [1] .
>>>
>>>     User agents commonly apply same-origin restrictions to network
>>>     requests. These restrictions prevent a client-side Web
>>>     application running from one origin from obtaining data
>>>     retrieved from another origin, and also limit unsafe HTTP
>>>     requests that can be automatically launched toward destinations
>>>     that differ from the running application's origin.
>>>
>>>     To overcome this issue , I implemented an axis2 handler which
>>>     the implementation is very specific to my use case. It handles
>>>     the preflight request.
>>>
>>>     In Axis2 , have we implemented CORS Spec? If not what about
>>>     providing CORS support with Axis2?
>>>     Since I already have the implementation, I can make it more
>>>     generic and add to Axis2.
>>>
>>>     [1] http://www.w3.org/TR/cors/
>>>
>>>     Thanks,
>>>     Asanka
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>     <ma...@axis.apache.org>
>>     For additional commands, e-mail: java-dev-help@axis.apache.org
>>     <ma...@axis.apache.org>
>>
>
>     --
>     Hiranya Jayathilaka
>     Mayhem Lab/RACE Lab;
>     Dept. of Computer Science, UCSB; http://cs.ucsb.edu
>     <http://cs.ucsb.edu/>
>     E-mail: hiranya@cs.ucsb.edu <ma...@wso2.com>; Mobile: +1
>     (805) 895-7443 <tel:%2B1%20%28805%29%20895-7443>
>     Blog: http://techfeast-hiranya.blogspot.com
>     <http://techfeast-hiranya.blogspot.com/>
>
>


Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
Implementations is completed. I tested few scenarios and it works fine. I
will attach the patch to the ticket once the tests and documentations is
completed.

Thanks,
Asanka

On Tue, Jul 14, 2015 at 8:56 AM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi sagara,
> Thanks for the input. Implementation is completed. I am working on
> testing. I will make the change as you suggested.(servlet transport).
>
> Thanks,
> Asanka D
>
> On Tuesday, July 14, 2015, Sagara Gunathunga <sa...@gmail.com>
> wrote:
>
>>
>> Please note Axis2 simple HTTP server is not production recommended hence
>> this feature should support Servlet transport in order to support
>> production use cases.
>>
>> Sometimes back I tested cors-filter[1] for Servlet transport
>> successfully, I doubt whether we should implement CORS support again or we
>> just need to integrate existing implementation such as cors-filter[1].
>>
>>
>>
>> [1] - http://software.dzhuvinov.com/cors-filter.html
>>
>> Thanks !
>>
>> On Mon, Jul 13, 2015 at 6:27 AM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>>> Hi Devs,
>>> What is the best place to implement this. IMHO I think following place
>>> is suitable.
>>>
>>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>>> AxisHttpConnection conn, final HttpContext context)
>>>             throws IOException, HttpException
>>>
>>> Thanks,
>>> Asanka D
>>>
>>> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <asankanbd@gmail.com
>>> > wrote:
>>>
>>>> Yes, agreed. I will start implementation with axis2 http transport .
>>>>
>>>> Thanks,
>>>> Asanka D
>>>>
>>>>
>>>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi Devs,
>>>>> How about implementing this as an Axis2 module. That will allow user
>>>>> to have the feature if user prefers. And we can re-use it for synapse as
>>>>> well.
>>>>>
>>>>>
>>>>> I read about this technology a little bit. My preference is for
>>>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>>>> feature, and I don't see a reason why it should be implemented outside the
>>>>> transport. Unfortunately, however, this means we have to re-implement it
>>>>> for Synapse.
>>>>>
>>>>> Thanks,
>>>>> Hiranya
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Asanka
>>>>>
>>>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>>>> hiranya911@gmail.com> wrote:
>>>>>
>>>>>> This might be a useful feature addition to Synapse as well. When
>>>>>> you're done with the Axis2 implementation, perhaps you can take a look at
>>>>>> the Synapse pass-thru transport as well.
>>>>>>
>>>>>> Thanks,
>>>>>> Hiranya
>>>>>>
>>>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>>>
>>>>>> +1 for adding CORS support.
>>>>>>
>>>>>>
>>>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>>
>>>>>> Hi Devs,
>>>>>> I recently happened to call a Axis2Service with AJAX post method.
>>>>>> Then there was an "Access-Control-Allow-Origin Error". When I was digging
>>>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>>>> spec [1] .
>>>>>>
>>>>>> User agents commonly apply same-origin restrictions to network
>>>>>> requests. These restrictions prevent a client-side Web application running
>>>>>> from one origin from obtaining data retrieved from another origin, and also
>>>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>>>> destinations that differ from the running application's origin.
>>>>>>
>>>>>> To overcome this issue , I implemented an axis2 handler which the
>>>>>> implementation is very specific to my use case. It handles the preflight
>>>>>> request.
>>>>>>
>>>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>>>> CORS support with Axis2?
>>>>>> Since I already have the implementation, I can make it more generic
>>>>>> and add to Axis2.
>>>>>>
>>>>>> [1] http://www.w3.org/TR/cors/
>>>>>>
>>>>>> Thanks,
>>>>>> Asanka
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Hiranya Jayathilaka
>>>>>> Mayhem Lab/RACE Lab;
>>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Hiranya Jayathilaka
>>>>> Mayhem Lab/RACE Lab;
>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>>
>>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog      - http://ssagara.blogspot.com
>> Web      - http://people.apache.org/~sagara/
>> LinkedIn - http://www.linkedin.com/in/ssagara
>>
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
Implementations is completed. I tested few scenarios and it works fine. I
will attach the patch to the ticket once the tests and documentations is
completed.

Thanks,
Asanka

On Tue, Jul 14, 2015 at 8:56 AM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi sagara,
> Thanks for the input. Implementation is completed. I am working on
> testing. I will make the change as you suggested.(servlet transport).
>
> Thanks,
> Asanka D
>
> On Tuesday, July 14, 2015, Sagara Gunathunga <sa...@gmail.com>
> wrote:
>
>>
>> Please note Axis2 simple HTTP server is not production recommended hence
>> this feature should support Servlet transport in order to support
>> production use cases.
>>
>> Sometimes back I tested cors-filter[1] for Servlet transport
>> successfully, I doubt whether we should implement CORS support again or we
>> just need to integrate existing implementation such as cors-filter[1].
>>
>>
>>
>> [1] - http://software.dzhuvinov.com/cors-filter.html
>>
>> Thanks !
>>
>> On Mon, Jul 13, 2015 at 6:27 AM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>>> Hi Devs,
>>> What is the best place to implement this. IMHO I think following place
>>> is suitable.
>>>
>>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>>> AxisHttpConnection conn, final HttpContext context)
>>>             throws IOException, HttpException
>>>
>>> Thanks,
>>> Asanka D
>>>
>>> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <asankanbd@gmail.com
>>> > wrote:
>>>
>>>> Yes, agreed. I will start implementation with axis2 http transport .
>>>>
>>>> Thanks,
>>>> Asanka D
>>>>
>>>>
>>>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Hi Devs,
>>>>> How about implementing this as an Axis2 module. That will allow user
>>>>> to have the feature if user prefers. And we can re-use it for synapse as
>>>>> well.
>>>>>
>>>>>
>>>>> I read about this technology a little bit. My preference is for
>>>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>>>> feature, and I don't see a reason why it should be implemented outside the
>>>>> transport. Unfortunately, however, this means we have to re-implement it
>>>>> for Synapse.
>>>>>
>>>>> Thanks,
>>>>> Hiranya
>>>>>
>>>>>
>>>>> Thanks,
>>>>> Asanka
>>>>>
>>>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>>>> hiranya911@gmail.com> wrote:
>>>>>
>>>>>> This might be a useful feature addition to Synapse as well. When
>>>>>> you're done with the Axis2 implementation, perhaps you can take a look at
>>>>>> the Synapse pass-thru transport as well.
>>>>>>
>>>>>> Thanks,
>>>>>> Hiranya
>>>>>>
>>>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>>>
>>>>>> +1 for adding CORS support.
>>>>>>
>>>>>>
>>>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>>
>>>>>> Hi Devs,
>>>>>> I recently happened to call a Axis2Service with AJAX post method.
>>>>>> Then there was an "Access-Control-Allow-Origin Error". When I was digging
>>>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>>>> spec [1] .
>>>>>>
>>>>>> User agents commonly apply same-origin restrictions to network
>>>>>> requests. These restrictions prevent a client-side Web application running
>>>>>> from one origin from obtaining data retrieved from another origin, and also
>>>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>>>> destinations that differ from the running application's origin.
>>>>>>
>>>>>> To overcome this issue , I implemented an axis2 handler which the
>>>>>> implementation is very specific to my use case. It handles the preflight
>>>>>> request.
>>>>>>
>>>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>>>> CORS support with Axis2?
>>>>>> Since I already have the implementation, I can make it more generic
>>>>>> and add to Axis2.
>>>>>>
>>>>>> [1] http://www.w3.org/TR/cors/
>>>>>>
>>>>>> Thanks,
>>>>>> Asanka
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Hiranya Jayathilaka
>>>>>> Mayhem Lab/RACE Lab;
>>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Hiranya Jayathilaka
>>>>> Mayhem Lab/RACE Lab;
>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>>
>>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog      - http://ssagara.blogspot.com
>> Web      - http://people.apache.org/~sagara/
>> LinkedIn - http://www.linkedin.com/in/ssagara
>>
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi sagara,
Thanks for the input. Implementation is completed. I am working on testing.
I will make the change as you suggested.(servlet transport).

Thanks,
Asanka D
On Tuesday, July 14, 2015, Sagara Gunathunga <sa...@gmail.com>
wrote:

>
> Please note Axis2 simple HTTP server is not production recommended hence
> this feature should support Servlet transport in order to support
> production use cases.
>
> Sometimes back I tested cors-filter[1] for Servlet transport successfully,
> I doubt whether we should implement CORS support again or we just need to
> integrate existing implementation such as cors-filter[1].
>
>
> [1] - http://software.dzhuvinov.com/cors-filter.html
>
> Thanks !
>
> On Mon, Jul 13, 2015 at 6:27 AM, Asanka Dissanayake <asankanbd@gmail.com
> <javascript:_e(%7B%7D,'cvml','asankanbd@gmail.com');>> wrote:
>
>> Hi Devs,
>> What is the best place to implement this. IMHO I think following place is
>> suitable.
>>
>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>> AxisHttpConnection conn, final HttpContext context)
>>             throws IOException, HttpException
>>
>> Thanks,
>> Asanka D
>>
>> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <asankanbd@gmail.com
>> <javascript:_e(%7B%7D,'cvml','asankanbd@gmail.com');>> wrote:
>>
>>> Yes, agreed. I will start implementation with axis2 http transport .
>>>
>>> Thanks,
>>> Asanka D
>>>
>>>
>>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hiranya911@gmail.com
>>> <javascript:_e(%7B%7D,'cvml','hiranya911@gmail.com');>> wrote:
>>>
>>>>
>>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Devs,
>>>> How about implementing this as an Axis2 module. That will allow user to
>>>> have the feature if user prefers. And we can re-use it for synapse as well.
>>>>
>>>>
>>>> I read about this technology a little bit. My preference is for
>>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>>> feature, and I don't see a reason why it should be implemented outside the
>>>> transport. Unfortunately, however, this means we have to re-implement it
>>>> for Synapse.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>>
>>>> Thanks,
>>>> Asanka
>>>>
>>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>>> hiranya911@gmail.com> wrote:
>>>>
>>>>> This might be a useful feature addition to Synapse as well. When
>>>>> you're done with the Axis2 implementation, perhaps you can take a look at
>>>>> the Synapse pass-thru transport as well.
>>>>>
>>>>> Thanks,
>>>>> Hiranya
>>>>>
>>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>>
>>>>> +1 for adding CORS support.
>>>>>
>>>>>
>>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>
>>>>> Hi Devs,
>>>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>>> spec [1] .
>>>>>
>>>>> User agents commonly apply same-origin restrictions to network
>>>>> requests. These restrictions prevent a client-side Web application running
>>>>> from one origin from obtaining data retrieved from another origin, and also
>>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>>> destinations that differ from the running application's origin.
>>>>>
>>>>> To overcome this issue , I implemented an axis2 handler which the
>>>>> implementation is very specific to my use case. It handles the preflight
>>>>> request.
>>>>>
>>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>>> CORS support with Axis2?
>>>>> Since I already have the implementation, I can make it more generic
>>>>> and add to Axis2.
>>>>>
>>>>> [1] http://www.w3.org/TR/cors/
>>>>>
>>>>> Thanks,
>>>>> Asanka
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>>
>>>>>
>>>>> --
>>>>> Hiranya Jayathilaka
>>>>> Mayhem Lab/RACE Lab;
>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Mayhem Lab/RACE Lab;
>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>>
>>
>
>
> --
> Sagara Gunathunga
>
> Blog      - http://ssagara.blogspot.com
> Web      - http://people.apache.org/~sagara/
> LinkedIn - http://www.linkedin.com/in/ssagara
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi sagara,
Thanks for the input. Implementation is completed. I am working on testing.
I will make the change as you suggested.(servlet transport).

Thanks,
Asanka D
On Tuesday, July 14, 2015, Sagara Gunathunga <sa...@gmail.com>
wrote:

>
> Please note Axis2 simple HTTP server is not production recommended hence
> this feature should support Servlet transport in order to support
> production use cases.
>
> Sometimes back I tested cors-filter[1] for Servlet transport successfully,
> I doubt whether we should implement CORS support again or we just need to
> integrate existing implementation such as cors-filter[1].
>
>
> [1] - http://software.dzhuvinov.com/cors-filter.html
>
> Thanks !
>
> On Mon, Jul 13, 2015 at 6:27 AM, Asanka Dissanayake <asankanbd@gmail.com
> <javascript:_e(%7B%7D,'cvml','asankanbd@gmail.com');>> wrote:
>
>> Hi Devs,
>> What is the best place to implement this. IMHO I think following place is
>> suitable.
>>
>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>> AxisHttpConnection conn, final HttpContext context)
>>             throws IOException, HttpException
>>
>> Thanks,
>> Asanka D
>>
>> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <asankanbd@gmail.com
>> <javascript:_e(%7B%7D,'cvml','asankanbd@gmail.com');>> wrote:
>>
>>> Yes, agreed. I will start implementation with axis2 http transport .
>>>
>>> Thanks,
>>> Asanka D
>>>
>>>
>>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hiranya911@gmail.com
>>> <javascript:_e(%7B%7D,'cvml','hiranya911@gmail.com');>> wrote:
>>>
>>>>
>>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>>> wrote:
>>>>
>>>> Hi Devs,
>>>> How about implementing this as an Axis2 module. That will allow user to
>>>> have the feature if user prefers. And we can re-use it for synapse as well.
>>>>
>>>>
>>>> I read about this technology a little bit. My preference is for
>>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>>> feature, and I don't see a reason why it should be implemented outside the
>>>> transport. Unfortunately, however, this means we have to re-implement it
>>>> for Synapse.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>>
>>>> Thanks,
>>>> Asanka
>>>>
>>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>>> hiranya911@gmail.com> wrote:
>>>>
>>>>> This might be a useful feature addition to Synapse as well. When
>>>>> you're done with the Axis2 implementation, perhaps you can take a look at
>>>>> the Synapse pass-thru transport as well.
>>>>>
>>>>> Thanks,
>>>>> Hiranya
>>>>>
>>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>>
>>>>> +1 for adding CORS support.
>>>>>
>>>>>
>>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>
>>>>> Hi Devs,
>>>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>>> spec [1] .
>>>>>
>>>>> User agents commonly apply same-origin restrictions to network
>>>>> requests. These restrictions prevent a client-side Web application running
>>>>> from one origin from obtaining data retrieved from another origin, and also
>>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>>> destinations that differ from the running application's origin.
>>>>>
>>>>> To overcome this issue , I implemented an axis2 handler which the
>>>>> implementation is very specific to my use case. It handles the preflight
>>>>> request.
>>>>>
>>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>>> CORS support with Axis2?
>>>>> Since I already have the implementation, I can make it more generic
>>>>> and add to Axis2.
>>>>>
>>>>> [1] http://www.w3.org/TR/cors/
>>>>>
>>>>> Thanks,
>>>>> Asanka
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>>
>>>>>
>>>>> --
>>>>> Hiranya Jayathilaka
>>>>> Mayhem Lab/RACE Lab;
>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Mayhem Lab/RACE Lab;
>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>>
>>
>
>
> --
> Sagara Gunathunga
>
> Blog      - http://ssagara.blogspot.com
> Web      - http://people.apache.org/~sagara/
> LinkedIn - http://www.linkedin.com/in/ssagara
>

Re: CORS Supprt in Axis2

Posted by Sagara Gunathunga <sa...@gmail.com>.
Please note Axis2 simple HTTP server is not production recommended hence
this feature should support Servlet transport in order to support
production use cases.

Sometimes back I tested cors-filter[1] for Servlet transport successfully,
I doubt whether we should implement CORS support again or we just need to
integrate existing implementation such as cors-filter[1].


[1] - http://software.dzhuvinov.com/cors-filter.html

Thanks !

On Mon, Jul 13, 2015 at 6:27 AM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi Devs,
> What is the best place to implement this. IMHO I think following place is
> suitable.
>
> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
> AxisHttpConnection conn, final HttpContext context)
>             throws IOException, HttpException
>
> Thanks,
> Asanka D
>
> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <as...@gmail.com>
> wrote:
>
>> Yes, agreed. I will start implementation with axis2 http transport .
>>
>> Thanks,
>> Asanka D
>>
>>
>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>> wrote:
>>
>>>
>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>> wrote:
>>>
>>> Hi Devs,
>>> How about implementing this as an Axis2 module. That will allow user to
>>> have the feature if user prefers. And we can re-use it for synapse as well.
>>>
>>>
>>> I read about this technology a little bit. My preference is for
>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>> feature, and I don't see a reason why it should be implemented outside the
>>> transport. Unfortunately, however, this means we have to re-implement it
>>> for Synapse.
>>>
>>> Thanks,
>>> Hiranya
>>>
>>>
>>> Thanks,
>>> Asanka
>>>
>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>> hiranya911@gmail.com> wrote:
>>>
>>>> This might be a useful feature addition to Synapse as well. When you're
>>>> done with the Axis2 implementation, perhaps you can take a look at the
>>>> Synapse pass-thru transport as well.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>
>>>> +1 for adding CORS support.
>>>>
>>>>
>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>
>>>> Hi Devs,
>>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>> spec [1] .
>>>>
>>>> User agents commonly apply same-origin restrictions to network
>>>> requests. These restrictions prevent a client-side Web application running
>>>> from one origin from obtaining data retrieved from another origin, and also
>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>> destinations that differ from the running application's origin.
>>>>
>>>> To overcome this issue , I implemented an axis2 handler which the
>>>> implementation is very specific to my use case. It handles the preflight
>>>> request.
>>>>
>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>> CORS support with Axis2?
>>>> Since I already have the implementation, I can make it more generic and
>>>> add to Axis2.
>>>>
>>>> [1] http://www.w3.org/TR/cors/
>>>>
>>>> Thanks,
>>>> Asanka
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Mayhem Lab/RACE Lab;
>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Mayhem Lab/RACE Lab;
>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>>
>


-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

Re: CORS Supprt in Axis2

Posted by Sagara Gunathunga <sa...@gmail.com>.
Please note Axis2 simple HTTP server is not production recommended hence
this feature should support Servlet transport in order to support
production use cases.

Sometimes back I tested cors-filter[1] for Servlet transport successfully,
I doubt whether we should implement CORS support again or we just need to
integrate existing implementation such as cors-filter[1].


[1] - http://software.dzhuvinov.com/cors-filter.html

Thanks !

On Mon, Jul 13, 2015 at 6:27 AM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi Devs,
> What is the best place to implement this. IMHO I think following place is
> suitable.
>
> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
> AxisHttpConnection conn, final HttpContext context)
>             throws IOException, HttpException
>
> Thanks,
> Asanka D
>
> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <as...@gmail.com>
> wrote:
>
>> Yes, agreed. I will start implementation with axis2 http transport .
>>
>> Thanks,
>> Asanka D
>>
>>
>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>> wrote:
>>
>>>
>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>> wrote:
>>>
>>> Hi Devs,
>>> How about implementing this as an Axis2 module. That will allow user to
>>> have the feature if user prefers. And we can re-use it for synapse as well.
>>>
>>>
>>> I read about this technology a little bit. My preference is for
>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>> feature, and I don't see a reason why it should be implemented outside the
>>> transport. Unfortunately, however, this means we have to re-implement it
>>> for Synapse.
>>>
>>> Thanks,
>>> Hiranya
>>>
>>>
>>> Thanks,
>>> Asanka
>>>
>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>> hiranya911@gmail.com> wrote:
>>>
>>>> This might be a useful feature addition to Synapse as well. When you're
>>>> done with the Axis2 implementation, perhaps you can take a look at the
>>>> Synapse pass-thru transport as well.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>
>>>> +1 for adding CORS support.
>>>>
>>>>
>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>
>>>> Hi Devs,
>>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>> spec [1] .
>>>>
>>>> User agents commonly apply same-origin restrictions to network
>>>> requests. These restrictions prevent a client-side Web application running
>>>> from one origin from obtaining data retrieved from another origin, and also
>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>> destinations that differ from the running application's origin.
>>>>
>>>> To overcome this issue , I implemented an axis2 handler which the
>>>> implementation is very specific to my use case. It handles the preflight
>>>> request.
>>>>
>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>> CORS support with Axis2?
>>>> Since I already have the implementation, I can make it more generic and
>>>> add to Axis2.
>>>>
>>>> [1] http://www.w3.org/TR/cors/
>>>>
>>>> Thanks,
>>>> Asanka
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Mayhem Lab/RACE Lab;
>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Mayhem Lab/RACE Lab;
>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>>
>


-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

RE: CORS Supprt in Axis2

Posted by Martin Gainty <mg...@hotmail.com>.
http://www.w3.org/TR/cors/#access-control-allow-credentials-response-header
true 
false (no authentication allowed for this request)
The
  Access-Control-Allow-Credentials
  header indicates whether the response to request can be
  exposed when the omit credentials flag is unset. When part
  of the response to a preflight request it indicates that the
  actual request can include user credentials.
  

http://www.w3.org/TR/cors/#access-control-allow-origin-response-header
http://foo.example
Access-Control-Allow-Origin header indicates whether resource can be shared by returning :
Origin request header value
"*"
null

Passing these 2 additional parameters for installations which mandate authentication
(banks/financial-instutions/health-care-facilities) 
will allow those installations which mandate authentication to implement CORS 

Can we include these 2 parameters to widen CORS deployment base for banks?
Martin

Date: Thu, 16 Jul 2015 22:52:25 -0700
From: deepalk@gmail.com
To: java-dev@axis.apache.org
Subject: Re: CORS Supprt in Axis2


  
    
  
  
    Looks good to me.

      

      Deepal

    
    
      
        Hi Devs,

          I thought of giving some insight to the approach and the
          design, so that I can have your valuable feedback.

          

        
        Following configuration should be added to the axis2.xml
        
          

            <CORSConfig enabled="true">

                   
<Access-Control-Allow-Headers>content-type,soapaction,x-requested-with</Access-Control-Allow-Headers>

                   
<Access-Control-Allow-Methods>GET,POST,PUT,DELETE,OPTIONS</Access-Control-Allow-Methods>

                   
            <Access-Control-Allow-Origin>*</Access-Control-Allow-Origin>

                   
<Access-Control-Expose-Headers>header1,header2</Access-Control-Expose-Headers>

                    <Access-Control-Allow-Credentials
            enabled="false"/>

                   
            <Access-Control-Max-Age>500</Access-Control-Max-Age>

            </CORSConfig>

            

            Classes 

            ------------------------

            

            CorsConfig

          
          Using those configuration
            CorsConfig is created and can be retrieved through
            AxisConfiguration.

            

          
          CORSProcesser

            This class is implemented according to the section 6 of the
            CORS spec.

            

          
          Currently CORS Processor
            in engaged in the AxisHttpService handle request method. As
            per Sagara's mail, I will work on adding this to servlet
            transport later

          
          

            if(corsConfig.isEnabled()){
    //CORS is enabled by the configs
    corsProcessor.process(axisreq,axisres);
}
            Thanks,

          
          Asanka

          
          

          
        
        
          

            On Thu, Jul 16, 2015 at 10:30 PM,
              Asanka Dissanayake <as...@gmail.com>
              wrote:

              
                
                  Hi Devs,

                  
                  I thought of giving some insight to the approach
                    and the design, so that I can have your valuable
                    feedback.

                    

                  
                  Following configuration should be added to the
                    axis2.xml

                    

                     

                  
                  

                  
                  

                
                
                  
                    

                      On Thu, Jul 16, 2015 at
                        1:44 AM, Deepal jayasinghe <de...@gmail.com>
                        wrote:

                        
                          
                            Done.

                                  

                                  Deepal

                                
                            
                              
                                
                                  
                                    
                                      Hi Devs,

                                      
                                      Can some one assign me the issue 

                                      https://issues.apache.org/jira/browse/AXIS2-5708.

                                    
                                    I cannot assign it to myself. Seems
                                    I don't have enough permissions. 

                                    

                                    
                                    Thanks,

                                    
                                    Asanka

                                    
                                  
                                  

                                    On Sun, Jul
                                      12, 2015 at 8:57 PM, Asanka
                                      Dissanayake <as...@gmail.com>
                                      wrote:

                                      
                                        
                                          
                                            
                                              Hi Devs,

                                              
                                              What is the best place to
                                              implement this. IMHO I
                                              think following place is
                                              suitable.

                                              

                                              org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final

                                              AxisHttpConnection conn,
                                              final HttpContext context)

                                                          throws
                                              IOException, HttpException

                                              

                                            
                                            Thanks,

                                          
                                          Asanka D

                                        
                                        
                                          
                                            

                                              On
                                                Sat, Jul 11, 2015 at
                                                3:18 PM, Asanka
                                                Dissanayake <as...@gmail.com>
                                                wrote:

                                                Yes,

                                                  agreed. I will start
                                                  implementation with
                                                  axis2 http transport .
                                                  

                                                  
                                                  Thanks,
                                                  Asanka D
                                                    
                                                      

                                                        

                                                        On Saturday,
                                                        July 11, 2015,
                                                        Hiranya
                                                        Jayathilaka <hi...@gmail.com>

                                                        wrote:

                                                        
                                                          

                                                          
                                                          On Jul
                                                          10, 2015, at
                                                          6:50 PM,
                                                          Asanka
                                                          Dissanayake
                                                          <as...@gmail.com>

                                                          wrote:
                                                          

                                                          
                                                          Hi
                                                          Devs,
                                                          How about
                                                          implementing
                                                          this as an
                                                          Axis2 module.
                                                          That will
                                                          allow user to
                                                          have the
                                                          feature if
                                                          user prefers.
                                                          And we can
                                                          re-use it for
                                                          synapse as
                                                          well.
                                                          
                                                          
                                                          

                                                          
                                                          I read
                                                          about this
                                                          technology a
                                                          little bit. My
                                                          preference is
                                                          for
                                                          implementing
                                                          it in the HTTP
                                                          transport.
                                                          This really is
                                                          a
                                                          HTTP-specific
                                                          feature, and I
                                                          don't see a
                                                          reason why it
                                                          should be
                                                          implemented
                                                          outside the
                                                          transport.
                                                          Unfortunately,
                                                          however, this
                                                          means we have
                                                          to
                                                          re-implement
                                                          it for
                                                          Synapse. 
                                                          

                                                          
                                                          Thanks,
                                                          Hiranya
                                                          

                                                          
                                                          
                                                          

                                                          
                                                          Thanks,
                                                          Asanka
                                                          
                                                          

                                                          On
                                                          Fri, Jul 10,
                                                          2015 at 12:46
                                                          AM, Hiranya
                                                          Jayathilaka <hi...@gmail.com> wrote:

                                                          
                                                          This

                                                          might be a
                                                          useful feature
                                                          addition to
                                                          Synapse as
                                                          well. When
                                                          you're done
                                                          with the Axis2
                                                          implementation,

                                                          perhaps you
                                                          can take a
                                                          look at the
                                                          Synapse
                                                          pass-thru
                                                          transport as
                                                          well.
                                                          

                                                          
                                                          Thanks,
                                                          Hiranya
                                                          
                                                          
                                                          

                                                          
                                                          On Jul 9,
                                                          2015, at 5:27
                                                          AM, T. Allen
                                                          <bi...@verizon.net>

                                                          wrote:
                                                          

                                                          +1
                                                          for adding
                                                          CORS support.

                                                          

                                                          

                                                          On 7/8/2015
                                                          8:13 PM,
                                                          Asanka
                                                          Dissanayake
                                                          wrote:

                                                          Hi
                                                          Devs,

                                                          I recently
                                                          happened to
                                                          call a
                                                          Axis2Service
                                                          with AJAX post
                                                          method. Then
                                                          there was an
                                                          "Access-Control-Allow-Origin
                                                          Error". When I
                                                          was digging
                                                          through the
                                                          path, I came
                                                          to know about
                                                          CORS (Cross
                                                          Origin
                                                          Resource
                                                          Sharing) spec
                                                          [1] .

                                                          

                                                          User agents
                                                          commonly apply
                                                          same-origin
                                                          restrictions
                                                          to network
                                                          requests.
                                                          These
                                                          restrictions
                                                          prevent a
                                                          client-side
                                                          Web
                                                          application
                                                          running from
                                                          one origin
                                                          from obtaining
                                                          data retrieved
                                                          from another
                                                          origin, and
                                                          also limit
                                                          unsafe HTTP
                                                          requests that
                                                          can be
                                                          automatically
                                                          launched
                                                          toward
                                                          destinations
                                                          that differ
                                                          from the
                                                          running
                                                          application's
                                                          origin.

                                                          

                                                          To overcome
                                                          this issue , I
                                                          implemented an
                                                          axis2 handler
                                                          which the
                                                          implementation
                                                          is very
                                                          specific to my
                                                          use case. It
                                                          handles the
                                                          preflight
                                                          request.

                                                          

                                                          In Axis2 ,
                                                          have we
                                                          implemented
                                                          CORS Spec? If
                                                          not what about
                                                          providing CORS
                                                          support with
                                                          Axis2?

                                                          Since I
                                                          already have
                                                          the
                                                          implementation,
                                                          I can make it
                                                          more generic
                                                          and add to
                                                          Axis2.

                                                          

                                                          [1] http://www.w3.org/TR/cors/

                                                          

                                                          Thanks,

                                                          Asanka

                                                          
                                                          

---------------------------------------------------------------------

                                                          To
                                                          unsubscribe,
                                                          e-mail: java-dev-unsubscribe@axis.apache.org

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

                                                          

                                                          
                                                          
                                                          

                                                          
                                                          
                                                          
                                                          --
                                                          Hiranya

                                                          Jayathilaka
                                                          Mayhem

                                                          Lab/RACE Lab;
                                                          Dept.

                                                          of Computer
                                                          Science,
                                                          UCSB;  http://cs.ucsb.edu
                                                          E-mail: hiranya@cs.ucsb.edu; 

                                                          Mobile: +1 (805) 895-7443
                                                          Blog: http://techfeast-hiranya.blogspot.com
                                                          
                                                          

                                                          
                                                          
                                                          
                                                          
                                                          

                                                          
                                                          
                                                          
                                                          

                                                          
                                                          --
                                                          Hiranya

                                                          Jayathilaka
                                                          Mayhem

                                                          Lab/RACE Lab;
                                                          Dept.

                                                          of Computer
                                                          Science,
                                                          UCSB;  http://cs.ucsb.edu
                                                          E-mail: hiranya@cs.ucsb.edu; 

                                                          Mobile: +1 (805) 895-7443
                                                          Blog: http://techfeast-hiranya.blogspot.com
                                                          
                                                          

                                                          
                                                        
                                                      
                                                    
                                                  
                                                
                                              
                                              

                                            
                                          
                                        
                                      
                                    
                                    

                                  
                                
                                

                              
                            
                          
                        
                      
                      

                    
                  
                
              
            
            

          
        
      
    
    
 		 	   		  

Re: CORS Supprt in Axis2

Posted by Deepal jayasinghe <de...@gmail.com>.
Looks good to me.

Deepal
> Hi Devs,
> I thought of giving some insight to the approach and the design, so 
> that I can have your valuable feedback.
>
> Following configuration should be added to the axis2.xml
>
> <CORSConfig enabled="true">
> <Access-Control-Allow-Headers>content-type,soapaction,x-requested-with</Access-Control-Allow-Headers>
> <Access-Control-Allow-Methods>GET,POST,PUT,DELETE,OPTIONS</Access-Control-Allow-Methods>
> <Access-Control-Allow-Origin>*</Access-Control-Allow-Origin>
> <Access-Control-Expose-Headers>header1,header2</Access-Control-Expose-Headers>
>         <Access-Control-Allow-Credentials enabled="false"/>
> <Access-Control-Max-Age>500</Access-Control-Max-Age>
> </CORSConfig>
>
> Classes
> ------------------------
>
> *CorsConfig*
> Using those configuration CorsConfig is created and can be retrieved 
> through AxisConfiguration.
>
> *CORSProcesser*
> This class is implemented according to the section 6 of the CORS spec.
>
> Currently CORS Processor in engaged in the AxisHttpService handle 
> request method. As per Sagara's mail, I will work on adding this to 
> servlet transport later
>
> if(corsConfig.isEnabled()){
>      //CORS is enabled by the configs
>      corsProcessor.process(axisreq,axisres);
> }
> Thanks,
> Asanka
>
>
> On Thu, Jul 16, 2015 at 10:30 PM, Asanka Dissanayake 
> <asankanbd@gmail.com <ma...@gmail.com>> wrote:
>
>     Hi Devs,
>     I thought of giving some insight to the approach and the design,
>     so that I can have your valuable feedback.
>
>     Following configuration should be added to the axis2.xml
>
>
>
>
>
>     On Thu, Jul 16, 2015 at 1:44 AM, Deepal jayasinghe
>     <deepalk@gmail.com <ma...@gmail.com>> wrote:
>
>         Done.
>
>         Deepal
>>         Hi Devs,
>>         Can some one assign me the issue
>>         https://issues.apache.org/jira/browse/AXIS2-5708.
>>         I cannot assign it to myself. Seems I don't have enough
>>         permissions.
>>
>>         Thanks,
>>         Asanka
>>
>>         On Sun, Jul 12, 2015 at 8:57 PM, Asanka Dissanayake
>>         <asankanbd@gmail.com <ma...@gmail.com>> wrote:
>>
>>             Hi Devs,
>>             What is the best place to implement this. IMHO I think
>>             following place is suitable.
>>
>>             org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>>             AxisHttpConnection conn, final HttpContext context)
>>                         throws IOException, HttpException
>>
>>             Thanks,
>>             Asanka D
>>
>>             On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake
>>             <asankanbd@gmail.com <ma...@gmail.com>> wrote:
>>
>>                 Yes, agreed. I will start implementation with axis2
>>                 http transport .
>>
>>                 Thanks,
>>                 Asanka D
>>
>>
>>                 On Saturday, July 11, 2015, Hiranya Jayathilaka
>>                 <hiranya911@gmail.com <ma...@gmail.com>>
>>                 wrote:
>>
>>
>>                     On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake
>>                     <as...@gmail.com> wrote:
>>
>>>                     Hi Devs,
>>>                     How about implementing this as an Axis2 module.
>>>                     That will allow user to have the feature if user
>>>                     prefers. And we can re-use it for synapse as well.
>>
>>                     I read about this technology a little bit. My
>>                     preference is for implementing it in the HTTP
>>                     transport. This really is a HTTP-specific
>>                     feature, and I don't see a reason why it should
>>                     be implemented outside the transport.
>>                     Unfortunately, however, this means we have to
>>                     re-implement it for Synapse.
>>
>>                     Thanks,
>>                     Hiranya
>>
>>>
>>>                     Thanks,
>>>                     Asanka
>>>
>>>                     On Fri, Jul 10, 2015 at 12:46 AM, Hiranya
>>>                     Jayathilaka <hi...@gmail.com> wrote:
>>>
>>>                         This might be a useful feature addition to
>>>                         Synapse as well. When you're done with the
>>>                         Axis2 implementation, perhaps you can take a
>>>                         look at the Synapse pass-thru transport as
>>>                         well.
>>>
>>>                         Thanks,
>>>                         Hiranya
>>>
>>>                         On Jul 9, 2015, at 5:27 AM, T. Allen
>>>                         <bi...@verizon.net> wrote:
>>>
>>>>                         +1 for adding CORS support.
>>>>
>>>>
>>>>                         On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>                         Hi Devs,
>>>>>                         I recently happened to call a Axis2Service
>>>>>                         with AJAX post method. Then there was an
>>>>>                         "Access-Control-Allow-Origin Error". When
>>>>>                         I was digging through the path, I came to
>>>>>                         know about CORS (Cross Origin Resource
>>>>>                         Sharing) spec [1] .
>>>>>
>>>>>                         User agents commonly apply same-origin
>>>>>                         restrictions to network requests. These
>>>>>                         restrictions prevent a client-side Web
>>>>>                         application running from one origin from
>>>>>                         obtaining data retrieved from another
>>>>>                         origin, and also limit unsafe HTTP
>>>>>                         requests that can be automatically
>>>>>                         launched toward destinations that differ
>>>>>                         from the running application's origin.
>>>>>
>>>>>                         To overcome this issue , I implemented an
>>>>>                         axis2 handler which the implementation is
>>>>>                         very specific to my use case. It handles
>>>>>                         the preflight request.
>>>>>
>>>>>                         In Axis2 , have we implemented CORS Spec?
>>>>>                         If not what about providing CORS support
>>>>>                         with Axis2?
>>>>>                         Since I already have the implementation, I
>>>>>                         can make it more generic and add to Axis2.
>>>>>
>>>>>                         [1] http://www.w3.org/TR/cors/
>>>>>
>>>>>                         Thanks,
>>>>>                         Asanka
>>>>
>>>>                         ---------------------------------------------------------------------
>>>>                         To unsubscribe, e-mail:
>>>>                         java-dev-unsubscribe@axis.apache.org
>>>>                         For additional commands, e-mail:
>>>>                         java-dev-help@axis.apache.org
>>>>
>>>
>>>                         --
>>>                         Hiranya Jayathilaka
>>>                         Mayhem Lab/RACE Lab;
>>>                         Dept. of Computer Science, UCSB;
>>>                         http://cs.ucsb.edu <http://cs.ucsb.edu/>
>>>                         E-mail: hiranya@cs.ucsb.edu; Mobile: +1
>>>                         (805) 895-7443 <tel:%2B1%20%28805%29%20895-7443>
>>>                         Blog: http://techfeast-hiranya.blogspot.com
>>>                         <http://techfeast-hiranya.blogspot.com/>
>>>
>>>
>>
>>                     --
>>                     Hiranya Jayathilaka
>>                     Mayhem Lab/RACE Lab;
>>                     Dept. of Computer Science, UCSB;
>>                     http://cs.ucsb.edu <http://cs.ucsb.edu/>
>>                     E-mail: hiranya@cs.ucsb.edu; Mobile: +1 (805)
>>                     895-7443 <tel:%2B1%20%28805%29%20895-7443>
>>                     Blog: http://techfeast-hiranya.blogspot.com
>>                     <http://techfeast-hiranya.blogspot.com/>
>>
>>
>>
>
>
>


Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
I thought of giving some insight to the approach and the design, so that I
can have your valuable feedback.

Following configuration should be added to the axis2.xml

<CORSConfig enabled="true">

<Access-Control-Allow-Headers>content-type,soapaction,x-requested-with</Access-Control-Allow-Headers>

<Access-Control-Allow-Methods>GET,POST,PUT,DELETE,OPTIONS</Access-Control-Allow-Methods>
        <Access-Control-Allow-Origin>*</Access-Control-Allow-Origin>

<Access-Control-Expose-Headers>header1,header2</Access-Control-Expose-Headers>
        <Access-Control-Allow-Credentials enabled="false"/>
        <Access-Control-Max-Age>500</Access-Control-Max-Age>
</CORSConfig>

Classes
------------------------

*CorsConfig*
Using those configuration CorsConfig is created and can be retrieved
through AxisConfiguration.

*CORSProcesser*
This class is implemented according to the section 6 of the CORS spec.

Currently CORS Processor in engaged in the AxisHttpService handle request
method. As per Sagara's mail, I will work on adding this to servlet
transport later


if(corsConfig.isEnabled()){
    //CORS is enabled by the configs
    corsProcessor.process(axisreq,axisres);
}

Thanks,
Asanka


On Thu, Jul 16, 2015 at 10:30 PM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi Devs,
> I thought of giving some insight to the approach and the design, so that I
> can have your valuable feedback.
>
> Following configuration should be added to the axis2.xml
>
>
>
>
>
> On Thu, Jul 16, 2015 at 1:44 AM, Deepal jayasinghe <de...@gmail.com>
> wrote:
>
>>  Done.
>>
>> Deepal
>>
>>  Hi Devs,
>>  Can some one assign me the issue
>> https://issues.apache.org/jira/browse/AXIS2-5708.
>>  I cannot assign it to myself. Seems I don't have enough permissions.
>>
>>  Thanks,
>>  Asanka
>>
>> On Sun, Jul 12, 2015 at 8:57 PM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>>>   Hi Devs,
>>>  What is the best place to implement this. IMHO I think following place
>>> is suitable.
>>>
>>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>>> AxisHttpConnection conn, final HttpContext context)
>>>             throws IOException, HttpException
>>>
>>>  Thanks,
>>>  Asanka D
>>>
>>> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <asankanbd@gmail.com
>>> > wrote:
>>>
>>>> Yes, agreed. I will start implementation with axis2 http transport .
>>>>
>>>>  Thanks,
>>>> Asanka D
>>>>
>>>>
>>>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>  On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>  Hi Devs,
>>>>> How about implementing this as an Axis2 module. That will allow user
>>>>> to have the feature if user prefers. And we can re-use it for synapse as
>>>>> well.
>>>>>
>>>>>
>>>>>  I read about this technology a little bit. My preference is for
>>>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>>>> feature, and I don't see a reason why it should be implemented outside the
>>>>> transport. Unfortunately, however, this means we have to re-implement it
>>>>> for Synapse.
>>>>>
>>>>>  Thanks,
>>>>> Hiranya
>>>>>
>>>>>
>>>>>  Thanks,
>>>>> Asanka
>>>>>
>>>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>>>> hiranya911@gmail.com> wrote:
>>>>>
>>>>>> This might be a useful feature addition to Synapse as well. When
>>>>>> you're done with the Axis2 implementation, perhaps you can take a look at
>>>>>> the Synapse pass-thru transport as well.
>>>>>>
>>>>>>  Thanks,
>>>>>> Hiranya
>>>>>>
>>>>>>  On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>>>
>>>>>> +1 for adding CORS support.
>>>>>>
>>>>>>
>>>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>>
>>>>>> Hi Devs,
>>>>>> I recently happened to call a Axis2Service with AJAX post method.
>>>>>> Then there was an "Access-Control-Allow-Origin Error". When I was digging
>>>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>>>> spec [1] .
>>>>>>
>>>>>> User agents commonly apply same-origin restrictions to network
>>>>>> requests. These restrictions prevent a client-side Web application running
>>>>>> from one origin from obtaining data retrieved from another origin, and also
>>>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>>>> destinations that differ from the running application's origin.
>>>>>>
>>>>>> To overcome this issue , I implemented an axis2 handler which the
>>>>>> implementation is very specific to my use case. It handles the preflight
>>>>>> request.
>>>>>>
>>>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>>>> CORS support with Axis2?
>>>>>> Since I already have the implementation, I can make it more generic
>>>>>> and add to Axis2.
>>>>>>
>>>>>> [1] http://www.w3.org/TR/cors/
>>>>>>
>>>>>> Thanks,
>>>>>> Asanka
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>>>
>>>>>>
>>>>>>   --
>>>>>> Hiranya Jayathilaka
>>>>>> Mayhem Lab/RACE Lab;
>>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>>> <%2B1%20%28805%29%20895-7443>
>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>
>>>>>>
>>>>>
>>>>>  --
>>>>> Hiranya Jayathilaka
>>>>> Mayhem Lab/RACE Lab;
>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>>
>>>
>>
>>
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
I thought of giving some insight to the approach and the design, so that I
can have your valuable feedback.

Following configuration should be added to the axis2.xml





On Thu, Jul 16, 2015 at 1:44 AM, Deepal jayasinghe <de...@gmail.com>
wrote:

>  Done.
>
> Deepal
>
>  Hi Devs,
>  Can some one assign me the issue
> https://issues.apache.org/jira/browse/AXIS2-5708.
>  I cannot assign it to myself. Seems I don't have enough permissions.
>
>  Thanks,
>  Asanka
>
> On Sun, Jul 12, 2015 at 8:57 PM, Asanka Dissanayake <as...@gmail.com>
> wrote:
>
>>   Hi Devs,
>>  What is the best place to implement this. IMHO I think following place
>> is suitable.
>>
>> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>> AxisHttpConnection conn, final HttpContext context)
>>             throws IOException, HttpException
>>
>>  Thanks,
>>  Asanka D
>>
>> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>>> Yes, agreed. I will start implementation with axis2 http transport .
>>>
>>>  Thanks,
>>> Asanka D
>>>
>>>
>>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>>> wrote:
>>>
>>>>
>>>>  On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>>> wrote:
>>>>
>>>>  Hi Devs,
>>>> How about implementing this as an Axis2 module. That will allow user to
>>>> have the feature if user prefers. And we can re-use it for synapse as well.
>>>>
>>>>
>>>>  I read about this technology a little bit. My preference is for
>>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>>> feature, and I don't see a reason why it should be implemented outside the
>>>> transport. Unfortunately, however, this means we have to re-implement it
>>>> for Synapse.
>>>>
>>>>  Thanks,
>>>> Hiranya
>>>>
>>>>
>>>>  Thanks,
>>>> Asanka
>>>>
>>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>>> hiranya911@gmail.com> wrote:
>>>>
>>>>> This might be a useful feature addition to Synapse as well. When
>>>>> you're done with the Axis2 implementation, perhaps you can take a look at
>>>>> the Synapse pass-thru transport as well.
>>>>>
>>>>>  Thanks,
>>>>> Hiranya
>>>>>
>>>>>  On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>>
>>>>> +1 for adding CORS support.
>>>>>
>>>>>
>>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>>
>>>>> Hi Devs,
>>>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>>> spec [1] .
>>>>>
>>>>> User agents commonly apply same-origin restrictions to network
>>>>> requests. These restrictions prevent a client-side Web application running
>>>>> from one origin from obtaining data retrieved from another origin, and also
>>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>>> destinations that differ from the running application's origin.
>>>>>
>>>>> To overcome this issue , I implemented an axis2 handler which the
>>>>> implementation is very specific to my use case. It handles the preflight
>>>>> request.
>>>>>
>>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>>> CORS support with Axis2?
>>>>> Since I already have the implementation, I can make it more generic
>>>>> and add to Axis2.
>>>>>
>>>>> [1] http://www.w3.org/TR/cors/
>>>>>
>>>>> Thanks,
>>>>> Asanka
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>>
>>>>>
>>>>>   --
>>>>> Hiranya Jayathilaka
>>>>> Mayhem Lab/RACE Lab;
>>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>>> <%2B1%20%28805%29%20895-7443>
>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>
>>>>>
>>>>
>>>>  --
>>>> Hiranya Jayathilaka
>>>> Mayhem Lab/RACE Lab;
>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>>
>>
>
>

Re: CORS Supprt in Axis2

Posted by Deepal jayasinghe <de...@gmail.com>.
Done.

Deepal
> Hi Devs,
> Can some one assign me the issue
> https://issues.apache.org/jira/browse/AXIS2-5708.
> I cannot assign it to myself. Seems I don't have enough permissions.
>
> Thanks,
> Asanka
>
> On Sun, Jul 12, 2015 at 8:57 PM, Asanka Dissanayake 
> <asankanbd@gmail.com <ma...@gmail.com>> wrote:
>
>     Hi Devs,
>     What is the best place to implement this. IMHO I think following
>     place is suitable.
>
>     org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
>     AxisHttpConnection conn, final HttpContext context)
>                 throws IOException, HttpException
>
>     Thanks,
>     Asanka D
>
>     On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake
>     <asankanbd@gmail.com <ma...@gmail.com>> wrote:
>
>         Yes, agreed. I will start implementation with axis2
>         http transport .
>
>         Thanks,
>         Asanka D
>
>
>         On Saturday, July 11, 2015, Hiranya Jayathilaka
>         <hiranya911@gmail.com <ma...@gmail.com>> wrote:
>
>
>             On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake
>             <as...@gmail.com> wrote:
>
>>             Hi Devs,
>>             How about implementing this as an Axis2 module. That will
>>             allow user to have the feature if user prefers. And we
>>             can re-use it for synapse as well.
>
>             I read about this technology a little bit. My preference
>             is for implementing it in the HTTP transport. This really
>             is a HTTP-specific feature, and I don't see a reason why
>             it should be implemented outside the transport.
>             Unfortunately, however, this means we have to re-implement
>             it for Synapse.
>
>             Thanks,
>             Hiranya
>
>>
>>             Thanks,
>>             Asanka
>>
>>             On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka
>>             <hi...@gmail.com> wrote:
>>
>>                 This might be a useful feature addition to Synapse as
>>                 well. When you're done with the Axis2 implementation,
>>                 perhaps you can take a look at the Synapse pass-thru
>>                 transport as well.
>>
>>                 Thanks,
>>                 Hiranya
>>
>>                 On Jul 9, 2015, at 5:27 AM, T. Allen
>>                 <bi...@verizon.net> wrote:
>>
>>>                 +1 for adding CORS support.
>>>
>>>
>>>                 On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>                 Hi Devs,
>>>>                 I recently happened to call a Axis2Service with
>>>>                 AJAX post method. Then there was an
>>>>                 "Access-Control-Allow-Origin Error". When I was
>>>>                 digging through the path, I came to know about CORS
>>>>                 (Cross Origin Resource Sharing) spec [1] .
>>>>
>>>>                 User agents commonly apply same-origin restrictions
>>>>                 to network requests. These restrictions prevent a
>>>>                 client-side Web application running from one origin
>>>>                 from obtaining data retrieved from another origin,
>>>>                 and also limit unsafe HTTP requests that can be
>>>>                 automatically launched toward destinations that
>>>>                 differ from the running application's origin.
>>>>
>>>>                 To overcome this issue , I implemented an axis2
>>>>                 handler which the implementation is very specific
>>>>                 to my use case. It handles the preflight request.
>>>>
>>>>                 In Axis2 , have we implemented CORS Spec? If not
>>>>                 what about providing CORS support with Axis2?
>>>>                 Since I already have the implementation, I can make
>>>>                 it more generic and add to Axis2.
>>>>
>>>>                 [1] http://www.w3.org/TR/cors/
>>>>
>>>>                 Thanks,
>>>>                 Asanka
>>>
>>>                 ---------------------------------------------------------------------
>>>                 To unsubscribe, e-mail:
>>>                 java-dev-unsubscribe@axis.apache.org
>>>                 For additional commands, e-mail:
>>>                 java-dev-help@axis.apache.org
>>>
>>
>>                 --
>>                 Hiranya Jayathilaka
>>                 Mayhem Lab/RACE Lab;
>>                 Dept. of Computer Science, UCSB; http://cs.ucsb.edu
>>                 <http://cs.ucsb.edu/>
>>                 E-mail: hiranya@cs.ucsb.edu; Mobile: +1 (805)
>>                 895-7443 <tel:%2B1%20%28805%29%20895-7443>
>>                 Blog: http://techfeast-hiranya.blogspot.com
>>                 <http://techfeast-hiranya.blogspot.com/>
>>
>>
>
>             --
>             Hiranya Jayathilaka
>             Mayhem Lab/RACE Lab;
>             Dept. of Computer Science, UCSB; http://cs.ucsb.edu
>             <http://cs.ucsb.edu/>
>             E-mail: hiranya@cs.ucsb.edu; Mobile: +1 (805) 895-7443
>             <tel:%2B1%20%28805%29%20895-7443>
>             Blog: http://techfeast-hiranya.blogspot.com
>             <http://techfeast-hiranya.blogspot.com/>
>
>
>


Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
Can some one assign me the issue
https://issues.apache.org/jira/browse/AXIS2-5708.
I cannot assign it to myself. Seems I don't have enough permissions.

Thanks,
Asanka

On Sun, Jul 12, 2015 at 8:57 PM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Hi Devs,
> What is the best place to implement this. IMHO I think following place is
> suitable.
>
> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
> AxisHttpConnection conn, final HttpContext context)
>             throws IOException, HttpException
>
> Thanks,
> Asanka D
>
> On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <as...@gmail.com>
> wrote:
>
>> Yes, agreed. I will start implementation with axis2 http transport .
>>
>> Thanks,
>> Asanka D
>>
>>
>> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
>> wrote:
>>
>>>
>>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>>> wrote:
>>>
>>> Hi Devs,
>>> How about implementing this as an Axis2 module. That will allow user to
>>> have the feature if user prefers. And we can re-use it for synapse as well.
>>>
>>>
>>> I read about this technology a little bit. My preference is for
>>> implementing it in the HTTP transport. This really is a HTTP-specific
>>> feature, and I don't see a reason why it should be implemented outside the
>>> transport. Unfortunately, however, this means we have to re-implement it
>>> for Synapse.
>>>
>>> Thanks,
>>> Hiranya
>>>
>>>
>>> Thanks,
>>> Asanka
>>>
>>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>>> hiranya911@gmail.com> wrote:
>>>
>>>> This might be a useful feature addition to Synapse as well. When you're
>>>> done with the Axis2 implementation, perhaps you can take a look at the
>>>> Synapse pass-thru transport as well.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>>
>>>> +1 for adding CORS support.
>>>>
>>>>
>>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>>
>>>> Hi Devs,
>>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>>> spec [1] .
>>>>
>>>> User agents commonly apply same-origin restrictions to network
>>>> requests. These restrictions prevent a client-side Web application running
>>>> from one origin from obtaining data retrieved from another origin, and also
>>>> limit unsafe HTTP requests that can be automatically launched toward
>>>> destinations that differ from the running application's origin.
>>>>
>>>> To overcome this issue , I implemented an axis2 handler which the
>>>> implementation is very specific to my use case. It handles the preflight
>>>> request.
>>>>
>>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>>> CORS support with Axis2?
>>>> Since I already have the implementation, I can make it more generic and
>>>> add to Axis2.
>>>>
>>>> [1] http://www.w3.org/TR/cors/
>>>>
>>>> Thanks,
>>>> Asanka
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Mayhem Lab/RACE Lab;
>>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Mayhem Lab/RACE Lab;
>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>>
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
What is the best place to implement this. IMHO I think following place is
suitable.

org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
AxisHttpConnection conn, final HttpContext context)
            throws IOException, HttpException

Thanks,
Asanka D

On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Yes, agreed. I will start implementation with axis2 http transport .
>
> Thanks,
> Asanka D
>
>
> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
> wrote:
>
>>
>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>> Hi Devs,
>> How about implementing this as an Axis2 module. That will allow user to
>> have the feature if user prefers. And we can re-use it for synapse as well.
>>
>>
>> I read about this technology a little bit. My preference is for
>> implementing it in the HTTP transport. This really is a HTTP-specific
>> feature, and I don't see a reason why it should be implemented outside the
>> transport. Unfortunately, however, this means we have to re-implement it
>> for Synapse.
>>
>> Thanks,
>> Hiranya
>>
>>
>> Thanks,
>> Asanka
>>
>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>> hiranya911@gmail.com> wrote:
>>
>>> This might be a useful feature addition to Synapse as well. When you're
>>> done with the Axis2 implementation, perhaps you can take a look at the
>>> Synapse pass-thru transport as well.
>>>
>>> Thanks,
>>> Hiranya
>>>
>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>
>>> +1 for adding CORS support.
>>>
>>>
>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>
>>> Hi Devs,
>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>> spec [1] .
>>>
>>> User agents commonly apply same-origin restrictions to network requests.
>>> These restrictions prevent a client-side Web application running from one
>>> origin from obtaining data retrieved from another origin, and also limit
>>> unsafe HTTP requests that can be automatically launched toward destinations
>>> that differ from the running application's origin.
>>>
>>> To overcome this issue , I implemented an axis2 handler which the
>>> implementation is very specific to my use case. It handles the preflight
>>> request.
>>>
>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>> CORS support with Axis2?
>>> Since I already have the implementation, I can make it more generic and
>>> add to Axis2.
>>>
>>> [1] http://www.w3.org/TR/cors/
>>>
>>> Thanks,
>>> Asanka
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Mayhem Lab/RACE Lab;
>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>>
>>
>> --
>> Hiranya Jayathilaka
>> Mayhem Lab/RACE Lab;
>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
What is the best place to implement this. IMHO I think following place is
suitable.

org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(final
AxisHttpConnection conn, final HttpContext context)
            throws IOException, HttpException

Thanks,
Asanka D

On Sat, Jul 11, 2015 at 3:18 PM, Asanka Dissanayake <as...@gmail.com>
wrote:

> Yes, agreed. I will start implementation with axis2 http transport .
>
> Thanks,
> Asanka D
>
>
> On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
> wrote:
>
>>
>> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com>
>> wrote:
>>
>> Hi Devs,
>> How about implementing this as an Axis2 module. That will allow user to
>> have the feature if user prefers. And we can re-use it for synapse as well.
>>
>>
>> I read about this technology a little bit. My preference is for
>> implementing it in the HTTP transport. This really is a HTTP-specific
>> feature, and I don't see a reason why it should be implemented outside the
>> transport. Unfortunately, however, this means we have to re-implement it
>> for Synapse.
>>
>> Thanks,
>> Hiranya
>>
>>
>> Thanks,
>> Asanka
>>
>> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
>> hiranya911@gmail.com> wrote:
>>
>>> This might be a useful feature addition to Synapse as well. When you're
>>> done with the Axis2 implementation, perhaps you can take a look at the
>>> Synapse pass-thru transport as well.
>>>
>>> Thanks,
>>> Hiranya
>>>
>>> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>>>
>>> +1 for adding CORS support.
>>>
>>>
>>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>>
>>> Hi Devs,
>>> I recently happened to call a Axis2Service with AJAX post method. Then
>>> there was an "Access-Control-Allow-Origin Error". When I was digging
>>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>>> spec [1] .
>>>
>>> User agents commonly apply same-origin restrictions to network requests.
>>> These restrictions prevent a client-side Web application running from one
>>> origin from obtaining data retrieved from another origin, and also limit
>>> unsafe HTTP requests that can be automatically launched toward destinations
>>> that differ from the running application's origin.
>>>
>>> To overcome this issue , I implemented an axis2 handler which the
>>> implementation is very specific to my use case. It handles the preflight
>>> request.
>>>
>>> In Axis2 , have we implemented CORS Spec? If not what about providing
>>> CORS support with Axis2?
>>> Since I already have the implementation, I can make it more generic and
>>> add to Axis2.
>>>
>>> [1] http://www.w3.org/TR/cors/
>>>
>>> Thanks,
>>> Asanka
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>>
>>> --
>>> Hiranya Jayathilaka
>>> Mayhem Lab/RACE Lab;
>>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>>> Blog: http://techfeast-hiranya.blogspot.com
>>>
>>>
>>
>> --
>> Hiranya Jayathilaka
>> Mayhem Lab/RACE Lab;
>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Yes, agreed. I will start implementation with axis2 http transport .

Thanks,
Asanka D

On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
wrote:

>
> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <asankanbd@gmail.com
> <javascript:_e(%7B%7D,'cvml','asankanbd@gmail.com');>> wrote:
>
> Hi Devs,
> How about implementing this as an Axis2 module. That will allow user to
> have the feature if user prefers. And we can re-use it for synapse as well.
>
>
> I read about this technology a little bit. My preference is for
> implementing it in the HTTP transport. This really is a HTTP-specific
> feature, and I don't see a reason why it should be implemented outside the
> transport. Unfortunately, however, this means we have to re-implement it
> for Synapse.
>
> Thanks,
> Hiranya
>
>
> Thanks,
> Asanka
>
> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
> hiranya911@gmail.com
> <javascript:_e(%7B%7D,'cvml','hiranya911@gmail.com');>> wrote:
>
>> This might be a useful feature addition to Synapse as well. When you're
>> done with the Axis2 implementation, perhaps you can take a look at the
>> Synapse pass-thru transport as well.
>>
>> Thanks,
>> Hiranya
>>
>> On Jul 9, 2015, at 5:27 AM, T. Allen <bif@verizon.net
>> <javascript:_e(%7B%7D,'cvml','bif@verizon.net');>> wrote:
>>
>> +1 for adding CORS support.
>>
>>
>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>
>> Hi Devs,
>> I recently happened to call a Axis2Service with AJAX post method. Then
>> there was an "Access-Control-Allow-Origin Error". When I was digging
>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>> spec [1] .
>>
>> User agents commonly apply same-origin restrictions to network requests.
>> These restrictions prevent a client-side Web application running from one
>> origin from obtaining data retrieved from another origin, and also limit
>> unsafe HTTP requests that can be automatically launched toward destinations
>> that differ from the running application's origin.
>>
>> To overcome this issue , I implemented an axis2 handler which the
>> implementation is very specific to my use case. It handles the preflight
>> request.
>>
>> In Axis2 , have we implemented CORS Spec? If not what about providing
>> CORS support with Axis2?
>> Since I already have the implementation, I can make it more generic and
>> add to Axis2.
>>
>> [1] http://www.w3.org/TR/cors/
>>
>> Thanks,
>> Asanka
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> <javascript:_e(%7B%7D,'cvml','java-dev-unsubscribe@axis.apache.org');>
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>> <javascript:_e(%7B%7D,'cvml','java-dev-help@axis.apache.org');>
>>
>>
>> --
>> Hiranya Jayathilaka
>> Mayhem Lab/RACE Lab;
>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>> E-mail: hiranya@cs.ucsb.edu
>> <javascript:_e(%7B%7D,'cvml','hiranya@wso2.com');>;  Mobile: +1 (805)
>> 895-7443
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>>
>
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu
> <javascript:_e(%7B%7D,'cvml','hiranya@wso2.com');>;  Mobile: +1 (805)
> 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
>
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Yes, agreed. I will start implementation with axis2 http transport .

Thanks,
Asanka D

On Saturday, July 11, 2015, Hiranya Jayathilaka <hi...@gmail.com>
wrote:

>
> On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <asankanbd@gmail.com
> <javascript:_e(%7B%7D,'cvml','asankanbd@gmail.com');>> wrote:
>
> Hi Devs,
> How about implementing this as an Axis2 module. That will allow user to
> have the feature if user prefers. And we can re-use it for synapse as well.
>
>
> I read about this technology a little bit. My preference is for
> implementing it in the HTTP transport. This really is a HTTP-specific
> feature, and I don't see a reason why it should be implemented outside the
> transport. Unfortunately, however, this means we have to re-implement it
> for Synapse.
>
> Thanks,
> Hiranya
>
>
> Thanks,
> Asanka
>
> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <
> hiranya911@gmail.com
> <javascript:_e(%7B%7D,'cvml','hiranya911@gmail.com');>> wrote:
>
>> This might be a useful feature addition to Synapse as well. When you're
>> done with the Axis2 implementation, perhaps you can take a look at the
>> Synapse pass-thru transport as well.
>>
>> Thanks,
>> Hiranya
>>
>> On Jul 9, 2015, at 5:27 AM, T. Allen <bif@verizon.net
>> <javascript:_e(%7B%7D,'cvml','bif@verizon.net');>> wrote:
>>
>> +1 for adding CORS support.
>>
>>
>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>
>> Hi Devs,
>> I recently happened to call a Axis2Service with AJAX post method. Then
>> there was an "Access-Control-Allow-Origin Error". When I was digging
>> through the path, I came to know about CORS (Cross Origin Resource Sharing)
>> spec [1] .
>>
>> User agents commonly apply same-origin restrictions to network requests.
>> These restrictions prevent a client-side Web application running from one
>> origin from obtaining data retrieved from another origin, and also limit
>> unsafe HTTP requests that can be automatically launched toward destinations
>> that differ from the running application's origin.
>>
>> To overcome this issue , I implemented an axis2 handler which the
>> implementation is very specific to my use case. It handles the preflight
>> request.
>>
>> In Axis2 , have we implemented CORS Spec? If not what about providing
>> CORS support with Axis2?
>> Since I already have the implementation, I can make it more generic and
>> add to Axis2.
>>
>> [1] http://www.w3.org/TR/cors/
>>
>> Thanks,
>> Asanka
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> <javascript:_e(%7B%7D,'cvml','java-dev-unsubscribe@axis.apache.org');>
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>> <javascript:_e(%7B%7D,'cvml','java-dev-help@axis.apache.org');>
>>
>>
>> --
>> Hiranya Jayathilaka
>> Mayhem Lab/RACE Lab;
>> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
>> E-mail: hiranya@cs.ucsb.edu
>> <javascript:_e(%7B%7D,'cvml','hiranya@wso2.com');>;  Mobile: +1 (805)
>> 895-7443
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>>
>
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu
> <javascript:_e(%7B%7D,'cvml','hiranya@wso2.com');>;  Mobile: +1 (805)
> 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
>
>

Re: CORS Supprt in Axis2

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com> wrote:

> Hi Devs,
> How about implementing this as an Axis2 module. That will allow user to have the feature if user prefers. And we can re-use it for synapse as well.

I read about this technology a little bit. My preference is for implementing it in the HTTP transport. This really is a HTTP-specific feature, and I don't see a reason why it should be implemented outside the transport. Unfortunately, however, this means we have to re-implement it for Synapse. 

Thanks,
Hiranya

> 
> Thanks,
> Asanka
> 
> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <hi...@gmail.com> wrote:
> This might be a useful feature addition to Synapse as well. When you're done with the Axis2 implementation, perhaps you can take a look at the Synapse pass-thru transport as well.
> 
> Thanks,
> Hiranya
> 
> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
> 
>> +1 for adding CORS support.
>> 
>> 
>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>> Hi Devs,
>>> I recently happened to call a Axis2Service with AJAX post method. Then there was an "Access-Control-Allow-Origin Error". When I was digging through the path, I came to know about CORS (Cross Origin Resource Sharing) spec [1] .
>>> 
>>> User agents commonly apply same-origin restrictions to network requests. These restrictions prevent a client-side Web application running from one origin from obtaining data retrieved from another origin, and also limit unsafe HTTP requests that can be automatically launched toward destinations that differ from the running application's origin.
>>> 
>>> To overcome this issue , I implemented an axis2 handler which the implementation is very specific to my use case. It handles the preflight request.
>>> 
>>> In Axis2 , have we implemented CORS Spec? If not what about providing CORS support with Axis2?
>>> Since I already have the implementation, I can make it more generic and add to Axis2.
>>> 
>>> [1] http://www.w3.org/TR/cors/
>>> 
>>> Thanks,
>>> Asanka
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>> 
> 
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
> 
> 

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


Re: CORS Supprt in Axis2

Posted by Hiranya Jayathilaka <hi...@gmail.com>.
On Jul 10, 2015, at 6:50 PM, Asanka Dissanayake <as...@gmail.com> wrote:

> Hi Devs,
> How about implementing this as an Axis2 module. That will allow user to have the feature if user prefers. And we can re-use it for synapse as well.

I read about this technology a little bit. My preference is for implementing it in the HTTP transport. This really is a HTTP-specific feature, and I don't see a reason why it should be implemented outside the transport. Unfortunately, however, this means we have to re-implement it for Synapse. 

Thanks,
Hiranya

> 
> Thanks,
> Asanka
> 
> On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <hi...@gmail.com> wrote:
> This might be a useful feature addition to Synapse as well. When you're done with the Axis2 implementation, perhaps you can take a look at the Synapse pass-thru transport as well.
> 
> Thanks,
> Hiranya
> 
> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
> 
>> +1 for adding CORS support.
>> 
>> 
>> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>>> Hi Devs,
>>> I recently happened to call a Axis2Service with AJAX post method. Then there was an "Access-Control-Allow-Origin Error". When I was digging through the path, I came to know about CORS (Cross Origin Resource Sharing) spec [1] .
>>> 
>>> User agents commonly apply same-origin restrictions to network requests. These restrictions prevent a client-side Web application running from one origin from obtaining data retrieved from another origin, and also limit unsafe HTTP requests that can be automatically launched toward destinations that differ from the running application's origin.
>>> 
>>> To overcome this issue , I implemented an axis2 handler which the implementation is very specific to my use case. It handles the preflight request.
>>> 
>>> In Axis2 , have we implemented CORS Spec? If not what about providing CORS support with Axis2?
>>> Since I already have the implementation, I can make it more generic and add to Axis2.
>>> 
>>> [1] http://www.w3.org/TR/cors/
>>> 
>>> Thanks,
>>> Asanka
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>> 
> 
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
> 
> 

--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;
Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
E-mail: hiranya@cs.ucsb.edu;  Mobile: +1 (805) 895-7443
Blog: http://techfeast-hiranya.blogspot.com


Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
How about implementing this as an Axis2 module. That will allow user to
have the feature if user prefers. And we can re-use it for synapse as well.

Thanks,
Asanka

On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <hi...@gmail.com>
wrote:

> This might be a useful feature addition to Synapse as well. When you're
> done with the Axis2 implementation, perhaps you can take a look at the
> Synapse pass-thru transport as well.
>
> Thanks,
> Hiranya
>
> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>
> +1 for adding CORS support.
>
>
> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>
> Hi Devs,
> I recently happened to call a Axis2Service with AJAX post method. Then
> there was an "Access-Control-Allow-Origin Error". When I was digging
> through the path, I came to know about CORS (Cross Origin Resource Sharing)
> spec [1] .
>
> User agents commonly apply same-origin restrictions to network requests.
> These restrictions prevent a client-side Web application running from one
> origin from obtaining data retrieved from another origin, and also limit
> unsafe HTTP requests that can be automatically launched toward destinations
> that differ from the running application's origin.
>
> To overcome this issue , I implemented an axis2 handler which the
> implementation is very specific to my use case. It handles the preflight
> request.
>
> In Axis2 , have we implemented CORS Spec? If not what about providing CORS
> support with Axis2?
> Since I already have the implementation, I can make it more generic and
> add to Axis2.
>
> [1] http://www.w3.org/TR/cors/
>
> Thanks,
> Asanka
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu <hi...@wso2.com>;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
>
>

Re: CORS Supprt in Axis2

Posted by Asanka Dissanayake <as...@gmail.com>.
Hi Devs,
How about implementing this as an Axis2 module. That will allow user to
have the feature if user prefers. And we can re-use it for synapse as well.

Thanks,
Asanka

On Fri, Jul 10, 2015 at 12:46 AM, Hiranya Jayathilaka <hi...@gmail.com>
wrote:

> This might be a useful feature addition to Synapse as well. When you're
> done with the Axis2 implementation, perhaps you can take a look at the
> Synapse pass-thru transport as well.
>
> Thanks,
> Hiranya
>
> On Jul 9, 2015, at 5:27 AM, T. Allen <bi...@verizon.net> wrote:
>
> +1 for adding CORS support.
>
>
> On 7/8/2015 8:13 PM, Asanka Dissanayake wrote:
>
> Hi Devs,
> I recently happened to call a Axis2Service with AJAX post method. Then
> there was an "Access-Control-Allow-Origin Error". When I was digging
> through the path, I came to know about CORS (Cross Origin Resource Sharing)
> spec [1] .
>
> User agents commonly apply same-origin restrictions to network requests.
> These restrictions prevent a client-side Web application running from one
> origin from obtaining data retrieved from another origin, and also limit
> unsafe HTTP requests that can be automatically launched toward destinations
> that differ from the running application's origin.
>
> To overcome this issue , I implemented an axis2 handler which the
> implementation is very specific to my use case. It handles the preflight
> request.
>
> In Axis2 , have we implemented CORS Spec? If not what about providing CORS
> support with Axis2?
> Since I already have the implementation, I can make it more generic and
> add to Axis2.
>
> [1] http://www.w3.org/TR/cors/
>
> Thanks,
> Asanka
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>
> --
> Hiranya Jayathilaka
> Mayhem Lab/RACE Lab;
> Dept. of Computer Science, UCSB;  http://cs.ucsb.edu
> E-mail: hiranya@cs.ucsb.edu <hi...@wso2.com>;  Mobile: +1 (805) 895-7443
> Blog: http://techfeast-hiranya.blogspot.com
>
>