Quantcast
Channel: Discussion Forum > Connect Data Services
Viewing all articles
Browse latest Browse all 2504

Unable to parse XML response returned by cURL in Customer Portal (1 Comment)

$
0
0

Topic by Shreyas Pandhari

Content

Hi,

I am unable to parse the response received by using cURL. Having tried all the possible ways to parse the xml response, raising this query on the forum.

Even json object returns NULL, when I try to use json_decode($response);

In addition, it seems CP doesn't support the use of DOMDocument object and SimpleXmlElement() classes as I get the Fatal Error: Class not found.

Below is the code snippet in which I am getting a response but there are issues with the response:

1. The response I am getting is flat text response but not xml, I guess we need to convert the response into xml format using methods like simplexml_load_string($response). But this methods are also not supported in CP. CP version is the latest one and RN version is Feb 14. How to convert the response I get using cURL into xml format?

2. json object get null value in it once i start decoding it (please refer to below code snippet for the same.)

I want to retrieve the particular information from the response like OptyId, Name etc. Really appreciate if anyone can respond to resolve this issue.

Thanks,

Shreyas

Version

Feb 14

Code Block


Viewing all articles
Browse latest Browse all 2504

Trending Articles