Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Verify Correct Implementation in Web Services

Reply
Thread Tools

Verify Correct Implementation in Web Services

 
 
Soul
Guest
Posts: n/a
 
      05-29-2004
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




 
Reply With Quote
 
 
 
 
Sami Vaaraniemi
Guest
Posts: n/a
 
      05-30-2004

"Soul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/archiv...7/07/9769.aspx

Regards,
Sami


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How .NET web services client handles exceptions from Java web services? John ASP .Net Web Services 4 03-31-2006 10:13 PM
web services - java class vs. ejb implementation whoopsy Java 3 11-23-2005 05:13 AM
Real implementation issues in web services EmJayEm ASP .Net Web Services 0 01-03-2005 02:54 PM
implementation issues in web services? EmJayEm ASP .Net Web Services 3 12-07-2004 07:25 PM
To correct my program. please, check to find errors and correct me. joon Java 1 07-08-2003 06:13 AM



Advertisments