OperationOutput Class
Defines the specifications for output messages returned by the XML Web service. This class cannot be inherited.
System.Web.Services.Description::DocumentableItem
System.Web.Services.Description::NamedItem
System.Web.Services.Description::OperationMessage
System.Web.Services.Description::OperationOutput
Assembly: System.Web.Services (in System.Web.Services.dll)
The OperationOutput type exposes the following members.
| 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.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | 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/.
#using <System.Xml.dll> #using <System.Web.Services.dll> #using <System.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Collections; using namespace System::Xml; int main() { try { ServiceDescription^ myDescription = ServiceDescription::Read( "AddNumbersIn_cs.wsdl" ); // Add the ServiceHttpPost binding. Binding^ myBinding = gcnew Binding; myBinding->Name = "ServiceHttpPost"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:ServiceHttpPost" ); myBinding->Type = myXmlQualifiedName; HttpBinding^ myHttpBinding = gcnew HttpBinding; myHttpBinding->Verb = "POST"; myBinding->Extensions->Add( myHttpBinding ); // Add the operation name AddNumbers. OperationBinding^ myOperationBinding = gcnew OperationBinding; myOperationBinding->Name = "AddNumbers"; HttpOperationBinding^ myOperation = gcnew HttpOperationBinding; myOperation->Location = "/AddNumbers"; myOperationBinding->Extensions->Add( myOperation ); // Add the input binding. InputBinding^ myInput = gcnew InputBinding; MimeContentBinding^ postMimeContentbinding = gcnew 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. OutputBinding^ myOutput = gcnew OutputBinding; MimeXmlBinding^ postMimeXmlbinding = gcnew 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. Port^ postPort = gcnew Port; postPort->Name = "ServiceHttpPost"; postPort->Binding = gcnew XmlQualifiedName( "s0:ServiceHttpPost" ); HttpAddressBinding^ postAddressBinding = gcnew HttpAddressBinding; postAddressBinding->Location = "http://localhost/Service_cs.asmx"; postPort->Extensions->Add( postAddressBinding ); myDescription->Services[ 0 ]->Ports->Add( postPort ); // Add the post port type definition. PortType^ postPortType = gcnew PortType; postPortType->Name = "ServiceHttpPost"; Operation^ postOperation = gcnew Operation; postOperation->Name = "AddNumbers"; OperationMessage^ postInput = dynamic_cast<OperationMessage^>(gcnew OperationInput); postInput->Message = gcnew XmlQualifiedName( "s0:AddNumbersHttpPostIn" ); OperationOutput^ postOutput = gcnew OperationOutput; postOutput->Message = gcnew XmlQualifiedName( "s0:AddNumbersHttpPostOut" ); postOperation->Messages->Add( postInput ); postOperation->Messages->Add( postOutput ); postPortType->Operations->Add( postOperation ); myDescription->PortTypes->Add( postPortType ); // Add the first message information. Message^ postMessage1 = gcnew Message; postMessage1->Name = "AddNumbersHttpPostIn"; MessagePart^ postMessagePart1 = gcnew MessagePart; postMessagePart1->Name = "firstnumber"; postMessagePart1->Type = gcnew XmlQualifiedName( "s:string" ); // Add the second message information. MessagePart^ postMessagePart2 = gcnew MessagePart; postMessagePart2->Name = "secondnumber"; postMessagePart2->Type = gcnew XmlQualifiedName( "s:string" ); postMessage1->Parts->Add( postMessagePart1 ); postMessage1->Parts->Add( postMessagePart2 ); Message^ postMessage2 = gcnew Message; postMessage2->Name = "AddNumbersHttpPostOut"; // Add the third message information. MessagePart^ postMessagePart3 = gcnew MessagePart; postMessagePart3->Name = "Body"; postMessagePart3->Element = gcnew 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_cs.wsdl" ); Console::WriteLine( "WSDL file named AddNumbersOut_cs.Wsdl" " created successfully." ); } catch ( Exception^ e ) { Console::WriteLine( "Exception caught!!!" ); Console::WriteLine( "Source : {0}", e->Source ); Console::WriteLine( "Message : {0}", e->Message ); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


