Hi,

Seems like JAX-RS CORS is about work for me. I am finally getting 400 error if the method uses @LocalPreflight. **My previous logs I posted were wrong, because my bundles were not updating.

So like Preflight is suppose to act, after verification from server of Access-Control-Allow-Methods and Access-Control-Allow-Headers, it should make the POST( in my case ), but that is where it is failing with 400.

---------------------------
Http-Method: OPTIONS
Content-Type:
Headers: {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8], accept-encoding=[gzip, deflate], Accept-Language=[en-us,en;q=0.5], Access-Control-Request-Headers=[content-type], Access-Control-Request-Method=[POST], Cache-Control=[no-cache], connection=[keep-alive], Content-Type=[null], Host=[localhost:8181], Origin=[http://localhost], Pragma=[no-cache], User-Agent=[Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1]}


ID: 49
Response-Code: 400
Content-Type: text/plain
Headers: {Content-Type=[text/plain], Date=[Thu, 12 Jul 2012 04:15:21 GMT]}

I am also getting warning , http://pastebin.com/6QSwdbXM .
-----------------------------------------------------------------------------------------------
If the don't use @LocalPreflight and leave it to filter, I get this warning and 405 error code. It seems like resource is re-requested at localhost/cxf/hi/for , instead of localhost:8181/cxf/hi/for

| WARN | qtp363775074-93 | JAXRSUtils | 117 - org.apache.cxf.cxf-rt-frontend-jaxrs - 2.6.1 | No operation matching request path "/cxf/hi/for" is found, Relative Path: /, HTTP Method: POST, ContentType: */*, Accept: */*,. Please enable FINE/TRACE log level for more details. 2012-07-11 23:13:06,500 | INFO | qtp363775074-93 | LoggingOutInterceptor | 81 - org.apache.cxf.cxf-api - 2.6.1 | Outbound Message
---------------------------
ID: 46
Response-Code: 405
Content-Type: text/xml
Headers: {Allow=[GET, OPTIONS, HEAD], Date=[Thu, 12 Jul 2012 04:13:06 GMT], Content-Length=[0]}

any help appreciated
regards,
Ramesh

Reply via email to