1 Reply Latest reply on Feb 3, 2012 9:54 AM by RWinscot

    Webservice Proxy

    Flex Questions Level 1

      Hello,

      we try to invoke a Webservice using a Proxy with Flex 3 /BlazeDS. If i run it on my local server, local BlazeDS with the webservice on a different Server, everything works fine.

      But when i copy the whole webapps Directory to the server with the webservice, it failed:

       

      [QUOTE]

      RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (null)"]
          at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\ rpc\wsdl\WSDLLoader.as:98]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.5.0\framewor ks\projects\rpc\src\mx\rpc\http\HTTPService.as:763]
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.5.0\frameworks\p rojects\rpc\src\mx\rpc\AbstractInvoker.as:295]
          at mx.rpc::Responder/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\Responder .as:58]
          at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:103]
          at mx.messaging::ChannelSet/faultPendingSends()[C:\autobuild\3.5.0\frameworks\projects\rpc\s rc\mx\messaging\ChannelSet.as:1446]
          at mx.messaging::ChannelSet/channelFaultHandler()[C:\autobuild\3.5.0\frameworks\projects\rpc \src\mx\messaging\ChannelSet.as:1056]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.messaging::Channel/connectFailed()[C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\m essaging\Channel.as:1069]
          at mx.messaging.channels::PollingChannel/connectFailed()[C:\autobuild\3.5.0\frameworks\proje cts\rpc\src\mx\messaging\channels\PollingChannel.as:388]
          at mx.messaging.channels::AMFChannel/statusHandler()[C:\autobuild\3.5.0\frameworks\projects\ rpc\src\mx\messaging\channels\AMFChannel.as:411]
      [/QUOTE]

       


      The relevant code:
      [Code]
      public function start(destination:String):void{
         _web = new mx.rpc.soap.WebService();
         _web.useProxy = true;
         _web.destination = destination; //test-ws
         _web.loadWSDL();
                 
      }
      [/Code]

       

      [Code]
      private function callOperation(parameter:Object):void{
         var operation:AbstractOperation = _weg.getauthorization();           
         operation.addEventListener(ResultEvent.RESULT,resultHandler);
         operation.addEventListener(FaultEvent.FAULT,faultHandler);
         operation.send(parameter);
      }
      [/Code]  

      The configuration files are binded with the "-service" compiler argument. The following code shows the proxy-config file:

       

      [HTML]
      <?xml version="1.0" encoding="UTF-8"?>
      <service id="proxy-service"
          class="flex.messaging.services.HTTPProxyService">

       

          <properties>
              <connection-manager>
                  <max-total-connections>100</max-total-connections>
                  <default-max-connections-per-host>2</default-max-connections-per-host>
              </connection-manager>
              <allow-lax-ssl>true</allow-lax-ssl>
          </properties>

       

          <adapters>
              <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
          </adapters>

       

          <default-channels>
              <channel ref="my-amf"/>
          </default-channels>

       

         
          <destination id="test-ws">
              <properties>
                  <wsdl>http://198.208.106.21:8888/Test-context-root/TestSoapHttpPort?wsdl</wsdl>
                  <soap>*</soap>
              </properties>
              <adapter ref="soap-proxy"/>
          </destination>
         
      </service>

       

      [/HTML]

      Like i said, it works on the local Tomcat with a remote webservice. Whe i copy it on the webservice server, it failed.

      Has anybody an idea, what we are doing wrong?

       

      *greetings*