webMethods

 View Only
Expand all | Collapse all

REST API Descriptor

webMethods Community Member

webMethods Community MemberTue March 01, 2022 01:26 AM

  • 1.  REST API Descriptor

    Posted Mon February 28, 2022 08:54 AM

    Hello,
    we did not receive the data Rest API descriptor in flow service by using postman tool.

    Can you please help me on this?

    Thanks and Regards
    Kanaka Rao Darsi

    Do you get any error messages? Please provide a full error message screenshot and log file.


    #REST
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: REST API Descriptor

    Posted Mon February 28, 2022 09:11 AM

    Hi @kanakarao ,

    Can you please elaborate on your issue? What is the use case? What API are you trying to invoke to get the Rest API Descriptor? Please share the exact steps and the error you are facing and what are your expectations?

    Please fill out in the format.

    • What product/components do you use and which version/fix level?
    • Are you using a free trial or a product with a customer license?
    • What are trying to achieve? Please describe in detail.
    • Do you get any error messages? Please provide a full error message screenshot and log file

    Thanks,
    Sree


    #Integration-Server-and-ESB
    #webMethods
    #REST


  • 3.  RE: REST API Descriptor

    Posted Mon February 28, 2022 09:40 AM

    Hello,

    • What product/components do you use and which version/fix level?
      A) we are using 10.11
    • Are you using a free trial or a product with a customer license?
      A) licensed version
    • What are trying to achieve? Please describe in detail.
      A) we are created REST Descriptor with openAPI 3.0 version and it is created rad and resource and services and doctype also.
      when we are testing the postman below url status showing 200 Ok but not receiving Data in the flow services.

    services not receiving the data

    • Do you get any error messages? Please provide a full error message screenshot and log file
      A) we have not received any error log.

    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 4.  RE: REST API Descriptor

    Posted Mon February 28, 2022 11:47 AM

    As Sree has mentioned , elaborating your usecase will definitely help.

    • When you mention that you are not receiving the data in the flow services, what data are you sending from postman?
    • Is this a GET request or a POST request. Does it match the mapping in the Rest API Descriptor?
    • Have you tried invoking the flow service directly through invoke directive , e.g, /invoke/folder:serviceName and check if the data is available?

    -NP


    #Integration-Server-and-ESB
    #webMethods
    #REST


  • 5.  RE: REST API Descriptor

    Posted Mon February 28, 2022 03:19 PM

    How did you determine that the FLOW service did not receive data? What does the service do?


    #webMethods
    #REST
    #Integration-Server-and-ESB


  • 6.  RE: REST API Descriptor

    Posted Mon February 28, 2022 09:49 PM

    Hello,

    This is POST services. please find the below screenshot for your references.

    image
    .


    #REST
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: REST API Descriptor

    Posted Mon February 28, 2022 11:34 PM

    Hi @kanakarao,

    There are 2 scenarios in webMethods Integration Server supporting the OpenAPI 3.0.

    1. OpenAPI Provider - When you import an OpenAPI document as a provider you will have to do the implementation of the services to be returned when the API is invoked because you are acting as the service provider. If you haven’t done any implementation after importing the OpenAPI document then you would not have anything to be returned as part of the service invocation

    2. OpenAPI Consumer - When you import an OpenAPI document as a consumer you are creating just a consumer (client) of an already provided server.

    Let me know, which one you are using it as. Also, it would help if you could provide a screenshot of what you are providing in postman for the request and also what is the service implementation (if you have done it). If you could share the OpenAPI document and the API you are invoking, we could give it a try and let you know how it works.

    Thanks,
    Sree


    #REST
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: REST API Descriptor

    Posted Mon February 28, 2022 11:57 PM

    @kanakarao , In addition to the above steps, You can also try with a sample request that points eventually to a simple service, In this service, you can have a pub.flow:tracePipeline to check what is the available in the pipeline.
    Then compare with a direct /invoke on the same service if you see the same data.

    -NP


    #Integration-Server-and-ESB
    #webMethods
    #REST


  • 9.  RE: REST API Descriptor

    Posted Tue March 01, 2022 01:21 AM

    Open API we have openapi 3.0 document file imported. when taking the service.

    rad/notify:rad_API:cameras


    #webMethods
    #REST
    #Integration-Server-and-ESB


  • 10.  RE: REST API Descriptor

    Posted Tue March 01, 2022 01:26 AM


  • 11.  RE: REST API Descriptor

    Posted Tue March 01, 2022 01:34 AM

    Again, yes we can import the OpenAPI Document as “Provider” or as “Consumer”. Please see attached screenshot.

    And can you please attach the service pipeline? Or the generated folder structure from designer?


    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 12.  RE: REST API Descriptor

    Posted Tue March 01, 2022 01:56 AM


  • 13.  RE: REST API Descriptor

    Posted Tue March 01, 2022 02:03 AM

    Ok. After you have imported the OpenAPI document as Provider, did you do the implementation in the service? Ideally, when you open one of the POST_** services you would add some steps into it and also do the mapping to the output. Please check how the implementation is been done and whether data is set to the output of the service. You could simply run the service by right click on it and selecting “Run Service”. If the implementation is there, you would see the output. Let know how it worked.


    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 14.  RE: REST API Descriptor

    Posted Tue March 01, 2022 02:13 AM

    we are not receiving the data POST_cameraAlarm_svc1 services

    please help me on this?


    #webMethods
    #Integration-Server-and-ESB
    #REST


  • 15.  RE: REST API Descriptor

    Posted Tue March 01, 2022 02:21 AM

    Hello,

    Yes, I have implemented services just document to json string and debug log also. but services receiving empty data.

    i have given some data through postman.
    image


    #REST
    #webMethods
    #Integration-Server-and-ESB


  • 16.  RE: REST API Descriptor

    Posted Tue March 01, 2022 02:22 AM

    @kanakarao we could certainly help only when we have the required information. Please do the following

    1. Open POST_cameraAlarm_svc1 in Designer (attach the screenshot)
    2. Open the pipeline view for this service in Designer (attach the screenshot)

    OR

    1. Run the service directly in the Designer and attach the screenshot of the results.

    OR

    1. If you could attach the openAPI document.

    If we know what is in the service then only we can analyze and see what is happening.

    Thanks,
    Sree


    #webMethods
    #REST
    #Integration-Server-and-ESB


  • 17.  RE: REST API Descriptor



  • 18.  RE: REST API Descriptor

    Posted Tue March 01, 2022 02:40 AM


  • 19.  RE: REST API Descriptor

    Posted Tue March 01, 2022 03:59 AM

    Hello,

    I have sent meeting invite


    #REST
    #Integration-Server-and-ESB
    #webMethods


  • 20.  RE: REST API Descriptor

    Posted Tue March 01, 2022 09:27 AM

    You don’t need to use documentToJSONString in your service as long as the Content-Type is set to ‘application/json’
    The API layer will convert http payload to a wm document implicitly and place that in the pipeline. However you need to make sure that the service signature matches it identically, otherwise it will get removed.
    regards,
    John.


    #REST
    #Integration-Server-and-ESB
    #webMethods


  • 21.  RE: REST API Descriptor

    Posted Tue March 01, 2022 08:16 AM

    hi @kanakarao

    As discussed, please check after installing the latest fixes on 10.11 and let me know if it resolved your scenario.

    Thanks,
    Sree


    #Integration-Server-and-ESB
    #webMethods
    #REST


  • 22.  RE: REST API Descriptor

    Posted Tue March 01, 2022 09:46 AM

    Hi All
    we have installed latest fixes. when we changed the extended setting jsonformat “parsed” it is working find but we are implemented so many flow services “jsonStreamToDocument”. the json format is Stream. why we have given in json format given stream rad API it is not working. Can you please suggest me.

    Thanks and Regards
    Kanaka


    #webMethods
    #Integration-Server-and-ESB
    #REST


  • 23.  RE: REST API Descriptor

    Posted Tue March 01, 2022 09:54 AM

    As I said you don’t need to use jsonStreamToDocument at all. As long as the content type is set properly your service will already have the data in the pipeline formatted as webMethods attributes correctly.
    regards,
    John.


    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 24.  RE: REST API Descriptor

    Posted Tue March 01, 2022 11:04 AM

    Hi,

    if we have change the extended setting “watt.server.http.jsonformat”=stream we are not hitting services.

    we have already implemented so many services “watt.server.http.jsonformat”=stream only, if now we have changed value in parsed it will impact so many flow services.

    please help me with this?

    Thanks and Regards
    Kanaka


    #REST
    #Integration-Server-and-ESB
    #webMethods


  • 25.  RE: REST API Descriptor

    Posted Tue March 01, 2022 11:17 AM

    Sorry I didn’t realise that you changed the watt property.
    In which case you need to assume that the input is called jsonStream
    e.g.

    Then map the output to the input that has been generated for your service.
    Call a tracePipeline to check everything at the end.

    This worked for me.
    regards
    John.


    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 26.  RE: REST API Descriptor

    Posted Tue March 01, 2022 12:32 PM

    Hello,

    If we use http call invoke jsonStreamToDocument it is working fine me also but when we using rest API descriptor in rad we are not receiving the data. Changed the watt.server.http.jsonformat in extended setting in value “parsed” data we are receiving. we don’t need change watt.server.http.jsonformat=stream rest API descriptor also need work.

    please help with this?

    Thanks and Regards
    Kanaka


    #webMethods
    #Integration-Server-and-ESB
    #REST


  • 27.  RE: REST API Descriptor

    Posted Tue March 01, 2022 12:47 PM

    Can you please paste the request that you are using, you should be able to export it as a curl statement from tools such as postman.

    Also post a screenshot of your pipeline where you are calling jsonStreamToDocument (see my example above). Also add a savePipeline to the line following your jsonStreamToDocument. You can then view the resulting pipeline by calling restorePipeline service after from Designer. Also post a screenshot of that too.

    As I said it works for me, including both invoke and rad executions.

    regards,
    John.


    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 28.  RE: REST API Descriptor

    Posted Tue March 01, 2022 01:00 PM

    Hello,

    Can you please provide the your id i will connect and show you in Teams

    Thanks and Regards
    Kanak


    #REST
    #Integration-Server-and-ESB
    #webMethods


  • 29.  RE: REST API Descriptor

    Posted Wed March 02, 2022 12:10 AM

    Probably, create a Support Incident and let this get checked.

    Thanks,
    Sree


    #Integration-Server-and-ESB
    #REST
    #webMethods


  • 30.  RE: REST API Descriptor

    Posted Wed March 02, 2022 02:18 AM

    Request payload handing for Open API request is based on the JSONFormat=Parsed.

    With format set to stream, request payload wont be parsed and mapped to input signature. Even having JSonSTreamTo Document wont help for Open API requests.

    Please get an support Incident created to get this use cases handled.


    #webMethods
    #REST
    #Integration-Server-and-ESB