Hi Alex,
DirectHttpChannel calls URLLoader.load with */urlRequest /*parameter,
which is correct and contains input data.
mx.messaging.channels.DirectHTTPChannel.prototype.internalSend =
function(msgResp) {
var /** @type
{mx.messaging.channels.DirectHTTPChannel.DirectHTTPMessageResponder} */
httpMsgResp = org.apache.royale.utils.Language.as(msgResp,
mx.messaging.channels.DirectHTTPChannel.DirectHTTPMessageResponder, true);
var /** @type {org.apache.royale.net.URLRequest} */ urlRequest;
try {
urlRequest =
this.http_$$www_adobe_com$2006$flex$mx$internal__createURLRequest(httpMsgResp.message);
} catch (e) {
httpMsgResp.agent.fault(e.fault, httpMsgResp.message);
return;
}
var /** @type {org.apache.royale.net.URLLoader} */ urlLoader =
httpMsgResp.urlLoader;
urlLoader.addEventListener(mx.events.ErrorEvent.ERROR,
org.apache.royale.utils.Language.closure(httpMsgResp.errorHandler,
httpMsgResp, 'errorHandler'));
urlLoader.addEventListener(mx.events.IOErrorEvent.IO_ERROR,
org.apache.royale.utils.Language.closure(httpMsgResp.errorHandler,
httpMsgResp, 'errorHandler'));
urlLoader.addEventListener(mx.events.SecurityErrorEvent.SECURITY_ERROR,
org.apache.royale.utils.Language.closure(httpMsgResp.securityErrorHandler,
httpMsgResp, 'securityErrorHandler'));
urlLoader.addEventListener(org.apache.royale.events.Event.COMPLETE,
org.apache.royale.utils.Language.closure(httpMsgResp.completeHandler,
httpMsgResp, 'completeHandler'));
urlLoader.addEventListener(mx.events.HTTPStatusEvent.HTTP_STATUS,
org.apache.royale.utils.Language.closure(httpMsgResp.httpStatusHandler,
httpMsgResp, 'httpStatusHandler'));
urlLoader.load(urlRequest);
};
And URLoader.load is called :
org.apache.royale.net.URLLoader.prototype.load = function(request) {
var /** @type {XMLHttpRequest} */ element =
org.apache.royale.utils.Language.as(this.org_apache_royale_net_URLLoader_element,
XMLHttpRequest);
element.onreadystatechange =
org.apache.royale.utils.Language.closure(this.progressHandler, this,
'progressHandler');
var /** @type {string} */ url = request.url;
element.open(request.method, request.url, true);
var /** @type {boolean} */ sawContentType = false;
if (request.requestHeaders) {
var /** @type {number} */ n = request.requestHeaders.length;
for (var /** @type {number} */ i = 0; i < n; i++) {
var /** @type {org.apache.royale.net.HTTPHeader} */ header =
request.requestHeaders[i];
if (header.name == org.apache.royale.net.HTTPHeader.CONTENT_TYPE) {
sawContentType = true;
}
element.setRequestHeader(header.name, header.value);
}
}
element.send();
this.dispatchEvent(new org.apache.royale.events.Event("postSend"));
};
element.open is called with correct url and correct method - got from
request which correct.
element.send() is called, but there is no place in load function that
sets the input parameter request.data to element before calling send method.
If you prefer I may create a sample project for you to check.
Thanks,
Serkan
17.01.2019 22:15 tarihinde Alex Harui yazdı:
Hi Serkan,
I assume your goal is to get DirectHTTPChannel to work? Or maybe I do
not understand your scenario. Doesn’t DirectHTTPChannel eventually
call URLLoader.load? It looked from your screenshot that the XML data
was not handled correctly by createURLRequest.
-Alex
*From: *Serkan Taş <[email protected]>
*Reply-To: *"[email protected]" <[email protected]>
*Date: *Thursday, January 17, 2019 at 10:38 AM
*To: *"[email protected]" <[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
Do you want me to replace URLLoader.load with
DirectHTTPChannel.createURLRequest ?
Thanks,
Serkan
17.01.2019 06:24 tarihinde Serkan Taş yazdı:
I can say that server side does not get data, so I am sure that it
is not sent.
The point is where it is lost.
I am going to check your point.
Thanks,
Serkan
Android için Outlook
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fghei36&data=02%7C01%7Caharui%40adobe.com%7C54620cf7874d4120893108d67caafd5e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636833471172442091&sdata=sMOBR4O%2BhyLwdjkd8H0KbfgcLLFLaQxYPd52gnvrGn0%3D&reserved=0>
uygulamasını edinin
On Wed, Jan 16, 2019 at 11:42 PM +0300, "Alex Harui"
<[email protected] <mailto:[email protected]>> wrote:
Try DirectHTTPChannel’s createURLRequest.
*From: *Alex Harui <[email protected]> <mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Wednesday, January 16, 2019 at 12:22 PM
*To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Subject: *Re: Work on Emulation
I haven’t looked at the code, but I would imagine data was set
on the request before it got passed into load? Or data is set
on the URLLoader by some other code and you can set a
breakpoint on the data setter.
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Wednesday, January 16, 2019 at 12:03 PM
*To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
Sorry for the delay, here is the debug screen-shots. Just
trying to recover from flu
The picture below show the places where the post request is
sent: element.send()
cid:[email protected]
And here are the values of request and the element :
cid:[email protected]
cid:[email protected]
I can see in the debug view that the method an the url is set
correctly for element but can not see where the data is set.
Even in URLLoader.as JS compiler section has no setting for
request data.
May be I am missing something.
Thanks,
Serkan
14.01.2019 08:08 tarihinde [email protected]
<mailto:[email protected]> yazdı:
I drilled in to the DirectChannel apply method and saw the
same picture that all the values are as expected. I am
going to prepare the case and the screenshot later today.
Thanks,
Serkan
Alinti Alex Harui <[email protected]>
<mailto:[email protected]>
I think there is a good chance that that
AbstractOperation doesn't work (or the AbstractInvoker
it calls isn't working). I would recommend that you
debug in that area first.
-Alex
On 1/13/19, 8:36 PM, "[email protected]"
<mailto:[email protected]>
<[email protected]>
<mailto:[email protected]> wrote:
Sure not Alex,
I am going through my application workflow.
If you need to know, than I may prepare an
application to see if it is or not.
I think you are wondering about the emulated
classes causing the issue.
Thanks,
Serkan
Alinti Alex Harui <[email protected]>
<mailto:[email protected]>
> Hi Serkan,
>
> Have you seen AbstractOperation (for HTTP) work
without XML?
>
> -Alex
>
> From: Serkan Taş <[email protected]>
<mailto:[email protected]>
> Reply-To: "[email protected]"
<mailto:[email protected]>
<[email protected]>
<mailto:[email protected]>
> Date: Sunday, January 13, 2019 at 11:01 AM
> To: "[email protected]"
<mailto:[email protected]>
<[email protected]>
<mailto:[email protected]>
> Subject: Re: Work on Emulation
>
> Hi Alex,
>
> Adding the part below worked for text conversion.
>
> if (ctype == CONTENT_TYPE_XML)
> {
> paramsToSend =
parameters.toXMLString();
>
> I am not sure but I guess this time the data is
not sent to the
> server side. I debugged the code and see that it
is all set.
>
> Here is the capture of the debug, you can see
the watch expression
> and the parameters which are all correct.
>
> [cid:[email protected]]
>
>
> 13.01.2019 14:35 tarihinde Serkan Taş yazdı:
> Hi Alex,
>
> parameters is XML. It is the return of
>
> XML.conversion("username=" +
>
com.likya.pinara.model.ModelLocator.getInstance().currentUser.username);
>
> Yes the request use POST. I am going to try
toXMLString.
>
> Thanks,
> Serkan
>
> 13.01.2019 10:01 tarihinde Alex Harui yazdı:
> 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
--
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&data=02%7C01%7Caharui%40adobe.com%7Cf63c32d6d50541ee5e4708d679d9e4db%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636830374110739512&sdata=gD5MNvTJP%2FrA5DjVt3RFnfHzZHRLOCvb9%2BM1o%2BkKOqQ%3D&reserved=0
<https://na01.safelinks.protection.outlook.com/?url=www.likyateknoloji.com&data=02%7C01%7Caharui%40adobe.com%7C54620cf7874d4120893108d67caafd5e%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636833471172442091&sdata=%2Bt6r1TOg04dko8H2ll4HOniEexyQhad8KgmtvRdS3%2B4%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.
--------------------------------------