Hi Experts,
I am just having a heck of a time trying to get a $batch to properly process from my external application. I am getting an HTTP response code of 202, telling me that my request is getting to where it needs to go.
However, in the body of the response I'm getting the error "System expected the element '{http://www.w3.org/2005/Atom}entry'". After searching around through the discussions and seeing thesethree threads, then finding and reading this excellent help document, I am still at a loss.
I can successfully take the request body that I generate and use the Gateway client to do the entries, but when I try to use theAdvanced Rest Client Application, or try to use the application I am developing I get the error noted above.
Here is how the request looks:
Header attribute Content-Type: multipart/mixed; boundary=batch, method: POST (there are some other authentication attributes, but those appear to be working)
Request body:
--batch
Content-Type: multipart/mixed; boundary=changeset
--changeset
Content-Type: application/http
Content-Transfer-Encoding: binary
PUT ContractDetailsCollection(1) HTTP/1.1
Content-Type: application/atom+xml
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom">
<atom:content type="application/xml">
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:Id>1</d:Id>
<d:Description>batch test id 1</d:Description>
<d:Value>1111</d:Value>
</m:properties>
</atom:content>
</atom:entry>
--changeset--
--batch--
Does anyone have an idea as to what I'm doing wrong? I have tried the formats in the above discussion threads, and everything I try in tweaking the body format seems to lead to the same "expected the element..." error, but NetWeaver Gateway Client works and updates my backend data.
Any help is very much appreciated. Thank you!