Hi Serkan,

What is parameters?  Isn’t it XML or an Array with one XML element?  If so, “as 
String” will return null since neither XML or Array is a String.  I think the 
commented code calls toXMLString on an XML instance,  I think that’s what you 
want to do.  I think the code also switches to POST as well.

HTH,
-Alex

From: Serkan Taş <serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <users@royale.apache.org>
Date: Saturday, January 12, 2019 at 1:29 AM
To: "users@royale.apache.org" <users@royale.apache.org>
Subject: Re: Work on Emulation

Hi Alex,

Your welcome, happy to help improving the framework.

I changed the code AbstractOperations method sendBody and added the line below 
for XML content which is all commented-out :

paramsToSend = parameters as String;

Unfortunately, the generated javascript can not convert the text to string.

Here is the js  piece preparing XML data and sending the XML to the service 
call :

packedResponse = XML.conversion("username=" + 
com.likya.pinara.model.ModelLocator.getInstance().currentUser.username);
com.likya.pinara.utils.BasicAuthenticationHandler.authAndCall(this.userOpsService,
 "userread", packedResponse);

In AbstractOperaiton js :

if (ctype == mx.rpc.http.AbstractOperation.CONTENT_TYPE_XML) {
    paramsToSend = org.apache.royale.utils.Language.as(parameters, String);
  }

org.apache.royale.utils.Language.as(parameters, String) returns null for the 
packedResponse whch is set to parameters in javascript function.

I thought that getting XML as string will work but did not.

Let me knıow what you think, what should I do next.

Thanks,
Serkan



11.01.2019 20:16 tarihinde Alex Harui yazdı:

I had time to investigate this afternoon.   I just pushed a fix for it.  Thanks 
for finding it.



-Alex



On 1/10/19, 9:20 PM, 
"serkan....@likyateknoloji.com"<mailto:serkan....@likyateknoloji.com> 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com> wrote:





    Alinti Alex Harui <aha...@adobe.com><mailto:aha...@adobe.com>



    > Congratulations on getting that far.  Are you still having the issue

    > with states and the login form looking wrong?



    Thank you Alex. But I am still having the issue and may open a bug on

    github, can you check my previous mail which has the details and the

    sample code  ?



    >

    > In order to help with what to do for CONTENT_TYPE_XML, can you tell

    > us what you want to have happen?  From the code, it looks like it

    > should POST the XML as a string.  If that’s true, then just run the

    > last part that calls toXMLString() and see if that works.  If not,

    > compare that string with what you do want and we try to help figure

    > out what else needs to be changed.  That part is commented out

    > mainly because there were conditions in there that required

    > XMLDocument and we didn’t want to get into emulating that right now.



    As emulated the the class, I remeber its complexity for implementing

    XMLDocument.



    I think just passing the xml as string to the rest call may solve my

    issue. I will try and let you know.



    Thanks,

    Serkan

    >

    > -Alex

    >

    > From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>

    > Reply-To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>

    > Date: Thursday, January 10, 2019 at 2:58 AM

    > To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>

    > Subject: Re: Work on Emulation

    >

    > Hi all,

    >

    > At last, I am able to display the login window and authenticate my

    > application through backend server.

    >

    > After from here, I have to implement the missing part of the method

    > sendBody in mx.rpc.http.AbstractOperation class.

    >

    > The part;

    >

    > if (ctype == CONTENT_TYPE_XML)

    >

    > is all commented-out and is related with http post with XML content.

    >

    > Any help kindly appreciated.

    >

    > Thanks,

    > Serkan





    --

    Serkan Taş

    Mobil : +90 532 250 07 71

    Likya Bilgi Teknolojileri

    ve İletişim Hiz. Ltd. Şti.

    
https://na01.safelinks.protection.outlook.com/?url=www.likyateknoloji.com&amp;data=02%7C01%7Caharui%40adobe.com%7C0ea14e9f54cc4931010f08d67784910a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636827808586507558&amp;sdata=Bgq4iG8Imj0O%2FBWeQHDsSYoa33x07aNwrmPJC7Tz48o%3D&amp;reserved=0<https://na01.safelinks.protection.outlook.com/?url=www.likyateknoloji.com&data=02%7C01%7Caharui%40adobe.com%7C68a22a10778542f5b1d608d678705346%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636828821197241534&sdata=YqigddWBi%2BWaNZeKxKKceMCmmJxrfHwEv0RwkZkTekI%3D&reserved=0>



    --------------------------------------

    Bu elektronik posta ve onunla iletilen bütün dosyalar gizlidir. Sadece

    yukarıda isimleri belirtilen kişiler arasında özel haberleşme amacını

    taşımaktadır. Size yanlışlıkla ulaşmışsa bu elektonik postanın

    içeriğini açıklamanız, kopyalamanız, yönlendirmeniz ve kullanmanız

    kesinlikle yasaktır. Lütfen mesajı geri gönderiniz ve sisteminizden

    siliniz. Likya Bilgi Teknolojileri ve İletişim Hiz. Ltd. Şti. bu

    mesajın içeriği ile ilgili olarak hiç bir hukuksal sorumluluğu kabul

    etmez.



    This electronic mail and any files transmitted with it are intended

    for the private use of  the persons named above. If you received this

    message in error, forwarding, copying or use of any of the information

    is strictly prohibited. Please immediately notify the sender and

    delete it from your system. Likya Bilgi Teknolojileri ve İletişim Hiz.

    Ltd. Şti. does not accept legal responsibility for the contents of

    this message.

    --------------------------------------








Reply via email to