Parse http response for DataTable (Server side processing)

Parse http response for DataTable (Server side processing)

niemand23niemand23 Posts: 4Questions: 2Answers: 0

Hello,

I am currently trying to implement server side processing as I often get too many results which leads to browser freezing.
The problem is that I always get a http response in form of html from server and not JSON like this one
(I am invoking a webMethods flow which returns a JSON string with the required format - I don't know if you are familiar with webMethods :) )
:

<BODY bgcolor=#dddddd>
<TABLE bgcolor=#dddddd border=1>
<TR>
<TD valign="top"><B>JSON</B></TD>
<TD> <JSON string> </TD>
</TR>
</TABLE>
</BODY>

The actual required JSON string is inside the html table returned as response
What I am trying to achieve is to get the JSON String from the html table from the http response, parse it as JSON and use it for my DataTable. Do you have any idea if this can be achieved?

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Is there no way to get webMethods to just return plain JSON. That would really be the best way to do it. For that you would need to ask in a WebMethods forum.

    Allan

  • niemand23niemand23 Posts: 4Questions: 2Answers: 0

    Hi Allan,

    Thanks for the answer. I will ask around but I believe this is the only supported format for the http response when invoking a webMethods flow. If it were to parse the html response would it be difficult?

  • niemand23niemand23 Posts: 4Questions: 2Answers: 0

    I just got an answer from the webMethods forms and there is a way of receiving JSON http response. Tested it and works great. Now I can see that my scripts which took some values from the datatable (when selecting a row) are not working anymore. Guess it is different when server side processing is in place right?

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Out of interest, what was the way to configure the server-side script to return just plain JSON?

    Now I can see that my scripts which took some values from the datatable (when selecting a row) are not working anymore. Guess it is different when server side processing is in place right?

    Possibly - I'm afraid I'm not sure what you mean by "took some values from the datatable" though. Do you have a form in the table or something else. A link to the page showing the issue would be really helpful.

    Allan

This discussion has been closed.