Expand Minimize
This topic has not yet been rated - Rate this topic

ServiceDescriptionImportWarnings Enumeration

Specifies the type of warnings produced by Import.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)
[FlagsAttribute]
public enum ServiceDescriptionImportWarnings
Member nameDescription
NoCodeGeneratedSpecifies that no proxy class was generated by the Import method.
OptionalExtensionsIgnoredSpecifies that at least one optional ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.
RequiredExtensionsIgnoredSpecifies that at least one required ServiceDescriptionFormatExtension for the ServiceDescription to be imported has been ignored.
UnsupportedOperationsIgnoredSpecifies that at least one Operation for the ServiceDescription to be imported is of an unsupported type and has been ignored.
UnsupportedBindingsIgnoredSpecifies that at least one Binding for the ServiceDescription to be imported is of an unsupported type and has been ignored.
NoMethodsGeneratedSpecifies that the proxy class generated by the Import method includes no methods.
SchemaValidationSpecifies that the ServiceDescription schema is invalid.
WsiConformanceSpecifies that the ServiceDescription to be imported does not conform to the WS-I Basic Profile.
String myDisplay;
// Read wsdl file.
ServiceDescription myServiceDescription = ServiceDescription.Read
   (myWSDLFileName);

ServiceDescriptionImporter myServiceDescriptionImporter = new
   ServiceDescriptionImporter();

// Add 'myServiceDescription' to 'myServiceDescriptionImporter'.
myServiceDescriptionImporter.AddServiceDescription
   (myServiceDescription, "", "");

myServiceDescriptionImporter.ProtocolName = "HttpGet";
CodeNamespace myCodeNamespace = new CodeNamespace();
CodeCompileUnit myCodeCompileUnit = new CodeCompileUnit();

// Invoke 'Import' method.
ServiceDescriptionImportWarnings myWarning = 
   myServiceDescriptionImporter.Import(myCodeNamespace,
   myCodeCompileUnit);

switch(myWarning)
{
   case ServiceDescriptionImportWarnings.NoCodeGenerated :
      myDisplay="NoCodeGenerated";
      break;
   case ServiceDescriptionImportWarnings.NoMethodsGenerated :
      myDisplay="NoMethodsGenerated";
      break;
   case ServiceDescriptionImportWarnings.UnsupportedOperationsIgnored :
      myDisplay="UnsupportedOperationsIgnored";
      break;
   case ServiceDescriptionImportWarnings.OptionalExtensionsIgnored :
      myDisplay="OptionalExtensionsIgnored";
      break;
   case ServiceDescriptionImportWarnings.RequiredExtensionsIgnored :
      myDisplay="RequiredExtensionsIgnored";
      break;
   case ServiceDescriptionImportWarnings.UnsupportedBindingsIgnored :
      myDisplay="UnsupportedBindingsIgnored";
      break;
   default :
      myDisplay="General Warning";
      break;
}
Console.WriteLine ("Warning : " + myDisplay);

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.