IBM Support

Invalid XML error thrown while invoking a Service through REST URL

Troubleshooting


Problem

Attempts to invoke service through REST URL in IBM Sterling Order Management leads to Invalid XML error.

Symptom

Steps to replicate:

  1. Create a service called TestService which is used to get the order list


  2. Invoked the service through a REST URL as follows:
    http://localhost:8084/smcfs/restapi/executeFlow/TestService

    The following error message is thrown:
    "ErrorDescription": "YFS:Invalid XML", "ErrorUniqueExceptionId": "9.112..245.20214830783994690000000000004", "ErrorCode": "YFS10013", "MoreInfo": { "Expected Root YFCNode": "Order",         "Actually received YFCNode": "TestService"}

Cause

The REST framework sends the root element name as the service name.

Diagnosing The Problem

For a service named TestService when the Json input is sent as {"Order": { "EnterpriseCode": "DEFAULT", "OrderNo": "Y100000000" } } the XML input sent to the SDF service is:

<TestService>
  <Order EnterpriseCode="DEFAULT" OrderNo="Y100000000"/>
</TestService>

Resolving The Problem

Since the REST framework does not know which API/services are configured inside the TestService, it places the service name as the root xml element name. The service can include suitable XSL/custom API components to parse the input as per needs.

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

Document Information

Modified date:
16 June 2018

UID

swg22000753