You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2015/09/17 12:50:53 UTC

svn commit: r1703564 - /olingo/site/trunk/content/doc/odata4/tutorials/sqo_tcs/tutorial_sqo_tcs.mdtext

Author: chrish
Date: Thu Sep 17 10:50:51 2015
New Revision: 1703564

URL: http://svn.apache.org/r1703564
Log:
CMS commit to olingo by chrish

Modified:
    olingo/site/trunk/content/doc/odata4/tutorials/sqo_tcs/tutorial_sqo_tcs.mdtext

Modified: olingo/site/trunk/content/doc/odata4/tutorials/sqo_tcs/tutorial_sqo_tcs.mdtext
URL: http://svn.apache.org/viewvc/olingo/site/trunk/content/doc/odata4/tutorials/sqo_tcs/tutorial_sqo_tcs.mdtext?rev=1703564&r1=1703563&r2=1703564&view=diff
==============================================================================
--- olingo/site/trunk/content/doc/odata4/tutorials/sqo_tcs/tutorial_sqo_tcs.mdtext (original)
+++ olingo/site/trunk/content/doc/odata4/tutorials/sqo_tcs/tutorial_sqo_tcs.mdtext Thu Sep 17 10:50:51 2015
@@ -367,16 +367,16 @@ So now we can finally have a look at the
         // and serialize the content: transform from the EntitySet object to InputStream
         EdmEntityType edmEntityType = edmEntitySet.getEntityType();
         ContextURL contextUrl = ContextURL.with().entitySet(edmEntitySet).build();
-
+        
+        final String id = request.getRawBaseUri() + "/" + edmEntitySet.getName();
         EntityCollectionSerializerOptions opts = EntityCollectionSerializerOptions.with()
-                                            .contextURL(contextUrl)
-                                            .count(countOption).build();
-        SerializerResult serializerResult = serializer.entityCollection(serviceMetadata,
-                                        edmEntityType,
-                                        returnEntityCollection,
-                                        opts);
-        InputStream serializedContent = serializerResult.getContent();
-
+                                                      .contextURL(contextUrl)
+                                                      .id(id)
+                                                      .count(countOption)
+                                                      .build();
+        SerializerResult serializerResult = serializer.entityCollection(serviceMetadata, edmEntityType, 
+                                                                        returnEntityCollection, opts);
+        
         // 5th: configure the response object: set the body, headers and status code
         response.setContent(serializedContent);
         response.setStatusCode(HttpStatusCode.OK.getStatusCode());