webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Trading network access via API

  • 1.  Trading network access via API

    Posted Mon February 26, 2024 04:36 AM

    10.15

    Hi guys,

    We have just upgraded our env in our lab and wanted to do a PoC.

    As a part of the task, we have created 2 partner profiles (Sender and Reciever) in our Trading network. We also created Document Types and Processing rules with two modes of delivery 1. API 2. Batch (Via ATS)

    We, also, could successfully run the ATS → TN flow successfully. However, we are interested in knowing, if there is a way, we could start the same TN flow using an API.

    We went through a tech community arcticle where it depicted how APIs can be added at partner and Partner group level etc but we couldn’t successfully access TN via an API hosted on the API GW as yet and need some guidance.

    Please note that we have followed the steps mentioned in the following article:

    Please let us know if we have to do something specific in our API routing policy in addition to what given in the article

    Regards


    #webMethods
    #API-Gateway
    #API-Management
    #Integration-Server-and-ESB
    #B2B-Integration


  • 2.  RE: Trading network access via API

    Posted Mon February 26, 2024 11:57 AM

    wm.tn:receive is callable via HTTP – has been an “API” from the beginning.

    You’ll want to consider creating your own TN entry point, rather than allowing other application to call wm.tn:receive directly. I think there are various threads on the forums that cover why that can be beneficial.


    #Integration-Server-and-ESB
    #API-Gateway
    #webMethods
    #B2B-Integration
    #API-Management


  • 3.  RE: Trading network access via API

    Posted Tue February 27, 2024 10:37 AM

    Hi,

    one reason is, that you can protect you own entry points with custom ACLs while wm.tn:receive is protected by a central “TN Users” ACL.

    See TN Users Guide and/or TN Built-In-Services Reference for details.

    Regards.
    Holger


    #API-Management
    #webMethods
    #B2B-Integration
    #API-Gateway
    #Integration-Server-and-ESB


  • 4.  RE: Trading network access via API

    Posted Wed February 28, 2024 10:16 AM

    I totally follow the comment. But somehow, I am not able to send an XML (application/xml) over rest using restV2 resource. My service receives blanks. I tried with the document, object, string everything in the signature. while I can easily pass & process JSON documents.

    My watt.server.http.xmlFormat is set as node by default.

    Please help. This is a bit frustrating.


    Thanks


    #API-Gateway
    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods
    #API-Management


  • 5.  RE: Trading network access via API

    Posted Wed February 28, 2024 11:23 AM

    Have you tried using the invoke directive instead of restv2? I’m not sure using restv2 provides any value in this case.

    http://yourhost.com:5555/invoke/tradingNetwork/receive


    #API-Gateway
    #Integration-Server-and-ESB
    #webMethods
    #API-Management
    #B2B-Integration


  • 6.  RE: Trading network access via API

    Posted Wed February 28, 2024 02:55 PM

    Tried INVOKE too but still the XML isnt passed to the service :frowning:


    #webMethods
    #API-Management
    #API-Gateway
    #Integration-Server-and-ESB
    #B2B-Integration


  • 7.  RE: Trading network access via API

    Posted Wed February 28, 2024 03:18 PM

    Can you share what you’ve done to determine the state of the pipeline when the service is called? What is the response being returned?


    #API-Gateway
    #Integration-Server-and-ESB
    #B2B-Integration
    #API-Management
    #webMethods


  • 8.  RE: Trading network access via API

    Posted Fri March 01, 2024 09:23 AM

    Hi Dhiraj,

    I also agree with Reamon and call should be tried with either using invoke/wm.tn/receive or invoke/wm.tn.doc.xml/routeXml and with node object in the pipeline you don’t have to explicit mapping either…ofcourse must is Content-type=“application/xml” and post method.

    HTH,
    RMG


    #B2B-Integration
    #API-Management
    #API-Gateway
    #webMethods
    #Integration-Server-and-ESB


  • 9.  RE: Trading network access via API

    Posted Fri March 01, 2024 10:25 AM


  • 10.  RE: Trading network access via API

    Posted Fri March 01, 2024 11:39 AM

    How are you checking your service to see if the XML is being received or not? To get XML into TN requires specific conditions, so you probably want to verify that your service is getting the XML first, without calling TN. Try to use nodeToDocument first or some other operation (XQL query) to confirm the XML is received. Then you can work out how to pass it as needed to TN.


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods
    #API-Management
    #API-Gateway