10 Replies Latest reply on Aug 3, 2007 8:23 PM by vekki11

    WSDL encoding error

    vekki11
      Hi,
      I am using web service in my mxml code. It used to work fine with Flex SDK 2.0, but I am getting the following error with Flex SDK hot fix 2.0.1 and Moxie M3:
      [RPC Fault faultString="Required parameter 'userName' not found in input arguments." faultCode="EncodingError" faultDetail="null"]
      at mx.rpc.soap::Operation/ http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()
      at mx.rpc.soap::Operation/send()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc.soap.mxml::Operation/send()
      at CslGraphCanvas/private::init()
      at CslGraphCanvas/___CslGraphCanvas_Application1_applicationComplete()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()

      Does anybody aware of any know bug in 2.0.1/Flex 3 SDK and is there any workaround?

        • 1. Re: WSDL encoding error
          zeke77
          Did you ever find the solution to this problem?
          thanks
          • 2. Re: WSDL encoding error
            vekki11 Level 1
            No, I couldn't get it working. I have created a bug report against Flex 3 SDk.

            Thanks.

            Venki
            • 3. Re: WSDL encoding error
              zeke77 Level 1
              I was a little mad (since it worked in Flex 2 and not Flex 3) and just started trying things and got real lucky (only took me a couple of minutes since my post).

              My old operation tag looked like this...
              <mx:operation name="GetStockQuotes" >
              <mx:request>
              <GetQuotes><QuoteTicker>{stockTicker}</QuoteTicker></GetQuotes>
              </mx:request>
              </mx:operation>

              and my new operation tag looks like this...

              <mx:operation name="GetStockQuotes" >
              <mx:request>
              <parameters><QuoteTicker>{stockTicker}</QuoteTicker></parameters>
              </mx:request>
              </mx:operation>

              While I don't really understand what is going on here and think there really is a bug somewhere along the line, you may be able to solve your problem by replacing something in your <mx:request> tag with the userName parameter that it was looking for in the same way that I replaced "GetQuotes" with "parameters". I was getting the same message you were except I was getting "parameters" in the same place you got "userName"

              Not really a good solution, but it seems to work for now.
              • 4. Re: WSDL encoding error
                Kenny Yates
                Not sure if this might solve the issue but according to the "powers that be" at Adobe Hot Fix 3 addresses issues with web services.

                Might be could address this one but not sure.

                Food for thought anyway.
                • 5. Re: WSDL encoding error
                  vekki11 Level 1
                  I tried wrapping it inside <parameters> tag and still couldn't get it working. The error message userName(user name is passed as an argument to web service operations) not found in input arguments.

                  Any help on this would be really useful.
                  • 6. Re: WSDL encoding error
                    zeke225 Level 1
                    Sorry, I wasn't clear. My error message referenced "parameters" in the same way that your error message referenced "userName". So I wrapped/replaced mine with parameters tags. To get the same effect, you should wrap yours in userName tags.

                    I am going to try the hot fix that mpactdesigns mentioned later tonight and will let you know if it resolved anything
                    • 7. Re: WSDL encoding error
                      vekki11 Level 1
                      In my case the WSDL message looks like as mentioned below:
                      <wsdl:message name="getCslSrcMessage">
                      <wsdl:part name="part1" element="ns0:getCslSrc" />
                      </wsdl:message>

                      <xs:element name="getCslSrc">
                      <xs:complexType>
                      <xs:sequence>
                      <xs:element name="userName" nillable="true" type="xs:string" />
                      </xs:sequence>
                      </xs:complexType>
                      </xs:element>

                      Hence the i created web service request as :
                      <mx:operation name="getCslSrc" result="logCslSrc(event)" fault="showErrorDialog(event)">
                      <mx:request>
                      <getCslSrc>
                      <userName>{userName}</userName>
                      </getCslSrc>
                      </mx:request>
                      </mx:operation>

                      Can you tell what I am doing wrong here?
                      • 8. Re: WSDL encoding error
                        zeke77 Level 1
                        try making userName the top level tag in the request, like...

                        <mx:operation name="getCslSrc" result="logCslSrc(event)" fault="showErrorDialog(event)">
                        <mx:request>
                        <userName>{userName}</userName>
                        </mx:request>
                        </mx:operation>
                        • 9. Re: WSDL encoding error
                          vekki11 Level 1
                          Thanks for helping me out. I tried the way you suggested, but still I am receiving userName not found in input arguments. I filed a bug and not sure if anybody in Flex 3 SDK team are aware of this.
                          • 10. Re: WSDL encoding error
                            vekki11 Level 1
                            Thanks zeke77. With August 03 Flex 3 SDK build, it is working with just passing parameters as <userName>{userName}</userName>, but for complexType more than one element it is expecting the elements to be wrapped by a parent element with the name of the WSDL part.