r response = $http({
method: "GET",
headers: headers,
url: 'http://localhost:9001/office/offices/123',
'X-Requested-With': 'XMLHttpRequest'
It works for java rest client as well chrome rest app.
rgey Beryozkin
wrote:
> Perhaps allowOrigins should be set to a wildcard ?
>
>
> On 04/12/15 11:09, Shashank Dutt Jha wrote:
>
>> still same error
>> Error:
>> XMLHttpRequest cannot load http://localhost:9001/office/offices/123. No
>> 'Access-Cont
d) {
System.out.println("Serving request to customer id\t"+id);
return "Systems";
}
}
On Fri, Dec 4, 2015 at 4:21 PM, Shashank Dutt Jha
wrote:
>
> @CrossOriginResourceSharing(
> allowOrigins = {
>"http://localhost:56696";, "*"
gt; return Response.ok().build();
> }
> }
>
> @GET
> @CrossOriginResourceSharing(
> allowOrigins = { "http://localhost:56696"; },
> allowCredentials = true,
> exposeHeaders = { "X-custom-3", "X-cus
m("echo") String echo) {
return echo;
}
On Thu, Dec 3, 2015 at 4:51 PM, Sergey Beryozkin
wrote:
> Please do not copy exception traces into Subject :-)
>
> Have a look at
> http://cxf.apache.org/docs/jax-rs-cors.html
>
> Register that filter as a provider
>
>
I want the REST server to be accessible to web/ browser app. Which is
correct example to refer to.
On Wed, Dec 2, 2015 at 11:15 AM, Shashank Dutt Jha
wrote:
> Server side code:
>
>protected Server() throws Exception {
> JAXRSServerFactoryBean sf = new JAXRSServe
Server side code:
protected Server() throws Exception {
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
sf.setResourceClasses(CustomerService.class);
sf.setResourceProvider(CustomerService.class,
new SingletonResourceProvider(new CustomerService()))