Training
Certifications
Books
Special Offers
Community




 
Microsoft® .NET XML Web Services Step by Step
Author Adam Freeman, Allen Jones
Pages 432
Disk N/A
Level Beg/Int
Published 10/30/2002
ISBN 9780735617209
Price $39.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Companion Content
Related Series
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 

Index


Symbols and Numbers
<% (ASP.NET directive start tag), 28
%> (ASP.NET directive end tag), 28
@ (ASP.NET directive symbol), 28

A
Active Server Pages (ASP). See ASP.NET
Add method, Cache object, 255-56
Add method, CredentialCache object, 287
advertising XML Web services using DISCO (discovery) files, 187-89
<allow> element, 306, 307, 308, 309
Anonymous authentication method, 285
application events
   demonstrating, 273-81
   role of Global.asax file, 271-73
Application object, 273, 277
Application property, 224, 225-28
application state
   defined, 209
   enabling, 224
   overview, 224
   request history client example, 229-31
   role of Application property, 224, 225-28
   testing support, 231-32
Application_AuthenticateRequest method, 272
Application_BeginRequest method, 272
Application_End method, 272
Application_EndRequest method, 272
Application_Error method, 272
ApplicationException exception, 127
applications. See also client applications
   role of XML Web services in extending and integrating, 6
   role of XML Web services in integrating legacy systems into newer technologies, 6
   XML Web services as component, 3
Application_Start method, 272
arguments. See reference arguments
array lists, 225, 235
.asax files, 37. See also Global.asax file
.asmx files. See also Validation.asmx file
   for HelloWorld example, 32-33, 34
   inline, 28
   overview, 28, 37
   Service1.asmx file, 32, 36, 37, 46
   testing in Internet Explorer, 34
ASP.NET
   application events feature, 271-81
   and automatic discovery, 189-91
   caching feature, 253-71
   configuring authentication method, 289
   directives, 28
   generating DISCO files, 187, 188-89
   handling exceptions, 125-27
   overview, 27-29
   role in creating XML Web services, 18, 21
   support for state management, 209-32
AssemblyInfo.cs file, 36, 37
AssemblyInfo.vb file, 36, 37
asynchronous communication
   blocking completion, 361
   creating asynchronous client, 344-53
   polling to determine completion, 361
   vs. synchronous communications, 333-34
   waiting for completion, 353-60
   XML Web service clients and, 340-61
   XML Web services and, 333, 334-40
AuthenticateUser method, 317-18, 322
authentication
   Anonymous authentication method, 285
   vs. authorization, 306
   Basic authentication method, 285, 286-300
   Client Certification authentication method, 285
   Digest authentication method, 285, 286-300
   Integrated Windows authentication method, 285, 301-6
   list of methods, 285
   overview, 284-86
Author property, 198
authorization
   vs. authentication, 306
   file-type, 309
   overview, 306
   URL-type, 306-9
automatic discovery, 189, 190-91
Autos window, 163

B
Basic authentication method
   configuring IIS server, 289-91
   defined, 285
   vs. Digest authentication method, 286
   implementation example, 288-300
   overview, 286-87
   setting in Web.config file, 289
   steps to implement, 287-88
BeginValidateCard method, 340, 341-42, 350
BeginValidateVISACard method, 72
BeginWebMethodName method, 340
bin directory, 36, 38
blocking threads, 361
bool C# data type, 103
Boolean Visual Basic .NET data type, 103
breakpoints
   changing the conditions, 159
   configuring, 153-60
   disabling, 160
   enabling, 160
   hitting, 153
   overview, 144
   removing, 160
   role of hit count, 153-57
   setting, 149-50
   suspending debugger execution in response to exceptions being thrown, 160-63
   triggering, 151-52
   triggering based on hit count, 153-57
   triggering based on specified conditions, 157-59
breaks, ways to cause, 144. See also breakpoints
BufferResponse property, 58
Button control, 75, 76, 77
by reference arguments. See reference arguments
by value arguments. See value arguments vs. reference arguments
ByRef keyword, 121
byte C# data type, 103
Byte Visual Basic .NET data type, 103

C
C#. See Visual C#
cache, defined, 253. See also caching
Cache object
   Add method, 255-56
   adding data to, 255-56, 259
   vs. CacheDuration property, 255-56
   Insert method, 255-56, 257
CachedDataRemoveCallback method, 257, 259-60
CacheDependency argument, 255
CacheDuration property
   vs. Cache object, 255-56
   defined, 58
   overview, 254-55
CacheItemPriority argument, 256
CacheItemRemovedCallback argument, 256
caching
   advantages of using Cache object, 255-56
   consuming XML Web services that use, 265-69
   creating XML Web services that use, 256-60
   enabling through CacheDuration property, 254-55
   overview, 253-54
   suitability of data, 253-54
   testing, 269-71
Call Stack window, 163
callback methods
   as asynchronous communication tool, 343
   for signaling asynchronous method completion, 343-53
CCIllegalCharacterException exception, 43, 128, 161, 162-63, 381
CCInvalidLengthException exception, 43, 128, 380-81
CCInvalidPrefixException exception, 43, 128, 379-80
centralization services, as example of XML Web services functionality, 5
char C# data type, 103
Char Visual Basic .NET data type, 103
checkLUHN method, 383-85
Class attribute, 29
classes, adding, 104-6
client applications
   asynchronous communications in, 340-61
   developing XML Web service clients that use custom SOAP headers, 323-31
   enabling Basic or Digest authentication, 288-300
   enabling Integrated Windows authentication, 301-6
Client Certification authentication method, 285
client sessions
   creating, 210
   defined, 210
   deleting, 224
   enabling, 58, 210
   lifetime, 224
   what they do, 210-16
client state
   consuming XML Web services, 216-23
   defined, 209
   enabling cookie support, 216-17
   overview, 210
   testing support, 223
   what sessions do, 210-16
ClientStats class, 211, 212, 219, 223, 241-42
Code property, 126, 127
CodeBehind attribute, 29
code-behind files. See also Validation.asmx.cs file; Validation.asmx.vb file
   defined, 28
   for Global.asax file, 36, 37, 271, 273-74
   overview, 29
columns, DataSet table, 234
ComboBox control, 111
compile-time errors, 143
complex types
   consuming XML Web services that use, 110-15
   creating, 104-6
   creating XML Web services that use, 104-10
   defined, 103
   and HTTP, 104
   and SOAP, 103, 104
component reuse, 8-9
console clients, creating, 83-88
ConsoleClient application
   adding code, 86-87
   creating project, 84-86
   overview, 83-84
   testing, 87-88
ConsoleClient.cs file, 86-87
ConsoleClient.vb file, 87
consumers
   defined in XML Web services context, 4
   role in success of XML Web services model, 10-11
controls, adding to Windows Forms, 75-77
CookieContainer property, 217
cookies, enabling support, 216-17
Copy Project feature, Visual Studio .NET, 92-94, 128, 194-95
copying project files, 92-94, 128, 194-95
CreateDataSet method, 235, 236-38
CredentialCache object, 287
credentials. See authentication
credit card validation. See also CreditCardValidator library
   creating VISAValidator sample project, 43-58
   how to validate a credit card using CreditCardValidator.dll library, 42-43
   overview, 41-42
   what it means to validate a credit card number, 42, 377-79
CreditCardValidation.dll file, 377-79
CreditCardValidator library
   adding to VISAValidator project, 44-46
   CCIllegalCharacterException exception, 381
   CCInvalidLengthException exception, 380-81
   CCinValidPrefixException exception, 379-80
   classes in, 379-88
   exception classes, 379-81
   overview, 42-43, 379
   Validator class, 379, 381-88
.cs files, 32
custom fault codes, 127-35
custom SOAP headers
   adding support to XML Web services, 313-14
   developing an XML Web service that uses, 312-23
   developing XML Web service client applications that use, 323-31
   overview, 311-12
   updating ValidatorServiceClass class, 317-23

D
data integration, aggregation, and analysis, as example of XML Web services, 5-6
data types. See also complex types
   complex, 103-15
   consuming XML Web services that use complex types, 110-15
   creating ValidationState class, 211
   creating XML Web services that use complex types, 104-10
   defined, 101
   list of .NET Framework types, 102
   simple, 102-3
DataGrid control, 246, 247, 250, 251
DataSets
   creating, 235, 236-38
   as disconnected objects, 234-35
   displaying, 250-51
   overview, 233
   placing in cache, 254-55, 257-60
   validation history example, 235-51
DataView class, 245, 247, 251
DateTime argument, 255
Debug attribute, 29
debugger, Visual Studio .NET
   advanced features, 163-64
   debugging XML Web services, 143-64
   managing breakpoints, 144-60
   overview, 143-44
   starting, 151
   stepping through code, 152-53
   stopping, 153
decimal C# data type, 103
Decimal Visual Basic .NET data type, 103
default Web access mode, 38, 39
<deny> element, 306, 307, 308
deploying XML Web services, 191-205
Deployment project, 196-205
Description property
   in Deployment project, 198
   WebMethod attribute, 58
   WebService attribute, 57
descriptions. See also DISCO (discovery) files
   finding with UDDI, 183-86
   obtaining for XML Web services, 13-15, 17
Digest authentication method
   vs. Basic authentication method, 287
   defined, 285
   implementing, 286-300
   overview, 287
   steps to implement, 287-88
Direction property, 314
directories of XML Web services, 4, 17
DISCO (discovery) files
   advertising XML Web services, 187-89
   creating, 187-89
   discovering XML Web services using, 189-91
   HelloWorld.vsdisco file, 37
   overview, 14, 187
   publishing XML Web services using, 187-89
   vs. UDDI registries, 14-15
   Validation.disco file, 69
discovery. See also DISCO (discovery) files
   automatic, 189-91
   DISCO form, 14-15
   overview, 13
   role in XML Web services architecture, 17
   UDDI form, 14
Domain property, NetworkCredential object, 287
double C# data type, 103
Double Visual Basic .NET data type, 103

E
EnableSession property, 58, 210
EndValidateCard method, 340, 342-43, 350, 361
EndValidateVISACard method, 72
EndWebMethodName method, 340
errors, run-time vs. compile-time, 143. See also exceptions
exceptions
   adding exception handling code to ValidateCard method of Validation.asmx file, 129-32
   communicating to HTTP clients, 125-26
   communicating to SOAP clients, 126-27
   handling error conditions in clients, 132-35
   how ASP.NET handles, 125-27
   list of those thrown by methods of Validator class, 127, 128
   setting policy in Visual Studio .NET debugger, 161-62
   suspending code execution, 160-64
   suspending debugger execution, 160-63
   throwing in XML Web services, 127-32
   Validator class methods, 43

F
fault codes, custom, 127-35
faultcode field, 126
faultstring field, 126
file authorization, 309
File Share, as method for uploading project files to IIS server, 38
File System Editor, 198-99
filtering DataSets, 251
finding XML Web services in UDDI registries, 183-86
float C# data type, 103
Folder Name property, 70
Form1. See Windows Forms clients
Form1.cs file, 75
Form1.vb file, 75
formatCreditCardNumber method, 382-83
Forms authentication, 286
FrontPage Server Extensions (FPSE)
   installing, 24
   as method for uploading project files to IIS server, 38
   as requirement for XML Web services development, 22, 23
functional abstraction, 8

G
GetClientStatistics method
   application events project, 276-77
   DataSets project, 241-42
   defining, 212
   state management project, 217, 219
GetException method, 131
GetValidationHistory method
   code for application events project, 274-76
   code for caching project, 257-58
   code for state management project, 227-28, 230-31
   defining, 225
   editing code for DataSets project, 235, 238-39
   editing code for ValidationHistoryClient project, 245, 247
   testing, 231-32
Global.asax file
   code-behind file, 271
   list of code-behind file methods, 272
   overview, 36, 37, 271-72
   role in processing application events, 271-73
   updating Application_Start method in code- behind file, 273-74
   updating Session_Start method in code- behind file, 274
Global.asax.cs file
   overview, 36, 37
   updating Application_Start method, 273-74
   updating Session_Start method, 274
Global.asax.resx file, 36, 37
Global.asax.vb file
   overview, 36, 37
   updating Application_Start method, 273-74
   updating Session_Start method, 274

H
Hashtable collection, 212
HelloWorld XML Web service example
   creating, 30-34
   list of project files, 37-38
   project file overview, 36-38
   testing, 34-36
HelloWorld.vsdisco file, 36, 37
history, requesting, 229-32. See also validation history
HistoryTable table, 235
hit count
   overview, 153
   resetting, 155-56
   setting, 154-55
   testing, 155
   types of conditions, 156-57
HTML (Hypertext Markup Language), role in XML Web services, 29
HTTP-GET protocol
   communicating exceptions to clients, 125-26
   consuming XML Web services, 94-99
   creating Web Forms clients, 95-99
   in HelloWorld example, 36
   vs. HTTP-POST protocol, 90-91
   overview, 89-90
   vs. SOAP protocol, 64
   in ValidateVISACard example, 53
HTTP (Hypertext Transfer Protocol)
   communicating exceptions to clients, 125-26
   consuming XML Web services, 94-99
   and data types, 103, 104
   HTTP-GET vs. HTTP-POST, 90-91
   links to Web resources, 391
   as mechanism for sending SOAP messages over networks, 16, 90-92
   vs. SOAP, 91-92, 102
   as standard Internet protocol, 3
   and XML Web services, 89-90
HTTP-POST protocol
   communicating exceptions to clients, 125-26
   consuming XML Web services, 94-99
   vs. HTTP-GET protocol, 90-91
   overview, 89-90
   vs. SOAP protocol, 64
   in ValidateVISACard example, 53
HttpApplicationState class, 224
HttpContext class, 255

I
IAsyncResult object, 341-42, 350, 353, 361
IBM, as provider of UDDI registry, 14
IIS. See Internet Information Services
importing namespaces, 54, 78
information services, as example of XML Web services functionality, 4-5
Insert method, 255-56, 257
Installer. See Microsoft Installer
installing
   FrontPage Server Extensions (FPSE), 24
   Internet Information Services, 23-24, 27
   Microsoft .NET Framework, 25, 27
   Visual Studio .NET, 24, 26-27
instance variables, 217, 221, 243-44
int C# data type, 103
Integer Visual Basic .NET data type, 103
Integrated Windows authentication method
   configuring IIS server, 301-2
   implementing, 301-6
   overview, 285, 301
interfaces, programmatic, role in XML Web services, 4
Internet Explorer
   testing HelloWorld example, 34-36
   testing VISAValidator XML Web services, 50-52
   viewing HTTP-GET and HTTP-POST protocols, 90
   viewing validation request history, 232
Internet Information Services (IIS)
   authentication issues, 284, 286, 287, 288
   configuring server for Basic authentication method, 289-91
   configuring server for Integrated Windows authentication method, 301-2
   configuring server for XML Web services development, 24-26
   creating application directories, 193-94
   installing, 23-24, 27
   server requirements, 22-23
   turning keep-alives feature on and off, 298, 299, 300
   uploading files to server from Visual Studio .NET, 38-40
   when to install, 24, 27
Internet Services Manager, Windows 2000, 298

K
keep-alives feature, 298, 299, 300

L
Label control, 75, 76, 77
Language attribute, 29
legacy systems, role of XML Web services in integrating into modern IT applications, 6
license agreements, 201-3
Locals window, 163
long C# data type, 103
Long Visual Basic .NET data type, 103

M
manually deploying XML Web services, 192-94
Manufacturer property, 198
MemberName property, 314
Message property, 126, 127, 131
MessageName property, 58
messaging XML Web services, 15-16
methods. See WebMethod attribute
Microsoft, as provider of UDDI registry, 14
Microsoft FrontPage Server Extensions. See FrontPage Server Extensions
Microsoft Installer (MSI), 195, 196-97
Microsoft Internet Information Services (IIS) Web servers. See Internet Information Services
Microsoft .NET Framework
   installing, 25, 27
   links to Web resources, 392
   program elements for creating XML Web services, 53-58
   and XML Web services architecture, 16-18
Microsoft .NET Passport
   links to Web resources, 392
   role in publishing XML Web services using UDDI, 167, 168, 169
Microsoft Visual Basic .NET. See Visual Basic .NET
Microsoft Visual C#. See Visual C#

N
Name property, 57
Namespace property, 57
namespaces
   importing, 54, 78
   in .NET Framework context, 55
   specifying in WebService attribute, 56-57
   in XML context, 55
.NET Framework. See Microsoft .NET Framework
.NET Passport. See Microsoft .NET Passport
NetworkCredential object, 287

O
Object argument, 255

P
Passport accounts. See Microsoft .NET Passport
Password property, NetworkCredential object, 287
peer-to-peer computing, role of XML Web services, 6-7
polling, to determine asynchrous method completion, 361
primitives. See simple types
ProductName property, 198
programmatic interfaces. See interfaces, programmatic, role in XML Web services
projects
   copying files, 92-94, 128, 194-95
   list of files for HelloWorld example, 37-38
   new, creating in Visual Studio .NET, 30-32
   setup and deployment, creating in Visual Studio .NET, 196-97
   uploading files to IIS server from Visual Studio .NET, 38-40
   viewing files in Solution Explorer, 36-37
protocols. See also HTTP; SOAP; UDDI; WSDL
   overview, 3
   Secure Sockets Layer (SSL) protocol, 286, 392
   Simple Mail Transfer Protocol (SMTP), 16
   Transport Layer Security (TLS) protocol, 286, 392
providers, defined in XML Web services context, 4
proxy classes
   CookieContainer property, 217
   creating as instance variables, 217, 221
   creating by setting Web referencess, 65-67
   creating manually using Wsdl.exe tool, 364-66
   Credentials property, 287
   enabling, 71
   and HTTP, 95
   importing namespace, 78, 114-15
   instantiating, 71
   method names, 340
   overview, 17-18, 64-65
   procedures for using, 70-72
   updating, 71-72
   ValidateCard method, 121, 340, 341-43
   ways to create, 65-67
proxy DLLs
   creating clients that use, 366-73
   creating proxy code files, 364-66
   testing clients that use, 373
publishing XML Web services using UDDI, 166-82
push technology, 6-7

R
ref keyword, 121
reference arguments
   consuming XML Web services that use, 120-23
   creating XML Web services that use, 116-20
   testing XML Web services that use, 122-23
   vs. value arguments, 115-16
Reference.cs file, 69
Reference.map file, 69
references, Web. See Web references
Reference.vb file, 69
registering in UDDI registries
   businesses, 175-77
   services, 178-82
   tModels, 171-74, 180
   UDDI overview, 166-67
   yourself, 168-71
registries of XML Web services, 8, 14, 166-67
relational data, 233-35. See also DataSets
renaming
   Service1.asmx file, 46
   Web references, 67-68
request history client, building, 229-31
Required property, 314
reuse, component, 8-9
Roles attribute, 307
RowFilter property, 251
rows, DataSet table, 234
run-time errors vs. compile-time errors, 143

S
SAP, as provider of UDDI registry, 14
searching for XML Web services in UDDI registries, 183-86
Secure Sockets Layer (SSL) protocol, 286, 392
security, XML Web services overview, 283-84. See also authentication; authorization
SecurityHeader SOAP header
   developing XML Web service client applications that use, 323-31
   overview, 312-13
   passing to XML Web services, 324
servers. See Internet Information Services; Web servers
service help pages
   viewing HelloWorld, 34-36
   viewing HTTP-GET and HTTP-POST protocols, 50-52
   viewing VISAValidator, 50-52
Service1.asmx file
   editing code, 32
   overview, 36, 37
   renaming, 46
Service1.asmx.cs file, 32, 36, 37
Service1.asmx.vb file, 32, 36, 37
Session object, 212, 223, 273
Session_End method, 272
sessions
   creating, 210
   defined, 210
   deleting, 224
   enabling, 58, 210
   lifetime, 224
   what they do, 210-16
Session_Start method, 272
short C# data type, 103
Short Visual Basic .NET data type, 103
Simple Mail Transfer Protocol (SMTP), 16
simple types
   defined, 102
   and HTTP, 103
   list of .NET Framework data types, 102
   and SOAP, 103
Single Visual Basic .NET data type, 103
Size property, 75, 133
SOAP (Simple Object Access Protocol)
   advantages, 101-2
   communicating exceptions to clients, 126-27
   custom headers, 311-31
   and data types, 103, 104
   Fault fields, 126, 127
   vs. HTTP, 91-92, 102
   HTTP as mechanism for sending messages over networks, 16, 90-92
   links to Web resources, 392
   overview, 15-16, 64, 101-2
   as protocol developed for XML Web services, 3
   role of proxy classes, 64-65
SoapException exception
   Code property, 126, 127, 131
   instantiating, 131
   Message property, 126, 127, 131
   and SOAP proxies, 126, 127
SoapHeader attribute
   applying, 313, 317
   list of properties, 313-14
   ValidateCard method example, 317
SoapHeaderException exception, 313
Solution Explorer
   modifying WebFormsClient sample application, 96-99
   project files overview, 36-38
   viewing HelloWorld code, 32
standards for XML Web services, 3, 7. See also protocols
starting Visual Studio .NET debugger, 151
states. See also application state; client state
   client vs. application, 209
   managing, 209-32
   stateful XML Web services, 209
   stateless XML Web services, 209
stopping Visual Studio .NET debugger, 151
String argument, 255
string C# data type, 103
String Visual Basic .NET data type, 103
StringBuilder objects, 96
synchronous communication, 333-34
System.Boolean class, 103
System.Byte class, 103
System.Char class, 103
System.Collections namespace, 212
System.Data.DataSet class. See DataSets
System.Data.DataView class. See DataView class
System.Decimal class, 103
System.Double class, 103
System.Int16 class, 103
System.Int32 class, 103
System.Int64 class, 103
System.Net.CredentialCache class, 287
System.Net.NetworkCredential class, 287
System.Net.WebException exception, 126, 287, 308, 309
System.Single class, 103
System.Strong class, 103
System.Text namespace, 228
System.Threading namespace, 335, 359
System.Web.Caching namespace, 256-57, 259
System.Web.HttpContext class. See HttpContext class
System.Web.Services namespace, 54-55
System.Web.Services.dll file, adding to list of project references, 367-68
System.Web.Services.Protocols namespace, 126, 313

T
tables, DataSet, 234
Tables property, 247
TCP/IP, 3
testing
   application state support, 231-32
   asynchronous client, 353
   caching feature, 269-71
   client state support, 223
   clients that use proxy DLLs, 373
   ConsoleClient sample application, 87-88
   GetValidationHistory method, 231-32
   HelloWorld sample application, 34-36
   hit count, 155
   VISAValidator sample application, 50-53
   WaitHandle functionality, 360
   WebFormsClient sample application, 82-83, 99
   WindowsFormsClient sample application, 78-79
   XML Web services that use reference arguments, 122-23
   XML Web services using Internet Explorer, 34-36
Text property, 75, 133
TextBox control, 75, 76
Thread class, 335
threads, blocking, 361
throwing exceptions in XML Web services, 127-32
TimeSpan argument, 256
tModels, 166, 167, 171-74, 180
Transmission Control Protocol/Internet Protocol (TCP/IP), 3
transport, defined, 16
Transport Layer Security (TLS) protocol, 286, 392
types. See data types

U
UDDI (Universal Discovery, Description, and Integration)
   vs. DISCO files, 14-15
   discovering XML Web services using, 183-86
   as form of discovery, 14
   key information elements, 167
   links to Web resources, 393
   overview, 14
   as protocol developed for XML Web services, 3
   publicly available registries, 14
   publishing XML Web services using, 166-82
   registering businesses, 175-77
   registering services, 178-82
   registering tModels, 171-74, 180
   registering yourself, 168-71
Uniform Resource Identifiers (URIs), 28
updating proxy classes, 71-72
uploading files to IIS server from Visual Studio .NET, 38-40
URL authorization, 306-9
URL Behavior property, 70
user interfaces
   adding Progress Bar control, 354-55
   creating interface for authentication example, 293-94
   creating interface for callback example, 345-47
UserName property, NetworkCredential object, 287
Users attribute, 307

V
ValidateAMEX method, 43, 385-88
ValidateButton_Click method
   adding code to WebFormsClient applications, 81-82
   adding code to WindowsFormsClient applications, 77-78
   modifying for Basic authentication example, 294-97
   modifying for callback methods example, 348-50
   modifying for complex types example, 113-14
   modifying for exception handling example, 137-39
   modifying for Integrated Windows authentication example, 303-5
   modifying for proxy DLL example, 368-72
   modifying for WebFormsClient HTTP client, 97-98
ValidateCard method
   adding to Validation.asmx file, 108
   invoking, 145
   modifying code, 225-27
   modifying to restrict user access, 312
   modifying to test asynchronous communication, 335, 336-40
   proxy methods, 340, 341
   replacing code, 118-20, 213-16, 277-81, 317-22
ValidateMasterCard method, 43, 385-88
ValidateVisa method, 43, 64, 385-88
ValidateVISACard method, 72, 95, 103
validation history. See also GetValidationHistory method
   DataSet example, 235-51
   testing caching, 269-71
   testing requests, 231-32
   viewing in Internet Explorer, 232
Validation.asmx file
   adding exception handling code to ValidateCard method, 129-32
   application events project, 274-81
   caching project, 256-60
   DataSet project, 236
   editing ValidateCard method, 118-20
   need for, 192
   opening code-behind file, 46, 212, 225
   registering, 181
   renaming Service1.asmx file to, 46, 106-7
   replacing ValidateCard method, 317-22
   role of Visual Studio .NET, 49-50
   for VISAValidator XML Web service, 49-50
Validation.asmx.cs file
   application events project, 274, 275, 276, 277-79
   caching project, 256, 257-58, 259
   defining CreateDataSet method, 236, 237
   revising GetValidationHistory method, 235, 238-39
   for ValidatorService XML Web service, 107, 212, 225-26
   for VISAValidator XML Web service, 46-47, 48-49, 53-54, 55, 56, 57
Validation.asmx.vb file
   application events project, 274, 275-76, 277, 279-81
   caching project, 256, 257, 258, 259-60
   defining CreateDataSet method, 236, 237-38
   revising GetValidationHistory method, 235, 239
   for ValidatorService XML Web service, 107, 212-13, 226-27
   for VISAValidator XML Web service, 47, 48, 49, 54, 55, 56, 57
ValidationCallback method, 352
Validation.disco file, 69
ValidationHistory DataSet object, 235
ValidationHistoryClient project
   creating project, 245
   creating Windows Form, 245-47
   editing code file, 247-49
   testing application, 250-51
ValidationObject class, 106, 108, 110-20, 123, 235, 341
ValidationObject.cs file, 105, 117
ValidationObject.vb file, 105, 117
ValidationState class, 211
ValidationState.cs file, 211
ValidationState.vb file, 211
Validation.wsdl file, 69
Validator class
   checkLUHN method, 383-85
   formatCreditCardNumber method, 382-83
   list of exceptions thrown by methods, 127, 128
   lists of methods, 43, 381-88
   overview, 42-43, 379, 381
   ValidateAMEX method, 43, 385-88
   ValidateMasterCard method, 43, 385-88
   ValidateVISA method, 43, 385-88
Validator Service, installing deployed project, 204-5
ValidatorService class, 107, 108, 217, 221, 243-45
ValidatorService XML Web service
   adding SecurityHeader class, 315-16
   adding Web reference, 112-13
   application events project, 273-81
   authentication project, 288-300
   caching project, 256-60
   copying for SOAP header example, 314-15
   copying project, 128, 194-95
   creating, 104-10
   developing client application that uses custom SOAP header, 323-31
   modifying to test asynchronous communication, 335-40
   preparing for debugging, 145-46
   testing, 115
ValidatorService.asmx file, registering in UDDI registry, 179
ValidatorServiceClass class
   adding GetException method, 131-32
   changing Service1 class declaration to, 107-8
   updating for SOAP header example, 317-23
   ValidateCard method, 108
value arguments vs. reference arguments, 115-16
value types. See simple types
.vb files, 32
verbs attribute, 307
VISAValidator proxy class, 72
VISAValidator XML Web service
   adding reference to CreditCardValidator library, 44-46
   building, 49
   code explanations, 53-58
   creating, 44-50
   creating project, 44
   creating Windows Forms client for, 73-79
   implementing VISA card validation functionality, 46-49
   overview, 43
   System.Web.Services namespace, 54-55
   testing XML Web service, 50-53
   Validation.asmx file, 49-50
   Validation.asmx.cs file, 46-47, 48-49, 53-54, 55, 56, 57
   Validation.asmx.vb file, 47, 48, 49, 54, 55, 56, 57
Visual Basic .NET
   adding ComboBox code, 248-49
   adding delay to ValidateCard method, 338-40
   adding exception handling code to ValidatorService XML Web service, 130-31, 132
   adding processResultString method, 98-99
   adding validation history code, 230-31
   CCIllegalCharacterException exception, 381
   CCInvalidLengthException exception, 380-81
   CCInValidPrefixException exception, 380
   code for callback functionality, 349-50, 352
   code-behind file Validation.asmx.vb, 47, 48, 49, 54, 55, 56, 57
   and complex types, 106, 107, 108, 109-10, 114, 115
   configuring conditional breakpoints, 157
   ConsoleClient.vb file, 87
   creating DataView, 248
   creating XML Web service client, 148-49
   defining GetClientStatistics method, 212-13
   defining GetValidationrHistory method, 227-28
   editing ValidateCard method, 119-20
   editing Windows Forms client for state management project, 220-21, 222
   enabling proxy classes, 71
   HelloWorld example, 33
   implementing WaitHandle functionality, 357-59, 360
   importing namespace, 54, 78
   list of data types, 103
   modifying code for proxy DLL example, 369-70, 371, 372
   modifying ValidateButton_Click method for Basic authentication example, 296-98
   modifying ValidateButton_Click method for callback methods example, 349-50
   modifying ValidateButton_Click method for DataSet example, 242-43, 244-45
   modifying ValidateButton_Click method for exception handling example, 139
   modifying ValidateButton_Click method for Integrated Windows authentication example, 304-5
   modifying ValidateButton_Click method to create SecurityHeader instance, 328-29
   modifying ValidateCard method to test asynchronous communication, 338-40
   and reference arguments, 122
   replacing ValidateCard method in Validation.asmx file, 320-22
   revising GetValidationHistory method, 235, 239
   SecurityHeader class, 316
   setting breakpoints in code files, 150
   template for XML Web service client projects, 135-37
   updating Application_Start method in Global.asax.vb file, 273-74
   updating Session_Start method in Global.asax.vb file, 274
   updating ValidationObject.vb file, 117
   updating ValidatorServiceClass class, 317, 323
   ValidateButton_Click method, 77-78, 81-82, 97-98
   ValidateCard method, 215-16
   Validation.asmx.vb file, 212-13
   Validation.asmx.vb file for application events project, 274, 275-76, 277, 279-81
   Validation.asmx.vb file for caching project, 256, 257, 258, 259-60
   ValidationState.vb file, 211
   ValidatorService proxy class methods, 341, 342
   WebFormsClient code, 81-82
   WebMethod attribute, 57
   WebService attribute, 56
   WindowsFormsClient code, 77-78
Visual C#
   adding ComboBox code, 248-49
   adding delay to ValidateCard method, 336-38
   adding exception handling code to ValidatorService XML Web service, 129-30, 132
   adding processResultString method, 98
   adding validation history code, 230, 231
   CCIllegalCharacterException exception, 381
   CCInValidLengthException exception, 380
   CCInValidPrefixException exception, 379-80
   code for callback functionality, 348-49, 350, 351-52
   code-behind file Validation.asmx.cs, 46-47, 48-49, 53-54, 55, 56, 57
   and complex types, 106, 107, 108-9, 113-14, 115
   configuring conditional breakpoints, 157
   ConsoleClient.cs file, 86-87
   creating DataView, 248
   creating XML Web service client, 147-48
   defining GetClientStatistics method, 212
   defining GetValidationHistory method, 227
   editing ValidateCard method, 118-19
   editing Windows Forms client for state management project, 219-20, 221, 222
   enabling proxy classes, 71
   HelloWorld example, 33
   implementing WaitHandle functionality, 355-57, 359, 360
   importing namespace, 54, 78
   list of data types, 103
   modifying code in proxy DLL example, 368-69, 371, 372
   modifying ValidateButton_Click method for Basic authentication example, 294-96
   modifying ValidateButton_Click method for DataSet example, 241-42, 244
   modifying ValidateButton_Click method for exception handling example, 137-38
   modifying ValidateButton_Click method for Integrated Windows authentication example, 303-4
   modifying ValidateButton_Click method in callback methods example, 348-49
   modifying ValidateButton_Click method to create SecurityHeader instance, 326-28
   modifying ValidateCard method to test asynchronous communication, 336-38
   and reference arguments, 121
   replacing ValidateCard method in Validation.asmx file, 318-20
   revising GetValidationHistory method, 235, 238-39
   role in XML Web services development, 22
   SecurityHeader class, 316
   setting breakpoints in code files, 150
   template for XML Web service client projects, 135-37
   updating Application_Start method in Global.asax.cs file, 273-74
   updating Session_Start method in Global.asax.cs file, 274
   updating ValidationObject.cs file, 117
   updating ValidatorServiceClass class, 317, 322-23
   ValidateButton_Click method, 77, 81, 82, 97, 113-14
   ValidateCard method, 213-15, 226-27
   Validation.asmx.cs file, 212, 225-26
   in Validation.asmx.cs file for application events project, 274, 275, 276, 277-79
   Validation.asmx.cs file for caching project, 256, 257-58, 259
   ValidationState.cs file, 211
   ValidatorService proxy class methods, 341, 342
   WebFormsClient code, 81, 82
   WebMethod attribute, 57
   WebService attribute, 56
   WindowsFormsClient code, 77, 78
Visual Studio .NET
   advanced debugging features, 163-64
   Copy Project feature, 92-94, 128, 194-95
   creating new projects, 30-32
   creating setup and deployment projects, 196-97
   creating XML Web service projects, 30-40
   debugger overview, 143-44
   debugging XML Web services, 143-64
   generating client proxies, 323-24
   installing, 24, 26-27
   overview, 13, 17
   project files overview, 36-38
   role in developing XML Web services, 21, 22
   starting debugger, 151
   stepping through code using debugger, 152-53
   stopping debugger, 153
   triggering breakpoints, 151-52
   uploading files to IIS server from, 38-40
   Web Setup project, 195-205
   when to install, 24, 27
   and WSDL, 15
VSDISCO files, 36, 37, 189-91

W
WaitHandle class, 353-54, 359
Watch window, 163
Web access mode, 38, 39-40
Web Forms clients
   adding controls to forms, 81
   copying to new project, 96
   creating in state management project, 229-31
   creating project for VISAValidator client, 79-80
   creating VISAValidator client Web Form, 79-83
   creating with HTTP-GET protocol, 95-99
   creating with proxy class and SOAP, 79-83
   modifying in Solution Explorer, 96-99
   testing, 82-83, 99
Web Reference URL property, 70
Web references
   adding to ValidatorService XML Web service, 112-13, 218, 247
   adding to VISAValidator XML Web Service, 65-67
   creating, 65-67
   renaming, 67-68
   viewing files, 68-69
   viewing properties, 69-70
Web servers
   configuring for XML Web services development, 24-26
   installing Internet Information Services (IIS), 23-24
   requirements for IIS, 22-23
Web services. See XML Web services
Web Setup project, Visual Studio .NET, 195-205
Web.config file, 36, 38, 289, 306-9
WebException exception, 126, 287, 308, 309
WebForm1.aspx file
   adding Web controls, 81
   implementing functionality, 230-31
   modifying code, 96-99
WebMethod attribute, 55, 57-58, 108, 210, 254-55
WebMethodName method, 340
WebService attribute, 55, 56-57, 107
WebService class, 55-56
@ WebService directive
   Class attribute, 29
   CodeBehind attribute, 29
   Debug attribute, 29
   example, 28
   Language attribute, 29
   list of attributes, 29
   overview, 29
Windows 2000, running Internet Services Manager, 298, 299-300
Windows Component Update, 25
Windows Forms clients
   adding code to ValidateButton_Click method, 77-78
   adding controls to forms, 75-77
   configuring controls for VISAValidator client, 76
   creating asynchronous client, 344-53
   creating Basic authentication example, 291-300
   creating client for DataSet project, 239-45
   creating client for proxy DLL project, 366-72
   creating client for reference arguments example, 120
   creating client for state management project, 217-23
   creating client for VISAValidator XML Web service, 73-79
   creating client that uses proxies to consume XML Web services, 73-79
   creating client that uses ValidationObject class, 110-15
   creating client to view request history, 265-69
   creating exception-handling project, 133
   creating Integrated Windows authentication example, 302-6
   creating project for VISAValidator client, 74-75
   creating SecurityHeader example, 324-29
   creating validation client, 260-65
   creating ValidationHistoryClient project, 245-47
   creating VISAValidator client Windows Form, 75-77
   creating Windows Form for exception- handling project, 133-35
   editing code for exception handling, 137-40
   editing code for WaitHandle functionality, 355-60
   importing System.Text namespace, 228
   list of controls for VISAValidator client, 76-77
   list of properties for VISAValidator client, 75
   overview, 73
   template for XML Web service client projects, 135-37
   testing error conditions, 140-41
   testing SecurityHeader SOAP header, 329-31
   testing WindowsFormsClient application, 78-79
WSDL (Web Service Description Language)
   links to Web resources, 393
   overview, 15, 63
   as protocol developed for XML Web services, 3
Wsdl.exe tool, 65, 363-64

X
XML (Extensible Markup Language)
   links to Web resources, 391
   role in XML Web services, 16
   as standard Internet protocol, 3
XML Web services
   adding SOAP header support, 313-14
   advertising using DISCO (discovery) files, 187-89
   architecture, 16-18
   asynchronous, 333, 334-40
   asynchronous clients, 340-61
   benefits, 7-9
   centralization services example, 5
   as components of larger applications, 3
   consuming those that use caching, 265-69
   consuming those that use client state, 216-23
   consuming those that use complex types, 110-15
   consuming those that use DataSets, 245-51
   consuming those that use HTTP, 94-99
   consuming those that use reference arguments, 120-23
   copying projects, 92-94, 128
   copying ValidatorService project for SOAP header example, 314-15
   creating client projects, 146-48
   creating HelloWorld example, 30-34
   creating projects in Visual Studio .NET, 30-40
   creating those that use caching, 256-60
   creating those that use complex types, 104-10
   creating those that use reference arguments, 116-20
   creating Windows Forms client for VISAValidator service, 73-79
   debugging with Visual Studio .NET, 143-64
   deploying, 191-205
   developing an example that uses custom SOAP headers, 312-23
   developing client applications that use custom SOAP headers, 323-31
   DISCO files, 14-15
   discovering, using DISCO files, 189-91
   discovering, using UDDI, 183-86
   fundamental .NET Framework program elements, 53-58
   handling exceptions in clients, 132-35
   and HTTP, 89-90
   information services example, 4-5
   as language and platform independent, 8
   limitations, 10-12
   major characteristics, 3-4
   messaging, 15-16
   obtaining descriptions, 13-15, 17
   overview, 3-4
   project file overview, 36-38
   publishing using DISCO files, 187-89
   publishing using UDDI, 166-82
   reusability, 8-9
   role in data integration, aggregation, and analysis, 5-6
   role in extending and integrating applications, 6
   role in integrating legacy systems into newer technologies, 6
   role of ASP.NET, 18, 21
   role of interfaces, 4
   role of Visual Studio .NET in development, 21, 22
   searching for, using business classification, 183-86
   security overview, 283-84
   setting breakpoints in code files, 149-50
   standards and protocols, 13-16
   as standards based, 7
   stateless vs. stateful, 209
   synchronous, 333-34
   template for client projects, 135-37
   testing HelloWorld example, 34-36
   throwing exceptions, 127-32
   UDDI registries, 14
   as vendor neutral, 7
   VISAValidator example, 43-58
   when not to use, 9



Last Updated: October 8, 2002
Top of Page