You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Ivan Lucas Vargas <xe...@gmail.com> on 2015/02/10 04:50:41 UTC

Error in batch post with $links

Hi,

I`m trying to insert a master / detail data through $batch POST request.
Both entities are new and they need to be related by
<content-id>/$links/<entity>, correct? My request is payload is:


   1. --batch_26cc-9858-907c Content-Type: multipart/mixed;
   boundary=changeset_2731-64ce-af4c --changeset_2731-64ce-af4c Content-Type:
   application/http Content-Transfer-Encoding: binary POST EfdCapaDocfis
   HTTP/1.1 Content-Id: 1 DataServiceVersion: 2.0 Accept:
   application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7,
   application/json;q=0.5, */*;q=0.1 Content-Type: application/json
   MaxDataServiceVersion: 3.0 {data...} --changeset_2731-64ce-af4c
   Content-Type: application/http Content-Transfer-Encoding: binary POST
   *$1/$links/EfdItemDocfis* HTTP/1.1 Content-Id: 2 DataServiceVersion: 2.0
   Accept: application/atomsvc+xml;q=0.8,
   application/json;odata=fullmetadata;q=0.7, application/json;q=0.5,
   */*;q=0.1 Content-Type: application/json MaxDataServiceVersion: 3.0
   {data...} --changeset_2731-64ce-af4c-- --batch_26cc-9858-907c--


The second part of the batch request fails with the following exception:

org.apache.olingo.odata2.api.uri.UriNotMatchingException: Could not find
property with name: 'EfdItemDocfis'.

at
org.apache.olingo.odata2.core.uri.UriParserImpl.handleNavigationProperties(
UriParserImpl.java:288)

at
org.apache.olingo.odata2.core.uri.UriParserImpl.handleNavigationPathOptions(
UriParserImpl.java:268) ......

What am I doing wrong?

tks!