dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: .NET
Expertise: Beginner
Feb 9, 2004

WEBINAR:

On-Demand


Preserve the Sequence of Web Methods

The .NET Framework generates a service help page when accessing the asmx page for a Web service. This page lists the Web methods exposed by the Web service, but doesn't list these methods in the order they appear in the source code. This tip describes a minor modification which keeps Web methods in source code sequence.

The service help page is generated by DefaultWsdlHelpGenerator.aspx in


\%WINDOWS%
  \Microsoft.NET
    \Framework
      \[version]
        \CONFIG
DefaultWsdlHelpGenerator.aspx uses a Hashtable to store the Web methods. Replace the Hashtable with a ListDictionary (in the System.Collections.Specialized namespace) as follows:
  1. Open DefaultWsdlHelpGenerator.aspx
  2. Search for 'Hashtable methodsTable' in the line which reads
    
    'Hashtable methodsTable = new Hashtable();'
    
  3. Change both occurrences of 'Hashtable' to:
  4. 'System.Collections.Specialized.ListDictionary' so that the line reads 'System.Collections.Specialized.ListDictionary methodsTable = new System.Collections.Specialized.ListDictionary();'
  5. Save the file.
Every service help page will now list Web methods in source code sequence.

Uwe Schmitz
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date