1. Home
  2. Dokumente
  3. Tutorials
  4. 51. How to pass raw data to custom class for processing with custom code?

51. How to pass raw data to custom class for processing with custom code?

Learning Objective:-

This unit describes:-

  • How to pass raw data to custom class for processing?

How to pass raw data to custom class for processing?

When we get unstructured data that are not XML, CSV or JSON at that time we need to create a custom class. The data can be raw text and do not follow any format. Therefore we cannot parse and create messages. In this case, we pass the raw data to the customer class and the custom class will do everything itself e.g. parse the data, create and post messages.

The unstructured data are for example binary data, windows in the file, etc.

How to use it:-

The procedure is given below with an example:-

  •  Create Integration:-

  • Create Interface:-


  • In Runtime Configuration Section of Interface page, we need to select two things which are shown in the picture given below:-
  1. We need to tick Custom Processing.
  2. And need to enter the Custom Processing class.


  • Create a custom class:-

The custom code is given below to pass raw data to custom class:-


public with sharing class RawDataCustomProcessing extends AbstractIntegrationV3 {

public override String messageProcessing(){

System.debug('>>>>>>RawDataCustomProcessing>messageProcessing>dtoRequestBody: '+dtoRequestBody);

//do raw data in dtoRequestBody

return 'ok';


public override IServicesUtil.IMessageResult createMessage(AbstractIntegrationV3.DtoRequestBody dtoRequestBody,

AbstractIntegrationV3.DtoStructure dtoStr){

return null;




  • We can use dtoRequestBody to do the complex logic that payload defined dtoRequestBody structure is as below:-
global class DtoRequestBody{
global String mode{get;set;}//Synchronous,Asynchronous
global String integration{get;set;}//integration name or integration id

global String iinterface{get;set;}//interface name or interface id

global String transferId{get;set;}

global String runtimeParameter{get;set;}//runtime interface field value to overwrite real interface in memory

global String payloadFormat{get;set;}//xml/json

global String payload{get;set;}//data to be integrated

  • Call Webservice:-


  • After call Webservice, it will pass raw data to message processing method.
  • After that, user can use this raw data to do with their complex logic that they want.


Fandest du diesen Artikel hilfreich? Ja Nein

Wie können wir helfen?