1

I have an angular frontend that uses rest services provided by wildfly. To call the wildfly from angular I installed a proxy using this informations: angular-cli server - how to proxy API requests to another server?

When I now call the service from my angular app, I get the following error in wildfly. javax.ws.rs.NotFoundException: Could not find resource for full path: http://localhost:8080/whatever/rest/entity

Calling the url in the browser works fine.

Any Ideas?

fuechsle
  • 225
  • 1
  • 4
  • 11

2 Answers2

1

Now I found the solution:

proxy.config.json

{
   "/**api**": {
      "target": "http://localhost:8080/whatever/rest",
      "secure": false,
      "changeOrigin": true
   }
}

this way the proxy forwards you to http://localhost:8080/whatever/rest/api/entity

I thought api isn't regarded.

So I changed it like this:

{
   "/**rest**": {
      "target": "http://localhost:8080/whatever/",
      "secure": false,
      "changeOrigin": true
   }
}

and it worked. The url http://localhost:8080/whatever/rest/entity is reachable

fuechsle
  • 225
  • 1
  • 4
  • 11
0

Just a suggestion, it could be that your missing a trailing slash at the end.

  • Thanks, but didn't help: javax.ws.rs.NotFoundException: Could not find resource for full path: http://localhost:8080/whatever/rest/entity/ – fuechsle Oct 12 '17 at 11:21