Author: buildbot
Date: Wed Mar  2 05:00:05 2016
New Revision: 981616

Log:
Staging update by buildbot for olingo

Modified:
    websites/staging/olingo/trunk/content/   (props changed)
    
websites/staging/olingo/trunk/content/doc/odata4/tutorials/streaming/tutorial_streaming.html

Propchange: websites/staging/olingo/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Mar  2 05:00:05 2016
@@ -1 +1 @@
-1733138
+1733216

Modified: 
websites/staging/olingo/trunk/content/doc/odata4/tutorials/streaming/tutorial_streaming.html
==============================================================================
--- 
websites/staging/olingo/trunk/content/doc/odata4/tutorials/streaming/tutorial_streaming.html
 (original)
+++ 
websites/staging/olingo/trunk/content/doc/odata4/tutorials/streaming/tutorial_streaming.html
 Wed Mar  2 05:00:05 2016
@@ -313,7 +313,7 @@ Based on this the <em>OData-v4.0 Part1 P
 <p>In the case that the service encounters an error after sending a success 
status to the client, the service MUST generate an error within the payload, 
which may leave the response malformed. Clients MUST treat the entire response 
as being in error. This specification does not prescribe a particular format 
for generating errors within a payload.</p>
 </blockquote>
 <p>For <em>exception/error handling</em> in Olingo exists the 
<code>ODataContentWriteErrorCallback</code> interface which must be implemented 
and then can be set as an option at the 
<code>EntityCollectionSerializerOptions</code> with the 
<code>writeContentErrorCallback(...)</code> method.</p>
-<p>If during processing (<em>write</em>) of the <code>ODataContent</code> 
object (normally serialization into an according <code>OutputStream</code>, 
like the <code>ServletOutputStream</code> in a JEE servlet environment) an 
exception occurs the <code>ODataContentWriteErrorCallback</code> 
<code>handleError</code> method is called.
+<p>If during processing (<em>write</em>) of the <code>ODataContent</code> 
object (normally serialization into an according <code>OutputStream</code>, 
like the <code>javax.servlet.ServletOutputStream</code> in a JEE servlet 
environment) an exception occurs the 
<code>ODataContentWriteErrorCallback</code> <code>handleError</code> method is 
called.
 This method get as parameter the <code>ODataContentWriteErrorContext</code> 
which contains at least the thrown and to be handled <code>Exception</code> and 
the <code>WritableByteChannel</code> in which the payload of the response was 
written before the error occurred.
 Based on the requirements of the OData specification that <em>the service MUST 
generate an error within the payload, which may leave the response 
malformed</em> the <code>WritableByteChannel</code> is still open and the 
service developer can write additional data to ensure that the response payload 
is malformed.</p>
 <p>A basic <code>ODataContentWriteErrorCallback</code> implementation could 
look like this code snippet:</p>
@@ -342,7 +342,31 @@ Based on the requirements of the OData s
 
 
 <h1 id="run-sample-service">Run sample service<a class="headerlink" 
href="#run-sample-service" title="Permanent link">&para;</a></h1>
-<p>After building and deploying your service to your server, you can try a 
requests to the entity set via: <a 
href="http://localhost:8080/DemoService-Action/DemoService.svc/Products";>http://localhost:8080/DemoService-Action/DemoService.svc/Products</a></p>
+<p>After building and deploying your service to your server, you can try a 
requests to the entity set via: <a 
href="http://localhost:8080/DemoService/DemoService.svc/Products?$format=json";>http://localhost:8080/DemoService/DemoService.svc/Products?$format=json</a></p>
+<p>The response is exactly the same response as in the none streaming request. 
So unfortunaly here is no difference beside of the technical fact that the 
response is serialized at the very end of the request chain and directly 
written into the response output stream 
(<code>javax.servlet.ServletOutputStream</code>)</p>
+<div class="codehilite"><pre><span class="p">{</span>
+  <span class="nt">&quot;@odata.context&quot;</span><span class="p">:</span> 
<span class="s2">&quot;$metadata#Products&quot;</span><span class="p">,</span>
+  <span class="nt">&quot;value&quot;</span><span class="p">:</span> <span 
class="p">[</span>
+    <span class="p">{</span>
+      <span class="nt">&quot;ID&quot;</span><span class="p">:</span> <span 
class="mi">1</span><span class="p">,</span>
+      <span class="nt">&quot;Name&quot;</span><span class="p">:</span> <span 
class="s2">&quot;Notebook Basic 15&quot;</span><span class="p">,</span>
+      <span class="nt">&quot;Description&quot;</span><span class="p">:</span> 
<span class="s2">&quot;Notebook Basic, 1.7GHz - 15 XGA - 1024MB DDR2 SDRAM - 
40GB&quot;</span>
+    <span class="p">},</span>
+    <span class="p">{</span>
+      <span class="nt">&quot;ID&quot;</span><span class="p">:</span> <span 
class="mi">2</span><span class="p">,</span>
+      <span class="nt">&quot;Name&quot;</span><span class="p">:</span> <span 
class="s2">&quot;1UMTS PDA&quot;</span><span class="p">,</span>
+      <span class="nt">&quot;Description&quot;</span><span class="p">:</span> 
<span class="s2">&quot;Ultrafast 3G UMTS/HSDPA Pocket PC, supports GSM 
network&quot;</span>
+    <span class="p">},</span>
+    <span class="p">{</span>
+      <span class="nt">&quot;ID&quot;</span><span class="p">:</span> <span 
class="mi">3</span><span class="p">,</span>
+      <span class="nt">&quot;Name&quot;</span><span class="p">:</span> <span 
class="s2">&quot;Ergo Screen&quot;</span><span class="p">,</span>
+      <span class="nt">&quot;Description&quot;</span><span class="p">:</span> 
<span class="s2">&quot;19 Optimum Resolution 1024 x 768 @ 85Hz, resolution 1280 
x 960&quot;</span>
+    <span class="p">}</span>
+  <span class="p">]</span>
+<span class="p">}</span>
+</pre></div>
+
+
 <h1 id="links">Links<a class="headerlink" href="#links" title="Permanent 
link">&para;</a></h1>
 <h3 id="tutorials">Tutorials<a class="headerlink" href="#tutorials" 
title="Permanent link">&para;</a></h3>
 <p>Further topics to be covered by follow-up tutorials:</p>


Reply via email to