XML Tags in Input and Output for many API's are not consistent

Technote (troubleshooting)


Problem(Abstract)

The inconsistency between capitalisation in input and output XML for some API's may cause difficulties in extending/customizing the application where data objects need to be handled externally, in UI design for instance.

This non-uniformity of capitalization of input and output attributes is due to integration with legacy Comergent code. Comergent code was designed to work with the tags/attributes in lower case, and Foundation APIs provide camel-case tags. Even a few tags/attributes in the input xml (which are meant for the Comergent piece) are defined in lower case ( Eg. <message /> and <property /> tags ).

Symptom

Example of inconsistently capitalised XML:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration ConfigId="" CreateDate="" Partial="" SKU="" Type="" UpdateDate="">
<ConfiguratorBOM ModelName="" Version="" containerOnly="" errors="">
<message item="" type="" value=""/>
<LineItem CommerceItemKey="" Description="" ItemID="" ItemKey=""
Name="" Price="" Quantity="" RulePicked="" SKU="" UOM=""
Visible="" lockprice="" uevValue="">
<property name="" type="" value=""/>
<LineItem CommerceItemKey="" Description="" ItemID=""
ItemKey="" Name="" Price="" Quantity="" RulePicked=""
SKU="" UOM="" Visible="" lockprice="" uevValue=""/>
</LineItem>
</ConfiguratorBOM>
</Configuration>

Corrected after translation:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration ConfigId="" CreateDate="" Partial="" SKU=""
Type="" UpdateDate="">
<ConfiguratorBOM ModelName="" Version="" ContainerOnly=""
Errors="">
<Message Item="" Type="" Value="" />
<LineItem CommerceItemKey="" Description="" ItemID=""
ItemKey="" Name="" Price="" Quantity="" RulePicked="" SKU="" UOM=""
Visible="" LockPrice="" UevValue="">
<Property Name="" Type="" Value="" />
<LineItem CommerceItemKey="" Description="" ItemID=""
ItemKey="" Name="" Price="" Quantity="" RulePicked="" SKU="" UOM=""
Visible="" LockPrice="" UevValue="" />
</LineItem>
</ConfiguratorBOM>
</Configuration>

Cause

Legacy Comergent application merge with SSFS ( Sterling Selling and Fulfilment Suite )

Resolving the problem

There are solutions available :

1. Extend the outputXML by following the steps in product documentation:

http://pic.dhe.ibm.com/infocenter/ssfs/v9r2/topic/com.ibm.help.custom.apis.doc/API_To_Extend_Output_XML_temp.html


2. Programmatically handle it in the implementation of API call, a case insensitive matching for attributes/tags would be a solution, otherwise:
3. Create a custom service with required API call and an XSL call to transform the output as desired (capitalize the attributes/tags as needed). Some API can be called once or more times to retrieve the existing configurations, some of them can call not for each attribute many times, hence you need to make sure what would be the performance impact.

Example steps:

1. Create a custom service which will have two components - API call to extractPicksFromConfigurationBOM followed by an xslt component.
2. From the custom UI, make a call to the above service instead of calling API extractPicksFromConfigurationBOM.
For example, if a mashup is being used, the mashup definition will look like :
<mashup id="extractPicksFromConfigurationBOM001" transactional="true" mashuptype="XAPI" description="Extract picks from Configuration BOM Api">
<classInformation
name="com.sterlingcommerce.ui.web.platform.mashup.SCUIXAPIMashup" />
<API FlowName="CUSTOM_SERVICE_CREATED_IN_STEP_1">

In the attachment below, we provide translations for 7 API's built for one of the customers including outputXML, XSD, XSLT and output test of the translation ( <name>output_out.xml )


1) processConfigurationPicks
2) getConfigurationModel
3) generateConfigurationBOM
4) extractPicksFromConfigurationBOM
5) validateConfigurationBOM
6) manageConfigurationBOM
7) getConfigurationDetail


This defect was submitted to Engineering Team and is planned to be fixed in a subsequent releases.


Rate this page:

(0 users)Average rating

Document information


More support for:

Sterling Selling and Fulfillment Suite
Mapping and Translation

Software version:

8.0, 8.0.1, 8.0.2, 8.5, 9.0, 9.1, 9.2

Operating system(s):

All

Software edition:

Foundation

Reference #:

1635151

Modified date:

2013-05-21

Translate my page

Machine Translation

Content navigation