2 Replies Latest reply on May 19, 2006 9:32 AM by kmurray24

    New Install causes app not work now

    kmurray24
      I have a google web service program that was working. When I reinstalled Flex the app doesn't work anymore telling me that a web service parameter is missing.. It's not. Can anyone tell me what might be wrong with this?

      Error
      ********************************************
      [RPC Fault faultString="Required parameter 'key' not found in input arguments." faultCode="Client.Input" faultDetail="null"]
      at mx.rpc.soap::Operation/mx.rpc.soap:Operation::createFaultEvent()
      at mx.rpc.soap::Operation/ http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()
      at mx.rpc.soap::Operation/send()
      at mx.rpc.soap.mxml::Operation/send()
      at main/___Button1_click()

      Application
      ************************************************************************
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">

      <mx:WebService id="ws" wsdl="C:\Documents and Settings\murrayk\My Documents\googleapi\GoogleSearch.wsdl" useProxy="false">
      <mx:operation name="doGoogleSearch" resultFormat="e4x">
      <mx:request>
      <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
      <key xsi:type="xsd:string">cHbyBAdQFHJJ818t2wmxyTWozpACputa</key>
      <q xsi:type="xsd:string">Orbit Gum</q>
      <start xsi:type="xsd:int">0</start>
      <maxResults xsi:type="xsd:int">10</maxResults>
      <filter xsi:type="xsd:boolean">true</filter>
      <restrict xsi:type="xsd:string"/>
      <safeSearch xsi:type="xsd:boolean">false</safeSearch>
      <lr xsi:type="xsd:string" />
      <ie xsi:type="xsd:string">latin1</ie>
      <oe xsi:type="xsd:string">latin1</oe>
      </ns1:doGoogleSearch>
      </mx:request>
      </mx:operation>
      </mx:WebService>

      <mx:Button x="70" y="31" label="Search" click="ws.doGoogleSearch.send()"/>
      <mx:TextInput x="38" y="73" id="ti_searchparm"/>
      <mx:TextArea x="38" y="141" width="412" height="100" id="ta_searchresults"/>
      <mx:TextArea x="38" y="261" width="412" height="100" id="ta_searchresults2" text="{ti_searchparm.text}"/>
      </mx:Application>

        • 1. Re: New Install causes app not work now
          Level 7
          Two things here.
          1 � you need to add format=�xml� to your request tag for this format to work
          2 � you were missing a namespace declaration for xsd

          Here�s what I got to work (proxy turned on for debugging purposes).

          <mx:WebService id="ws" wsdl=" http://api.google.com/GoogleSearch.wsdl" useProxy="true">
          <mx:operation name="doGoogleSearch" resultFormat="e4x">
          <mx:request format="xml">
          <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"
          xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
          xmlns:xsd=" http://www.w3.org/2001/XMLSchema">
          <key xsi:type="xsd:string">cHbyBAdQFHJJ818t2wmxyTWozpACputa</key>
          <q xsi:type="xsd:string">Orbit Gum</q>
          <start xsi:type="xsd:int">0</start>
          <maxResults xsi:type="xsd:int">10</maxResults>
          <filter xsi:type="xsd:boolean">true</filter>
          <restrict xsi:type="xsd:string"/>
          <safeSearch xsi:type="xsd:boolean">false</safeSearch>
          <lr xsi:type="xsd:string" />
          <ie xsi:type="xsd:string">latin1</ie>
          <oe xsi:type="xsd:string">latin1</oe>
          </ns1:doGoogleSearch>
          </mx:request>
          </mx:operation>
          </mx:WebService>

          And a note. This format is cumbersome and normally wouldn�t be necessary except for a bug that was
          found post-beta 3 where empty elements weren�t getting sent over the wire correctly. But in the
          final 2.0 release you should be able to have a simpler request like so:

          <mx:WebService id="ws" wsdl=" http://api.google.com/GoogleSearch.wsdl" useProxy="true">
          <mx:operation name="doGoogleSearch" resultFormat="e4x">
          <mx:request>
          <key>cHbyBAdQFHJJ818t2wmxyTWozpACputa</key>
          <q>Orbit Gum</q>
          <start>0</start>
          <maxResults>10</maxResults>
          <filter>true</filter>
          <restrict/>
          <safeSearch>false</safeSearch>
          <lr/>
          <ie>latin1</ie>
          <oe>latin1</oe>
          </mx:request>
          </mx:operation>
          </mx:WebService>

          Mark Shepherd
          Adobe Flex Team
          (thanks to Tom Ruggles for the detailed answer)

          kmurray24 wrote:
          > I have a google web service program that was working. When I reinstalled Flex
          > the app doesn't work anymore telling me that a web service parameter is
          > missing.. It's not. Can anyone tell me what might be wrong with this?
          >
          > Error
          > ********************************************
          > [RPC Fault faultString="Required parameter 'key' not found in input
          > arguments." faultCode="Client.Input" faultDetail="null"]
          > at mx.rpc.soap::Operation/mx.rpc.soap:Operation::createFaultEvent()
          > at mx.rpc.soap::Operation/<a target=_blank class=ftalternatingbarlinklarge
          > href=" http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()
          > at"> http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()
          > at</a> mx.rpc.soap::Operation/send()
          > at mx.rpc.soap.mxml::Operation/send()
          > at main/___Button1_click()
          >
          > Application
          > ************************************************************************
          > <?xml version="1.0" encoding="utf-8"?>
          > <mx:Application xmlns:mx="<a target=_blank class=ftalternatingbarlinklarge
          > href=" http://www.adobe.com/2006/mxml"">http://www.adobe.com/2006/mxml"</a>
          > layout="absolute">
          >
          > <mx:WebService id="ws" wsdl="C:\Documents and Settings\murrayk\My
          > Documents\googleapi\GoogleSearch.wsdl" useProxy="false">
          > <mx:operation name="doGoogleSearch" resultFormat="e4x">
          > <mx:request>
          > <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch" xmlns:xsi="<a
          > target=_blank class=ftalternatingbarlinklarge
          > href=" http://www.w3.org/2001/XMLSchema-instance">">http://www.w3.org/2001/XMLSch
          > ema-instance"></a>
          > <key xsi:type="xsd:string">cHbyBAdQFHJJ818t2wmxyTWozpACputa</key>
          > <q xsi:type="xsd:string">Orbit Gum</q>
          > <start xsi:type="xsd:int">0</start>
          > <maxResults xsi:type="xsd:int">10</maxResults>
          > <filter xsi:type="xsd:boolean">true</filter>
          > <restrict xsi:type="xsd:string"/>
          > <safeSearch xsi:type="xsd:boolean">false</safeSearch>
          > <lr xsi:type="xsd:string" />
          > <ie xsi:type="xsd:string">latin1</ie>
          > <oe xsi:type="xsd:string">latin1</oe>
          > </ns1:doGoogleSearch>
          > </mx:request>
          > </mx:operation>
          > </mx:WebService>
          >
          > <mx:Button x="70" y="31" label="Search"
          > click="ws.doGoogleSearch.send()"/>
          > <mx:TextInput x="38" y="73" id="ti_searchparm"/>
          > <mx:TextArea x="38" y="141" width="412" height="100" id="ta_searchresults"/>
          > <mx:TextArea x="38" y="261" width="412" height="100" id="ta_searchresults2"
          > text="{ti_searchparm.text}"/>
          > </mx:Application>
          >
          >
          >
          • 2. Re: New Install causes app not work now
            kmurray24 Level 1
            Thanks for your help! It's greatly appreciated! I'm telling you my app worked when I 1st created it in beta 3. I reinstalled beta 3 and then it didn't work... But, I'll try your code. Thanks again and we all appreciate your involvement!

            Ken Murray