cancel
Showing results for 
Search instead for 
Did you mean: 

XML entities in xs:base64Binary

Former Member
0 Kudos

Hi there,

this is my first Post, and i hope i am at the right place in this forum.

I am integrating a third party application, that provides WSDL files for generating web services. An internal Web Service is creating an XML which is than encoded via base64 an sent as a SOAP message to the application.

So the SOAP message contains an element (type xsd:base64Binary) in wich the base64 content is transported. The problem is, that in this base64 string, there are xml entities 
 instead of the allowed base64 whitespace characters.

Can anyone give me a hint, if these character entities can be supressed?

Best

Thomas

Accepted Solutions (0)

Answers (2)

Answers (2)

stefan_grube
Active Contributor
0 Kudos

To be able to give you a good advise, it is necessary to understand the full scenario.

That means: you is sender and receiver of the message, which adapter is used.

How come the hex 0A values into the message and why do they cause problems?

Some base64 algorithms add a new line after 72 characters to make the XML more readable.

If the web service adds those characters, the receiver has to accept it.

Otherwise the sender should not add them.

Former Member
0 Kudos

Hi,

Sorry, but i think i cant do search and replace here.

@David: the SOAP message containing the base64Binary element is sent from SAP to the application. It is created by a consumer proxy we generated from the WSDL files provided by the third party application (namely StreamServe) . The application cant handle the character entities 
 the base64 string contains.

We also regenerated the proxy class, but there ist still a mapping from the xml schema type xsd:base64Binary to ABAP RAWSTRING.

This error (or these character entities) occur, since we upgraded to EHP1, so i think there might be the cause for this behaviour.

Best

Thomas

former_member181985
Active Contributor
0 Kudos

Better use your own schema for the ABAP client proxy. Use STRING xsd type for BASE64 content.

and once message into XI from SAP via proxy map it to the target webservice schema.

Check my WIKI section, here i used RFC.

https://wiki.sdn.sap.com/wiki/display/XI/HowtoSendBinaryDatatoRFCfromXI%28or%29PI

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>Can anyone give me a hint, if these character entities can be supressed?

&#xA represents next line. One way of suppressing this is using udf something as below

Example:

String str =" Hello &#xA world"
str.replace("&#xA",  ""):
return str;

Other option is using Java mapping or XSLT mapping based on your data requirement.

Note: Add ; at the end of &#XA in coding. The editor displays next line if I say