Author Message
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
You're right. We can probably enhance this. We base the REST feature on Axis2. We use the underlining Axis2 stub call:

_serviceClient.sendReceive()

and this call requires the data be deserialized into an Axis2 object.
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
I've gotten the REST service to work using XML as the message body. However, each time the request is executed, it ends up executing twice. The web service is returning a status code 201 (Created). The next entry in the logs after making the first successful call, I see this message:

Response had content type: application/xml. Retrying call with new type...


Then the call is re-executed. Is this standard behavior because the response was not 200, or is the OD REST client expecting the response content type of 'application/json' regardless of the request content type?

The unfortunate circumstance of this is duplicate records are being created.

Michael
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
As I am going though the code my ex-coworker wrote, I can see that it is doing a rerun as the result of AxisFault exception and that could be very well caused by the 201 returned code.
Go to:   
Mobile view