Hi, everyone
I need to create a simple BPEL project to get some JSON objects stored in a database and return the list to the caller. The customer requested to be able to see the objects in JSON and in XML formats. So I created a project with a REST Adapter replying in both formats.
For the JSON format the reply works fine, but when I choose XML the server returns this error: "unsupported variable outputVar in REST reply".
After searching for it, I couldn't find anyone with this error in the "reply" activity, but I could find people seeing errors in the "invoke" activity of a service.
In Oracle Support I could find some references to the error in the "invoke" activity, like "Doc ID 2297232.1", which leads to "Bug 26365499", but it was closed as unresolved.
Also, I could find "Doc ID 2268954.1", which leads to "Patch 25759383", but it is obsolete.
Its "Replacement Option" is "Patch 26953820", which has nothing to do with the original problem and didn't solve it.
So I need help solving this issue. I've made a small step-by-step to help reproduce the error:
1: in JDeveloper, create a new “SOA Application” and “SOA Project” with “Empty Composite”
2: in “Exposed Services” insert a new “REST Adapter”
3: create a “Method” for the default resource “/” and set the “HTTP Verb” to GET. In the “Response” tab, ”Success": uncheck JSON, check XML and Finish the configuration

4: in “Components” insert a new BPEL Process. Set the “Template Type” to “REST Service” and in “REST Methods” select the method we created in the previous step.
5: open the BPEL Process and open the Variables box. The “outputVar” is set to “xsd:anyType”:

6: drag an “Assign” component to the flow and open it. Create a “Literal” with any very simple XML, like “<a/>”. Assign it to the “outputVar” variable:

7: deploy the project to the server, open its “Test” window and click “Test Web Service”:

8: result: runtimeFault with “java.lang.RuntimeException: unsupported variable outputVar in REST reply”:

