IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 02:20 PM

    I am just returning to webMethods development after being away for a few years. I have a JSON file that is in an array format. It is actually the output of a website. When I try to create a JSON Document in the Designer I get an Error on the format. This is a very standard well known site and I have successfully used this site in other environments.

    The error I get while trying to “Create a New JSON Document Type” is:

    Invalid JSON schema: #: expected type is one of Boolean or JSON Object, found: JSON Array

    Link to website is: APOD website


    image

    A copy of the JSON file is attached

    Can anyone help :worried: :worried: :worried: :worried?

    apod.txt (8.4 KB)


    #Integration-Server-and-ESB
    #webMethods-io-Integration
    #webMethods


  • 2.  RE: How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 03:46 PM

    What version of Integration Server are you using? Support for JSON documents with an array at the root was added (I think) in 9.10. The generated doctype will have an array element at its root with a name of $rootArray.

    image


    #webMethods-io-Integration
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 04:01 PM

    Michael, I was testing this to help Page and here are my observations -

    • When I try to create a “JSON Document Type” artefact, both the URL and File options fail with the error message that Page shared (this artefact was not in the 9.x versions)

    • I did succeed by creating the good old “Document Type” and then selecting JSON as the source type; this was successfully created with the structure you have shown above

    Thus, the question is whether JSON Document Type artefact supports creating from JSON Arrays (possible bug, if it does) or not.

    KM


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-io-Integration


  • 4.  RE: How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 10:02 PM

    Thanks Michael, Wouldn’t you know it. I come back to wM after 2 years and find a bug in the first weekend. That’s what I get for trying something new. I will give it the good old fashion try.


    #webMethods
    #webMethods-io-Integration
    #Integration-Server-and-ESB


  • 5.  RE: How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 10:13 PM

    As Venkata said using the New Document type with type JSON on the very same input works. here is the picture of the results.

    image


    #webMethods-io-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 09:59 PM

    !(file:///C:/SoftwareAG/Designer/eclipse/plugins/com.softwareag.common.eclipse_10.7.0.0000-0054/about/sag_logo.png)

    Software AG Designer 10.7


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-io-Integration


  • 7.  RE: How do I create a JSON Array document from a website return or a file?

    Posted 08/30/21 10:30 PM

    Yep. Looks like something the JSON Document Type does not handle, but should. Please create a support ticket. Thanks …Michael


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-io-Integration