jquery - How to enable CORS in jBoss -
I'm developing an HTML5 application to get some value from legacy web services (JXW) to get feedback Ask these web services for I have tried the correctness of my requests with the SOAP UI, and they work properly.
With my HTMLX client, I can not get SOAP responses from the server, because in response control-permission-origin header set * on. Therefore, the origin of the request is not acceptable, and the response to the server is an error response.
Error message, firebug + is to debug my HTML5 project with Firefox:
Lock Cross-Orland Request: does not allow reading standards on Genesis Remote processing can solve the problem by transferring the resources to a single domain or activating the CORS.
How can I enable the Corrosion in jbr?
You need to deal with your legacy web-services to fix the problem. As Macbill has said, you have the web. Need to add CORS filter to XML
You can use a solution from Transaction Settings:
web.xml:
& lt; Filter & gt; & Lt; Filter-name & gt; CORS & lt; / Filter-name & gt; & Lt; Filter range & gt; Com.thetransactioncompany.cors.CORSFilter & lt; / Filter range & gt; & Lt; / Filter & gt; & Lt; Filter-mapping & gt; & Lt; Filter-name & gt; CORS & lt; / Filter-name & gt; & Lt; URL pattern & gt; * & Lt; / URL pattern & gt; & Lt; / Filter-mapping & gt;
Mayen:
& lt; Dependency & gt; & Lt; Group & gt; Com.thetransactioncompany & lt; / Group & gt; & Lt; ArtifactId & gt; CORS filter & lt; / ArtifactId> & Lt; Version & gt; 2.5 & lt; / Edition & gt; & Lt; / Dependencies & gt;
If you use ApacheTomack, then you can use built-in Corfilter:
web.xml:
& Lt; Filter & gt; & Lt; Filter-name & gt; CorsFilter & lt; / Filter-name & gt; & Lt; Filter range & gt; Org.apache.catalina.filters.CorsFilter & lt; / Filter range & gt; & Lt; / Filter & gt; & Lt; Filter-mapping & gt; & Lt; Filter-name & gt; CorsFilter & lt; / Filter-name & gt; & Lt; URL pattern & gt; / * & Lt; / URL pattern & gt; & Lt; / Filter-mapping & gt;
pom.xml:
& lt; Dependency & gt; & Lt; Group & gt; Org.apache.tomcat & lt; / Group & gt; & Lt; ArtifactId & gt; Badge-Catalina & lt; / ArtifactId> & Lt; Version & gt; 7.0.42 & lt; / Edition & gt; & Lt; Scope & gt; Provided & lt; / Scope & gt; & Lt; / Dependencies & gt;
Comments
Post a Comment