Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HTTP Protocol to send json payload with DELETE method

Prasanna GApr 28 2020 — edited Apr 28 2020

Hi,

One of my clients exposed the following service for us to invoke from OSB 12c.

Uri: http://localhost/TestService

Http Method: DELETE

Body payload :

{

"param1" : "xyz",

"param2" : "test"

}

content-type : application/json

REST adapter's DELETE method expects input as query/template params and not Body.

Hence, I am not able to use it.

But I tried using HTTP protocol adapter in OSB. Chose Service Type as Rest. And set the following params -

Body -

{

"param1" : "xyz",

"param2" : "test"

}

Outbound:

<con:endpoint

name="BusinessService$Process$BusinessServices$DeleteAction xmlns:con="http://www.bea.com/wli/sb/context">

<con:service/>

<con:transport>

<con:mode>request-response</con:mode>

<con:qualityOfService>best-effort</con:qualityOfService>

<con:request

xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<tran:headers

xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">

<http:Accept>application/json</http:Accept>

<http:Content-Type>application/json</http:Content-Type>

</tran:headers>

<http:http-method>DELETE</http:http-method>

</con:request>

</con:transport>

<con:security>

<con:doOutboundWss>true</con:doOutboundWss>

</con:security>

</con:endpoint>

HTTP, Accept and Content-type - all are set correctly. But still I am getting 400 Invalid request error.

Can you please let me know if OSB (http adapter/rest adapter) supports DELETE with payload in body?

Thanks!!!

Comments
Post Details
Added on Apr 28 2020
3 comments
1,276 views