Hi,
I'm trying to calling an OE web service using javascript and I encounter the 405 error http.
My website (http://myserver) is hosted on the same server that my web services (http://myserver:8080/wsa_h01/wsa1).
I read this post, which describes exactly my problem :
https://community.progress.com/community_groups/mobile/f/17/p/8558/32768.aspx#
Is anyone ever encountered this error? and how to solve ??? yet I set CORS in apache ....
Thanks for help !
Thanks Bronco for your response.
I applied this same parameters on my Apache Server, without result.
I found that it's possible to enable CORS filter on Tomcat.
I've actived CORS filter, and now it's works !
It's only 2 jar file to add on lib directory, declare CORS filter on web.xml, and done !
Please call tech support and do a request for assistance so we can look into this.
Thanks
Shelley
Hi schase,
I've already call tech support, they told me to ask to community ....
Albeit this was the solution for AngularJs to node.js call I ended up setting the following headers:
"Access-Control-Allow-Origin": "*"
"Access-Control-Allow-Methods", "GET,POST"
"Access-Control-Allow-Headers": "Origin, X-Requested-With, Content-Type, Accept"
However, that's not all I did to get this to work. What you might experience is that *before* your actual call is executed, a so called CORS preflight is done. This actually an HTTP OPTION request. The reason that this is happening is that you set more than the minimum set of HTTP headers. This is explained at this link:
What you could do is to use Fiddler to see if there's an HTTP OPTION request and if so either narrow down the amount of headers you send or serve the HTTP OPTION request.
Does this help?
Thanks Bronco for your response.
I applied this same parameters on my Apache Server, without result.
I found that it's possible to enable CORS filter on Tomcat.
I've actived CORS filter, and now it's works !
It's only 2 jar file to add on lib directory, declare CORS filter on web.xml, and done !
just for completeness of the answer: which jar's did you add and what did you do exactly to the web.xml file?
edited: typo
For completing my answer :
- I download cors-filter-1.7.jar and java-property-utils-1.9.1.jar on $CATALINA_HOME/WEB-INF/lib directory.
- On the web.xml file, I insert these lines :
<filter>
<filter-name>CORS</filter-name>
<filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CORS</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>