Note: There is a known issue in this approach. Hence this will not work. I will update once it is fixed.
Some of the features that can be enabled using custom script in Integration Gateway (IGW) are: modify the requests and responses of an Odata request, handle delta token , multipart and composite WSDL support, and SOAP authentication. There are many examples in SCN on how to write custom script in Integration Gateway. In this blog I am explaining how to easily debug the script using IGW’s eclipse based tooling.
|Custom Script written under function processRequestData|
//Getting value from header
var context = message.getHeaders().get(“odatacontext”);
var City = context.getRequestHeaders().get(“City”).get(0);
var child = new LinkedHashMap();
How to start debugging ?
- Open prop.ini file of SMP server (C:\SAP\MobilePlatform3\Server) and add the property -Drhino.debugger.port=9123
- From eclipse, click on down arrow next to debug menu and choose debug configurations.
If debug menu is not visible: Go to Windows > Customize Perspective. “Navigate to Commands group visibility” tab. Then select “Launch” option in the Availability Command Groups and click OK.
- On the new window opened, provide below details:
- Navigate to Source tab and provide the path to the script file and click on Debug.
- Execute the Odata service from a rest client by passing City as header along with Authorization header.
SAP Technology RIG