本文整理汇总了VB.NET中System.Web.Services.Discovery.ContractReference.ReadDocument方法的典型用法代码示例。如果您正苦于以下问题:VB.NET ContractReference.ReadDocument方法的具体用法?VB.NET ContractReference.ReadDocument怎么用?VB.NET ContractReference.ReadDocument使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Services.Discovery.ContractReference
的用法示例。
在下文中一共展示了ContractReference.ReadDocument方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: MyClass1
Class MyClass1
Shared Sub Main()
Try
' Create the file stream.
Dim wsdlStream As _
New FileStream("MyService1_vb.wsdl", FileMode.Open)
Dim myContractReference As New ContractReference()
' Read the service description from the passed stream.
Dim myServiceDescription As ServiceDescription = _
CType(myContractReference.ReadDocument(wsdlStream), _
ServiceDescription)
Console.Write(("Target Namesapce for the service description is: " _
+ myServiceDescription.TargetNamespace))
wsdlStream.Close()
Catch e As Exception
Console.WriteLine(("Exception: " + e.Message))
End Try
End Sub
End Class