Override RESTful service mapping (JSON)

  • Thread starter Thread starter Tony
  • Start date Start date
Status
Not open for further replies.
T

Tony

Guest
It would be great to have the ability to override the 'Expression Value" via the node editor dialog box withing the PDSOE. The current mapping always wraps the parameter within a 'request' object. I need to create a REST service to recieve messages from a third party, that we then update our OE app as needed. The message payload is JSON with multiple parameters. The issue I have is that this third party is not able(willing) to change their JSON output to have this outer "request" object. This restriction serverly slows down development of RESTful services where third party apps that post JSON payloads can not or will not change their apps output. The work around for us is to first perform all the mappings needed. Generate a deployment war file for the RESTful service. Deploy the service. The process that generates the WAR file creates & inserts a REST service description file with a .paar file extension in the WEB-INF/adapter/ rest-service-name /. It is a ZIP archive with all the service's information the run-time requires and in it you can view all of the mapping from http to the AppServer client. Extract from this ".paar" file the mapping.xml file. Then edit the file to remove/replace the 'request' object references. Save the file and place it back into the ".paar" file. Reload the service. Although this work around is effective, it is time consuming. Also the fact that it can't be tested while in the PDSOE workbench means that it needs to be deployed.

Continue reading...
 
Status
Not open for further replies.
Back
Top