cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Business connector sending XML data

Former Member
0 Kudos

Dear all,

I am using an RFC to transfer the data from SAP R/3 to web server. I have to send the data to web server URl via SAP Business Connector in the below format.

I am getting data in RFC sttructure, Now I need to change the above data into XMl and hence need to compress.

The requirement is as below:

The XML message is signed, encoded in base64.

Signed and encoded XML message is compressed in GZIP format.

Can u please share your ideas to achieve this.

Thanks and regards,

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

most of the things you say can be done using standard services:

>>The XML message is signed, encoded in base64.

use pub.string:base64Decode to decode

for signing there are some services which I never used yet like:

pub.security.pkcs7:sign

>>message is compressed in GZIP format.

use pub.string:gzip

Regards,

Michal Krawczyk

Former Member
0 Kudos

Dear Michal,

Thank you very much for your quick response.

The above information is very helpful to me. and one more douobt I have,

After invoking RFC we are getting the data in structure nothing but a record list.

How can I convert record list to string?

Is there any standard service?

Please help me.

Thanks and Regards,

Former Member
0 Kudos

You use the standard service pub.web:recordToDocument.

Description: Converts an IData object to a String of XML. This service recurses through a given IData object, building an XML document from the elements within it. Key names are turned into XML elements and the key

values are turned into the contents of those elements.

(the record list is an IData object)

CSY

prateek
Active Contributor
0 Kudos

pub.web:recordToDocument and then

pub.web:documentToString

Regards,

Prateek

Former Member
0 Kudos

Dear Michal and Prateek,

Thank you very much for your ideas.

This is my flow:

clear XML data -> SIgning with detached signature -> Base 64 encode -> send the data via HTTP port.

I am signing the message using pub.security.pkcs7:sign.

But here problem is I am not able to get the detached signature.

If I select the option Detached signature it is giving only signature.

How can I manage the Detached signature and Message at HTTP port.

Please help me.

Thanks and regards,

Former Member
0 Kudos

Thanks a lot Michal.

Answers (0)