Home arrow Visual Basic arrow Page 2 - Developing an XML Web Service Using Visual Studio 2005
VISUAL BASIC

Developing an XML Web Service Using Visual Studio 2005


This article guides you in developing a practical “Number to Words” web service using the latest Microsoft Visual Studio 2005 as the development tool.

Author Info:
By: Jagadish Chaterjee
Rating: 4 stars4 stars4 stars4 stars4 stars / 79
December 13, 2005
TABLE OF CONTENTS:
  1. · Developing an XML Web Service Using Visual Studio 2005
  2. · Brief explanation of the “Number to Words” XML Web Service
  3. · Creating XML Web Service using Visual Studio 2005
  4. · Developing the XML Web Service
  5. · Developing the XML Web Service continued
  6. · Executing and testing the XML Web Service

print this article
SEARCH DEVARTICLES

Developing an XML Web Service Using Visual Studio 2005 - Brief explanation of the “Number to Words” XML Web Service
(Page 2 of 6 )

The XML web service, which we are going to develop now, simply accepts a number (of type “long”) and converts it to words.  Putting it into plain language, if we send “345,” the XML web-service returns the result as “Three hundred forty five.”  Once we host this XML Web Service, we can access it in any application of any platform using any language, even remotely!

Let us come to the discussion of the inner workings of the “Number to Words” Web service.  Even though the main method is “NumberToWords,” the heart (or processing) of the entire XML web service is divided into four “private” methods as follows:

  • ConvertToWords
  • Process3DigitNumber
  • Process2DigitNumber
  • ProcessSingleDigitNumber

“ConvertToWords” checks number of places (or digits) in the number and chunks the number based on hundreds, thousands, and so forth. The chunked parts of the number are forwarded to “Process3DigitNumber” (for processing only three digit numbers).  The “Process3DigitNumber” may forward further to “Process2DigitNumber” (for processing only two digit numbers) or “ProcessSingleDigitNumber” based on the argument it received.

At the moment, “ConvertToWords” can chunk the number to a maximum of hundreds of trillions.  The maximum number could be 999,999,999,999,999 (or 999 trillions).  But, there always exists a chance of extensibility (say quadrillion, quintillion, and so on).  To extend further, you can simply modify and rearrange the “arrays” I declared within “ConvertToWords.”

Now, let us start developing it.


blog comments powered by Disqus
VISUAL BASIC ARTICLES

- Developing an XML Web Service Using Visual S...
- Creating an HTML File List with VB
- Fun with Email: VB6, CDO, MAPI, and a Remote...
- Extranet/Intranet Dictionary Cracker in VB
- Finding Default App Icons With Visual Basic
- Registry Fever With Visual Basic
- Implementing An ADO Data Control With VB6
- Printing With Visual Basic
- MSMQ Part 1/2: Architecture and Simple Imple...
- Magnifying The Desktop With Visual Basic
- Sending Email With MAPI Components in Visual...
- Two Person Chat With The Winsock Control And...
- A Real-Time ActiveX News Control
- Accessing the Windows API in Visual Basic

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials