2 Replies Latest reply on Mar 20, 2008 3:30 PM by tgoodmannz

    Creating Channel for WebService

    tgoodmannz Level 1


      I am getting the following error when I try to call a SOAP Service. I believe I need to
      - Create a file called services-config.xml AND include it in my compiler
      - Create some settings in services-config ??????

      Can anybody please provide documentation on services-config for SOAP/WSDL because I am having real trouble finding how to do this...

      [MessagingError message='Destination 'https://{hostname-removed}.com/soapi.pl' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
      at mx.messaging.config::ServerConfig$/internalGetChannelSet()[E:\dev\3.0.x\frameworks\projec ts\rpc\src\mx\messaging\config\ServerConfig.as:624]
      at mx.messaging.config::ServerConfig$/getChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\s rc\mx\messaging\config\ServerConfig.as:255]
      at mx.messaging::MessageAgent/initChannelSet()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\m essaging\MessageAgent.as:1083]
      at mx.messaging::MessageAgent/internalSend()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\mes saging\MessageAgent.as:1059]
      at mx.messaging::Producer/internalSend()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messagi ng\Producer.as:143]
      at mx.messaging::AbstractProducer/send()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messagi ng\AbstractProducer.as:469]
      at mx.rpc::AsyncRequest/invoke()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncReques t.as:126]
      at generated.webservices::BaseVoiceForgeAPIS/call()[C:\Users\Tim\Documents\Flex Builder 3\AIRHelloWorld\src\generated\webservices\BaseVoiceForgeAPIS.as:328]
      at generated.webservices::BaseVoiceForgeAPIS/getSessionID()[C:\Users\Tim\Documents\Flex Builder 3\AIRHelloWorld\src\generated\webservices\BaseVoiceForgeAPIS.as:226]
      at generated.webservices::VoiceForgeAPIS/getSessionID()[C:\Users\Tim\Documents\Flex Builder 3\AIRHelloWorld\src\generated\webservices\VoiceForgeAPIS.as:102]
      at AIRHelloWorld/loadTTS()[C:\Users\Tim\Documents\Flex Builder 3\AIRHelloWorld\src\AIRHelloWorld.mxml:91]
      at AIRHelloWorld/___AIRHelloWorld_Button1_click()[C:\Users\Tim\Documents\Flex Builder 3\AIRHelloWorld\src\AIRHelloWorld.mxml:173]
        • 1. Re: Creating Channel for WebService
          SujitG Level 2
          You can access web services with or with out using BlazeDS/LCDS. If you want to access web service with out using BlazeDS then you don't need to configure services-config.xml. If you want to access the web services through BlazeDS, i.e using the proxy service of BlazeDS, you need to configure services-config.xml to add a destination for the web service.

          BlazeDS developers guide: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/

          You can find information on configuring services-config.xml for web services at this URL:

          To compile your Flex application with services-config.xml you can either specify that your project is using Server technology in the Flex Builder or you can compile the services-config.xml with your Flex application by adding -services "<path to your services-config.xml> to the Flex compiler arguments.

          Please find more details on how to add services-config.xml to your Flex application in Flex builder at this URL: http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/

          Hope this helps.
          • 2. Creating Channel for WebService
            tgoodmannz Level 1
            Hmmm - I'm not running BlazeDS - I just want to connect to the WebService directly

            If I check the definition of the WebService mxml class in the documentation:

            It says: "destination:String (default = null) — the destination of the WebService, should match a destination name in the services-config.xml file."

            And the Stack trace in the error shows a failure at: ServerConfig$/internalGetChannelSet()[

            So, if I'm not using BlazeDS, does this mean that I do or don't need to configure services-config.xml?

            If I do need to configure, then how should I do it?

            If I don't need to configure, then why would I get that error???

            NOTE: Here is the definition for my WebService - I'm specificying the destination attribute, and not the wsdl attribute because I am connecting to a vendor who has supplied me a wsdl file, but is not supplying it online. Would that cause a problem??

            <mx:WebService id="srv" destination="https://{servername-removed}.com/soapi.pl" fault="handleFault(event)" result="handleResult(event)">
            <mx:operation name="submitPO"/>