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

mapping and looping dynamic response value

  • 1.  mapping and looping dynamic response value

    Posted 03/12/20 10:17 AM

    Hi, I have a case to mapping document to dynamic response (in json format) and then looping it. For example:

    {
    “paths”: {
    “/”: {
    “get”: {
    “summary”: “GET”,
    “description”: “”,
    “operationId”: “”,
    “produces”: [
    “application/json”
    ],
    “responses”: {},
    “scopes”: [“scoperead”],
    “enabled”: true
    },
    “put”: {
    “summary”: “PUT”,
    “description”: “”,
    “operationId”: “”,
    “produces”: [
    “application/json”
    ],
    “responses”: {},
    “scopes”: [“scopewrite”],
    “enabled”: true
    },
    “enabled”: true
    },
    “/responseBad”: {
    “put”: {
    “description”: “Bad Bad”,
    “consumes”: ,
    “responses”: {},
    “enabled”: true
    },
    “post”: {
    “description”: “Bad Bad”,
    “consumes”: ,
    “responses”: {},
    “enabled”: true
    },
    “parameters”: ,
    “enabled”: true
    },
    “/responseGood”: {
    “get”: {
    “summary”: “GET”,
    “description”: “”,
    “operationId”: “”,
    “produces”: [
    “application/json”
    ],
    “responses”: {},
    “scopes”: [“scoperead”],
    “enabled”: true
    },
    “post”: {
    “consumes”: ,
    “responses”: {},
    “enabled”: true
    },
    “parameters”: ,
    “enabled”: true
    }
    }
    }

    from above sample, I need to mapping this response value (dynamic response) to document and looping from the “/” or “responseBad” (the operation name is dynamic) then “get” or “put” then cek the value of “summary” if “GET” then add a new node “scopes”: [“scoperead”] if “PUT” then add new node “scopes”: [“scopewrite”]. How can I implement this?

    Thanks


    #Integration-Server-and-ESB
    #webMethods