1 Reply Latest reply on May 21, 2008 11:19 AM by David_M..

    Web Service Error

    josh_aries
      Hi,
      I am new to working with webservices. This is my first program.

      I have the following error

      [RPC Fault faultString="Required parameter 'isbnSearchRequest' not found in input arguments." faultCode="EncodingError" faultDetail="null"]
      at mx.rpc.soap::Operation/ http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()[E:\dev\3.0.x\frameworks\pr ojects\rpc\src\mx\rpc\soap\Operation.as:774
      at mx.rpc.soap::Operation/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\Operat ion.as:688]
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc.soap.mxml::Operation/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\m xml\Operation.as:167]


      The portions of the wsdl are

      - <xsd:element name="IsbnSearchRequest">
      - <xsd:complexType>
      - <xsd:sequence>
      <xsd:element name="bookName" nillable="true" type="xsd:string" />
      <xsd:element name="category" nillable="true" type="xsd:string" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      - <xsd:element name="IsbnSearchResponse">
      - <xsd:complexType>
      - <xsd:sequence>
      <xsd:element name="isbn" type="xsd:string" />
      <xsd:element name="author" type="xsd:string" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>

      <wsdl:message name="getISBNDetailsRequest">
      <wsdl:part element="tns:IsbnSearchRequest" name="isbnSearchRequest" />
      </wsdl:message>
      - <wsdl:message name="getISBNDetailsResponse">
      <wsdl:part element="tns:IsbnSearchResponse" name="isbnSearchResponse" />
      </wsdl:message>

      - <wsdl:portType name="test">
      - <wsdl:operation name="getISBNDetails">
      <wsdl:input message="tns:getISBNDetailsRequest" />
      <wsdl:output message="tns:getISBNDetailsResponse" />
      <wsdl:fault message="tns:faultMessageResponse" name="isbnFaultMessageResponse" />
      </wsdl:operation>

      My mxml file is

      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:WebService service="amazon" port="amazonSOAP" id="Test"
      wsdl="location of wsdl">
      <mx:operation name="getISBNDetails">
      <mx:request>
      <bookname>Java 5</bookname>
      </mx:request>
      </mx:operation>
      </mx:WebService>
      <mx:Panel x="10" y="10" width="475" height="400" layout="absolute"
      title="Amazon WebService">
      <mx:Button x="143" y="207" label="Test" click="Test.getISBNDetails.send()"/>
      <mx:Text x="133" y="82" text="{Test.getISBNDetails.lastResult.isbn}" width="188" height="79"/>
      </mx:Panel>
      </mx:Application>

      I am trying to call the webservice and display the output in the text control.

      thanks in advance.



        • 1. Web Service Error
          David_M..
          Hi,

          As the error says, you need to have an isbnSearchRequest tag in your request.

          Maybe you can try to change your operation descriptor like this:

          <mx:operation name="getISBNDetails">
          <mx:request>
          <IsbnSearchRequest>
          <bookname>Java 5</bookname>
          </IsbnSearchRequest>
          </mx:request>
          </mx:operation>

          Another solution if you want to ease all your calls to web services is to use the WebServices introspection tool offered by Flex Builder 3. It doesn't work every time but for simple wsdl it should be enough.

          Good luck,
          David