Skip to content

Latest commit

 

History

History
179 lines (174 loc) · 7.58 KB

4.OutputBuilders.md

File metadata and controls

179 lines (174 loc) · 7.58 KB

All 3 available output builders are

  • JsObjBuilder
  • JsArrBuilder
  • JsMinArrBuilder

Output builders

You can use provided output builds or your own output builder.

JsObjOutputBuilder

{
    "soap:Envelope": {
        "@_xmlns:soap": "http://schemas.xmlsoap.org/soap/envelope/",
        "soap:Body": {
            "rpt:loadReportFileResponseElem": {
                "@_xmlns:s": "http://bus.x.com/common/support/v1",
                "@_xmlns:rpt": "http://bus.x.com/service/statement/v1",
                "s:code": 0,
                "s:responseTime": 2588,
                "s:responseDbTime": 1893,
                "s:requestId": "6b408fd09eb211e7a0807e34820340ec",
                "s:route": "172.16.x.x:9192",
                "rpt:result": {
                    "rpt:file": "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n    <soap:Body>\n        <rpt:loadReportFileResponseElem\n                xmlns:s=\"http://bus.x.com/common/support/v1\"\n                xmlns:rpt=\"http://bus.x.com/service/statement/v1\">\n            <s:code>0</s:code>\n            <s:responseTime>2588</s:responseTime>\n            <s:responseDbTime>1893</s:responseDbTime>\n            <s:requestId>6b408fd09eb211e7a0807e34820340ec</s:requestId>\n            <s:route>172.16.x.x:9192</s:route>\n            <rpt:result>\n <rpt:file></rpt:file>\n            </rpt:result>\n        </rpt:loadReportFileResponseElem>\n    </soap:Body>\n</soap:Envelope>"
                }
            }
        }
    }
}

JsArrBuilder

{
    "tagname": "soap:Envelope",
    "child": [
        {
            "tagname": "soap:Body",
            "child": [
                {
                    "tagname": "rpt:loadReportFileResponseElem",
                    "child": [
                        {
                            "tagname": "s:code",
                            "child": [
                                {
                                    "#text": 0
                                }
                            ]
                        },
                        {
                            "tagname": "s:responseTime",
                            "child": [
                                {
                                    "#text": 2588
                                }
                            ]
                        },
                        {
                            "tagname": "s:responseDbTime",
                            "child": [
                                {
                                    "#text": 1893
                                }
                            ]
                        },
                        {
                            "tagname": "s:requestId",
                            "child": [
                                {
                                    "#text": "6b408fd09eb211e7a0807e34820340ec"
                                }
                            ]
                        },
                        {
                            "tagname": "s:route",
                            "child": [
                                {
                                    "#text": "172.16.x.x:9192"
                                }
                            ]
                        },
                        {
                            "tagname": "rpt:result",
                            "child": [
                                {
                                    "tagname": "rpt:file",
                                    "child": [
                                        {
                                            "#text": "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n    <soap:Body>\n        <rpt:loadReportFileResponseElem\n                xmlns:s=\"http://bus.x.com/common/support/v1\"\n                xmlns:rpt=\"http://bus.x.com/service/statement/v1\">\n            <s:code>0</s:code>\n            <s:responseTime>2588</s:responseTime>\n            <s:responseDbTime>1893</s:responseDbTime>\n            <s:requestId>6b408fd09eb211e7a0807e34820340ec</s:requestId>\n            <s:route>172.16.x.x:9192</s:route>\n            <rpt:result>\n <rpt:file></rpt:file>\n            </rpt:result>\n        </rpt:loadReportFileResponseElem>\n    </soap:Body>\n</soap:Envelope>"
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    ":@": {
                        "@_xmlns:s": "http://bus.x.com/common/support/v1",
                        "@_xmlns:rpt": "http://bus.x.com/service/statement/v1"
                    }
                }
            ]
        }
    ],
    ":@": {
        "@_xmlns:soap": "http://schemas.xmlsoap.org/soap/envelope/"
    }
}

JsMinArrBuilder

{
    "soap:Envelope": [
        {
            "soap:Body": [
                {
                    "rpt:loadReportFileResponseElem": [
                        {
                            "s:code": [
                                {
                                    "#text": 0
                                }
                            ]
                        },
                        {
                            "s:responseTime": [
                                {
                                    "#text": 2588
                                }
                            ]
                        },
                        {
                            "s:responseDbTime": [
                                {
                                    "#text": 1893
                                }
                            ]
                        },
                        {
                            "s:requestId": [
                                {
                                    "#text": "6b408fd09eb211e7a0807e34820340ec"
                                }
                            ]
                        },
                        {
                            "s:route": [
                                {
                                    "#text": "172.16.x.x:9192"
                                }
                            ]
                        },
                        {
                            "rpt:result": [
                                {
                                    "rpt:file": [
                                        {
                                            "#text": "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n    <soap:Body>\n        <rpt:loadReportFileResponseElem\n                xmlns:s=\"http://bus.x.com/common/support/v1\"\n                xmlns:rpt=\"http://bus.x.com/service/statement/v1\">\n            <s:code>0</s:code>\n            <s:responseTime>2588</s:responseTime>\n            <s:responseDbTime>1893</s:responseDbTime>\n            <s:requestId>6b408fd09eb211e7a0807e34820340ec</s:requestId>\n            <s:route>172.16.x.x:9192</s:route>\n            <rpt:result>\n <rpt:file></rpt:file>\n            </rpt:result>\n        </rpt:loadReportFileResponseElem>\n    </soap:Body>\n</soap:Envelope>"
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    ":@": {
                        "@_xmlns:s": "http://bus.x.com/common/support/v1",
                        "@_xmlns:rpt": "http://bus.x.com/service/statement/v1"
                    }
                }
            ]
        }
    ],
    ":@": {
        "@_xmlns:soap": "http://schemas.xmlsoap.org/soap/envelope/"
    }
}