This documentation is archived and is not being maintained.
ContractReference::ReadDocument Method
Visual Studio 2010
Reads the service description from the passed Stream and returns the service description.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- stream
- Type: System.IO::Stream
Stream containing the service description.
Return Value
Type: System::ObjectA ServiceDescription containing the contents of the referenced service description.
int main() { try { // Create the file stream. FileStream^ wsdlStream = gcnew FileStream( "MyService1_cpp.wsdl",FileMode::Open ); ContractReference^ myContractReference = gcnew ContractReference; // Read the service description from the passed stream. ServiceDescription^ myServiceDescription = dynamic_cast<ServiceDescription^>(myContractReference->ReadDocument( wsdlStream )); Console::Write( "Target Namespace for the service description is: {0}", myServiceDescription->TargetNamespace ); wsdlStream->Close(); } catch ( Exception^ e ) { Console::WriteLine( "Exception: {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.
Show: