tRESTClient doesn't propagate message body on DELETE

One Star

tRESTClient doesn't propagate message body on DELETE

System: linux debian and windows
TOS for ESB: 5.4.1r111943
I'm creating a full REST service with tRESTRequest and tRESTResponse components. GET and POST are working fine, but DELETE give me some trouble. I created a simple client to test the service, as you can see in first image attached.
A debug run shows that body is null, but when you see full log, outbound and inbound messages are correct:
connecting to socket on port 3543
connected
connecting to socket on port 4827
connected
Apr 23, 2014 12:30:07 PM org.apache.cxf.interceptor.LoggingOutInterceptor
INFO: Outbound Message
---------------------------
ID: 1
Address: http://localhost:8088/persone/1234567890123456
Http-Method: DELETE
Content-Type: */*
Headers: {Accept=, Content-Type=}
--------------------------------------
Apr 23, 2014 12:30:07 PM org.apache.cxf.interceptor.LoggingInInterceptor
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 200
Encoding: ISO-8859-1
Content-Type: application/xml
Headers: {content-type=, Date=, Server=, transfer-encoding=}
Payload: <?xml version="1.0" encoding="UTF-8"?>
<persona COD_FISC="1234567890123456"><MESSAGGIO>Cancellato</MESSAGGIO></persona>
--------------------------------------
200||
disconnected
disconnected
Why payload is not present in Response flow?
Thank you so much.
Employee

Re: tRESTClient doesn't propagate message body on DELETE

Hi,
DELETE is not expected to contain the body, not a 'must' requirement but Java HttpUrlConnection actually enforces it.
We can have it done in CXF alone by delegating to CXF HttpClient asynchronous conduit, but we do not have it supported in the studio.
Consider avoiding using DELETE with the body, unless you have a task of integrating with the legacy servers that do expect it, and if you do have such a case then check tHTTP* client components, one of them may actually use Apache HttpClient
HTH, Sergey
One Star

Re: tRESTClient doesn't propagate message body on DELETE

Ok, thank you. It was confusing see it on log message
Pierpaolo
One Star

Re: tRESTClient doesn't propagate message body on DELETE

But, if so, why in tRESTRequest a DELETE verb "must" have a "Produce" field filled with something? You must fill it with XML or JSON or at least "any".
Pierpaolo
Employee

Re: tRESTClient doesn't propagate message body on DELETE

Blocking Produces completely in case of DELETE might be too restricting, we do not know of the actual client requirements, example, a client may want to get some confirmation...Note, even though Produces is enabled, there's no requirement for DELETE server flow to return any data back
Cheers, Sergey