Basic Web Service Question

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Basic Web Service Question

    I'm trying to connect a Flash interface with a web service over the company
    intranet, and so far having no luck at all. While I have a pretty good Flash
    background, my experience with other web technologies is pretty limited. The
    web service, which spits back XML, has been put together by a web developer who
    doesn't have a lot of experience with Flash. I'm using a web service object to
    connect, and the URL he has given me to connect to looks like this:



    [url]http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOffic[/url]
    esXML


    As I understand it,
    "http://usdev.somedomain.com/PrintWebService/printwebservice.asmx" is the web
    service itself and "FindAllOfficesXML" is the web service method.

    But that URL doesn't make sense in the context of my code:


    import mx.services.WebService;
    import mx.services.PendingCall;

    connectto_ws();

    function connectto_ws() {
    datapath =
    "http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOffi
    cesXML";
    printwebservice = new WebService(datapath);
    pendingcall = printwebservice.FindAllOfficesXML();
    pendingcall.onResult = function(result) {
    _root.resultstring.text = result;
    };
    pendingcall.onFault = function(fault) {
    _root.resultstring.text = fault.faultstring;
    };
    }


    I'm setting the web service URL to the specific method, FindAllOfficesXML, of
    the web service, and then I'm defining pendingcall as a method of that same
    method!

    Changing the URL to more closely resemble examples I see online doesn't work
    either:


    [url]http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?wsdl[/url]


    I have a feeling the solution is pretty simple, but I'm not seeing it.

    import mx.services.WebService;
    import mx.services.PendingCall;

    connectto_ws();

    function connectto_ws() {
    datapath =
    "http://usdev.somedomain.com/PrintWebService/printwebservice.asmx?op=FindAllOffi
    cesXML";
    printwebservice = new WebService(datapath);
    pendingcall = printwebservice.FindAllOfficesXML();
    pendingcall.onResult = function(result) {
    _root.resultstring.text = result;
    };
    pendingcall.onFault = function(fault) {
    _root.resultstring.text = fault.faultstring;
    };
    }

    billgregg Guest

  2. Similar Questions and Discussions

    1. Basic Example Needed To Communicate With ASP.NET 2.0 Web Service
      First a little background. I'm trying to access a .NET 2.0 Web Service from Flex. I'm very new to Flex and am looking into implementing it during...
    2. ASAP: Basic Web service dynaimc url question
      Sally via .NET 247 <anonymous@dotnet247.com> wrote in news:O23dymUWFHA.1148@tk2msftngp13.phx.gbl: Its very easy: Admin = new AdminWS.Admin();...
    3. Basic Web Service Prob
      Hi, Ok I uninstalled WSE2.0 sp3 and still get the same error in proxy file from web service. I have a web service thats local and created a...
    4. How to force reauthentication of a Web service client (Basic auth)
      Sorry for cross-posting, but I am not quite sure where this question belongs (maybe it should be addressed to some other group). I have a Web...
    5. Web Service- Basic HTTP Authentication
      Hi, Does anyone have a sample of Basic Http Authentication for a Web Service. Any help appreciated!! Thanks Ted
  3. #2

    Default Re: Basic Web Service Question

    Hello billgregg,

    As per my info the path (datapath in your case) should the path to WSDL, which
    contains the operation to perform on the service. I am also not sure as I
    havent tried much on this.

    However few helps pointers are below.

    printwebservice .onLoad = function(wsdl:Object){
    fn1("5"); //5 is sample argument
    };
    and your f1 should contain the code which check the result of pending call
    like what you have written pendingcall = printwebservice.FindAllOfficesXML();
    pendingcall.onResult = function(result) {
    _root.resultstring.text = result;
    };

    This is as per my info.

    Hope this helps

    Regards,
    Nilesh Walkoli

    NIlesh@ADOBE Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139