IBM Support

How do I invoke a custom API in 4.0 (Denali)?

Troubleshooting


Problem

How do I invoke a custom API in 4.0 (Denali)?

Symptom

PART: WMS 5.1.1 SP1 DCS
COMPONENT: <None>
OS: <None> - <None>
DATABASE: <None> - <None>
WEB SERVER: -
WEB BROWSER: -

How do you invoke a custom API in 4.0?

Cause

Resolving The Problem

Two interfaces are exposed within the InteropFramework for calling apis:
com.yantra.interop.japi.YIFApi and
com.yantra.integration.adapter.client.GenericClient

Factory classes are provided for each of the above interfaces :
com.yantra.interop.japi.YIFClientFactory for YIFApi and
com.yantra.integration.adapter.client.ClientFactory for GenericClient.

Why do we have two different interfaces for accessing the apis ?
Here are the primary considerations:
1. To invoke an api, the transport protocol is the primary consideration.
2. The transport protocol is determined by the physical location of the client calling the api
a) The client is outside a firewall, and therefore can access the Yantra application only via HTTP
b) The client is outside a firewall, and would like to access the Yantra application via EJB.
c) The client is inside the firewall, and would like to use EJB transport to benefit from the load balancing features of EJB
d) The client is inside the firewall, and would like to use the HTTP transport to benefit from the load balancing features provided by
the HTTP server.
e) The client is inside the firewall, and would like to invoke apis asynchronously, by placing the messages into an asynchronous medium, such as a JMSQueue, MSMQ Queue, or the Yantra Import table.

The YIFApi interface is applicable in cases a, b, c, and d. The client need not have access to the database at all to invoke
Yantra apis for cases a, b, c, and d. The client need not install the yantra application in the above cases.

In case of b, to use EJB outside a firewall, the weblogic proprietary transport protocol (called T3) needs to be tunneled. Weblogic documents the steps needed to tunnel this protocol via a firewall.
YIFApi is the recommended approach for the above cases, even invoking the custom apis that a user may have configured in the Interoperability Framework.

The GenericClient interface assumes that the client has full access to the Yantra database, that is the client has a complete installation of the Yantra application on his machine (which naturally assumes that the client machine has access to the Yantra database too).

For asynchronous integrations (using JMS, MSMQ or Database), usage of the GenericClient interface is the ONLY approach. So the GenericClient can only be used if the client has full Yantra install.

However, the GenericClient can also be used for cases c, d and e and that is an implementation choice - the assumption being that
the client has installed Yantra. The recommended approach, however, for synchronous transports (be it within a firewall or outside a firewall) is YIFApi.

The YFSEnvironment has setadaptername and system as methods; you use these methods for setting adaptername and system.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI48658

Product Synonym

[<p><b>]Fact[</b><p>];

Document Information

Modified date:
16 June 2018

UID

swg21527905