Skip to main content

Hi, 

I am having an action which takes LongText as input, inturn I have used CLOB datatype to parse the longtext value in my procedure, but when I send the string via postman it gives error as “ODP_DESERIALIZATION_ERROR”.

Is there a way to parse the longtext values or BLOB values.

 

 

Thanks in advance 

Hi,

Did you mean to post this in the Document Management forum here on IFS Community?
 


Hi,

I am looking for a solution to the above-mentioned problem.


The question is posted in the Document Management forum. Is your problem related to Document Management?


Yes, it is


What's the relation to Document Management? Can you show it?

Also, if you want help, you need to provide more details, like showing the complete request (type and body, to begin with, and the URL).

Thanks!
 


Hi, 

→ I have created a action with LongText  as datatype, 

→And later I have passed the longtext value as parameter to one of my procedures, as a CLOB datatype.

→the content got as a input from json will be encrypted, so I will be decrypting and converting to BLOB and storing into a variable of blob datatype.

→the obtained blob value will be sent as parameter to edm_file_storage_api.write_file_data.

 

 

 

Thanks in advance.


I cannot say what's wrong. What I can say is that the problem is most probably not in the PL/SQL side. It's more likely that you are posting the data to the REST service in the wrong format/way. How does the REST call look like? Is it a POST or PATCH?


It is POST service.


@CHAITRA_MUTTALLI 

How does the REST call look like?

 


Hi,

the json payload looks as below,

{
  "CReport" : {
    "Content" : "’",
    "ContentFormat" : "application/pdf",
    "Number" : "12349",
    "LanguageCode" : "en-US",
    "ReportFormat" : "PDF",
    "ReportType" : "Acrobat"
  }
}

in the content the encrypted longtext/ decrypted BLOB values will be parsed.


In your earlier screenshot above, it says "CGetReport" but in what you just pasted above it says "CReport”. Could that be what the ODP complains about?


I also miss some bits and pieces. In the procedure, you have four parameters, none of them is that structure I think.

At any rate, what I think is happening is that you don't post the data in the form/format that the ODP expects.

Try stripping things down to their bare minimum by removing parameters or attributes in the structure until it works, then add things back.

Good luck!
 


The structure name is CGetReport, the procedure/action parameter name is CReport

and in my procedure, I have considered only the parameters taking dynamic values, so we can see less number of parameters.

 

Sure let me try by removing each parameters.

 

Thank You.


How to send in CLOB/BLOB is described here in the documentation:

https://docs.ifs.com/techdocs/23r2/040_tailoring/300_extensibility/100_odata_provider/1110_large_param_action/#large_parameters_in_actions

Look at the example files in the link in the documentation.

 

Basically you need to:

Create Temporary LOB Storage:

In the Response you get an “OData-EntityId” that you shall use in next call:

Next step is to send the LOB data to the temporary LOB storage URL you got from previous call’s response:

 

Then You can call your projection action like this:

For reference, this is my ProjectionAction and plsql Implementation:

 

action LoadExternalFile {
   initialcheck none;
   parameter CreatedFrom Text;
   parameter FileName Text;
   parameter Message LongText;
}

 

PROCEDURE Load_External_File___ (
   created_from_ IN VARCHAR2,
   file_name_ IN VARCHAR2,
   message_ IN CLOB)
IS
BEGIN
    C_Ext_File_Server_Util_API.Load_External_File(created_from_, file_name_, message_);
END Load_External_File___;

 


Hi @Tomas Ruderfelt 

I would like to know how to handle BLOB data when specifying an array with BLOB items as input parameters in a RESTful API. Thanks!

 

Best regards

Feng


Unfortunately I have not tested that scenario so I can’t say anything about it. Maybe someone else have experience in this?


Reply