dcsimg
A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Problems using webservice and soap

Threaded View

  1. #1
    Half Empty happinessSam's Avatar
    Join Date
    May 2003
    Location
    London
    Posts
    442

    Problems using webservice and soap

    I'm working on a site which is using webservice to hook into a soap framework, which is being developed by the client.
    It works fine when plugged into .net, but flash seems to send different requests based on the same wsdl with the result that requests fail. My inexperience with soap coupled with the terrible documentation for the webservice class is making this a horror project.
    This is the test code I'm using to make the request:
    PHP Code:
    import mx.services.WebService;
    import mx.services.PendingCall;
    import mx.services.SOAPCall;
    function 
    getData() {
        var 
    myWebService:WebService = new WebService("service_restricted.xml");
        
    myWebService.onLoad = function(wsdlDocument) {
            var 
    callback1:PendingCall myWebService.GetPartnerCategories();
            
    callback1.onResult = function(result:Object) {
                for (
    i=0i<result.lengthi++) {
                    
    trace(result[i].Name+" : "+result[i].Count);
                }
            };
            
    callback1.onFault = function(code) {
                for (var 
    i in code) {
                    
    trace(i+":"+code[i]);
                }

            };
        };

    This is what it's sending (caught using fiddler):
    PHP Code:
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><GetPartnerCategories xmlns="undefined" /></SOAP-ENV:Body></SOAP-ENV:Envelope>
    As far as I can tell it's the xmlns="undefined" which is causing it to fail.
    This is what the .net frameworks sends (which works):
    PHP Code:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body><GetPartnerCategories xmlns="http://uk/co/theDomain/webservice" /></soap:Body></soap:Envelope>
    I've attached the wsdl (renamed as a txt doc).
    I can see that flash is using SOAP-ENV while the .net is using soap for the body, but the lack of any documentation means I have no idea of the reasons for this.
    Any help or advice would be much appreciated. Even if it's just pointing me to somewhere where I can find decent documentation of the webservices class or other relevant links.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center