1 Reply Latest reply on Sep 30, 2009 2:21 AM by FranciscoSalasHortelano

    custom soap

    FranciscoSalasHortelano

      I at all.

       

      I must create a custom soap message to call a ws.

       

      I have an action script class called Name with the next attribs:

       

        public class Name
            {
                 
               [Bindable] public var name:String;
               [Bindable] public var ape1:String;
               [Bindable] public var cp:String;

       

       

       

            public function Name()
                  {
                       
                        //nothing initialize   
                  }

       

      }

       

      In my mxml I have

       

      <mx:Script>
          <![CDATA[

       

          [Bindable] public var nombre:Name = new Name();

       

          ]]>
      </mx:Script>

       

       

      And the last code that are involve in my problem is the next one:

       

      <mx:WebService id="webService" wsdl="XXXX (local wsdl)" showBusyCursor="true">

       

          <mx:operation name="getNames"
                      resultFormat="e4x"
                      result="handleResponse(event);"
                      fault="handleFault(event);">

       

               
                <mx:request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                    xmlns:name="http://XXXXXXX"
                    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                         format="xml">
                       
                    <name:getNames soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

       

                         <in1 xsi:type="name:Name" xmlns:name="http://XXXXXX">

                            <name xsi:type="xsd:string"> {nombre.name}</name><!-- value from class-->
                            <ape1 xsi:type="xsd:string">{nombre.ape1}</ape1><!-- value from class-->
                            <cp xsi:type="xsd:string">{nombre.cp}</cp><!-- value from class-->
                         </in1>

       

                 </name:getNames>               
               </mx:request>
                     
                </mx:operation>

       

          </mx:WebService>

       

      I will try to invoke the webservice operation, but I do not retrieve the values of the class attributes, that are important to me, because I must pass it to the webservice.

       

      Please take a look and tell me something if you can. (I´ll try to retrieve the value with {nombre.XXX}, "{nombre.XXX}", {"nombre.cp"}).

       

      Thanks in advance