1 Reply Latest reply on Nov 26, 2008 3:04 PM by rtalton

    web service call problem

    Level 7
      We are trying to call a web service and pass as parameter some complex
      types. When invoking the web service everything works well on flex
      side, but on the server side the input parameters we get from flex are
      not correct - complex type is removed and the elements of the complex
      type are sent. See the example:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml"
      layout="absolute">
      <mx:WebService id="ws_id" wsdl="link" useProxy="false"
      fault="wsFault(event)">
      <mx:operation id="op_id" name="op" result="wsResult(event)">
      <mx:request>
      <parameters>
      <parameter1>{value1}</parameter1>
      <parameter2>{value2}</parameter2>
      <parameter3>{value3}</parameter3>
      <parameter4>
      <parameter4_1>{value4_1}</parameter4_1>
      <parameter4_2>{value4_2}</parameter4_2>
      <parameter4_3>{value4_3}</parameter4_3>
      </parameter4>
      </parameters>
      </mx:request>
      </mx:operation>
      </mx:WebService>
      </mx:Application>


      on server side we get this:

      <parameters>
      <parameter1>{value1}</parameter1>
      <parameter2>{value2}</parameter2>
      <parameter3>{value3}</parameter3>
      <parameter4_1>{value4_1}</parameter4_1>
      <parameter4_2>{value4_2}</parameter4_2>
      <parameter4_3>{value4_3}</parameter4_3>
      </parameters>

      Instead of :

      <parameters>
      <parameter1>{value1}</parameter1>
      <parameter2>{value2}</parameter2>
      <parameter3>{value3}</parameter3>
      <parameter4>
      <parameter4_1>{value4_1}</parameter4_1>
      <parameter4_2>{value4_2}</parameter4_2>
      <parameter4_3>{value4_3}</parameter4_3>
      </parameter4>
      </parameters>

      Any idea how is it possible to send complex type as web service input
      from flex ?
        • 1. Re: web service call problem
          rtalton Level 4
          May be wrong, but I don't think the WebService <request> tag can accept nested parameters, such as what you're doing with <parameter4>. Each element name in the xml pair must match a parameter name in the Web Service WSDL. I think Flex would just ignore <parameter4> and not send it.