Skip to main content

Access any Service created in Thingworx using GET Method

   

Access any Service created in Thingworx using GET Method



As developers must be aware that Ptc based Thingworx has certain limitations when it comes to creation of REST Web-Services.
Accessing created Services using GETmethod is one of them.
Second being, modifying the response codes.

However, a workaround for the same is possible. It can be achieved using Java Servlet Filters.Steps to implement the same is as follows:
  • Create a filter entry in web.xml inside Thingworx (web application).
  • Create a Custom filter class with expected url-patterns in filter entries.
  • Create a custom request-response wrapper to modify request/ response.
  • Modify Response code in the Response Wrapper.

Comments