OperationOutput Class
Defines the specifications for output messages returned by the XML Web service. This class cannot be inherited.
Assembly: System.Web.Services (in System.Web.Services.dll)
System.Web.Services.Description.DocumentableItem
System.Web.Services.Description.NamedItem
System.Web.Services.Description.OperationMessage
System.Web.Services.Description.OperationOutput
| Name | Description | |
|---|---|---|
![]() | OperationOutput() | Initializes a new instance of the OperationOutput class. |
| Name | Description | |
|---|---|---|
![]() | Documentation | Gets or sets the text documentation for the instance of the DocumentableItem.(Inherited from DocumentableItem.) |
![]() | DocumentationElement | Gets or sets the documentation element for the DocumentableItem.(Inherited from DocumentableItem.) |
![]() | ExtensibleAttributes | Gets or sets an array of type XmlAttribute that represents attribute extensions of WSDL to comply with Web Services Interoperability (WS-I) Basic Profile 1.1.(Inherited from DocumentableItem.) |
![]() | Extensions | Gets the ServiceDescriptionFormatExtensionCollection associated with this OperationOutput.(Overrides DocumentableItem.Extensions.) |
![]() | Message | Gets or sets an abstract, typed definition of the data being communicated.(Inherited from OperationMessage.) |
![]() | Name | Gets or sets the name of the item.(Inherited from NamedItem.) |
![]() | Namespaces | Gets or sets the dictionary of namespace prefixes and namespaces used to preserve namespace prefixes and namespaces when a ServiceDescription object is constructed.(Inherited from DocumentableItem.) |
![]() | Operation | Gets the Operation of which the OperationMessage is a member.(Inherited from OperationMessage.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
Exactly one instance of this class is a member of the Messages property of the parent Operation instance.
The OperationOutput class corresponds to the Web Services Description Language (WSDL) output element enclosed by the operation element that is in turn enclosed by the portType element. For more information about WSDL, see the specification at http://www.w3.org/TR/wsdl/.
Imports System Imports System.Web.Services.Description Imports System.Collections Imports System.Xml Class MyOperationOutputSample Public Shared Sub Main() Try Dim myDescription As ServiceDescription = _ ServiceDescription.Read("AddNumbersIn_vb.wsdl") ' Add the ServiceHttpPost binding. Dim myBinding As New Binding() myBinding.Name = "ServiceHttpPost" Dim myXmlQualifiedName As New XmlQualifiedName("s0:ServiceHttpPost") myBinding.Type = myXmlQualifiedName Dim myHttpBinding As New HttpBinding() myHttpBinding.Verb = "POST" myBinding.Extensions.Add(myHttpBinding) ' Add the operation name AddNumbers. Dim myOperationBinding As New OperationBinding() myOperationBinding.Name = "AddNumbers" Dim myOperation As New HttpOperationBinding() myOperation.Location = "/AddNumbers" myOperationBinding.Extensions.Add(myOperation) ' Add the input binding. Dim myInput As New InputBinding() Dim postMimeContentbinding As New MimeContentBinding() postMimeContentbinding.Type = "application/x-www-form-urlencoded" myInput.Extensions.Add(postMimeContentbinding) ' Add the InputBinding to the OperationBinding. myOperationBinding.Input = myInput ' Add the ouput binding. Dim myOutput As New OutputBinding() Dim postMimeXmlbinding As New MimeXmlBinding() postMimeXmlbinding.Part = "Body" myOutput.Extensions.Add(postMimeXmlbinding) ' Add the OutPutBinding to the OperationBinding. myOperationBinding.Output = myOutput myBinding.Operations.Add(myOperationBinding) myDescription.Bindings.Add(myBinding) ' Add the port definition. Dim postPort As New Port() postPort.Name = "ServiceHttpPost" postPort.Binding = New XmlQualifiedName("s0:ServiceHttpPost") Dim postAddressBinding As New HttpAddressBinding() postAddressBinding.Location = "http://localhost/Service_vb.asmx" postPort.Extensions.Add(postAddressBinding) myDescription.Services(0).Ports.Add(postPort) ' Add the post port type definition. Dim postPortType As New PortType() postPortType.Name = "ServiceHttpPost" Dim postOperation As New Operation() postOperation.Name = "AddNumbers" Dim postInput As OperationMessage = _ CType(New OperationInput(), OperationMessage) postInput.Message = New XmlQualifiedName("s0:AddNumbersHttpPostIn") Dim postOutput As New OperationOutput() postOutput.Message = New XmlQualifiedName("s0:AddNumbersHttpPostOut") postOperation.Messages.Add(postInput) postOperation.Messages.Add(postOutput) postPortType.Operations.Add(postOperation) myDescription.PortTypes.Add(postPortType) ' Add the first message information. Dim postMessage1 As New Message() postMessage1.Name = "AddNumbersHttpPostIn" Dim postMessagePart1 As New MessagePart() postMessagePart1.Name = "firstnumber" postMessagePart1.Type = New XmlQualifiedName("s:string") ' Add the second message information. Dim postMessagePart2 As New MessagePart() postMessagePart2.Name = "secondnumber" postMessagePart2.Type = New XmlQualifiedName("s:string") postMessage1.Parts.Add(postMessagePart1) postMessage1.Parts.Add(postMessagePart2) Dim postMessage2 As New Message() postMessage2.Name = "AddNumbersHttpPostOut" ' Add the third message information. Dim postMessagePart3 As New MessagePart() postMessagePart3.Name = "Body" postMessagePart3.Element = New XmlQualifiedName("s0:int") postMessage2.Parts.Add(postMessagePart3) myDescription.Messages.Add(postMessage1) myDescription.Messages.Add(postMessage2) ' Write the 'ServiceDescription' as a WSDL file. myDescription.Write("AddNumbersOut_vb.wsdl") Console.WriteLine("WSDL file named AddNumberOut_vb.Wsdl" & _ " created successfully.") Catch e As Exception Console.WriteLine("Exception caught!!!") Console.WriteLine("Source : " & e.Source.ToString()) Console.WriteLine("Message : " & e.Message.ToString()) End Try End Sub 'Main End Class 'MyOperationOutputSample
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
.jpeg?cs-save-lang=1&cs-lang=vb)
.jpeg?cs-save-lang=1&cs-lang=vb)