Many customers ask me how to call a script from JD Edwards (UBE or APPS) and get return values from the script. One of the most usefulness could be to call a Web Service (REST or SOAP).
You will say me for those who are confident with Orchestrator that today it's a standard options with JD Edwards. But you should have Orchestrator and also you should understand how Orchestrator works.
Another solution, is to copy a standard BSFN (B34A10) that can call a script on an Enterprise Server and just modify it easily to get the return value. You will find in attachment of this topics the code to implement