9 Replies Latest reply on Oct 8, 2007 2:33 AM by LenHarley

    Builder 3 Beta 2

    LenHarley
      I'm new to Flex, Actionscript etc so please forgive what may seem like ignorance..

      I have downloaded Flex 3 Beta 2 which now supports webservices introspection - the wizard works like a charm and inspects the WDSL perfectly creating the interaction classes etc.

      I know it's early days but I was wondering if someone out there can show me a working example of how to proceed once the introspection wizard has done it's thing. The inline usage example is a little vague...

      Thanks

      Len
        • 1. Re: Builder 3 Beta 2
          Lăcră Ene
          Hi Len,
          Here is a very simple demo application that you could take a look at: http://labs.adobe.com/technologies/flex/videos/webservicesintrospection/
          It should give you some basic insight about how to use the generated ActionScript code until more complex working examples become available.
          Lacra
          • 2. Re: Builder 3 Beta 2
            LenHarley Level 1
            Hi Lacra,

            Thanks very much for the info - my issue is that this is an example of a RPC style webservice where one calls a remote "method".

            What I am after is an example of a document literal style implementation where there are no "methods" specified at the SOAP end - rather the XML that is passed describes the desired interaction method...

            Do you perhaps know if there is an example of a document literal style implementation I could look at somewhere...

            Thanks

            Len
            • 4. Re: Builder 3 Beta 2
              LenHarley Level 1
              Hi Adobe_Phil,

              Thanks for the post - unfortunately this example is dated Dec 2006 so I suspect that it is out of date now in terms of using Flex Builder 3 Beta 2 with the introspection wizard...

              Does anyone know if there is an example anywhere using this latest release of Flex Builder?

              What I am after is an example of how one builds up the XML input, sending it off and retrieving the resultant XML...

              Thanks

              Len
              • 5. Re: Builder 3 Beta 2
                LenHarley Level 1
                I am trying to use the inline code generated examples (both AS and MXML) but am getting nowhere fast.

                I keep getting "Access of undefined property AnyResultEvent"... Even with the simplest code it never compiles - always complaining about something in the AS generated code! - Now that's not right - if the introspection wizard is doing the stub generation I would think that all one would need to do is call the main entry points and that the underlying generated code should be 100%...

                I have seen several posts by Adobe staff expounding on how "simple" it is to use WS in Flex 3 - so far I must be honest that has not been my experience - quite the opposite - I know it's Beta and all but surely there is at least some current test cases / working examples that show it working in Flex 3 Beta 2...

                Any advice would be much appreciated - I have been tasked to evaluate using Flex as an alternative to jsp faces for a project so I need to get this working in order to give Flex a fair shake - everything else so far has been good - just the comms via WS seems a little dodgy ...

                Thanks.
                • 6. Re: Builder 3 Beta 2
                  Ivascu Cristian
                  Hi Len,

                  From the error you describe it seems that the wizard failed to generate a class, or did not adjust the naming inside one of the method calls correctly. This usually happens when an unsupported port type is selected (we already have a bug on making it more obvious what ports are not supported - e.g. SOAP 1.2, HTTP) because the introspected code is lacking some information.
                  The wizard does not make distinction (from the end-usage point of view) between RPC - Encoded and DOC-Literal - for both it exposes ActionScript methods for each operation defined inside the WSDL. It handles the XML packaging and unpackaging automatically, taking as input instances of the strong-types and returning the same (via the ResultEvent.result property). We still do have some bugs (sorry about that), mostly due to the variety of naming used inside the wsdl, but we are sorting them out.
                  For this particular case, if you can attach the wsdl file to a post we can look and give you a temporary solution until the final fix is out.

                  Hope this helps,
                  Cristian
                  • 7. Re: Builder 3 Beta 2
                    LenHarley Level 1
                    Hi Cristian,

                    Ok - that would make sense.

                    Here is the WDSL...

                    <definitions name="ITravelEngine" targetNamespace=" http://portaluniverse.ce.model.am.server.webservice/ITravelEngine.wsdl">

                    <documentation>

                    WSDL for Service: ITravelEngine, generated by Oracle WSDL toolkit (version: 1.1)

                    </documentation>

                    <types>
                    <schema targetNamespace=" http://portaluniverse.ce.model.am.server.webservice/ITravelEngine.xsd"/>
                    </types>

                    <message name="serviceOutput">
                    <part name="return" element="xsd:any"/>
                    </message>

                    <message name="serviceInput">
                    <part name="param0" element="xsd:any"/>
                    </message>

                    <portType name="ITravelEnginePortType">

                    <operation name="service">
                    <input message="tns:serviceInput"/>
                    <output message="tns:serviceOutput"/>
                    </operation>
                    </portType>

                    <binding name="ITravelEngineBinding" type="tns:ITravelEnginePortType">
                    <soap:binding transport=" http://schemas.xmlsoap.org/soap/http" style="document"/>

                    <operation name="service">
                    <soap:operation soapAction="urn:oracle:service"/>

                    <input>
                    <soap:body use="literal" namespace="urn:portaluniverse-ce-model-am-server-webservice-ITravelEngine"/>
                    </input>

                    <output>
                    <soap:body use="literal" namespace="urn:portaluniverse-ce-model-am-server-webservice-ITravelEngine"/>
                    </output>
                    </operation>
                    </binding>

                    <service name="ITravelEngine">

                    <port name="ITravelEnginePort" binding="tns:ITravelEngineBinding">
                    <soap:address location="https://secure.res247.com:443/CE/TravelEngine"/>
                    </port>
                    </service>
                    </definitions>
                    • 8. Re: Builder 3 Beta 2
                      Ivascu Cristian Level 1
                      Hi Len,

                      Please also post the namespace definitions because the current wsdl markup is reported as invalid.

                      Thanks,
                      Cristian
                      • 9. Re: Builder 3 Beta 2
                        LenHarley Level 1
                        Hi,

                        You can retrieve the WDSL directly from here:

                        https://secure.res247.com/CE/TravelEngine?WSDL

                        What I have noticed is that if I sniff the network the webservice connects to the WDSL and the server responds correctly - so it seems that the wizard has correctly generated the introspection code to instantiate the webservice within Flex...