Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
REST adapter 12c - DELETE with payload

Hi,
Can we invoke a REST resource with a DELETE verb by sending a payload i.e. having representation. When I created a REST reference(using WSDL approach) by selecting a request schema in the payload for the DELETE method, the below WADL config is created(see 1) , however when I try to send the payload while invoking the rest service the body is going as null.
1) WADL config Default created
<resource path="/cim/{market}/{lang}/v1/{puid}/sms-identity">
<method name="DELETE" soa:wsdlOperation="CIAM_DeleteSMSIdentity">
<request soa:paramElement="pns:Request" xmlns:pns="http://ikea/system/ciam/ru/api/CIAM_RU_IntegrationProvABCS_CIAMUnlinkAccount_request">
<param name="market" style="template" soa:expression="$property.rest.template.market_code" type="xsd:string"/>
<param name="lang" style="template" soa:expression="$property.rest.template.language_code" type="xsd:string"/>
<param name="puid" style="template" soa:expression="$property.rest.template.partyUID" type="xsd:string"/>
</request>
2) I tried to change the WADL config as below and send a payload but this time it fails with below remote fault while invoking. What is the issue in both the cases.
<resource path="/cim/{market}/{lang}/v1/{puid}/sms-identity">
<method name="DELETE" soa:wsdlOperation="CIAM_DeleteSMSIdentity">
<request>
<param name="market" style="template" soa:expression="$property.rest.template.market_code" type="xsd:string"/>
<param name="lang" style="template" soa:expression="$property.rest.template.language_code" type="xsd:string"/>
<param name="puid" style="template" soa:expression="$property.rest.template.partyUID" type="xsd:string"/>
<representation mediaType="application/json" element="cns:Request" xmlns:cns="http://ikea/system/ciam/ru/api/CIAM_RU_IntegrationProvABCS_CIAMUnlinkAccount_request"/>
</request>
<bpelFault><faultType>0</faultType><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>oracle.fabric.common.FabricInvocationException: oracle.fabric.common.FabricException: java.lang.IllegalStateException: Entity must be null for http method DELETE.: Entity must be null for http method DELETE.</summary></part><part name="code"><code>null</code></part><part name="detail"><detail>Entity must be null for http method DELETE.</detail></part></remoteFault></bpelFault>
Answers
-
Hi
Did you get this working?
-
Hi,
Just seen your query. It seems it is expected behavior of the Jersey Rest Client used internally by the adapter.
As confirmed by Oracle, this is not a bug but due to configuration of JerseyInvocation class, which validate request body for all HTTP methods. In case of DELETE method, is marked as MUST_BE_NULL. Even they confirmed SOA version upgrade will not help with this issue.
I think it is standard of not allowing entities in the DELETE HTTP Method invocation.
map.put("DELETE", EntityPresence.MUST_BE_NULL);
So, possible options I can think of are instead of using a REST adapter, create a java class(spring rest) and use that to invoke as a spring component in your BPEL process.