How to enumerate and call .NET web service methods dynammically?

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default How to enumerate and call .NET web service methods dynammically?

    Hi
    I would like to enumerate methods exposed by a .NET web services dynamically from a windows application and call a specific one.
    I think this can be done by following steps: (Please correct me if I am wrong here.)
    1. Getting the WSDL
    2. Generating the Proxy
    3. Enumerating web methods
    4. Calling the web method

    Could you please let me know how to perform these steps in C#?

    Thanking you in anticipation
    Naidu

    Naidu Guest

  2. Similar Questions and Discussions

    1. #40459 [NEW]: Stat and Dir stream wrapper methods do not call constructor
      From: clay at killersoft dot com Operating system: irrelevant PHP version: 5.2.1 PHP Bug Type: Streams related Bug...
    2. Getting list of methods for a web service
      send the HTTP request to the webservice. Ex: http://localhost/WebTest/MySevice.asmx?WSDL get the XML response to DOM or XML parser and find...
    3. Server-Side Async Web Methods call fails
      Hi. I have WS implementing DIME 1.0. Primary client is ASP.NET Web application consuming WS through proxy. I though it might be beneficial from...
    4. How to call different methods in one PHP file?
      I'm a PHP newbie coming from experience with ASP.NET. I want to have a separate PHP file to support each HTML PHP page. This would be the...
    5. Enumerate Methods
      In VS 6.0, there is a tool named "OLE Viewer". It can check the interface information for a COM component. You can run it, click menu "File/View...
  3. #2

    Default Re: How to enumerate and call .NET web service methods dynammically?

    Alternativly you could process the WSDL XML yourself to discover the
    methods.

    Or you can use Christan Weyer's tool:
    GotDotNet User Sample: Dynamically invoke XML Web Services - significantly
    improved
    [url]http://tinyurl.com/yvqtp[/url]
    Did you ever think about invoking your XML Web Services dynamically without
    having to generate a client side proxy class at design/compile time? No need
    to know the exact Web Service description and endpoint at compile/design
    time. Just get your WSDL from whereever you want, specify the type to
    instantiate and the methods to call ... voila! Glance of features: - No need
    to add WSDL descriptions during design time - Point-and-run Web Services
    invocation functionality (generates in-memory assemblies) - Also resolves
    imports of external schemas - Works with complex types - Provides a better
    means to completely hide the Web Services bound functionality from client
    apps -> think Grid computing - Caching mechanism to improve performance of
    already 'well known' Web Services (pre-compiled and cahced assemblies) -
    Access the raw SOAP messages for request and response - Sample client
    application for testing purposes Please check out the included DynWSLib
    README.txt file!

    --
    Greetz

    Jan Tielens
    ________________________________
    Read my weblog: [url]http://weblogs.asp.net/jan[/url]


    "Naidu" <anonymous@discussions.microsoft.com> wrote in message
    news:97E86403-7BF3-45B6-AD5E-E840DF10F2F0@microsoft.com...
    > Hi
    > I would like to enumerate methods exposed by a .NET web services
    dynamically from a windows application and call a specific one.
    > I think this can be done by following steps: (Please correct me if I am
    wrong here.)
    > 1. Getting the WSDL
    > 2. Generating the Proxy
    > 3. Enumerating web methods
    > 4. Calling the web method
    >
    > Could you please let me know how to perform these steps in C#?
    >
    > Thanking you in anticipation
    > Naidu
    >

    Jan Tielens Guest

  4. #3

    Default Re: How to enumerate and call .NET web service methods dynammically?

    Thanks a lot Jan.
    Naidu Guest

  5. #4

    Default Re: How to enumerate and call .NET web service methods dynammically?

    Cweyer sample is builing the assembly on fly to invoke web methods. Is it possible to invoke web methods using HTTWebRequest? I mean without creating the proxy and the assembly.

    Thanks
    Naidu
    Naidu Guest

  6. #5

    Default Re: How to enumerate and call .NET web service methods dynammically?

    Well, your observation is correct.
    Of course you can invoke a Web service using any XML and HTTP functionality
    (includingthe way you mention). But be aware that you then have to handle
    all the WSDL and SOAP stuff on your own - and this is very error prone (to
    say the least)!
    The advantage of my approach is that I use the .NET Fx internal libraries to
    achieve all kinds of safety when invoking a service. And through the buil-in
    caching mechanism performance should not be a big matter ...

    Cheers,
    --
    Christian Weyer

    Microsoft .NET & Service Oriented Architectures
    Consulting, Developing, Writing & Teaching

    [Microsoft Regional Director, Germany]
    [url]http://www.regionaldirectors.de/[/url]

    * XML Web Services: [url]http://www.xmlwebservices.cc/[/url]
    * Weblog: [url]http://weblogs.asp.net/cweyer/[/url]



    "Naidu" <anonymous@discussions.microsoft.com> wrote in message
    news:10D05F2C-7F86-4061-972B-372E05F1B2A0@microsoft.com...
    > Cweyer sample is builing the assembly on fly to invoke web methods. Is it
    possible to invoke web methods using HTTWebRequest? I mean without creating
    the proxy and the assembly.
    >
    > Thanks
    > Naidu

    Christian Weyer [MSDN RD] Guest

  7. #6

    Unhappy How to enumerate and call .NET web service methods dynammically?

    How to enumerate and call .NET web service methods dynammically?
    Unregistered 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