cancel
Showing results for 
Search instead for 
Did you mean: 

OData v4 Receiver Adapter deep insert / update not working

Former Member
0 Kudos

Hello fellows,

I have noticed that I cannot perform inserts / updates to an OData API with the OData v4 Receiver Adapter if it contains nested entities.

I have followed this blog to set up my request structures: Payload structures in OData V2 adapter for SAP Cloud Integration | SAP Blogs. Its specific to OData V2, I'm using OData V4, but don't expect it to behave differently.

My OData PUT Request looks like the following.

<Accounts>
  <Accounts>
    <subscriptions>
      <Subscriptions>
        <section>section</section>
        <channel>channel</channel>
        <topics>
          <element>element</element>
        </topics>
      </Subscriptions>
    </subscriptions>
    <salutation>Mr</salutation>
    <firstname>Dennis</firstname>
    <lastname>Sentler</lastname>
    <email>dennis.sentler@contiva.com</email>
  </Accounts>
</Accounts>

As you can see, it contains a nested entity "Subscriptions". The structure was built as it is instructed in the blog.

But I get a meaningless error:

com.sap.gateway.core.ip.component.exception.ODataProcessingException: (400) OData-Version '4.0' is not a supported version.

In the monitoring I can also see the message being converted to JSON in the receiver adapter as expected:

{
    "salutation": "Mr",
    "firstname": "Dennis",
    "lastname": "Sentler",
    "email": "dennis.sentler@contiva.com",
    "subscriptions": [
        {
            "section": "section",
            "channel": "channel",
            "topics": ["element"]
        }
    ]
}

Still this message is rejected.

In my second experiment, I've tried to send this JSON message with the HTTP adapter, at it works as intended. So the only thing I can think of is, that the OData Receiver Adapter not working correctly.

Or what do you think?

BTW: The OData adapter works as long I'm not using nested entities. This error only occurs, when I try to update the nested "Subscription" entity.

Accepted Solutions (0)

Answers (1)

Answers (1)

maik_bosch
Contributor
0 Kudos

Sounds for me like a ticket to SAP 🙂

Former Member

I've opened one. I'll document the result here