Hi Guys!
Could you please help me...
My development environment: Avaya Aura(r) Orchestration Designer CCXML, Version: 7.0 (7.0.0.1801) Build id: 201311251624, Java 1.7 but compliance compatibility is set to 1.6.
My runtime is: Java 1.6, EP 6.0
I am using REST web service operation.
During wso execution I see the following exceptions in the log file (the full exceptions in attachment):
......
- 3F296E840476846BF433AAFF195AFA46:/WelcomeCall : Starting REST web service operation [LICAPersons]
- Could not get parser from data source for element ["cifId"
javax.xml.stream.XMLStreamException: org.codehaus.jettison.json.JSONException: Expected a ':' after a key at character 5 of {"["cifId"":1000002932}]
at org.codehaus.jettison.mapped.MappedXMLInputFactory.createXMLStreamReader(MappedXMLInputFactory.java:46)
at org.apache.axis2.json.JSONDataSource.getReader(JSONDataSource.java:56)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:238)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:270)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.serialize(OMSourcedElementImpl.java:661)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.serialize(OMSourcedElementImpl.java:649)
at com.avaya.sce.runtime.connectivity.restws.CallService.parseRestReturn(CallService.java:304)
at com.avaya.sce.runtime.connectivity.restws.Axis2RestStub.toODVariable(Axis2RestStub.java:492)
at com.avaya.sce.runtime.connectivity.restws.Axis2RestStub.execute(Axis2RestStub.java:167)
at com.avaya.sce.runtime.connectivity.restws.CallService.execute(CallService.java:370)
at com.avaya.sce.runtime.Data.evaluateActions(Data.java:191)
at flow.WSO_Persons.executeDataActions(WSO_Persons.java:85)
.....
So, for some reason the answer contains an extra double quotes: {"["cifId"":1000002932}]
and the braces are not at the correct place.
I did the same request in the SOAP UI and I've got the correct answer:
**********************************************
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 03 Sep 2018 15:45:10 GMT
[{"cifId":1000002932}]
**********************************************
And finally I decided to use "Edit Output" option in the output parameters section in the OD rest file editor.
The result was the same exception: "javax.xml.stream.XMLStreamException: org.codehaus.jettison.json.JSONException: Expected a ':' after a key at character 5 of {"["cifId"":1000002932}]"
Please check the screenshot I have attached.
So, in SOAP UI it does work fine, but from OD it does not work.
Later I tried "Edit Output" option in OD Version: 7.0 (7.0.1.0804) Build id: 201410141416
but the result was the same.
I did not find the same issue on devconnect forum, so, seems it was not discovered.
But I saw
https://www.devconnectprogram.com/forums/posts/list/20580.page which could relate...
May be my problem is in JSON format?
So, I would like to understand what can be the reason of such behavior. And I will need to explain it to the customer.
Thanks in advance for your help!