function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kittu9kittu9 

How to display HttpResponse result in vf page

res = http.send(req);
       pdf=res.getBody();

 

Getting Result every thing fine. But displaying that text in vf page got problem. The text displaying like below in the vf page. How to display result in proper format??????

 

<?xml version='1.0' ?> <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Body>
<env:Fault> <faultcode>env:Client</faultcode> <faultstring>Internal Error</faultstring> </env:Fault>
</env:Body> </env:Envelope>

 

 

gbu.varungbu.varun

Hi,

 

If you are getting response and It is in XML format you should parse the response using XmlStreamReader class. You should retrive content from XML.

 

You can find more detail here:

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http_httpresponse.htm

 

 

Thanks,

Varun