Fixed the issue by adding <xmp> tags inside the .jag file for the
respective gadget.

e.g.

        function createTableJSON(result) {
            var len = result.length;
            var rows = [];
            var columnNames = []
            for (var i = 0; i < len; i++) {
                var obj = result[i];
                var row = []
                for(var k in obj) {
                    if ({}.hasOwnProperty.call(obj, k)) {
                        if (i == 0) {
                            columnNames.push(k);
                        }

                        var str  = js.vkbeautify.prototype.xml(obj[k]);
                        row.push("<xmp>"+str+"</xmp>");
                    }
                }
                rows.push(row);
            }
            return {Rows: rows, ColumnNames : columnNames};
        }

Thanks.

Sandamal Weerasinghe | Software Engineer | WSO2 Lanka (Pvt) Ltd


On Fri, Aug 29, 2014 at 6:51 PM, Senduran Balasubramaniyam <
[email protected]> wrote:

> Hi Sandamal,
> I think even when the soap message is coming to the UI, the <soapenv:Body>
> or <ns:getVersionResponse> tags are not recognized by the  browser (you
> can check the raw xml by pressing F12 in Chrome)
> to show the soap message as it is, put the entire message inside a '
> *textarea*' tag.
>
> eg:
>  *<textarea> *
>  <soapenv:Body 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><ns:getVersionResponse
> xmlns:ns="http://version.services.core.carbon.wso2.org";><return>WSO2
> Enterprise Service Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
> *</textarea>*
>
> will show as
>
> <soapenv:Body 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><ns:getVersionResponse
> xmlns:ns="http://version.services.core.carbon.wso2.org";><return>WSO2
> Enterprise Service Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
>
> (please apply styles to textarea to show in a nicer way)
>
>  Regards
> Senduran
>
>
> On Fri, Aug 29, 2014 at 6:48 PM, Senduran Balasubramaniyam <
> [email protected]> wrote:
>
>> Hi Sandamal,
>> I think even when the soap message is coming to the UI, the
>> <soapenv:Body> or <ns:getVersionResponse> tags are not recognized by
>> the  browser (you can check the raw xml by pressing F12 in Chrome)
>> to show the soap message as it is, put the entire message inside a '
>> *textarea*' tag.
>>
>> eg:
>>  *<textarea> *
>>  <soapenv:Body 
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><ns:getVersionResponse
>> xmlns:ns="http://version.services.core.carbon.wso2.org";><return>WSO2
>> Enterprise Service Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
>> *</textarea>*
>>
>> will show as
>>
>> <soapenv:Body 
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><ns:getVersionResponse
>> xmlns:ns="http://version.services.core.carbon.wso2.org";><return>WSO2
>> Enterprise Service Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
>>
>> (please apply styles to textarea to show in a nicer way)
>>
>>  Regards
>> Senduran
>>
>>
>> On Fri, Aug 29, 2014 at 6:21 PM, Senduran Balasubramaniyam <
>> [email protected]> wrote:
>>
>>> Hi Sandamal,
>>> I think even when the soap message is coming to the UI, the
>>> <soapenv:Body> or <ns:getVersionResponse> tags are not recognized by
>>> the  browser (you can check the raw xml by pressing F12 in Chrome)
>>> to show the soap message as it is, put the entire message inside a '
>>> *textarea*' tag.
>>>
>>> eg:
>>>  *<textarea> *
>>>  <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>>> "><ns:getVersionResponse xmlns:ns="
>>> http://version.services.core.carbon.wso2.org";><return>WSO2 Enterprise
>>> Service Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
>>> *</textarea>*
>>>
>>> will show as
>>>
>>> <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
>>> "><ns:getVersionResponse xmlns:ns="
>>> http://version.services.core.carbon.wso2.org";><return>WSO2 Enterprise
>>> Service Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
>>>
>>> (please apply styles to textarea to show in a nicer way)
>>>
>>> Regards
>>> Senduran
>>>
>>>
>>> On Fri, Aug 29, 2014 at 6:01 PM, Sandamal Weerasinghe <[email protected]
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to display a SOAP body and its header inside a table.
>>>>
>>>> e.g.
>>>> <soapenv:Body 
>>>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><ns:getVersionResponse
>>>> xmlns:ns="http://version.services.core.carbon.wso2.org";><return>WSO2
>>>> Enterprise Service 
>>>> Bus-4.8.1</return></ns:getVersionResponse></soapenv:Body>
>>>>
>>>>
>>>> Even though UI the gets an XML message, only the content inside the xml
>>>> tags are displayed in the table
>>>>
>>>> e.g.
>>>> WSO2 Enterprise Service Bus-4.8.1
>>>>
>>>> Is there a way to overcome this?
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> Sandamal Weerasinghe | Software Engineer | WSO2 Lanka (Pvt) Ltd
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Senduran *
>>> Software Engineer,
>>> WSO2, Inc.;  http://wso2.com/ <http://wso2.com/>
>>> Mobile: +94 77 952 6548
>>>
>>
>>
>>
>> --
>> *Senduran *
>> Software Engineer,
>> WSO2, Inc.;  http://wso2.com/ <http://wso2.com/>
>> Mobile: +94 77 952 6548
>>
>
>
>
> --
> *Senduran *
> Software Engineer,
> WSO2, Inc.;  http://wso2.com/ <http://wso2.com/>
> Mobile: +94 77 952 6548
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to