1 Reply Latest reply on Apr 5, 2007 11:14 AM by craigkaminsky

    Troubles connecting to my Web Services WSDL

    mmouchet
      Hey,
      Ive been trying to connect to my companies web services through Flex for the last week or so and Ive hit a road block and cant seem to figure out why it isnt working.

      Im trying to connect to the following WSDL: http://michael.communityzero.com/ws/api/Session.wsdl

      Using every possible example I can find Ive probably tried to connect atleast 10 different ways in Flex Builder 2 but I keep getting the same error to appear:

      [RPC Fault faultString="The WSDL parser had no registered document for the namespace ''" faultCode="WSDL.UnrecognizedNamespace" faultDetail="null"]
      at mx.rpc.soap::WSDLParser/::dispatchFault ()
      at mx.rpc.soap::WSDLParser/ http://www.adobe.com/2006/flex/mx/internal::httpResultHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent ()
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::resultHandler()
      at mx.rpc::Responder/result ()
      at mx.rpc::AsyncRequest/acknowledge()
      at ::DirectHTTPMessageResponder/completeHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent ()
      at flash.net::URLLoader/flash.net:URLLoader::onComplete()

      Is there a problem with my WSDL?? Ive been successfully able to connect to it using SoapScope (a Web Services testing envrioment) and also through a Java Applet I created.

      If someone could point me in the right direction it would be GREATLY appreciated but Im uber stuck on this.

      Thanks!
      Mikey
        • 1. Re: Troubles connecting to my Web Services WSDL
          craigkaminsky Level 3
          Hi, Mikey,

          I'm not sure what code you used to call the Web service but here's what I did to see if I could connect.

          Copied the source of your WSDL file.
          Created a local WSDL with your contents and named it test.WSDL.

          I used this code in a sample Flex app and was able to connect to the WSDL and read all the data. :
          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
          <mx:HTTPService url=" http://localhost:8300/testWSDL/test.wsdl" id="testRPC" result="testRPCResult(event)" fault="serverFault(event)"/>
          <mx:Script>
          <![CDATA[
          import mx.rpc.events.ResultEvent;
          import mx.rpc.events.FaultEvent;
          import mx.controls.Alert;
          import mx.utils.ObjectUtil;

          private function init():void
          {
          testRPC.send()
          }
          private function testRPCResult(event:ResultEvent):void
          {
          Alert.show(ObjectUtil.toString(event));
          }
          private function serverFault(event:FaultEvent):void
          {
          Alert.show(ObjectUtil.toString(event.fault) );
          }
          ]]>
          </mx:Script>
          </mx:Application>

          I also tried to connect to the WSDL on your server but got a permissions error (Channel.Security.Error -- security error accessing URL).

          I'm sure someone with better Flex knowledge will have more to offer but I wanted to let you know that I tried this and how I was able to connect to it.

          Best,
          Craig