2 Replies Latest reply on Dec 25, 2010 11:38 PM by flexprabu

    hi 4nds

    flexprabu

      how to pass the xml values into sever

        • 1. Re: hi 4nds
          saisri2k2 Level 4

          You mean XML?

           

          if so convert into String and send it. something like the following will work,

           

          
          
          <?xml version="1.0" encoding="utf-8"?>
          <!-- http://blog.flexexamples.com/2007/08/16/using-httpservice-tag-to-sendreceive-variables-to-a-server-side-script/ -->
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                  layout="vertical"
                  creationComplete="httpService.send(myObj);">
              <fx:Script>
                    <![CDATA[
          
               var xml :XML = <nodes>
          <node>
          <category_id>3</category_id>
          </node>
          
          </nodes>;
          
          public function onClick():void{
          
          var obj:Object = new Object();
          obj['xmnl'] = xml.toXmlString;
          httpService.send(obj);
          
          }
          
          ]]>
               </fx:Script>
          
              <mx:HTTPService id="httpService"
                      url="xxx"
                      method="POST"
                      resultFormat="e4x" />
          
              <mx:Label text="{httpService.lastResult.welcomeMessage}" />
          
          </mx:Application>
          
          

          1 person found this helpful
          • 2. Re: hi 4nds
            flexprabu Level 1

            thank u for replying..but saisri am asking like that..

             

            i have create separate xml

             

            some time am adding nex patient name on run time that xml how can send

            server......