Verify Correct Implementation in Web Services

Discussion in 'ASP .Net Web Services' started by Soul, May 29, 2004.

  1. Soul

    Soul Guest

    Hi,

    I have a Windows Application and multiple Web Services, all Web Services
    will implement the same interface. My Windows Application allow users to
    enter Web Services' URL themselves and store in an .config file with XML
    format. In this case, I will only add one Web Service as web reference at
    compile time, then assign different URL to Web Service object created later
    during runtime.

    The problem is that there may be chances that user enter wrong URL or enter
    an URL that point to a wrong Web Service. Therefore, is there and mechanism,
    which able to check whether a Web Service has implement a specified
    interface during runtime? Or is that any way to check during runtime whether
    a Web Service is the same as the Web Service proxy I created at compile
    time?

    In this case, after user add an URL, I am able to check whether the URL is
    correct and point to the correct Web Service before storing the URL into
    configuration file. In result, when consuming Web Service I know that the
    URL is definitely correct, so I will only need to catch for connection error
    when consuming and Web Service rather than catching all other errors!

    Thank you.

    --
    Soul
     
    Soul, May 29, 2004
    #1
    1. Advertising

  2. "Soul" <> wrote in message
    news:...
    > Hi,
    >
    > I have a Windows Application and multiple Web Services, all Web Services
    > will implement the same interface. My Windows Application allow users to
    > enter Web Services' URL themselves and store in an .config file with XML
    > format. In this case, I will only add one Web Service as web reference at
    > compile time, then assign different URL to Web Service object created

    later
    > during runtime.
    >
    > The problem is that there may be chances that user enter wrong URL or

    enter
    > an URL that point to a wrong Web Service. Therefore, is there and

    mechanism,
    > which able to check whether a Web Service has implement a specified
    > interface during runtime? Or is that any way to check during runtime

    whether
    > a Web Service is the same as the Web Service proxy I created at compile
    > time?
    >
    > In this case, after user add an URL, I am able to check whether the URL is
    > correct and point to the correct Web Service before storing the URL into
    > configuration file. In result, when consuming Web Service I know that the
    > URL is definitely correct, so I will only need to catch for connection

    error
    > when consuming and Web Service rather than catching all other errors!


    One thing that comes to mind is you could pull the web service description
    (WSDL) and analyze it to see if it is what you expect.

    If you don't what to analyze WSDL you could load it into a
    ServiceDescription and have a ServiceDescriptionImporter generate the proxy
    class. You could then analyze the proxy class via reflection.

    You can use Christian Weyer's DynWsLib as a starting point for these tasks:

    http://weblogs.asp.net/cweyer/archive/2003/07/07/9769.aspx

    Regards,
    Sami
     
    Sami Vaaraniemi, May 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. joon
    Replies:
    1
    Views:
    520
    Roedy Green
    Jul 8, 2003
  2. whoopsy
    Replies:
    3
    Views:
    4,103
    EricF
    Nov 23, 2005
  3. EmJayEm

    implementation issues in web services?

    EmJayEm, Dec 5, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    140
    Dan Rogers
    Dec 7, 2004
  4. EmJayEm

    Real implementation issues in web services

    EmJayEm, Jan 3, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    115
    EmJayEm
    Jan 3, 2005
  5. John
    Replies:
    4
    Views:
    460
Loading...

Share This Page