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.

 View Only
  • 1.  JSON Document Type

    Posted Tue June 22, 2021 11:10 AM

    Hi,
    I have a problem with the JSON document type. As an example I just took the “address” from the IS 10.7 documentation (I am not allowed to put the link here…):

    {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "http://example.com/example.json",
    "type": "object",
    "properties": {
    "address": {
    "type": "object",
    "properties": {
    "streetAddress": {
    "type": "string"
    },
    "city": {
    "type": "string"
    }
    }
    },
    "phoneNumber": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "type": {
    "type": "string"
    },
    "number": {
    "type": "number"
    }
    }
    }
    }
    }
    }
    

    So I have loaded the schema and created a JSON Document Type. So far so good.

    When I fill the created address Document Type and convert it to a string via pub.json:documentToJSONString it creates me something like:

    {
    "streetAddress" : "teststr",
    "city" : "test"
    }
    

    But what I basically need is:

    {
    "address": {
    "streetAddress" : "teststr",
    "city" : "test"
    }
    }
    

    Hopefully you can help me on how I have to change the schema or maybe some options.
    Thanks and kind regards,
    Thorben


    #Service-Designer
    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: JSON Document Type

    Posted Tue June 22, 2021 12:49 PM

    Seems I found a solution: if I use a document reference as input (pointing to the JSON Document Type) it is working as expected.


    #Service-Designer
    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB