5 Replies Latest reply on Mar 12, 2009 4:57 AM by Billywizz101

    Webservice Invoking call failure

    Billywizz101
      Hi

      I wonder if someone has had the same problem i've got and could give me a hand.

      I've got a movie that i'm calling a webservice from. When I run the movie in flash it downloads the service stub and makes the SOAPCall and loads the data as you would expect. But when i upload it to a site it loads the service stub makes the SOAPCall but "Received SOAP response from network" is not called.

      About the files: I load the movie in an html file using UFO. There are some external interface calls before the webservice is called but these definatley return what is required for the webservice to run because the stub does not get downloaded if they don't return anything.

      Webservice Logs when in flash WORKING:
      2/16 10:12:38 [INFO] SOAP: Decoded SOAP response into result [4 millis]
      2/16 10:12:38 [INFO] SOAP: Decoding SOAPCall response
      2/16 10:12:38 [INFO] SOAP: Parsed SOAP response XML [2 millis]
      2/16 10:12:38 [INFO] SOAP: Received SOAP response from network [56 millis]
      2/16 10:12:38 [INFO] : Invoking call CourseSaveDataProvider_GetByUsernameCourseID
      2/16 10:12:38 [INFO] SOAP: Sent SOAP Request Message
      2/16 10:12:38 [INFO] SOAP: Encoding SOAPCall request
      2/16 10:12:38 [INFO] SOAP: Asynchronously invoking SOAPCall: CourseSaveDataProvider_GetByUsernameCourseID
      2/16 10:12:38 [INFO] : Set active port in service stub: FlashSaveServices : FlashSaveServicesSoap
      2/16 10:12:38 [INFO] : Made SOAPCall for operation CourseSaveDataProvider_Update
      2/16 10:12:38 [INFO] : Made SOAPCall for operation CourseSaveDataProvider_Insert
      2/16 10:12:38 [INFO] : Made SOAPCall for operation CourseSaveDataProvider_GetByUsernameCourseID
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://microsoft.com/wsdl/types/
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://XXXXXXXX
      2/16 10:12:38 [INFO] WSDL: Parsed WSDL XML [1 millis]
      2/16 10:12:38 [INFO] WSDL: Received WSDL document from the remote service
      2/16 10:12:38 [INFO] : Created stub for http://XXXXXXXX.asmx?wsdl
      2/16 10:12:38 [INFO] WSDL: Successfully created WSDL object
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://rpc.xml.coldfusion
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://xml.apache.org/xml-soap
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://schemas.xmlsoap.org/soap/encoding/
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://www.w3.org/2001/XMLSchema
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
      2/16 10:12:38 [INFO] XMLSchema: Registering schema namespace: http://www.w3.org/1999/XMLSchema
      2/16 10:12:38 [INFO] WSDL: Creating WSDL object for http://XXXXXXXX.asmx?wsdl
      2/16 10:12:38 [INFO] : Creating stub for http://XXXXXXXX.asmx?wsdl

      Webservice Logs when on site NOT WORKING:
      2/16 10:9:40 [INFO] : Invoking call CourseSaveDataProvider_GetByUsernameCourseID
      2/16 10:9:40 [INFO] SOAP: Sent SOAP Request Message
      2/16 10:9:40 [INFO] SOAP: Decoding SOAPCall response
      2/16 10:9:40 [INFO] SOAP: Received SOAP response from network [3 millis]
      2/16 10:9:40 [INFO] SOAP: Encoding SOAPCall request
      2/16 10:9:40 [INFO] SOAP: Asynchronously invoking SOAPCall: CourseSaveDataProvider_GetByUsernameCourseID
      2/16 10:9:40 [INFO] : Set active port in service stub: FlashSaveServices : FlashSaveServicesSoap
      2/16 10:9:40 [INFO] : Made SOAPCall for operation CourseSaveDataProvider_Update
      2/16 10:9:40 [INFO] : Made SOAPCall for operation CourseSaveDataProvider_Insert
      2/16 10:9:40 [INFO] : Made SOAPCall for operation CourseSaveDataProvider_GetByUsernameCourseID
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://microsoft.com/wsdl/types/
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://XXXXXXXX
      2/16 10:9:40 [INFO] WSDL: Parsed WSDL XML [1 millis]
      2/16 10:9:40 [INFO] WSDL: Received WSDL document from the remote service
      2/16 10:9:40 [INFO] : Created stub for http://XXXXXXXX.asmx?wsdl
      2/16 10:9:40 [INFO] WSDL: Successfully created WSDL object
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://rpc.xml.coldfusion
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://xml.apache.org/xml-soap
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://schemas.xmlsoap.org/soap/encoding/
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://www.w3.org/2001/XMLSchema
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://www.w3.org/2000/10/XMLSchema
      2/16 10:9:40 [INFO] XMLSchema: Registering schema namespace: http://www.w3.org/1999/XMLSchema
      2/16 10:9:40 [INFO] WSDL: Creating WSDL object for http://XXXXXXXX.asmx?wsdl
      2/16 10:9:40 [INFO] : Creating stub for http://XXXXXXXX.asmx?wsdl

      All help appreciated.

      Jon
        • 1. Re: Webservice Invoking call failure
          Billywizz101 Level 1
          Turns out the problem is caused by the Flash Player 9,0,124,0 +

          This version and above requires additional information to be in the corssdomain.xml file enabling SOAP requests to be made. New crossdomain looks like this.

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE cross-domain-policy SYSTEM
          " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
          <cross-domain-policy>
          <allow-access-from domain="*" />
          <allow-http-request-headers-from domain="*" headers="*" />
          </cross-domain-policy>
          • 2. Re: Webservice Invoking call failure
            socalfish-fDJTBM Level 1
            Jon, I have a SOAP script that I am trying to get working with this crossdomain.xml file as well. I put the file in several places on two different servers and still I am unable to connect. Basically I have one domain that host the SWF files. Another domain that I am calling a PDF file passing in the wsdl info. For some reason it always fails. Any advice on what could be going on?

            Thanks
            Jim
            • 3. Re: Webservice Invoking call failure
              Billywizz101 Level 1
              Hey Jim

              If you could clarify these questions i hope i'll be able to help.

              www.domain1.com/ - domain with all swf's on but no web service wsdl. NOTE: Technically there does not need to be a crossdomain.xml file but you can put one there if you want.

              www.domain2.com/ - domain with wsdl file on. I'm a little confused why the wsdl info would come from a PDF and this may be the problem but if it's just the URL to the wsdl then i guess that should be fine. NOTE: this domain requires the crossdomain.xml as it's the one files are being loaded from.

              Now if your PDF with the "wsdl info" in is redirecting to another domain then you'll also need the crossdomain.xml file on that domain as well.

              Other things to test out side of flash. Check the wsdl directs the requests to the correct file if you are loading the wsdl stub from a pdf you may have difficulty then loading data from the same place. Check the adobe's web service wsdl stub file and see if it's code reflects yours.

              http://feeds.adobe.com/webservices/mxna2.cfc?wsdl

              Any get back to me and hopefully we'll be able to sort this out.

              Jon
              • 4. Re: Webservice Invoking call failure
                socalfish-fDJTBM Level 1
                Sorry I was a little mind boggled when I wrote this... Not a PDF but a PHP script. We have several flash files on Domain. I did not write the web service to capture the data but when ran within the same domain all works fine. My client is loading the swf's on their server and I have it still connecting to our server (PHP script) to capture the data. When I read your post it appeared you were doing the same thing we were and found the solution. I tried using the crossdomain.xml you provided but all this is new to me. I thought if the xml file was in the route of the server it would be read by flash. But that doesn't make since unless Flash has that built in.

                So what I am doing is running all my flash files on Domain1 and within one of the Domain1 flash files I call a php file located on Domain2. See below... what returns is the client.onFault. Hope that is a little clearer.

                import mx.services.WebService;
                import mx.utils.Delegate;

                // This URL will change once I can update the DNS records for frameworksolutions.com
                var client = new WebService(" http://frameworksolutions.com/~barrick/record/soap/server.php?wsdl");
                // This sets the handler that gets invoked if the web service can't be created
                client.onFault = Delegate.create(this, handleServiceFailure);
                client.onLoad = Delegate.create(this, handleServiceLoad);


                Thanks for any help with this matter. They are all over my butt on this.

                Jim
                • 5. Re: Webservice Invoking call failure
                  Billywizz101 Level 1
                  Yeah the PDF thing threw me a little.

                  The crossdomain policy stuff is built in to flash you can find more information about it at http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

                  I see at http://frameworksolutions.com/crossdomain.xml the policy allows all connections so this should be correct and allow you to make soap requests but when i try to connect to the wsdl file i get an authentication box popup. I'm not a LAMP developer but i guess there is a .htaccess file stopping the url from being accessed other than by authenticated parties so this is a possible problem.

                  If you can get some trace information about the web service connection it would be worth checking at what point the connection fails. Post it here and I'll have a look.

                  Jon