Skip to Content
0

Set complete body/payload of C4C request for web service integration w/o complex field mapping?

May 19, 2017 at 08:35 AM

137

avatar image

Hi,

We are looking at creating a webservice integration where C4C is trying to send data to a ECC via HCI. We have created the External Service definition in C4C and the related objects Scenario+Arrangements. The data that we have to send is already formatted in XML in an attachment in the BO and we have read that attachment data and have it available in the variable in the action script. since the data contains of a large structure and it would take many lines of code to assign each individual element from the variable field to the C4C request structure, we wanted to directly assign the payload or body element of the C4C request with the data in the variable. But we are not able to do that as ABSL gives an error is we assign the variable to the Request structure. Is there a function or method in C4C which will allow us to set the complete body or payload of the C4C request with the variable value?


The XML has values like '<cart domain="00D15" id="442"> ....' which when assigned to a field in the web service integration structure get converted to '

'. This is if we try to create a structure with just the top level field and try to assign the remaining payload as a field value.

We also tried by trying to insert a CDATA tag to preserve the xml values, but the tag itself gets converted when assigned to the top level field value.

Hence we are looking for a way to assign the complete payload to the request rather than having to assign the fields.

We have done similar integration with Salesforce and there we were able to use the function req.setBody(bodyRequest); to set the complete body with the value and do away with having to map each individual field.

Please let us know if there is a way to achieve this.

Regards,

Vipin

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

0 Answers