Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Web Service - How to consume base64Binary parameter?

Former Member
0 Likes
950

Hello,

I`m facing next problem with Web Services.

In received WSDL we have operation X and one parameter (let`s name it "Report") is: type="s:base64Binary" . While doing service consumer in SAP this output parameter ("Report") is  RAWSTRING type.

What we are receiving.

It is file binary read send in base64 format.

Our problem is that we are receiving chars not even similar to these send by other side.

For example they are sending us:

"MDEsMjExMDMwMTA5MDAwMDAwMDAwODMzNTM2NTEsIkFMQklUIJYgdGVzdCBXUyIsIjI3LzEyLzEyIiwiNCIsIjAwIiwwLjY [...]"

and in output structure we can see:

"30312C32313130333031303930303030303030303038333335333635312C22414C42495420962074657374205753222C2232 [...] "

Is it possible SAP is converting it?

I have tried many ways of RAWSTRING -> XSTRING -> STRING on received strings in order to get these which are send with no success.

Maybe someone have any idea what can be wrong or how to solve it?

Hello,

I`m facing next problem with Web Services.

In received WSDL we have operation X and one parameter (let`s name it "Report") is: type="s:base64Binary" . While doing service consumer in SAP this output parameter ("Report") is  RAWSTRING type.

What we are receiving.

It is file binary read send in base64 format.

Our problem is that we are receiving chars not even similar to these send by other side.

For example they are sending us:

"MDEsMjExMDMwMTA5MDAwMDAwMDAwODMzNTM2NTEsIkFMQklUIJYgdGVzdCBXUyIsIjI3LzEyLzEyIiwiNCIsIjAwIiwwLjY [...]"

and in output structure we can see:

"30312C32313130333031303930303030303030303038333335333635312C22414C42495420962074657374205753222C2232 [...] "

Is it possible SAP is converting it?

I have tried many ways of RAWSTRING -> XSTRING -> STRING on received strings in order to get these which are send with no success.

Maybe someone have any idea what can be wrong or how to solve it?

2 REPLIES 2
Read only

Former Member
0 Likes
659

Hi,

Try to convert the base64 encoding. The following link may help:

http://scn.sap.com/thread/124427

Best Regards

Harald

Read only

Former Member
0 Likes
659

Hi Marisuz,

Try this:

1.Use the RFC : SSFC_BASE64_ENCODE

2. Pass the below as input to field : BINDATA  and BINLENG = 0

30312C32313130333031303930303030303030303038333335333635312C22414C42495420962074657374205753222C2232 [...]

3. you will get output:MDEsMjExMDMwMTA5MDAwMDAwMDAwODMzNTM2NTEsIkFMQklUIJYgdGVzdCBXUyIsIjI=

Regards,

A.K.Shyam Sundar