<div dir="ltr">Hello, guys. Thanks for a great help.<div><br></div><div style>I created these methods to check it:</div><div style><br></div><div style><div><font face="courier new, monospace">GPRestfulHandler(WARestfulHandler)&gt;&gt;executeResult: aRouteResult</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>| result |</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>self requestContext</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">                </span>respond: [ :response | </font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">                        </span>result := aRouteResult sendMessageTo: self.</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">                        </span>response document: result mimeType: aRouteResult seasideMimeType ]</font></div><div><br></div><div style>1) First one with simple Czech string:</div>
<div style><br></div><div style><div><span style="font-family:&#39;courier new&#39;,monospace">GPRestfulHandler(WARestfulHandler)&gt;&gt;</span><font face="courier new, monospace">czechTestReal</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>&lt;get&gt;</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>&lt;path: &#39;czechTestReal&#39;&gt;</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>&lt;produces: &#39;application/json; charset=utf-8&#39;&gt;</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>^ &#39;Czech is in Czech čeština.&#39; asJson</font></div></div><div style><br></div><div style><div>2) Second one with simple ascii string:</div>
<div><br></div><div><div><span style="font-family:&#39;courier new&#39;,monospace">GPRestfulHandler(WARestfulHandler)&gt;&gt;</span><font face="courier new, monospace">czechTestReal</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>&lt;get&gt;</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>&lt;path: &#39;czechTestReal&#39;&gt;</font></div><div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>&lt;produces: &#39;application/json; charset=utf-8&#39;&gt;</font></div>
<div><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>^ &#39;Czech is in Czech cestina.&#39; asJson</font></div></div><div><br></div></div><div style>1) In first case in <font face="courier new, monospace">executeResult:</font> method in result <font face="courier new, monospace">variable</font> is WideString &#39;<span style="font-family:&#39;courier new&#39;,monospace">Czech is in Czech čeština.</span>&#39;</div>
<div style><br></div><div style>I can see on the screen this error although I have <font face="courier new, monospace">WAException</font> filter set to <font face="courier new, monospace">WAWalbackErrorHandler</font>.</div>
<div style><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><font face="courier new, monospace">Error: Improper store into indexable object</font></pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">
<font face="arial, helvetica, sans-serif">2) In second case </font><span style="font-family:arial;color:rgb(34,34,34)">in</span><span style="font-family:arial;color:rgb(34,34,34)"> </span><font face="courier new, monospace" style="color:rgb(34,34,34)">executeResult:</font><span style="font-family:arial;color:rgb(34,34,34)"> </span><span style="font-family:arial;color:rgb(34,34,34)">method in result</span><span style="font-family:arial;color:rgb(34,34,34)"> </span><font face="courier new, monospace" style="color:rgb(34,34,34)">variable</font><span style="font-family:arial;color:rgb(34,34,34)"> </span><span style="font-family:arial;color:rgb(34,34,34)">is ByteString &#39;</span><span style="color:rgb(34,34,34);font-family:&#39;courier new&#39;,monospace">Czech is in Czech cestina.</span><span style="font-family:arial;color:rgb(34,34,34)">&#39;</span></pre>
<pre style="color:rgb(0,0,0);word-wrap:break-word"><span style="white-space:normal;color:rgb(34,34,34);font-family:arial">I can see on the screen</span><span style="color:rgb(34,34,34);font-family:arial;white-space:pre-wrap"> expected result:</span></pre>
<pre style="color:rgb(0,0,0);word-wrap:break-word"><pre style="word-wrap:break-word;white-space:pre-wrap"><font face="courier new, monospace">&quot;Czech is in Czech cestina.&quot;</font></pre><pre style="word-wrap:break-word;white-space:pre-wrap">
<font face="arial, helvetica, sans-serif">So, there must be somewhere a difference between ByteString and WideString conversion. I located the problem (thrown error) in this method:</font></pre><pre style="word-wrap:break-word;white-space:pre-wrap">
<span style="font-family:&#39;courier new&#39;,monospace;color:rgb(34,34,34);font-size:13px;white-space:normal">ZnZincServerAdaptor&gt;&gt;</span><span style="font-family:&#39;courier new&#39;,monospace;color:rgb(34,34,34);font-size:13px;white-space:normal">responseFrom: aRequestContext</span><br>
</pre><pre style="word-wrap:break-word;white-space:pre-wrap"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>| partialHeaders cookies fullHeaders seasideResponse contents entity contentType |</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>seasideResponse := aRequestContext response.</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>partialHeaders := seasideResponse headers.</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>cookies := seasideResponse cookies.</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>fullHeaders := ZnHeaders defaultResponseHeaders.</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>partialHeaders keysAndValuesDo: [ :key :value |</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>fullHeaders at: key put: value ].</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>cookies do: [ :each |</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>fullHeaders at: &#39;Set-Cookie&#39; add: each oldNetscapeString.</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>fullHeaders at: &#39;Set-Cookie2&#39; add: each rfc2965String ].</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>contentType := seasideResponse contentType greaseString.</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>contents := seasideResponse contents. &quot;&lt;------------------------ HERE is the error signalled&quot;</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>entity := (ZnEntity bytes: contents) contentType: contentType; yourself.</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">        </span>^ ZnResponse new</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>statusLine: (ZnStatusLine code: seasideResponse status);</font></div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>headers: fullHeaders;</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal">
<font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>entity: entity;</font></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;white-space:normal"><font face="courier new, monospace"><span style="white-space:pre-wrap">                </span>yourself</font></div>
<div style="color:rgb(34,34,34);font-size:13px;white-space:normal"><font face="arial, helvetica, sans-serif"><br></font></div><div style="color:rgb(34,34,34);font-size:13px;white-space:normal"><font face="arial, helvetica, sans-serif">Regards,</font></div>
<div style="color:rgb(34,34,34);font-size:13px;white-space:normal"><font face="arial, helvetica, sans-serif">Tomas</font></div></pre></pre></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 7:28 PM, Sven Van Caekenberghe <span dir="ltr">&lt;<a href="mailto:sven@stfx.eu" target="_blank">sven@stfx.eu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 26 Jun 2013, at 18:47, Philippe Marschall &lt;<a href="mailto:philippe.marschall@gmail.com">philippe.marschall@gmail.com</a>&gt; wrote:<br>
<br>
&gt; On Wed, Jun 26, 2013 at 6:37 PM, Sven Van Caekenberghe &lt;<a href="mailto:sven@stfx.eu">sven@stfx.eu</a>&gt; wrote:<br>
&gt;&gt; Tomas,<br>
&gt;&gt;<br>
&gt;&gt; I am not sure what one is supposed to return from #getUsers.<br>
&gt;&gt;<br>
&gt;&gt; Naively, I would guess just a [Wide]String with the &lt;produces: &#39;application/json; charset=utf-8&#39;&gt; telling the Seaside-REST framework to do the right thing, but I just don&#39;t know.<br>
&gt;<br>
&gt; Yes it does/should, see<br>
&gt;<br>
&gt; WARestfulHandler/Filter &gt;&gt; #executeResult:<br>
<br>
</div>I see. Tomas, can you trace in there and see what happens in your case ?<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; Cheers<br>
&gt; Philippe<br>
&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</div></div></blockquote></div><br></div>