1 Reply Latest reply on Oct 1, 2007 7:30 PM by LJ6m3gu9

    Data Binding Not Working With Response From Web Service

    LJ6m3gu9 Level 1
      Is my inside the curly brackets (i.e. braces) not proper given the response?

      7 5.217792 LOCAL 0019B949FF5C SOAP SOAP Reply : WARNING !!! Body not found P1133XP 192.168.1.32 IP
      FRAME: Base frame properties
      FRAME: Time of capture = 10/1/2007 16:23:45
      FRAME: Time delta from previous physical frame: 15625 microseconds
      FRAME: Frame number: 7
      FRAME: Total frame length: 689 bytes
      FRAME: Capture frame length: 689 bytes
      FRAME: Frame data: Number of data bytes remaining = 689 (0x02B1)
      ETHERNET: EType = Internet IP (IPv4)
      ETHERNET: Destination address = 0019B949FF5C
      ETHERNET: 0....... = Individual address
      ETHERNET: .0...... = Universally administered address
      ETHERNET: Source address = 00B0D0FCDB93
      ETHERNET: .0...... = Universally administered address
      ETHERNET: Ethernet Type : 0x0800 (Internet IP (IPv4))
      IP: Protocol = TCP - Transmission Control; Packet ID = 2662; Total IP Length = 675; Options = No Options
      IP: Version = IPv4; Header Length = 20
      IP: 0100.... = IP Version 4
      IP: ....0101 = Header Length 20
      IP: Type of Service = Normal Service
      IP: 000..... = Precedence - Routine
      IP: ...0.... = Normal Delay
      IP: ....0... = Normal Throughput
      IP: .....0.. = Normal Reliability
      IP: ......0. = Normal Monetary Cost
      IP: Total Length = 675 (0x2A3)
      IP: Identification = 2662 (0xA66)
      IP: Fragmentation Summary = 16384 (0x4000)
      IP: .1.............. = Cannot fragment datagram
      IP: ..0............. = Last fragment in datagram
      IP: ...0000000000000 = Fragment Offset 0 (0x0000)
      IP: Time to Live = 128 (0x80)
      IP: Protocol = TCP - Transmission Control
      IP: Checksum = 27215 (0x6A4F)
      IP: Source Address = 192.168.1.47
      IP: Destination Address = 192.168.1.32
      TCP: Control Bits: .AP..., len: 635, seq:1318245002-1318245637, ack: 74863142, win:64434, src: 80

      dst:49291
      TCP: Source Port = World Wide Web HTTP
      TCP: Destination Port = 0xC08B
      TCP: Sequence Number = 1318245002 (0x4E92D28A)
      TCP: Acknowledgement Number = 74863142 (0x4765226)
      TCP: Data Offset = 20 bytes
      TCP: 0101.... = Data Offset (20 bytes)
      TCP: ....0000 = Reserved bits
      TCP: Flags = 0x18 : .AP...
      TCP: ..0..... = No urgent data
      TCP: ...1.... = Acknowledgement field significant
      TCP: ....1... = Push function
      TCP: .....0.. = No Reset
      TCP: ......0. = No Synchronize
      TCP: .......0 = Not the end of the data
      TCP: Window = 64434 (0xFBB2)
      TCP: Checksum = 0xCCB3
      TCP: Urgent Pointer = 0 (0x0)
      HTTP: Response to Client; HTTP/1.1; Status Code = 200 - OK
      HTTP: Protocol Version =HTTP/1.1
      HTTP: Status Code = OK
      HTTP: Reason =OK
      HTTP: Date =Mon, 01 Oct 2007 20:23:45 GMT
      HTTP: Server =Microsoft-IIS/6.0
      HTTP: MicrosoftOfficeWebServer =5.0_Pub
      HTTP: X-Powered-By = ASP.NET
      HTTP: X-AspNet-Version = 2.0.50727
      HTTP: Cache-Control =private, max-age=0
      HTTP: Content-Type =text/xml; charset=utf-8
      HTTP: Content-Length =370
      HTTP: Data: Number of data bytes remaining = 370 (0x0172)
      SOAP: SOAP Reply : WARNING !!! Body not found
      SOAP: Envelope xmlns:soap=' http://schemas.xmlsoap.org/soap/envelope/'

      xmlns:xsi=' http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd=' http://www.w3.org/2001/XMLSchema'
      00000: 00 19 B9 49 FF 5C 00 B0 D0 FC DB 93 08 00 45 00 ..¹Iÿ\.°ÐüÛ“..E.
      00010: 02 A3 0A 66 40 00 80 06 6A 4F C0 A8 01 2F C0 A8 .£.f@.€.jOÀ¨./À¨
      00020: 01 20 00 50 C0 8B 4E 92 D2 8A 04 76 52 26 50 18 . .PÀ‹N’ÒŠ.vR&P.
      00030: FB B2 CC B3 00 00 48 54 54 50 2F 31 2E 31 20 32 û²Ì³..HTTP/1.1 2
      00040: 30 30 20 4F 4B 0D 0A 44 61 74 65 3A 20 4D 6F 6E 00 OK..Date: Mon
      00050: 2C 20 30 31 20 4F 63 74 20 32 30 30 37 20 32 30 , 01 Oct 2007 20
      00060: 3A 32 33 3A 34 35 20 47 4D 54 0D 0A 53 65 72 76 :23:45 GMT..Serv
      00070: 65 72 3A 20 4D 69 63 72 6F 73 6F 66 74 2D 49 49 er: Microsoft-II
      00080: 53 2F 36 2E 30 0D 0A 4D 69 63 72 6F 73 6F 66 74 S/6.0..Microsoft
      00090: 4F 66 66 69 63 65 57 65 62 53 65 72 76 65 72 3A OfficeWebServer:
      000A0: 20 35 2E 30 5F 50 75 62 0D 0A 58 2D 50 6F 77 65 5.0_Pub..X-Powe
      000B0: 72 65 64 2D 42 79 3A 20 41 53 50 2E 4E 45 54 0D red-By: ASP.NET.
      000C0: 0A 58 2D 41 73 70 4E 65 74 2D 56 65 72 73 69 6F .X-AspNet-Versio
      000D0: 6E 3A 20 32 2E 30 2E 35 30 37 32 37 0D 0A 43 61 n: 2.0.50727..Ca
      000E0: 63 68 65 2D 43 6F 6E 74 72 6F 6C 3A 20 70 72 69 che-Control: pri
      000F0: 76 61 74 65 2C 20 6D 61 78 2D 61 67 65 3D 30 0D vate, max-age=0.
      00100: 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65 3A 20 74 .Content-Type: t
      00110: 65 78 74 2F 78 6D 6C 3B 20 63 68 61 72 73 65 74 ext/xml; charset
      00120: 3D 75 74 66 2D 38 0D 0A 43 6F 6E 74 65 6E 74 2D =utf-8..Content-
      00130: 4C 65 6E 67 74 68 3A 20 33 37 30 0D 0A 0D 0A 3C Length: 370....<
      00140: 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 2E ?xml version="1.
      00150: 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 75 74 66 0" encoding="utf
      00160: 2D 38 22 3F 3E 3C 73 6F 61 70 3A 45 6E 76 65 6C -8"?><soap:Envel
      00170: 6F 70 65 20 78 6D 6C 6E 73 3A 73 6F 61 70 3D 22 ope xmlns:soap="
      00180: 68 74 74 70 3A 2F 2F 73 63 68 65 6D 61 73 2E 78 http://schemas.x
      00190: 6D 6C 73 6F 61 70 2E 6F 72 67 2F 73 6F 61 70 2F mlsoap.org/soap/
      001A0: 65 6E 76 65 6C 6F 70 65 2F 22 20 78 6D 6C 6E 73 envelope/" xmlns
      001B0: 3A 78 73 69 3D 22 68 74 74 70 3A 2F 2F 77 77 77 :xsi=" http://www
      001C0: 2E 77 33 2E 6F 72 67 2F 32 30 30 31 2F 58 4D 4C .w3.org/2001/XML
      001D0: 53 63 68 65 6D 61 2D 69 6E 73 74 61 6E 63 65 22 Schema-instance"
      001E0: 20 78 6D 6C 6E 73 3A 78 73 64 3D 22 68 74 74 70 xmlns:xsd="http
      001F0: 3A 2F 2F 77 77 77 2E 77 33 2E 6F 72 67 2F 32 30 ://www.w3.org/20
      00200: 30 31 2F 58 4D 4C 53 63 68 65 6D 61 22 3E 3C 73 01/XMLSchema"><s
      00210: 6F 61 70 3A 42 6F 64 79 3E 3C 4C 6F 67 6F 6E 52 oap:Body><LogonR
      00220: 65 73 70 6F 6E 73 65 20 78 6D 6C 6E 73 3D 22 68 esponse xmlns="h
      00230: 74 74 70 3A 2F 2F 73 79 73 74 61 72 2E 63 6F 6D ttp://systar.com
      00240: 2F 62 62 72 22 3E 3C 4C 6F 67 6F 6E 52 65 73 75 /bbr"><LogonResu
      00250: 6C 74 3E 35 64 34 32 39 36 66 62 2D 37 61 64 63 lt>5d4296fb-7adc
      00260: 2D 34 35 66 30 2D 38 31 32 63 2D 65 39 35 36 36 -45f0-812c-e9566
      00270: 35 65 38 35 33 30 32 3C 2F 4C 6F 67 6F 6E 52 65 5e85302</LogonRe
      00280: 73 75 6C 74 3E 3C 2F 4C 6F 67 6F 6E 52 65 73 70 sult></LogonResp
      00290: 6F 6E 73 65 3E 3C 2F 73 6F 61 70 3A 42 6F 64 79 onse></soap:Body
      002A0: 3E 3C 2F 73 6F 61 70 3A 45 6E 76 65 6C 6F 70 65 ></soap:Envelope
      002B0: 3E

      <?xml version="1.0"?>
      <!-- containers\layouts\FormDataSubmitServer.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

      <!-- Define the web service connection.
      The specified WSDL URI is not functional. -->
      <mx:WebService id="AuthenticationService" fault="bsFaultHandler(event);" result="bsReady();"
      wsdl="/Users/Ugen/Documents/JIFFY.XML" xmlns="NS0">
      <mx:operation name="Logon">
      <mx:request>
      <userName>{replyUserid.text}</userName>
      <password>{replyPassword.text}</password>
      <language>{replyCulture.text}</language>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      <mx:Script>
      <![CDATA[
      import mx.rpc.events.FaultEvent;
      import mx.controls.Alert;
      private function processValues():void
      {
      AuthenticationService.Logon.send();
      }

      private function bsFaultHandler(event:FaultEvent):void
      {
      Alert.show (event.fault.message);
      }

      private function bsReady():void
      {
      Alert.show("And now we are ready.");
      }
      ]]>
      </mx:Script>

      <mx:Panel>
      <mx:Form>
      <mx:FormItem label="Systar BusinessBridge Authentication">
      <mx:TextInput id="replyUserid"
      width="200"
      text="Userid please?"/>
      <mx:TextInput id="replyPassword"
      width="200"
      text="Password please?"/>
      <mx:TextInput id="replyCulture"
      width="200"
      text="Culture code please?"/>
      <mx:Button
      width="60"
      label="Submit"
      click="processValues();"/>
      </mx:FormItem>
      </mx:Form>
      </mx:Panel>
      <mx:Panel>
      <mx:VBox>
      <mx:TextArea text="{AuthenticationService.Logon.lastResult.LogonResponse.LogonResult}">
      </mx:TextArea>
      </mx:VBox>
      </mx:Panel>
      </mx:Application>

        • 1. Re: Data Binding Not Working With Response From Web Service
          LJ6m3gu9 Level 1
          It is me again. I have made a few changes. For example, I applied HOTFIX #2 and HOTFIX #3. Also, I attempted to extract the string that I need using ActionScript. I also installed the debugging version of the client-side of Flex. The network trace still shows that the Web Service is correctly responding to the query. Here is all the information that I have gathered:

          I applied HOTFIX 2 and HOTFIX 3 with no discernable change in behavior. I added the statement (suckolux = AuthenticationService.Logon.lastResult.LogonResponse.LogonResult;) to the program in the method that receives control once the server has responded to the client (Flash inside IE). By adding resultFormat="xml" to the mx:operation element, I was able to change the error message. Even though LogonResponse is as plain as the nose on Mr. Flex's face, Flex claims it isn't there. The message (TypeError: Error #1010: A term is undefined and has no properties.) appears in many situations, confounding everybody except the person who chose the words in the message. Apparently it translates to "I, the program, am completely confused, but I won't admit it."



          <?xml version="1.0"?>
          <!-- containers\layouts\FormDataSubmitServer.mxml -->
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">

          <!-- Define the web service connection.
          The specified WSDL URI is not functional. -->
          <mx:WebService id="AuthenticationService" fault="bsFaultHandler(event);" result="bsReady();" makeObjectsBindable="true"
          wsdl="/Users/Ugen/Documents/JIFFY.wsdl" xmlns="NS0">
          <mx:operation name="Logon" resultFormat="xml">
          <mx:request>
          <userName>{replyUserid.text}</userName>
          <password>{replyPassword.text}</password>
          <language>{replyCulture.text}</language>
          </mx:request>
          </mx:operation>
          </mx:WebService>

          <mx:Script>
          <![CDATA[
          // WHEEEEEEEEEEEEEEEEEEEEEEEEE! result="bsReady();"
          import mx.rpc.events.FaultEvent;
          import mx.controls.Alert;
          import mx.utils.ArrayUtil;
          import mx.collections.ArrayCollection;

          [Bindable]
          private var suckolux:ArrayCollection;

          private function processValues():void
          {
          AuthenticationService.Logon.send();
          }

          private function bsFaultHandler(event:FaultEvent):void
          {
          Alert.show (event.fault.message);
          Alert.show("I am sorry. This ride is closed.");
          }

          private function bsReady():void
          {
          Alert.show("Your order is ready.");
          suckolux = AuthenticationService.Logon.lastResult.LogonResponse.LogonResult;
          // <mx:ArrayCollection id="capricorn" source="{ArrayUtil.toArray(AuthenticationService.Logon.lastResult)}"/>
          // suckolux = ArrayUtil.toArray(AuthenticationService.Logon.lastResult);
          // buzz.text = (AuthenticationService.Logon.lastResult.LogonResponse.LogonResult);
          // ratso:XML = AuthenticationService.Logon.lastResult;
          }
          ]]>
          </mx:Script>

          <mx:Panel>
          <mx:Form>
          <mx:FormItem label="Systar BusinessBridge Authentication">
          <mx:TextInput id="replyUserid"
          width="200"
          text="test"/>
          <mx:TextInput id="replyPassword"
          width="200"
          text="test"/>
          <mx:TextInput id="replyCulture"
          width="200"
          text="1033"/>
          <mx:Button
          width="60"
          label="Submit"
          click="processValues();"/>
          </mx:FormItem>
          </mx:Form>
          </mx:Panel>

          <mx:Panel>
          <mx:VBox>
          <mx:TextArea text="{AuthenticationService.Logon.lastResult.LogonResponse.LogonResult}">
          </mx:TextArea>
          </mx:VBox>
          </mx:Panel>
          </mx:Application>




          [SWF] C:\Users\Ugen\ECLIPSE-WORKSPACE\SubmittingDataToAWebService\bin\SubmittingDataToAWebServi ce-debug.swf - 930,076 bytes after decompression
          warning: unable to bind to property 'LogonResponse' on class 'Array' (class is not an IEventDispatcher)
          TypeError: Error #1010: A term is undefined and has no properties.
          at SubmittingDataToAWebService/SubmittingDataToAWebService::bsReady()[C:\Users\Ugen\ECLIPSE- WORKSPACE\SubmittingDataToAWebService\SubmittingDataToAWebService.mxml:43]
          at SubmittingDataToAWebService/__AuthenticationService_result()[C:\Users\Ugen\ECLIPSE-WORKSP ACE\SubmittingDataToAWebService\SubmittingDataToAWebService.mxml:7]
          at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.rpc::AbstractService/dispatchEvent()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\Abst ractService.as:235]
          at mx.rpc.soap.mxml::WebService/dispatchEvent()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc \soap\mxml\WebService.as:229]
          at mx.rpc::AbstractOperation/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\flex_201_borneo\sdk\ frameworks\mx\rpc\AbstractOperation.as:183
          at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\flex_201_borneo\sdk\fra meworks\mx\rpc\AbstractInvoker.as:168
          at mx.rpc::Responder/result()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\Responder.as:48]
          at mx.rpc::AsyncRequest/acknowledge()[E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequ est.as:81]
          at DirectHTTPChannel.as$130::DirectHTTPMessageResponder/completeHandler()[E:\dev\flex_201_bo rneo\sdk\frameworks\mx\messaging\channels\DirectHTTPChannel.as:381]
          at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flash.net::URLLoader/flash.net:URLLoader::onComplete()