ServiceDescription.Types プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
Types に格納された ServiceDescription を取得または設定します。
public:
property System::Web::Services::Description::Types ^ Types { System::Web::Services::Description::Types ^ get(); void set(System::Web::Services::Description::Types ^ value); };
public System.Web.Services.Description.Types Types { get; set; }
member this.Types : System.Web.Services.Description.Types with get, set
Public Property Types As Types
プロパティ値
XML Web サービスで公開されるメソッドのパラメーターと戻り値の両方のデータ型を表す Types インスタンス。
例
myServiceDescription->Types->Schemas->Remove( myServiceDescription->Types->Schemas[ 0 ] );
XmlSchema^ myXmlSchema = gcnew XmlSchema;
myXmlSchema->AttributeFormDefault = XmlSchemaForm::Qualified;
myXmlSchema->ElementFormDefault = XmlSchemaForm::Qualified;
myXmlSchema->TargetNamespace = myServiceDescription->TargetNamespace;
XmlSchemaElement^ myXmlElement1 = gcnew XmlSchemaElement;
myXmlElement1->Name = "Add";
XmlSchemaComplexType^ myXmlSchemaComplexType = gcnew XmlSchemaComplexType;
XmlSchemaSequence^ myXmlSchemaSequence = gcnew XmlSchemaSequence;
myXmlSchemaSequence->Items->Add( CreateComplexTypeXmlElement( "1", "1", "a", gcnew XmlQualifiedName( "s:float" ) ) );
myXmlSchemaSequence->Items->Add( CreateComplexTypeXmlElement( "1", "1", "b", gcnew XmlQualifiedName( "s:float" ) ) );
myXmlSchemaComplexType->Particle = myXmlSchemaSequence;
myXmlElement1->SchemaType = myXmlSchemaComplexType;
myXmlSchema->Items->Add( myXmlElement1 );
XmlSchemaElement^ myXmlElement2 = gcnew XmlSchemaElement;
myXmlElement2->Name = "AddResponse";
myXmlSchemaComplexType = gcnew XmlSchemaComplexType;
myXmlSchemaSequence = gcnew XmlSchemaSequence;
myXmlSchemaSequence->Items->Add( CreateComplexTypeXmlElement( "1", "1", "AddResult", gcnew XmlQualifiedName( "s:float" ) ) );
myXmlSchemaComplexType->Particle = myXmlSchemaSequence;
myXmlElement2->SchemaType = myXmlSchemaComplexType;
myXmlSchema->Items->Add( myXmlElement2 );
XmlSchemaElement^ myXmlElement3 = gcnew XmlSchemaElement;
myXmlElement3->Name = "Subtract";
myXmlSchemaComplexType = gcnew XmlSchemaComplexType;
myXmlSchemaSequence = gcnew XmlSchemaSequence;
myXmlSchemaSequence->Items->Add( CreateComplexTypeXmlElement( "1", "1", "a", gcnew XmlQualifiedName( "s:float" ) ) );
myXmlSchemaSequence->Items->Add( CreateComplexTypeXmlElement( "1", "1", "b", gcnew XmlQualifiedName( "s:float" ) ) );
myXmlSchemaComplexType->Particle = myXmlSchemaSequence;
myXmlElement3->SchemaType = myXmlSchemaComplexType;
myXmlSchema->Items->Add( myXmlElement3 );
XmlSchemaElement^ myXmlElement4 = gcnew XmlSchemaElement;
myXmlElement4->Name = "SubtractResponse";
myXmlSchemaComplexType = gcnew XmlSchemaComplexType;
myXmlSchemaSequence = gcnew XmlSchemaSequence;
myXmlSchemaSequence->Items->Add( CreateComplexTypeXmlElement( "1", "1", "SubtractResult", gcnew XmlQualifiedName( "s:int" ) ) );
myXmlSchemaComplexType->Particle = myXmlSchemaSequence;
myXmlElement4->SchemaType = myXmlSchemaComplexType;
myXmlSchema->Items->Add( myXmlElement4 );
// Add the schemas to the Types property of the ServiceDescription.
myServiceDescription->Types->Schemas->Add( myXmlSchema );
myServiceDescription.Types.Schemas.Remove(
myServiceDescription.Types.Schemas[0]);
XmlSchema myXmlSchema = new XmlSchema();
myXmlSchema.AttributeFormDefault = XmlSchemaForm.Qualified;
myXmlSchema.ElementFormDefault = XmlSchemaForm.Qualified;
myXmlSchema.TargetNamespace = myServiceDescription.TargetNamespace;
XmlSchemaElement myXmlElement1 = new XmlSchemaElement();
myXmlElement1.Name="Add";
XmlSchemaComplexType myXmlSchemaComplexType =
new XmlSchemaComplexType();
XmlSchemaSequence myXmlSchemaSequence = new XmlSchemaSequence();
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement(
"1", "1", "a", new XmlQualifiedName("s:float")));
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement(
"1", "1", "b", new XmlQualifiedName("s:float")));
myXmlSchemaComplexType.Particle = myXmlSchemaSequence;
myXmlElement1.SchemaType = myXmlSchemaComplexType;
myXmlSchema.Items.Add(myXmlElement1);
XmlSchemaElement myXmlElement2 = new XmlSchemaElement();
myXmlElement2.Name = "AddResponse";
myXmlSchemaComplexType = new XmlSchemaComplexType();
myXmlSchemaSequence = new XmlSchemaSequence();
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement(
"1", "1", "AddResult", new XmlQualifiedName("s:float")));
myXmlSchemaComplexType.Particle = myXmlSchemaSequence;
myXmlElement2.SchemaType=myXmlSchemaComplexType;
myXmlSchema.Items.Add(myXmlElement2);
XmlSchemaElement myXmlElement3 = new XmlSchemaElement();
myXmlElement3.Name="Subtract";
myXmlSchemaComplexType = new XmlSchemaComplexType();
myXmlSchemaSequence = new XmlSchemaSequence();
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement(
"1", "1", "a", new XmlQualifiedName("s:float")));
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement(
"1", "1", "b", new XmlQualifiedName("s:float")));
myXmlSchemaComplexType.Particle = myXmlSchemaSequence;
myXmlElement3.SchemaType=myXmlSchemaComplexType;
myXmlSchema.Items.Add(myXmlElement3);
XmlSchemaElement myXmlElement4 = new XmlSchemaElement();
myXmlElement4.Name="SubtractResponse";
myXmlSchemaComplexType = new XmlSchemaComplexType();
myXmlSchemaSequence = new XmlSchemaSequence();
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement(
"1", "1", "SubtractResult", new XmlQualifiedName("s:int")));
myXmlSchemaComplexType.Particle = myXmlSchemaSequence;
myXmlElement4.SchemaType = myXmlSchemaComplexType;
myXmlSchema.Items.Add(myXmlElement4);
// Add the schemas to the Types property of the ServiceDescription.
myServiceDescription.Types.Schemas.Add(myXmlSchema);
myServiceDescription.Types.Schemas.Remove( _
myServiceDescription.Types.Schemas(0))
Dim myXmlSchema As New XmlSchema()
myXmlSchema.AttributeFormDefault = XmlSchemaForm.Qualified
myXmlSchema.ElementFormDefault = XmlSchemaForm.Qualified
myXmlSchema.TargetNamespace = myServiceDescription.TargetNamespace
Dim myXmlElement1 As New XmlSchemaElement()
myXmlElement1.Name = "Add"
Dim myXmlSchemaComplexType As New XmlSchemaComplexType()
Dim myXmlSchemaSequence As New XmlSchemaSequence()
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement( _
"1", "1", "a", New XmlQualifiedName("s:float")))
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement( _
"1", "1", "b", New XmlQualifiedName("s:float")))
myXmlSchemaComplexType.Particle = myXmlSchemaSequence
myXmlElement1.SchemaType = myXmlSchemaComplexType
myXmlSchema.Items.Add(myXmlElement1)
Dim myXmlElement2 As New XmlSchemaElement()
myXmlElement2.Name = "AddResponse"
myXmlSchemaComplexType = New XmlSchemaComplexType()
myXmlSchemaSequence = New XmlSchemaSequence()
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement( _
"1", "1", "AddResult", New XmlQualifiedName("s:float")))
myXmlSchemaComplexType.Particle = myXmlSchemaSequence
myXmlElement2.SchemaType = myXmlSchemaComplexType
myXmlSchema.Items.Add(myXmlElement2)
Dim myXmlElement3 As New XmlSchemaElement()
myXmlElement3.Name = "Subtract"
myXmlSchemaComplexType = New XmlSchemaComplexType()
myXmlSchemaSequence = New XmlSchemaSequence()
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement( _
"1", "1", "a", New XmlQualifiedName("s:float")))
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement( _
"1", "1", "b", New XmlQualifiedName("s:float")))
myXmlSchemaComplexType.Particle = myXmlSchemaSequence
myXmlElement3.SchemaType = myXmlSchemaComplexType
myXmlSchema.Items.Add(myXmlElement3)
Dim myXmlElement4 As New XmlSchemaElement()
myXmlElement4.Name = "SubtractResponse"
myXmlSchemaComplexType = New XmlSchemaComplexType()
myXmlSchemaSequence = New XmlSchemaSequence()
myXmlSchemaSequence.Items.Add(CreateComplexTypeXmlElement( _
"1", "1", "SubtractResult", New XmlQualifiedName("s:int")))
myXmlSchemaComplexType.Particle = myXmlSchemaSequence
myXmlElement4.SchemaType = myXmlSchemaComplexType
myXmlSchema.Items.Add(myXmlElement4)
' Add the schemas to the Types property of the ServiceDescription.
myServiceDescription.Types.Schemas.Add(myXmlSchema)
注釈
このプロパティによって返されるインスタンスはTypes、Web サービス記述言語 (WSDL) definitions
ルート要素で囲まれた要素のtypes
一覧に対応します。 WSDL の詳細については、WSDL 仕様を参照してください。
適用対象
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET