Layer7 API Management

 View Only
  • 1.  SAP ODATA BATCH REQUEST

    Posted Jul 21, 2020 10:57 AM

    We implemented a Service in the Gateway (Policy Manager 9.4.00) which routes to one of the SAP ODATA API's.

    We then use the Service to make a Batch Request, which when testing through Postman to the Service in CA API Gateway works successfully, but when running from our AWS API Gateway through to the Service in CA API Gateway, we get the following error:

    <?xml version="1.0" encoding="utf-8"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
    <code>00505692409C1EEA80C6EC2C0FB69918</code>
    <message xml:lang="en">Batch request payload does not contain any operations</message>
    </error>

    Which is strange as we use exactly the same Headers and Payload for the unsuccessful Request as we do with the successful Request through Postman.

    This leads me to think that the Gateway might be more "strict" when it comes to Batch Request Payloads?

    Does anyone have an idea of why this could be failing in the one case but not the other?

    The Content-Type Header is defined as multipart/mixed; boundary=batch.



  • 2.  RE: SAP ODATA BATCH REQUEST

    Posted Jul 22, 2020 10:19 AM

    Hello LeeAnne,

    I have experience with OData and batch requests in the Gateway, as we also implemented it some time ago. We used a tactical assertion "Asseble MIME Message". So, this works in the gateway, and I think your question "This leads me to believe that the gateway might be "stricter" when it comes to batch request payloads?" can be answered with NO. 

    Hopefully, I can help you solve your problem. I did not understand whether you receive a batch request in the gateway or you create a batch request in the gateway and then forward it to the SAP ODATA API? 
    Can you please release your Postman collection? 

    regards,
    Oleks


  • 3.  RE: SAP ODATA BATCH REQUEST
    Best Answer

    Posted Jul 23, 2020 04:47 AM

    Hi Oleks,

    Thank you for your reply, we ended up finding the problem...

    It was due to the very temperamental SAP ODATA Payload.

    Our DEV was escaping new lines as "\n" but the way the Gateway accepts it, is as "\r\n".

    Changing that throughout the Payload caused it to pass successfully.

    We found this, by looking at the "code" behind our Postman Request, which is then where we noticed the difference.




  • 4.  RE: SAP ODATA BATCH REQUEST

    Posted Jul 23, 2020 04:52 AM
    Hi LeeAnne,

    good to hear :).

    have a nice day.

    Oleks