8

I am trying to test my Web 8 Content service. When I invoke the URL

http://localhost:9081/content.svc (using an authorization token for cduser) I get the following in the response data:

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
  <head><title>Content service info page</title></head>
  <body> 
    <h1>Available content services:</h1> <ul><li>None</li> </ul>
  </body>
</html>

When I invoke http://localhost:9081/content.svc/Publications I get a 404, although the documentation seems to indicate that this would be a reasonable query.

Update: In response to vinayknl's question in the comments, I tried hitting http://localhost:9081/client/v2/content.svc/Publications and I get back data about the publications.

What is going on here?

  • Is this IIS? Sometimes IIS is configured to respond with a 404 when a 403 (Access Denied) was the response. This is to protect the location of secure pages from trial and error requests. Is the security of IIS, apps and all the sub folders etc set correctly? Anything in the security or windows logging? – Julian Wraith Apr 21 '16 at 19:32
  • It's the microservice, so Tomcat – Dominic Cronin Apr 21 '16 at 19:37
  • Can you try using localhost:9081/client/v2/content.svc/Publications instead ? – vinayknl Apr 22 '16 at 9:08
  • vinayknl - I've updated the question – Dominic Cronin Apr 22 '16 at 12:12
6

In the content service, we have info endpoint .../content.svc which would show available services deployed. But this was not intended as a customer facing URL. Now since Authentication is enabled, ping to the services deployed is not working and hence you are not seeing available services.

However, you can still use/access individual service endpoints available

../client/v2/content.svc - OData V2 services

../client/v4/content.svc - OData V4 services (introduced in Web8)

  • Thanks for answering. I don't understand what you mean by "ping to the services". Also - why is authentication a problem? I have a token, and it's good enough to talk to the versioned endpoints... It would be a big help if you could expand on that. – Dominic Cronin Apr 24 '16 at 18:19
  • The current implementation which checks for available services (by sending a dummy request) does not work when we have OAuth enabled. But this is just an info end point to show which services are available (which is not working now). You can still use individual versioned end points as mentioned above by passing the token. This should not cause any issues. – vinayknl Apr 24 '16 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.