Question

Serialization error on special characters in attribute in new custom projection

  • 22 January 2024
  • 2 replies
  • 67 views

Userlevel 2
Badge +10
  • Hero (Customer)
  • 37 replies

Hi everyone

We’ve implemented a new custom projection in IFS Developer Studio which includes an attribute for the description for a part main group:

fetch = "Eng_Part_Main_Group_API.Get_Description(part_main_group)";

Some of the descriptions include special characters such as ampersand &, slashes / etc.

When I call the PartMainGroupHandling.svc/EngPartMainGroups REST API from PostMan the descriptions are returned without any problems, including the special characters.

When I call the REST API for our new projection, I get

<ERROR>{"error":{"code":"ODP_SERIALIZATION_ERROR","message":"Error while serializing contents."}}</ERROR>

If I remove the special characters from the descriptions the REST API for the new projection works fine.

What do I need to do to get the REST API to serialise the special characters?

Any suggestions much appreciated!

Marion


2 replies

Userlevel 5
Badge +13

@MMcK 

Can you try out which is suggested in the following article if it is applicable for you. 

“Please try with ‘function’ keyword instead of ‘action’ in projection file. Usually action is used for a PLSQL procedure and function is used for PLSQL function which returns a value.”

 

REST call runs on "Error while de-serializing contents." | IFS Community

 

/Harshini

Userlevel 2
Badge +10

Hi @hamalk 

Many thanks for your response, but the problem was just an attribute so the suggestion in the other article didn’t apply.

In case it helps anyone else, I have found a solution which is just to ensure than the attribute name includes the word ‘Description’.  This seems to ensure that the serialization is done differently and handles the special characters.

Thanks again,

Marion

 

Reply