PAS REST pass value blanco but get unknown in backend - Forum - Mobile - Progress Community

PAS REST pass value blanco but get unknown in backend

 Forum

PAS REST pass value blanco but get unknown in backend

This question is answered

Dear,

When I call on my PAS instance an invoke function and I don't fill in some value for a parameter this will show value unknown in the backend.

 My call to the backend:

Backend message pSupplier this is ?

A solution can be that we replace all the parameters with a dataset because they don't have this problem. 
Was checking a solution with annotation but don't get it to work (temp-tables field have extra properties in the catalog).
At this moment I check all the input parameters and replace them with an empty value if it's ? a little bit stupid :)

does someone has an explanation for this or a best practice me seems that I have to replace everything with datasets.

Kind regards
Kevin Hermans

Verified Answer
  • Hello Kevin,

    The behavior that you are seeing is not expected.

    What version of OpenEdge are you using?

    I tested with OpenEdge 11.7.1 with both REST and WEB transports.

    I was able to reproduce the issue using the REST transport.

    The WEB transport worked fine. The value passed in the request payload was received on the server side.

    I would suggest to log a bug report with Technical Support so that this issue can be addressed in PASOE.

    For your specific case, certainly sending the data as a temp-table or a dataset would provide a solution.

    Another alternative would be to use the WEB transport since it does not have the issue.

    From the JSDO point of view, there is no difference whether REST or WEB transport is used.

    I hope this helps.

    Thank you and regards,

    Edsel

All Replies
  • Hello Kevin,

    The behavior that you are seeing is not expected.

    What version of OpenEdge are you using?

    I tested with OpenEdge 11.7.1 with both REST and WEB transports.

    I was able to reproduce the issue using the REST transport.

    The WEB transport worked fine. The value passed in the request payload was received on the server side.

    I would suggest to log a bug report with Technical Support so that this issue can be addressed in PASOE.

    For your specific case, certainly sending the data as a temp-table or a dataset would provide a solution.

    Another alternative would be to use the WEB transport since it does not have the issue.

    From the JSDO point of view, there is no difference whether REST or WEB transport is used.

    I hope this helps.

    Thank you and regards,

    Edsel

  • “pSupplier”: null
     
    Is the JSON way.
     
    In ABL you can say
    jsonObject:AddNull(“pSupplier”).
    jsonObject:SetNull(“pSupplier”).