IBM Support

getInventorySupply Rest API throws YFS:Invalid Node error in the the Promising Server Instance

Troubleshooting


Problem

Attempts to run getInventorySupply throws YFS:Invalid Node error in IBM Sterling Order Management

Symptom

Use REST API URL http://xx.xx.xx.xx:9400/smcfs/restapi/invoke/getInventorySupply with the following input message:
-----------------
<InventorySupply UnitOfMeasure="EACH" ShipNode="Node1"
SupplyType="ONHAND" ProductClass="GOOD" OrganizationCode="DEFAULT"
ItemID="Item1"></InventorySupply>
-----------------


The following error is seen:
-----------------
{"errors":[{"ErrorDescription":"YFS:Invalid Node","
ErrorUniqueExceptionId":"11.2.145.11415856984827530000000000010","
ErrorCode":"YFS10048","MoreInfo":{"ErrorRelatedMoreInfo":"Node1","
ShipNode":"Node1"},"httpcode":400}]}
-----------------

Cause

The query fired comprises of the clause ( 1=2 ).

-------------------------
[2/1/17 8:30:33:089 EST] 0000539d SystemOut     O 2017-02-01
08:30:33,089:VERBOSE:WebContainer : 20: ------------------------
selectWithWhere: Processing: Prepared Statement -  WHERE
ORGANIZATION_CODE = 'DEFAULT'  AND  ITEM_ID = 'Item1'  AND  UOM
= 'EACH'  AND  
(  1=2 )  [omsprid]: [DEFAULT]: YFS_ItemDBCacheHome
-------------------------

Diagnosing The Problem

When you run getInventorySupply on the API tester, it works fine without any errors. But when tried to post the same message to the REST API endpoint http://xx.xx.xx.xx:9400/smcfs/restapi/invoke/getInventorySupply, its leads to the error.

The expression (  1=2 )  is added in the query by data security [ resource does not have permission to access ]

Resolving The Problem

To resolve, set the below in customer_overrides.properties file:
-------------------------
xapirest.yif.apifactory.protocol=LOCAL
xapirest.servlet.authstyle=OPEN
xapirest.servlet.userid=admin
xapirest.servlet.put.enabled=true
xapirest.servlet.realm=prompt
xapirest.servlet.restadmin.enabled=true
xapirest.yif.httpapi.userid=admin
xapirest.yif.httpapi.password=password
xapirest.yfs.relogin=true
yfs.interopservlet.security.enabled=false
yfs.userauthfilter.enabled=false
yfs.api.security.enabled=N
yfs.api.security.token.enabled=N
yfs.interopservlet.auth.token.enabled=false
yfs.interopservlet.auth.container.enabled=false
-------------------------

Rebuilt the ear and deploy.

[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF033","label":"Windows"}],"Version":"9.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
11 February 2020

UID

swg21998426