Skip to Content
0

Read a C4C Survey in SAP CRM using Web Service Query Survey => Parsing the XML problem !

Mar 15, 2017 at 11:36 AM

103

avatar image

Dear experts,

My scenario is as follows:

C4C connected to SAP CRM OnPremise system.

1) I need to query a completed survey from SAP C4C system into SAP CRM system to retrieve the answers submitted.

2) These answers then to be used in a CRM process.

For this, I thought to use the QuerySurveys web service which I will be calling from SAP CRM Program.

When checking this service in SOAP UI , I am not happy with the response as it has Binary XML representation.

See the picture below ->

I know CRM ABAP classes and functions that can convert an XML into Internal table.

However, I don't know how to parse this XMLRepresentation Binary Object so that I can read the data in ABAP.

Can anyone hint me ?

Also can someone please confirm if XML Representation Binary Object data means XSTRING ?

Many thanks in advance.

Regards

Suchita

response.jpg (152.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Saurabh Kabra
Mar 15, 2017 at 06:35 PM
0

Hi,

Can you please try reuse Library 'Binary'?

Binary.ToBase64String(bin);

Though I haven't used it but you can give it a try if it can resolve your issue?

Thanks

Saurabh

Show 4 Share
10 |10000 characters needed characters left characters exceeded

in addition to this can u please also check this thread;

https://archive.sap.com/discussions/thread/3914097

Thanks

Saurabh

0

Many thanks Saurabh.

The problem is, I am receiving the response in SAP CRM - so I can't use C4C SDK library functions.

I just want to know what XML Binary Object technically is ? thank you for hinting that its base64Binary. I am looking for how do I convert it into normal XML or string/xstring formats so that I can covert it readable data in ABAP.

Regards

Suchita

0

Hi Suchita,

There are many ABAP class which can be used to play Base64 data but most common is

cl_http_utility.

Further details you can check with following links:

https://archive.sap.com/discussions/thread/375670

https://wiki.scn.sap.com/wiki/display/Snippets/Decoding+BASE64+in+ABAP

Thanks

Saurabh

0

Thanks Saurabh.

After consuming the service using SOAMANAGER, I am automatically getting this strange response converted into XSTRING :-) Now XTRING to ABAP itab is very easy.

This is solved.

Many thanks for your time.

0