Application Development 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: 

Help com RFC - parameter Xstring

carlos_valentini3
Participant

erros-xstring.pngGood Morning.

I am creating an RFC and managed an Enterprise Service (SOAP)

The RFC should receive a parameter of type Xstring. This parameter will convert to binary (SCMS_XSTRING_TO_BINARY).

However when testing, the error of the attached image is occurring.

How can I pass an Xtring value as a parameter?

1 ACCEPTED SOLUTION

carlos_valentini3
Participant

As suggested by Sandra Rossi I am passing as string and inside the RFC again converting to xstring, the error has been solved. Thank you all.

5 REPLIES 5

Tomas_Buryanek
Active Contributor

Everything we can tell you is in the error message.

Somewhere in your program you are probably trying to decode Base64 string and it fails.

-- Tomas --

Sandra_Rossi
Active Contributor

The first bytes "89504E47..." in your log, correspond to the bytes of a PNG file, but they are not encoded in base64. If you define a parameter of type XString, and you create a Web service around, then SAP framework expects a Base64 string and decodes it into an Xstring. Solution: call your web service with your PNG encoded into Base64. Another solution, maybe, is to map to a different type in your service definition (tab "Types").

isuru_fernando24
Explorer

I would check the possibility of encoding and decoding using ABAP class CL_HTTP_UTILITY.

isuru_fernando24
Explorer
0 Kudos

I would check the possibility of encoding and decoding to base64 using CL_HTTP_UTILITY.

carlos_valentini3
Participant

As suggested by Sandra Rossi I am passing as string and inside the RFC again converting to xstring, the error has been solved. Thank you all.