Work on Emulation

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Work on Emulation

Serkan Taş
Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes
XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations
or will there be ?

Thanks
Serkan
Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Alex Harui-2

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 16, 2018 at 9:40 AM
To: "[hidden email]" <[hidden email]>
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan

Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Serkan Taş
I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with
XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan


Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Alex Harui-2

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 16, 2018 at 10:15 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan




Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Serkan Taş
Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as

And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on
HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.
HTTPMultiService 
and 
mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating
mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use
e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a class="moz-txt-link-freetext" href="xml:XML">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan





Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Alex Harui-2

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 16, 2018 at 11:01 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan








Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Serkan Taş
Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML" moz-do-not-send="true">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan









Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Alex Harui-2

Hi Serkan,

 

I’m not sure why you posted links to XMLDocument/XMLNode.  I’m suggesting that you comment all of that out of AbstractOperation so you don’t need it.  I didn’t see references to it in your application code that is posted on GitHub.

 

I suggest commenting out usage of CursorManager for now.  Also NetworkMonitor.

 

Also see if you can comment out ObjectProxy.  Most other classes should be there.  What ones are not?

 

I think if you comment out RESULT_FORMAT_XML handling and ObjectProxy handling in AbstractOperation, that you can bring the rest of HTTPMultiService and AbstractOperation into the MXRoyale SWC.  I think you’ll have to bring of DirectHTTPChannel, but it might be able to call org.apache.royale.net.HTTPService.

 

HTH,

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 16, 2018 at 11:35 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Work on Emulation

 

Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan













Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Serkan Taş
Hi Alex,

Find my comments below;

Thanks
Serkan

16.10.2018 21:45 tarihinde Alex Harui yazdı:

Hi Serkan,

 

I’m not sure why you posted links to XMLDocument/XMLNode.  I’m suggesting that you comment all of that out of AbstractOperation so you don’t need it.  I didn’t see references to it in your application code that is posted on GitHub.


I created them to get rid of compile errors just for now, may be until there will be a real resolution, i see that you think it is not true !

I suggest commenting out usage of CursorManager for now.  Also NetworkMonitor.

Okay.

 

Also see if you can comment out ObjectProxy.  Most other classes should be there.  What ones are not?

Okay

 

I think if you comment out RESULT_FORMAT_XML handling and ObjectProxy handling in AbstractOperation, that you can bring the rest of HTTPMultiService and AbstractOperation into the MXRoyale SWC. 

And also
import mx.rpc.xml.SimpleXMLDecoder;
import mx.rpc.xml.SimpleXMLEncoder;

should be removed. okay.


I think you’ll have to bring of DirectHTTPChannel, but it might be able to call org.apache.royale.net.HTTPService.

 

I am not sure i got the point here :(


HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:35 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML" moz-do-not-send="true">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan














Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Serkan Taş
NetworkMonitor is already emulated. May i use it ?

16.10.2018 21:55 tarihinde Serkan Taş yazdı:
Hi Alex,

Find my comments below;

Thanks
Serkan

16.10.2018 21:45 tarihinde Alex Harui yazdı:

Hi Serkan,

 

I’m not sure why you posted links to XMLDocument/XMLNode.  I’m suggesting that you comment all of that out of AbstractOperation so you don’t need it.  I didn’t see references to it in your application code that is posted on GitHub.


I created them to get rid of compile errors just for now, may be until there will be a real resolution, i see that you think it is not true !

I suggest commenting out usage of CursorManager for now.  Also NetworkMonitor.

Okay.

 

Also see if you can comment out ObjectProxy.  Most other classes should be there.  What ones are not?

Okay

 

I think if you comment out RESULT_FORMAT_XML handling and ObjectProxy handling in AbstractOperation, that you can bring the rest of HTTPMultiService and AbstractOperation into the MXRoyale SWC. 

And also
import mx.rpc.xml.SimpleXMLDecoder;
import mx.rpc.xml.SimpleXMLEncoder;

should be removed. okay.


I think you’ll have to bring of DirectHTTPChannel, but it might be able to call org.apache.royale.net.HTTPService.

 

I am not sure i got the point here :(


HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:35 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML" moz-do-not-send="true">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan















Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Alex Harui-2
In reply to this post by Serkan Taş

Hi Serkan,

 

Is all of your source code on GitHub?  I don’t think your app is using resultFormat=”xml”.  The default is resultFormat=”e4x”, and that doesn’t require XMLDocument/XMLNode.

 

If you have your app compiling against HTTPMultiService, it will report compile errors about XMLDocument/XMLNode, but if you comment out usage of those classes from AbstractOperation then you won’t need to emulate XMLDocument/XMLNode, and your app will still work because the two files ViewToJobXML and JobXMLtoView are both using e4x.

 

When compiling against HTTPMultiService, it looks like it references DirectHTTPChannel which we haven’t emulated yet.  In my last post I suggested having the emulation use  org.apache.royale.net.HTTPService ,but I just took a look at the source and maybe instead of trying to use org.apache.royale.net.HTTPService instead of flash.net.URLLoader you can use org.apache.royale.net.URLLoader.

 

HTH,

-Alex

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 16, 2018 at 11:56 AM
To: "[hidden email]" <[hidden email]>
Subject: Re: Work on Emulation

 

Hi Alex,

Find my comments below;

Thanks
Serkan

16.10.2018 21:45 tarihinde Alex Harui yazdı:

Hi Serkan,

 

I’m not sure why you posted links to XMLDocument/XMLNode.  I’m suggesting that you comment all of that out of AbstractOperation so you don’t need it.  I didn’t see references to it in your application code that is posted on GitHub.


I created them to get rid of compile errors just for now, may be until there will be a real resolution, i see that you think it is not true !



I suggest commenting out usage of CursorManager for now.  Also NetworkMonitor.

Okay.

 

Also see if you can comment out ObjectProxy.  Most other classes should be there.  What ones are not?

Okay

 

I think if you comment out RESULT_FORMAT_XML handling and ObjectProxy handling in AbstractOperation, that you can bring the rest of HTTPMultiService and AbstractOperation into the MXRoyale SWC. 

And also
import mx.rpc.xml.SimpleXMLDecoder;
import mx.rpc.xml.SimpleXMLEncoder;

should be removed. okay.



I think you’ll have to bring of DirectHTTPChannel, but it might be able to call org.apache.royale.net.HTTPService.

 

I am not sure i got the point here :(



HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:35 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan



















Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Alex Harui-2
In reply to this post by Serkan Taş

Yes.

 

From: Serkan Taş <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Tuesday, October 16, 2018 at 12:02 PM
To: "[hidden email]" <[hidden email]>
Subject: Re: Work on Emulation

 

NetworkMonitor is already emulated. May i use it ?

16.10.2018 21:55 tarihinde Serkan Taş yazdı:

Hi Alex,

Find my comments below;

Thanks
Serkan

16.10.2018 21:45 tarihinde Alex Harui yazdı:

Hi Serkan,

 

I’m not sure why you posted links to XMLDocument/XMLNode.  I’m suggesting that you comment all of that out of AbstractOperation so you don’t need it.  I didn’t see references to it in your application code that is posted on GitHub.


I created them to get rid of compile errors just for now, may be until there will be a real resolution, i see that you think it is not true !



I suggest commenting out usage of CursorManager for now.  Also NetworkMonitor.

Okay.

 

Also see if you can comment out ObjectProxy.  Most other classes should be there.  What ones are not?

Okay

 

I think if you comment out RESULT_FORMAT_XML handling and ObjectProxy handling in AbstractOperation, that you can bring the rest of HTTPMultiService and AbstractOperation into the MXRoyale SWC. 

And also
import mx.rpc.xml.SimpleXMLDecoder;
import mx.rpc.xml.SimpleXMLEncoder;

should be removed. okay.



I think you’ll have to bring of DirectHTTPChannel, but it might be able to call org.apache.royale.net.HTTPService.

 

I am not sure i got the point here :(



HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:35 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan

















 



Reply | Threaded
Open this post in threaded view
|

Re: Work on Emulation

Serkan Taş
In reply to this post by Alex Harui-2
Hi Alex,

Here are my comments.

Thanks
Serkan.

16.10.2018 22:06 tarihinde Alex Harui yazdı:

Hi Serkan,

 

Is all of your source code on GitHub?  I don’t think your app is using resultFormat=”xml”.  The default is resultFormat=”e4x”, and that doesn’t require XMLDocument/XMLNode.

Yes all cleint side is on github and will be open-sourced.

 

If you have your app compiling against HTTPMultiService, it will report compile errors about XMLDocument/XMLNode, but if you comment out usage of those classes from AbstractOperation then you won’t need to emulate XMLDocument/XMLNode, and your app will still work because the two files ViewToJobXML and JobXMLtoView are both using e4x.

Okay

 

When compiling against HTTPMultiService, it looks like it references DirectHTTPChannel which we haven’t emulated yet.  In my last post I suggested having the emulation use  org.apache.royale.net.HTTPService ,but I just took a look at the source and maybe instead of trying to use org.apache.royale.net.HTTPService instead of flash.net.URLLoader you can use org.apache.royale.net.URLLoader.

Okay

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:56 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

Find my comments below;

Thanks
Serkan

16.10.2018 21:45 tarihinde Alex Harui yazdı:

Hi Serkan,

 

I’m not sure why you posted links to XMLDocument/XMLNode.  I’m suggesting that you comment all of that out of AbstractOperation so you don’t need it.  I didn’t see references to it in your application code that is posted on GitHub.


I created them to get rid of compile errors just for now, may be until there will be a real resolution, i see that you think it is not true !



I suggest commenting out usage of CursorManager for now.  Also NetworkMonitor.

Okay.

 

Also see if you can comment out ObjectProxy.  Most other classes should be there.  What ones are not?

Okay

 

I think if you comment out RESULT_FORMAT_XML handling and ObjectProxy handling in AbstractOperation, that you can bring the rest of HTTPMultiService and AbstractOperation into the MXRoyale SWC. 

And also
import mx.rpc.xml.SimpleXMLDecoder;
import mx.rpc.xml.SimpleXMLEncoder;

should be removed. okay.



I think you’ll have to bring of DirectHTTPChannel, but it might be able to call org.apache.royale.net.HTTPService.

 

I am not sure i got the point here :(



HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:35 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are also references for other objects.

May you look at the emulations:

https://drive.google.com/open?id=1SGxAfW7bUk2GA-xD2tbMLpyHj0Ev74Vx
https://drive.google.com/open?id=1OlmWCQ3X3gJZGuFs4kNfpOr8oUFUfuup
https://drive.google.com/open?id=1pMVqwZP7x6_O23u_P2gtX2VTthmYkkLV
https://drive.google.com/open?id=1ttCNWpqItzqKfjhLscezXGpAUmFa8b7I

Thanks,
Serkan

16.10.2018 21:26 tarihinde Alex Harui yazdı:

HI Serkan,

 

JobXMLtoView and ViewToJobXML are already using e4x so they should work as-is.

 

That makes me wonder if your app is actually using XMLDocument or not or you just ran into this problem trying to use HTTPMultiService.  A search of your code on your GitHub did not show any use of XMLDocument.

 

IMO, you could copy the code for HTTPMultiService and its AbstractOperation and just comment out RESULT_FORMAT_XML for now.

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 11:01 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

Hi Alex,

There are two cases, one of them is my project the other is related with Http services :

1.
I my case,  two transformation classes used for to/from xml with flex view.

https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/JobXmlToView.as
https://github.com/likyateknoloji/pinaraui-royale/blob/master/PinaraUI/src/com/likya/pinara/utils/ViewToJobXml.as


And i am not sure but there are some code pieces using xpath kind of controls/searches in source base AFAIR.

Having all xml functionality in Royale will be nice of course but if you think that  it is better to use e4x for all my code base  i may think on that.

2.
Currently i am working on HTTPMultiService  because as we discussed previously to create fiber HTTPServiceWrapper class and extend it from mx.rpc.http.HTTPMultiService

There are two classes :

mx.rpc.http.HTTPMultiService 
and  mx.rpc.http.mxml.HTTPMultiService and extends from mx.rpc.http.HTTPMultiService

mx.rpc.http.HTTPMultiService
has referance for class AbstractOperation. This class has emulation for package mx.rpc but not for mx.rpc.http which has references flash.xml.XMLDocument, flash.xml.XMLNode and mx.rpc.xml.SimpleXMLDecoder, mx.rpc.xml.SimpleXMLEncoder.

When i am  emulating mx.rpc.http.AbstractOperation i needed to emulate all XML thing.

If it is possible to use e4x for these classes also i may do it. I have to check all my emulation classes to remember the work i have done yesterday :) It is getting harder to recover as life goes.

Thanks
Serkan

16.10.2018 20:24 tarihinde Alex Harui yazdı:

Hi Serkan,

 

After looking at the XMLDocument/XMLNode API, it might be a manageable amount of work to map it to e4x.

 

On the other hand, if your response from the server is a string in XML format, you can create an e4x XML object by doing:

 

    Var <a href="xml:XML" moz-do-not-send="true">xml:XML = new XML(stringFromServer);

 

It will parse the string in the constructor.

 

Then instead of accessing a childNodes array, you get an XMLList that has an array-like API by calling:

 

    Var xmlChildren:XMLList = xml.children();

 

Then instead of an XMLNode you get an XML node:

 

    Var xmlChildNode:XML = xmlChildren[i];

 

HTH,

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 10:15 AM
To: [hidden email] [hidden email]
Subject: Re: Work on Emulation

 

I am using xml for communicating with a Java application over http (POST/GET) with rest way.  Send/Receive xml.

I need to replace this messsaging infrastructure with a lightweight approach but not now.

Reproducing all XML staff may need too much time for sure and i am not sure how to go with XML/XMLList and e4x how much time it may take.

Let me go step by step, discuss and see what can i do.

Serkan.

16.10.2018 19:58 tarihinde Alex Harui yazdı:

I suppose you could try to reproduce XMLDocument.  The only reason it doesn’t exist is because nobody has needed it so far, but creating that could be a lot of work.  Is there a reason you don’t want to use XML/XMLList and e4x?  Does your app decode SOAP responses or are you using SimpleXMLDecoder/Encoder for some other network/server communication?

 

-Alex

 

From: Serkan Taş [hidden email]
Reply-To: [hidden email] [hidden email]
Date: Tuesday, October 16, 2018 at 9:40 AM
To: [hidden email] [hidden email]
Subject: Work on Emulation

 

Hi,

When i have to use xml classes like SimpleXMLDecoder, SimpleXMLEncoder, etc. I need some class implentations like XMLNode, XMLType,XMLDocument. I created the emulations of Encode and Decoder and  created classes XMLNode, XMLType,XMLDocument with empty methods and some variables.

What will be the Royale approach for XML operations or will there be ?

Thanks
Serkan