[ 
https://issues.apache.org/jira/browse/OLINGO-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15801370#comment-15801370
 ] 

M Carissimi commented on OLINGO-1045:
-------------------------------------

This code in the XmlEntryConsumer suggests that inline next link is ignored:
{code}
  /**
   * Get a list of {@link ODataEntry}, an empty list, a single {@link 
ODataEntry} or <code>NULL</code> based on
   * <code>isFeed</code> value and <code>inlineEntries</code> content.
   * 
   * @param isFeed
   * @param inlineEntries
   * @return
   */
  private Object extractODataEntity(final boolean isFeed, final 
List<ODataEntry> inlineEntries) {
    if (isFeed) {
      // TODO: fill metadata correctly with inline count and inline next link. 
Both are currently ignored.
      return new ODataDeltaFeedImpl(inlineEntries, new FeedMetadataImpl());
    } else if (!inlineEntries.isEmpty()) {
      return inlineEntries.get(0);
    }
    return null;
  }
{code}

> ODataEntry with expanded link does not have the next link URL
> -------------------------------------------------------------
>
>                 Key: OLINGO-1045
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1045
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-core
>    Affects Versions: V2 2.0.7
>            Reporter: M Carissimi
>
> I am writing an OData consumer using Olingo and I have an issue with expanded 
> links. 
> I request data from an OData service using the $expand option
> {code}
> /odata/resource.svc/TEST_PRICE_CODE('P-1')?$expand=TEST_PRICE_QUOTE_link
> {code}
> This results in an entry containing an inline feed with a next link:
> {code}
> <entry xmlns="http://www.w3.org/2005/Atom"; ...>
>  <link href="TEST_PRICE_CODE('P-1')/TEST_PRICE_QUOTE_link" ...>
>   <m:inline>
>   <feed ...>
>     <entry>
>       ...
>     <entry/>
>     ...
>     <link 
> href="http://xxx/odata/resource.svc/TEST_PRICE_CODE('P-1')/TEST_PRICE_QUOTE_link?$skiptoken=10"
>  rel="next"/>
>   </feed>
>   </m:inline>
>  </link>
> ...
> </entry>
> {code}
> I read this entry via Http and I construct the ODataEntry using the 
> EntityProvider.readEntry() method, but when I then try to obtain the next 
> link from the inline feed, the next link is missing:
> {code}
> ...
> EdmEntityContainer myEntityContainer = theEdm.getDefaultEntityContainer();
> ODataEntry myEntry = EntityProvider.readEntry(aContentType,
>           myEntityContainer.getEntitySet(anEntitySetName),
>           myHttpResponse.getEntity().getContent(),
>           EntityProviderReadProperties.init().build());
> String myNextLink = 
> ((ODataDeltaFeed)myEntry.getProperties().get("TEST_PRICE_QUOTE_link")).getFeedMetadata().getNextLink());
> {code}
> Why is the next link not present in the ODataDeltaFeed instance within the 
> ODataEntry constructed from the InputStream of the content read via HTTP?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to