C# 클래스 Thinktecture.Tools.Web.Services.ServiceDescription.ServiceDescriptionEngine

Provides static methods for WSDL generation.
This class could not be inherited.
파일 보기 프로젝트 열기: WSCF/WSCF

공개 메소드들

메소드 설명
GenerateWsdl ( InterfaceContract serviceInterfaceContract, string wsdlSaveLocation, string xmlComment ) : string

Generates the WSDL file for specified InterfaceContract.

GenerateWsdl ( InterfaceContract serviceInterfaceContract, string wsdlSaveLocation, string xmlComment, string wsdlLocation ) : string

Generates the WSDL file for a specified InterfaceContract.

This methods loads the information, it receive in a InterfaceContract to a System.Web.Services.Description.ServiceDescription class, which is later used to generate the WSDL file. The loading process takes place in several steps.

1. Load the basic meta data from InterfaceContract.

2. Load the schema imports in the SchemaImports collection.

3. Load the messages in OperationsCollection.

4. Create the WSDL Port Type.

5. Add each operation and it's corresponding in/out messages to the Port Type.

6. Create a WSDL Binding section and add OperationBinding for each operation.

7. Generate the WSDL 'service' tags if required.

8. Finally write the file to the output stream.

This method generates WsdlGenerationException exception, if it fails to create the WSDL file. If a file is specified to overwrite with the new file, the original file is restored in case of a failure.

GetInterfaceContract ( string wsdlFileName ) : InterfaceContract

Creates an InterfaceContract object by loading the contents in a specified WSDL file.

This method first loads the content of the WSDL file to an instance of System.Web.Services.Description.ServiceDescription class. Then it creates an instance of InterfaceContract class by loading the data from that. This method throws WsdlLoadException in case of a failure to load the WSDL file.

GetIntrinsicSimpleTypesNames ( ) : ArrayList

GetSchemasFromXsd ( string schemaFile, string &schemaNamespace ) : ArrayList

Reads a XML schema file and returns the information found in that.

비공개 메소드들

메소드 설명
GetDefaultEndpoint ( System binding, string serviceName ) : string
GetFaultBodyBinding ( System binding ) : System.Web.Services.Description.SoapFaultBinding
GetSchemaElements ( System.Xml.Serialization.XmlSchemas schemas, string tns ) : SchemaElements

Extracts the elements from a given schemas.

GetSoapBinding ( System binding ) : object
GetSoapBodyBinding ( System binding ) : object
GetSoapHeaderBinding ( System binding, string message, string ns ) : object
GetSoapOperationBinding ( System binding, string action ) : object
GetTransport ( System binding ) : string
ServiceDescriptionEngine ( ) : System

Initializes a new instance of ServiceDescriptionEngine class.

ValidateWsdl ( System serviceDescription, bool &isHttpBinding ) : bool

Validates a specified instance of ServiceDescription class for the round tripping feature.

메소드 상세

GenerateWsdl() 공개 정적인 메소드

Generates the WSDL file for specified InterfaceContract.
public static GenerateWsdl ( InterfaceContract serviceInterfaceContract, string wsdlSaveLocation, string xmlComment ) : string
serviceInterfaceContract InterfaceContract /// to use for the WSDL generation. ///
wsdlSaveLocation string Location to save the generated WSDL file.
xmlComment string XML comment to add to the top of the WSDL file.
리턴 string

GenerateWsdl() 공개 정적인 메소드

Generates the WSDL file for a specified InterfaceContract.
This methods loads the information, it receive in a InterfaceContract to a System.Web.Services.Description.ServiceDescription class, which is later used to generate the WSDL file. The loading process takes place in several steps.

1. Load the basic meta data from InterfaceContract.

2. Load the schema imports in the SchemaImports collection.

3. Load the messages in OperationsCollection.

4. Create the WSDL Port Type.

5. Add each operation and it's corresponding in/out messages to the Port Type.

6. Create a WSDL Binding section and add OperationBinding for each operation.

7. Generate the WSDL 'service' tags if required.

8. Finally write the file to the output stream.

This method generates WsdlGenerationException exception, if it fails to create the WSDL file. If a file is specified to overwrite with the new file, the original file is restored in case of a failure.
public static GenerateWsdl ( InterfaceContract serviceInterfaceContract, string wsdlSaveLocation, string xmlComment, string wsdlLocation ) : string
serviceInterfaceContract InterfaceContract /// to use for the WSDL generation. ///
wsdlSaveLocation string Location to save the generated WSDL file.
xmlComment string XML comment to add to the top of the WSDL file.
wsdlLocation string Path of an existing WSDL file to overwrite with the generated /// WSDL file.
리턴 string

GetInterfaceContract() 공개 정적인 메소드

Creates an InterfaceContract object by loading the contents in a specified WSDL file.
This method first loads the content of the WSDL file to an instance of System.Web.Services.Description.ServiceDescription class. Then it creates an instance of InterfaceContract class by loading the data from that. This method throws WsdlLoadException in case of a failure to load the WSDL file.
public static GetInterfaceContract ( string wsdlFileName ) : InterfaceContract
wsdlFileName string Path of the WSDL file to load the information from.
리턴 InterfaceContract

GetIntrinsicSimpleTypesNames() 공개 정적인 메소드

public static GetIntrinsicSimpleTypesNames ( ) : ArrayList
리턴 System.Collections.ArrayList

GetSchemasFromXsd() 공개 정적인 메소드

Reads a XML schema file and returns the information found in that.
public static GetSchemasFromXsd ( string schemaFile, string &schemaNamespace ) : ArrayList
schemaFile string The XML schema file to read information from.
schemaNamespace string Ouput parameter which returns the namespace of the specified XML schema file.
리턴 System.Collections.ArrayList