Skip to main content
DjCentu
Participant
May 30, 2016
Question

laden von Externen XML nur noch Hieroglyphen

  • May 30, 2016
  • 1 reply
  • 565 views

Hallo Community.

Habe ein dickes Problem. Ich muss externe XML Daten vom einem Server abfragen. Alle neuen Kompilierten Flash Dateien funktionieren nicht mehr (nach Mitte März). Dabei habe ich nichts am Server sowie am AS3 Code geändert. wenn ich das Ganze als Air Kompiliere geht es, aber ich benötige Flash Player 10.3 (als export-basis). Kann das mit dem Update von Mai zu tun haben ?

ActionScript:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var xmlString: String = "<soapenv><clientNr>173</clientNr><clientPw>96231172</clientPw><outletID>429</outletID><stockNr>6</stockNr><ARTICLE><article_number>1848484</article_number></ARTICLE></soapenv>";
var XMLCode: XML = new XML(xmlString);
var xmlResponse: XML;
var xmlURLReq: URLRequest = new URLRequest("http://*********/GetHardwareDetail/v1");
var xmlSendLoad: URLLoader = new URLLoader();
xmlURLReq.data = XMLCode;
xmlURLReq.contentType = "text/xml";
xmlURLReq.method = URLRequestMethod.POST;
trace(XMLCode)

xmlSendLoad.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
xmlSendLoad.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
xmlSendLoad.load(xmlURLReq);

function onComplete(evt: Event): void {
     try {
        xmlResponse = new XML(evt.target.data);
        trace(xmlResponse)
        removeEventListener(Event.COMPLETE, onComplete);
        removeEventListener(IOErrorEvent.IO_ERROR, onIOError);
 
     } catch (err: TypeError) {
 
     }
}
   function onIOError(evt: IOErrorEvent): void {
        trace("ioERROR")}
     

Das sollte ich bekommen / Habe ich früher bekommen

ActionScript:

1
2
3
4
5
6
7
8
9
10
11
<GetHardwareDetail>
  <ARTICLE>
    <article_number>1848484</article_number>
    <stock>0</stock>
    <price_retail>799</price_retail>
    <price_wac>671.43</price_wac>
    <price_lastinvoice>604.89</price_lastinvoice>
    <onl_stock>0</onl_stock>
    <onl_price>0</onl_price>
  </ARTICLE>
</GetHardwareDetail>

Doch das bekomme ich jetzt / als Bild besser lesbar

ActionScript:

1 ? eË ?0 D÷$þ?a/ ? ?K?ñ¸2¸&µ4¦±´¦TôóUðíîΜ? ¤?Rvkn*¡Uâ ?ïv¹bº j?¸ÛlÞ ¹)é8°àvIMq¦?O¹¥B  o²Õd=#@ LòÊ 7$  ö ?~|¨&not;f r í G# ÏMû Ç1 /çÁ? ?û ~â»ñ`?VV¨Zßn?ýÐó?ÏÐ' ­dÞvF  ·j@?oë

ich hoffe es kann sich einer einen Reim daraus bilden.

Grüße

Stephan

This topic has been closed for replies.

1 reply

Inspiring
May 30, 2016

I doubt there are any changes in the player that would prevent XML from working. Looks maybe like a character encoding problem? Have you looked at what's happening in the call using Fiddler or other http sniffer? That should tell you a lot. Also, not that it matters to your output, but your removeEventListeners inside the callback don't do a thing. You need to remove them from the object you added them to - xmlSendLoad.

DjCentu
DjCentuAuthor
Participant
May 30, 2016

ist not a problem of removeEventListeners Event and the code is the same since 2 years. i think it's the security update from May.

source: httpnetworksniffer

Inspiring
May 30, 2016

Maybe it is the security update, but your removeEventListeners still do nothing as you have them. Did you look at Fiddler to see the requests being made?