Author Message
VanVuong
Joined: Dec 12, 2013
Messages: 20
Offline
Hi,
I'm developed a speech application using
Orchestration Designer: 7.101202
Tomcat: 8.0
Java: 1.8/8.0

I have a rest web service operation that I'm trying to invoke and have run into a problems with the web service response body. The details of the rest service operation are as follows:

HTTP Method: Post
URL Format: Query
Input Parameters: None
Message Body: <JSON formatted string>

The web service returns back 201 and striping the body of the web service response.

04/10/2018 12:15:46:459 INFO - DC4A940617A03FDF462C2DEBF6D7CA76:/rightfaxtest : 201 Error: Created
04/10/2018 12:15:46:459 DEBUG - DC4A940617A03FDF462C2DEBF6D7CA76:/rightfaxtest : Web Service Reply <- null
04/10/2018 12:15:46:459 DEBUG - DC4A940617A03FDF462C2DEBF6D7CA76:/rightfaxtest : channel:unknown | rightfaxtest:testrightfax | | result :
how do I get around that 201 Error and get back the response?

Thanks,


WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
I wonder what it returns in plain sight if you make a call from a test tool like Postman.
VanVuong
Joined: Dec 12, 2013
Messages: 20
Offline
, using essentially the same JSON object, and I do receive a 201 Created message back, but I also get a response body, looking like this:


{
"Id": "195",
"UserId": "2",
"HoldForPreview": false,
"Condition": "Processing",
"Status": "SendJobInitiation",
"DocumentCount": 0,
"CreateTime": "2018-10-04T14:57:25.3798434Z",
"Links": [
{
"Rel": "Self",
"Href": "http://atirf16dev01/RightFax/API/SendJobs/195"
},
{
"Rel": "Documents",
"Href": "http://atirf16dev01/RightFax/API/Documents?userId=2&filter=job&jobid=195"
},
{
"Rel": "ProcessingDocuments",
"Href": "http://atirf16dev01/RightFax/API/Documents?userId=2&filter=jobprocessing&jobid=195"
},
{
"Rel": "DeliveredDocuments",
"Href": "http://atirf16dev01/RightFax/API/Documents?userId=2&filter=jobsucceeded&jobid=195"
},
{
"Rel": "FailedDocuments",
"Href": "http://atirf16dev01/RightFax/API/Documents?userId=2&filter=jobfailed&jobid=195"
}
]
}
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The 201 error can be ignored. However the problem is the reply shows null. I am not sure why since you claim there should be a json string. Can you enable the soap trace either by specifying the localsoaptrace property in the data/log/ddrt.properties file or the parameter in EPM/Change Application/Reporting parameters if running the app on EP.
VanVuong
Joined: Dec 12, 2013
Messages: 20
Offline
I've the localsoaptrace enable all the time. I didn't test using the voice channel. I tested using the application's view (HTML mode) since I didn't have any voice prompt.

Thanks,

WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Axis2 which the REST Connector bases on does not process the message body for return code 201. I am not sure why. This is internal in Axis2. You may have to use a different way to call the REST API instead of using the OD REST Connector.
Go to:   
Mobile view