• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Connecting to a SOAP/Java Service via WSDL and Web Service wizard

Guest
Oct 24, 2011 Oct 24, 2011

Copy link to clipboard

Copied

Here is an example of the WSDL I am trying to connect to:

WSDL

<wsdl:operation name="getBooksByID">

      <wsdl:input message="tns:getBooksByIDRequest">

    </wsdl:input>

      <wsdl:output message="tns:getBooksByIDResponse">

    </wsdl:output>

      <wsdl:fault message="tns:RequestFault" name="RequestFault">

    </wsdl:fault>

    </wsdl:operation>

---------------------------------------

XSD Schema

Request

<xsd:complexType name="BookParam">

<xsd:sequence>

<xsd:element maxOccurs="1" minOccurs="1" name="BookID" type="xsd:int"/>

</xsd:sequence>

</xsd:complexType>

----

Response

<xsd:complexType name="BookSummary">

<xsd:sequence>

<xsd:element name="BookID" type="xsd:int"/>

<xsd:element name="BookLocation" type="xsd:string"/>

<xsd:element name="BookName" type="xsd:string"/>

<xsd:element name="BookPrice" type="xsd:int"/>

<xsd:element name="BookCost" type="xsd:int"/>

          </xsd:sequence>
     </xsd:complexType>

Basically, it uses parameter objects to store multiple int or string values into placeholders in the objects. I've tested the service to be sure it was working correctly, however when I imported the service via the WSDL Web Service wizard - and just tried a simple form to get an idea of how it needs to look in Flex, I can't even the templated request work.

Flex is saving the parameter as a param object, storing the id as an int inside the object - but both when testing the application in my browser and using the operation test, it is not returning anything at all, when it should be returning data based on the values I am sending.

I was wondering if there might be any tutorials out there using WSDL Web Services import wizard, where the service is expecting a request with an object and expecting a response as an object. Or if there are some troubleshooting steps I might be able to take to solve this. Thanks!

Views

425

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 24, 2011 Oct 24, 2011

Copy link to clipboard

Copied

oh it didn't show my WSDL/Schema...

Hopefully this works:

<wsdl:operation name="getBooksByID">

      <wsdl:input message="tns:getBooksByIDRequest">

    </wsdl:input>

      <wsdl:output message="tns:getBooksByIDResponse">

    </wsdl:output>

      <wsdl:fault message="tns:RequestFault" name="RequestFault">

    </wsdl:fault>

    </wsdl:operation>

Request

<xsd:complexType name="BookParam">

<xsd:sequence>

<xsd:element maxOccurs="1" minOccurs="1" name="BookID" type="xsd:int"/>

</xsd:sequence>

</xsd:complexType>

Response

<xsd:complexType name="BookSummary">

<xsd:sequence>

<xsd:element name="BookID" type="xsd:int"/>

<xsd:element name="BookLocation" type="xsd:string"/>

<xsd:element name="BookName" type="xsd:string"/>

<xsd:element name="BookPrice" type="xsd:int"/>

<xsd:element name="BookCost" type="xsd:int"/>

</xsd:sequence>

</xsd:complexType>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 24, 2011 Oct 24, 2011

Copy link to clipboard

Copied

LATEST

Nevermind! I found what I needed! For anyone else with some trouble finding out how to appropriately construct a request:

http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_5.html

I'm going to drop the wizard thing - it is making it much more confusing than it needs to be

Another great resource for people with trouble using the wizard import and want to try to do it on their own in flex:

http://www.blackpepper.co.uk/black-pepper-blog/How-to-use-SOAP-web-services-with-Java-and-Flex-Part-...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines