Thanks for your reply.! Would check again and get back.!!

Gireesh


On Sat, Sep 18, 2010 at 9:52 PM, Henry Minsky <[email protected]>wrote:

> So I believe the issue here is a cross-domain security error from the
> browser
>
> Is it the case that your PHP script test.php is running on a different web
> server than
> your Laszlo app is running on? If so, then  if the app is running SOLO,
> there will be a cross-domain security issue with the XMLHTTPRequest that is
> being used; the browser will not allow you to load XML data from a different
> host URL than the one which the app was loaded from. The error is not being
> printed out by the LFC, but I am pretty sure that is what is happening.
>
>  Note that even if the data URL  you are fetching from is the same host as
> your app was served from, if it has a different TCP port number, you will
> not be able to load it directly from the browser.  So if your app is coming
> from localhost:8080 and you're trying to fetch data from
> localhost/test/foo.php, you will get a security error.
>
> I was able to deploy your test app as a SOLO application, and put it onto a
> web server
> which runs php apps (i.e. my apache server, not the tomcat server I use for
> LZX development), and it works in that case, where both the app and the php
> script are
> on at same server host URL.
>
> [Note, I found a bug in the  DHTML solo deployer tool in trunk, it left
> some absolute pathnames in the HTML wrapper that it generates for the solo
> app in index.html, I am fixing that now. ]
>
>
> + What is really weird is that the error I am seeing shows up as the name
> of the HTTP request that goes out being "OPTIONS" instead of "POST", and I
> am seeing that in both Safari and Firefox.
>
>
>
>
>
> On Sat, Sep 18, 2010 at 6:30 AM, Gireesh Subramaniam 
> <[email protected]>wrote:
>
>> *All,
>>
>> Thanks for the reply.This is a sample of the XML that is generated by my
>> PHP server,
>> Sample code where an OL file gets XML from a php.!!
>>
>> It works fine when proxy="true" in canvas but dataset throws error
>>
>> 'client could not parse XML from server'
>>
>> Could some one let me know what am i doing wrong.!!
>>
>> OL FILE:
>>
>> <canvas width="100%" height="100%" proxied="false" debug="true">
>>     <dataset name="dsSample" type="http"  querytype="post" request="false"
>> ontimeout="Debug.write('timeout')"
>>         src="http://localhost/Test/test.php"; oninit=""
>> ondata="Debug.write(this.rawdata);"
>>          onerror="Debug.write('goterror'+this.getErrorString())"/>
>>     <view>
>>         <simplelayout axis="y" spacing="5"/>
>>         <button width="100" name="click" x="10" text="click">
>>             <handler name="onclick">
>>                 canvas.dsSample.doRequest();
>>             </handler>
>>         </button>
>>         <text datapath="dsSample:/table" text="$path{'admin/@value'}"
>> x="10"/>
>>     </view>
>>
>> </canvas>
>>
>> PHP FILE (Test.php):
>>
>>
>> <?php
>> header("Content-type: application/xml");
>> $xmldata ='<?xml version="1.0" encoding="ISO-8859-1"?>';
>> $xmldata .='<table>';
>> $xmldata .='<admin value="SOLO"/>';
>> $xmldata .='</table>';
>>
>> echo $xmldata;
>> ?>
>>
>> Content-type: text/xml was also tried.
>>
>> I validated the generated XML with a XML validator from the below link
>>
>> http://www.xmlvalidation.com/index.php?id=1&L=0
>>
>>
>>
>> It reports that there are no errors.The OL server delivers this XML from the 
>> PHP to application and it works well in Proxied mode.So was wondering if I 
>> am doing something wrong when it comes to solo deployment and something 
>> special needs to be changed apart from changing the variable proxied to 
>> false in canvas.!
>>
>>
>>
>> On Fri, Sep 17, 2010 at 10:15 PM, Raju Bitter <
>> [email protected]> wrote:
>>
>>  <?php
>>> header("Content-type: application/xml");
>>> ...
>>>
>>> should work
>>>
>>> On Fri, Sep 17, 2010 at 3:58 PM, Henry Minsky <[email protected]>
>>> wrote:
>>> > One more thing, if you're using DHTML runtime in solo mode, the browser
>>> may
>>> > require that your server send the proper mime type in the HTTP
>>> response,
>>> > e.g., xml/data or something like that. I'm not sure about XML, I do
>>> know
>>> > that some browsers care about
>>> > the mime type for java script includes.
>>> >
>>> > On Fri, Sep 17, 2010 at 9:02 AM, Gireesh Subramaniam <
>>> [email protected]>
>>> > wrote:
>>> >>
>>> >> Hi ,
>>> >> I tried your first suggestion and upgraded to 4.8.1 and think I have
>>> >> cornered the issue.
>>> >> I use php code to interact with database backend.My application passes
>>> the
>>> >> data from the backend to the OL via XML in the following format
>>> >> <table>
>>> >>      <admin  admin msg =  "....."
>>> >>                   user id=
>>> >>                   user_level id
>>> >>         etc >
>>> >> Now ,both flash and DHTML solo runtimes do not work for me.
>>> >> On seeing the error code returned by the OnError function of the
>>> datapath
>>> >> ,I see that the error is
>>> >>
>>> >>  'client could not parse xml from server'
>>> >> The same application works for Proxied deployment on both OL 4.7.1 and
>>> OL
>>> >> 4.8.1 ,seems to me that in the solo runtime of both OL 4.7.1 and OL
>>> 4.8.1,
>>> >> the XML parser does some strict type-checking or is there any other
>>> known
>>> >> issues related to this ?
>>> >> Can anyone help me on this ?
>>> >> On Thu, Sep 16, 2010 at 6:57 PM, P T Withington <[email protected]>
>>> wrote:
>>> >>>
>>> >>> Suggestions:
>>> >>>
>>> >>> 1) Update to 4.8
>>> >>>
>>> >>> 2) Turn on debugging and backtracing, see if you can generate a bug
>>> >>> report.
>>> >>>
>>> >>> (See http://www.openlaszlo.org/misc/OpenLaszloView021210.pdf)
>>> >>>
>>> >>> On 2010-09-16, at 08:55, Gireesh Subramaniam wrote:
>>> >>>
>>> >>> > All,
>>> >>> >
>>> >>> > I am encountering this error when i run DHTML run time on OL 4.7.1.
>>> >>> >
>>> >>> > This error is not encountered on compiling but i see it on the
>>> Error
>>> >>> > console
>>> >>> > of my browser when i try to run the DHTML application.
>>> >>> >
>>> >>> > Hence DHTML application does not start
>>> >>> >
>>> >>> >
>>> >>> > *Error: this.vip.subviews is undefined*
>>> >>> > *Source File:
>>> >>> > http://localhost:8084/DHTMLApp/lps/includes/lfc/LFCdhtml.js*
>>> >>> > *Line: 5110*
>>> >>> > *
>>> >>> > *
>>> >>> > Can someone help me understand if it is a known bug ?
>>> >>> >
>>> >>> > Thanks,
>>> >>> > Gireesh
>>> >>>
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Henry Minsky
>>> > Software Architect
>>> > [email protected]
>>> >
>>> >
>>> >
>>>
>>> *
>>
>
>
>
> --
> Henry Minsky
> Software Architect
> [email protected]
>
>
>

Reply via email to