Hi guys, so far I have been able to extract information from my SAP backend systems through the Gateway (which is SP2), but creating new data seems to be a problem. When I print the error message accompying the error, it gives me a 403 failure. The body XML is fine, I checked this using the REST client of Firefox and it works. I think I have to set the headers (X-Requested-With:XMLHttpRequest) of the Query somewhere, but I do not exactly know where. Can anybody help me with this?
My understanding from what you say and the version of GW that you have (SP2) your server should be under /SDATA/, right? In this case you should use the http header that you're talking about. But in case that you have GW SP3 and you are using the new OData Channel - this means that you're service is under /ODATA/ you need a different header which is the Cross-Site Request Forgery (CSRF). Check this other post: http://scn.sap.com/thread/3151207
Also check this code snippet:
Let me know how it goes!