<div>Thank you very much, Seb.</div><div>Following your instructions, I resolved it!</div><div><br></div><div><br></div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div></div><div><div><br></div><div dir="ltr">You can not do anything before connecting.<div>As when you connect, the created proxy will be deleted.<br><div>The creating of the view need to happen after your Connect() call.</div></div><div><br></div><div>
Seb</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 27, 2014 at 1:07 AM, Ewin <span dir="ltr"><<a href="mailto:tiandong@fingergo.com" target="_blank">tiandong@fingergo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div>Hi Seb,</div><div>    I found the point which cause the "OpenDataFile" error: when I executed < <span style="line-height:1.5">paraview.Connect("172.168.0.47", 11111);</span><span style="line-height:1.5"> >, the view died. </span></div>
<div><span style="line-height:1.5">But I still don't know How to fix it.</span></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">    Here is all my code:</span></div><div><span style="line-height:1.5">----------------------------------------------------</span></div>
<div><div><script type="text/javascript" language="javascript" src="/PWService/js/ParaViewWeb.js"></script></div><div><div id='container_id'></div></div><div><script></div>
<div><span style="white-space:pre-wrap">  </span>serverUrl = "<%=request.getScheme()%>://<%=request.getServerName()%>:<%=request.getServerPort()%>/PWService"; </div><div><span style="white-space:pre-wrap">  </span>paraview = new Paraview(serverUrl);</div>
<div><span style="white-space:pre-wrap">  </span>paraview.createSession("Session", "vispurpose", "default");</div><div><span style="white-space:pre-wrap">        </span>myview = paraview.CreateIfNeededRenderView();</div>
<div><span style="white-space:pre-wrap">  </span>var reader;</div><div><br></div><div> <span style="white-space:pre-wrap">       </span>paraview.Connect("172.168.0.47<span style="line-height:0px">‍</span>", 11111); // !!! delete this line, the code will be work!</div>
<div><span style="white-space:pre-wrap">  </span></div><div><span style="white-space:pre-wrap"> </span>val ="/home/tiandong/bluntfin.vts";</div><div><span style="white-space:pre-wrap">    </span>reader = paraview.OpenDataFile(val);</div>
<div><span style="white-space:pre-wrap">  </span><span style="line-height:1.5;white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap"> </span>dp = paraview.Show();</div><div>        paraview.Render();</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>renderers_java = new HttpAppletRenderer("javaRenderer", serverUrl);</div><div><span style="white-space:pre-wrap">    </span>renderers_java.init(paraview.sessionId, myview.__selfid__);</div>
<div><span style="white-space:pre-wrap">  </span>renderers_java.setSize(600 , 600);</div><div>  <span style="white-space:pre-wrap">        </span>renderers_java.bindToElementId('container_id');</div><div><span style="white-space:pre-wrap">  </span>renderers_java.start();</div>
<div></script> <span style="line-height:0px">‍</span></div></div><div>----------------------------------------------------<span style="line-height:0px">‍</span></div><div><br></div><div>   the pvserver is connected, server shows:</div>
<div>----------------------------------------------------</div><div><div>$ ./pvserver </div><div>Waiting for client...</div><div>Connection URL: cs://<a href="http://vis.sccas.cn:11111" target="_blank">vis.sccas.cn:11111</a></div>
<div>Accepting connection(s): <a href="http://vis.sccas.cn:11111" target="_blank">vis.sccas.cn:11111</a></div><div>Client connected.<span style="line-height:0px">‍</span></div></div><div>-----------------------------------------------------</div>
<div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div style="font-family:Simsun;font-size:medium;line-height:normal">
<span>------------------</span><span>------------------</span><span>--</span></div><div style="font-family:Simsun;font-size:medium;line-height:normal"><span style="line-height:18px"><font face="黑体" color="#999999"><b><a href="http://baike.baidu.com/view/350205.htm#sub9836231" target="_blank">Ewin.TD</a></b></font></span></div>
<div style="font-family:Simsun;font-size:medium;line-height:normal"><div style="line-height:21px"><span style="">------------------ -----------------</span></div>
<div style="line-height:21px"><span style="line-height:1.5;background-color:rgb(239,239,239);font-size:12px;font-family:Verdana">"Sebastien Jourdain";<<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>>;</span></div>
<div style="line-height:21px"><span style="line-height:1.5;background-color:rgb(239,239,239);font-size:12px;font-family:Verdana">"Ewin"<<a href="mailto:tiandong@fingergo.com" target="_blank">tiandong@fingergo.com</a>>;</span></div>
<div style="line-height:21px"><span style="line-height:1.5;background-color:rgb(239,239,239);font-size:12px;font-family:Verdana">"paraview"<<a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a>>;</span></div>
<div style="line-height:21px"><span style="line-height:1.5;background-color:rgb(239,239,239);font-size:12px;font-family:Verdana">Re: [Paraview] Open remote file Error via Paraviewweb (Paraview3.98.0)</span></div></div></div>
</div></div></div><div><div><br></div><div><div class="h5"><div dir="ltr">Hi Ewin,<div><br></div><div>this version of ParaViewWeb is so old, that I don't remember it on top of my head.</div><div><br></div><div>I will guess that the view was not properly created. (myview) hence the NoneType.</div>

<div>Moreover, you will have an issue with "wirefire" which should be "Wireframe" I believe.</div><div><br></div><div>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 4:03 AM, Ewin <span dir="ltr"><<a href="mailto:tiandong@fingergo.com" target="_blank">tiandong@fingergo.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi all,</div><div>     I want to show paraview result on webpage,  and I setup the paraviewweb envi (version 3.98.0). </div>

<div>     Method "paraview.loadData" can get a normal source object and show well, but it can only open native file. So, I use "paraview.OpenDataFile" to read the remote file, but I got an Error:</div>

<div> </div><div>     <font color="#ff0000"> 'NoneType' object has no attribute 'Representations'</font><span style="line-height:0px">‍</span></div><div><font color="#ff0000">     </font></div><div><font color="#ff0000">     </font>My Code:</div>

<div>            <font color="#ff0000">paraview = new Paraview(serverUrl);<span style="line-height:0px">‍</span></font></div><div><font color="#ff0000">            ......</font></div><div><font color="#ff0000">           var reader = paraview.OpenDataFile(val);<span style="line-height:0px">‍</span></font></div>

<div><font color="#ff0000">           <span style="line-height:1.5">paraview.SetDisplayProperties( {</span></font></div><div><font color="#ff0000"><span style="white-space:pre-wrap">              </span>'proxy' : reader <span style="line-height:0px">‍</span>,</font></div>

<div><font color="#ff0000"><span style="white-space:pre-wrap">            </span> 'view'  : myview,</font></div><div><font color="#ff0000"><span style="white-space:pre-wrap">          </span>Representation : 'wirefire<span style="line-height:0px">‍</span>'</font></div>

<div><font color="#ff0000"><span style="white-space:pre-wrap">    </span>    } );</font><span style="line-height:0px">‍</span></div><div><br></div><div>Any help will be appreciated!</div><div>Thanks all!</div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">

------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div style="font-family:Simsun;font-size:medium;line-height:normal"><span>------------------</span><span>------------------</span><span>--</span></div>

<div style="font-family:Simsun;font-size:medium;line-height:normal"><span style="line-height:18px"><font face="黑体" color="#999999"><b><a href="http://baike.baidu.com/view/350205.htm#sub9836231" target="_blank">Ewin.TD</a></b></font></span></div>

<div style="font-family:Simsun;font-size:medium;line-height:normal"><div style="line-height:21px"><br></div></div></div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div>