-- 作者:yd0731
-- 发布时间:2013/12/24 14:00:00
--
狐爸,以下代码是myFirstProxyClass.vb的内容,请问如何在全局代码中使用?
\'------------------------------------------------------------------------------ \' <auto-generated> \' This code was generated by a tool. \' Runtime Version:2.0.50727.42 \' \' Changes to this file may cause incorrect behavior and will be lost if \' the code is regenerated. \' </auto-generated> \'------------------------------------------------------------------------------
Option Strict Off Option Explicit On
Imports System Imports System.ComponentModel Imports System.Diagnostics Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.Xml.Serialization
\' \'This source code was auto-generated by wsdl, Version=2.0.50727.1432. \'
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Web.Services.WebServiceBindingAttribute(Name:="CfgCompManagerServiceSOAP", [Namespace]:="http://service.lrd.org.cn"), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(getAllCfgCompResponse)), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(getAllCfgComp)), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(CfgComp))> _ Partial Public Class CfgCompManagerService Inherits System.Web.Services.Protocols.SoapHttpClientProtocol Private getAllCfgCompOperationCompleted As System.Threading.SendOrPostCallback \'\'\'<remarks/> Public Sub New() MyBase.New Me.Url = "http://localhost:8080/cfmSoa/ns" End Sub \'\'\'<remarks/> Public Event getAllCfgCompCompleted As getAllCfgCompCompletedEventHandler \'\'\'<remarks/> <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.lrd.org.cn/NewOperation", RequestNamespace:="http://service.lrd.org.cn", ResponseNamespace:="http://service.lrd.org.cn", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _ Public Function getAllCfgComp() As <System.Xml.Serialization.XmlElementAttribute("CfgComp", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> Object() Dim results() As Object = Me.Invoke("getAllCfgComp", New Object(-1) {}) Return CType(results(0),Object()) End Function \'\'\'<remarks/> Public Function BegingetAllCfgComp(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Return Me.BeginInvoke("getAllCfgComp", New Object(-1) {}, callback, asyncState) End Function \'\'\'<remarks/> Public Function EndgetAllCfgComp(ByVal asyncResult As System.IAsyncResult) As Object() Dim results() As Object = Me.EndInvoke(asyncResult) Return CType(results(0),Object()) End Function \'\'\'<remarks/> Public Overloads Sub getAllCfgCompAsync() Me.getAllCfgCompAsync(Nothing) End Sub \'\'\'<remarks/> Public Overloads Sub getAllCfgCompAsync(ByVal userState As Object) If (Me.getAllCfgCompOperationCompleted Is Nothing) Then Me.getAllCfgCompOperationCompleted = AddressOf Me.OngetAllCfgCompOperationCompleted End If Me.InvokeAsync("getAllCfgComp", New Object(-1) {}, Me.getAllCfgCompOperationCompleted, userState) End Sub Private Sub OngetAllCfgCompOperationCompleted(ByVal arg As Object) If (Not (Me.getAllCfgCompCompletedEvent) Is Nothing) Then Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) RaiseEvent getAllCfgCompCompleted(Me, New getAllCfgCompCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) End If End Sub \'\'\'<remarks/> Public Shadows Sub CancelAsync(ByVal userState As Object) MyBase.CancelAsync(userState) End Sub End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class getAllCfgCompResponse Private cfgCompField() As Object \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute("CfgComp", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _ Public Property CfgComp() As Object() Get Return Me.cfgCompField End Get Set Me.cfgCompField = value End Set End Property End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class getAllCfgComp End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class CfgComp Private companyIdField As String Private tagSeqField As String \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer")> _ Public Property companyId() As String Get Return Me.companyIdField End Get Set Me.companyIdField = value End Set End Property \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer")> _ Public Property tagSeq() As String Get Return Me.tagSeqField End Get Set Me.tagSeqField = value End Set End Property End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")> _ Public Delegate Sub getAllCfgCompCompletedEventHandler(ByVal sender As Object, ByVal e As getAllCfgCompCompletedEventArgs)
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code")> _ Partial Public Class getAllCfgCompCompletedEventArgs Inherits System.ComponentModel.AsyncCompletedEventArgs Private results() As Object Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) MyBase.New(exception, cancelled, userState) Me.results = results End Sub \'\'\'<remarks/> Public ReadOnly Property Result() As Object() Get Me.RaiseExceptionIfNecessary Return CType(Me.results(0),Object()) End Get End Property End Class
[此贴子已经被作者于2013-12-24 14:15:53编辑过]
|
-- 作者:Bin
-- 发布时间:2013/12/24 14:30:00
--
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Web.Services.WebServiceBindingAttribute(Name:="CfgCompManagerServiceSOAP", [Namespace]:="http://service.lrd.org.cn"), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(getAllCfgCompResponse)), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(getAllCfgComp)), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(CfgComp))> _ Partial Public Class CfgCompManagerService Inherits System.Web.Services.Protocols.SoapHttpClientProtocol Private getAllCfgCompOperationCompleted As System.Threading.SendOrPostCallback \'\'\'<remarks/> Public Sub New() MyBase.New Me.Url = "http://localhost:8080/cfmSoa/ns" End Sub \'\'\'<remarks/> Public Event getAllCfgCompCompleted As getAllCfgCompCompletedEventHandler \'\'\'<remarks/> <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.lrd.org.cn/NewOperation", RequestNamespace:="http://service.lrd.org.cn", ResponseNamespace:="http://service.lrd.org.cn", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _ Public Function getAllCfgComp() As <System.Xml.Serialization.XmlElementAttribute("CfgComp", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> Object() Dim results() As Object = Me.Invoke("getAllCfgComp", New Object(-1) {}) Return CType(results(0),Object()) End Function \'\'\'<remarks/> Public Function BegingetAllCfgComp(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Return Me.BeginInvoke("getAllCfgComp", New Object(-1) {}, callback, asyncState) End Function \'\'\'<remarks/> Public Function EndgetAllCfgComp(ByVal asyncResult As System.IAsyncResult) As Object() Dim results() As Object = Me.EndInvoke(asyncResult) Return CType(results(0),Object()) End Function \'\'\'<remarks/> Public Overloads Sub getAllCfgCompAsync() Me.getAllCfgCompAsync(Nothing) End Sub \'\'\'<remarks/> Public Overloads Sub getAllCfgCompAsync(ByVal userState As Object) If (Me.getAllCfgCompOperationCompleted Is Nothing) Then Me.getAllCfgCompOperationCompleted = AddressOf Me.OngetAllCfgCompOperationCompleted End If Me.InvokeAsync("getAllCfgComp", New Object(-1) {}, Me.getAllCfgCompOperationCompleted, userState) End Sub Private Sub OngetAllCfgCompOperationCompleted(ByVal arg As Object) If (Not (Me.getAllCfgCompCompletedEvent) Is Nothing) Then Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) RaiseEvent getAllCfgCompCompleted(Me, New getAllCfgCompCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) End If End Sub \'\'\'<remarks/> Public Shadows Sub CancelAsync(ByVal userState As Object) MyBase.CancelAsync(userState) End Sub End Class \'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class getAllCfgCompResponse Private cfgCompField() As Object \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute("CfgComp", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _ Public Property CfgComp() As Object() Get Return Me.cfgCompField End Get Set Me.cfgCompField = value End Set End Property End Class \'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class getAllCfgComp End Class \'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class CfgComp Private companyIdField As String Private tagSeqField As String \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer")> _ Public Property companyId() As String Get Return Me.companyIdField End Get Set Me.companyIdField = value End Set End Property \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer")> _ Public Property tagSeq() As String Get Return Me.tagSeqField End Get Set Me.tagSeqField = value End Set End Property End Class \'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")> _ Public Delegate Sub getAllCfgCompCompletedEventHandler(ByVal sender As Object, ByVal e As getAllCfgCompCompletedEventArgs) \'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code")> _ Partial Public Class getAllCfgCompCompletedEventArgs Inherits System.ComponentModel.AsyncCompletedEventArgs Private results() As Object Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) MyBase.New(exception, cancelled, userState) Me.results = results End Sub \'\'\'<remarks/> Public ReadOnly Property Result() As Object() Get Me.RaiseExceptionIfNecessary Return CType(Me.results(0),Object()) End Get End Property
这一段复制到全局代码,对应的DLL引用好.
|
-- 作者:yd0731
-- 发布时间:2013/12/24 14:52:00
--
以下是引用Bin在2013-12-24 14:30:00的发言:
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Web.Services.WebServiceBindingAttribute(Name:="CfgCompManagerServiceSOAP", [Namespace]:="http://service.lrd.org.cn"), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(getAllCfgCompResponse)), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(getAllCfgComp)), _ System.Xml.Serialization.XmlIncludeAttribute(GetType(CfgComp))> _ Partial Public Class CfgCompManagerService Inherits System.Web.Services.Protocols.SoapHttpClientProtocol Private getAllCfgCompOperationCompleted As System.Threading.SendOrPostCallback \'\'\'<remarks/> Public Sub New() MyBase.New Me.Url = "http://localhost:8080/cfmSoa/ns" End Sub \'\'\'<remarks/> Public Event getAllCfgCompCompleted As getAllCfgCompCompletedEventHandler \'\'\'<remarks/> <System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://service.lrd.org.cn/NewOperation", RequestNamespace:="http://service.lrd.org.cn", ResponseNamespace:="http://service.lrd.org.cn", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _ Public Function getAllCfgComp() As <System.Xml.Serialization.XmlElementAttribute("CfgComp", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> Object() Dim results() As Object = Me.Invoke("getAllCfgComp", New Object(-1) {}) Return CType(results(0),Object()) End Function \'\'\'<remarks/> Public Function BegingetAllCfgComp(ByVal callback As System.AsyncCallback, ByVal asyncState As Object) As System.IAsyncResult Return Me.BeginInvoke("getAllCfgComp", New Object(-1) {}, callback, asyncState) End Function \'\'\'<remarks/> Public Function EndgetAllCfgComp(ByVal asyncResult As System.IAsyncResult) As Object() Dim results() As Object = Me.EndInvoke(asyncResult) Return CType(results(0),Object()) End Function \'\'\'<remarks/> Public Overloads Sub getAllCfgCompAsync() Me.getAllCfgCompAsync(Nothing) End Sub \'\'\'<remarks/> Public Overloads Sub getAllCfgCompAsync(ByVal userState As Object) If (Me.getAllCfgCompOperationCompleted Is Nothing) Then Me.getAllCfgCompOperationCompleted = AddressOf Me.OngetAllCfgCompOperationCompleted End If Me.InvokeAsync("getAllCfgComp", New Object(-1) {}, Me.getAllCfgCompOperationCompleted, userState) End Sub Private Sub OngetAllCfgCompOperationCompleted(ByVal arg As Object) If (Not (Me.getAllCfgCompCompletedEvent) Is Nothing) Then Dim invokeArgs As System.Web.Services.Protocols.InvokeCompletedEventArgs = CType(arg,System.Web.Services.Protocols.InvokeCompletedEventArgs) RaiseEvent getAllCfgCompCompleted(Me, New getAllCfgCompCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)) End If End Sub \'\'\'<remarks/> Public Shadows Sub CancelAsync(ByVal userState As Object) MyBase.CancelAsync(userState) End Sub End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class getAllCfgCompResponse Private cfgCompField() As Object \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute("CfgComp", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _ Public Property CfgComp() As Object() Get Return Me.cfgCompField End Get Set Me.cfgCompField = value End Set End Property End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class getAllCfgComp End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.SerializableAttribute(), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code"), _ System.Xml.Serialization.XmlTypeAttribute([Namespace]:="http://service.lrd.org.cn")> _ Partial Public Class CfgComp Private companyIdField As String Private tagSeqField As String \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer")> _ Public Property companyId() As String Get Return Me.companyIdField End Get Set Me.companyIdField = value End Set End Property \'\'\'<remarks/> <System.Xml.Serialization.XmlElementAttribute(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="integer")> _ Public Property tagSeq() As String Get Return Me.tagSeqField End Get Set Me.tagSeqField = value End Set End Property End Class
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432")> _ Public Delegate Sub getAllCfgCompCompletedEventHandler(ByVal sender As Object, ByVal e As getAllCfgCompCompletedEventArgs)
\'\'\'<remarks/> <System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.1432"), _ System.Diagnostics.DebuggerStepThroughAttribute(), _ System.ComponentModel.DesignerCategoryAttribute("code")> _ Partial Public Class getAllCfgCompCompletedEventArgs Inherits System.ComponentModel.AsyncCompletedEventArgs Private results() As Object Friend Sub New(ByVal results() As Object, ByVal exception As System.Exception, ByVal cancelled As Boolean, ByVal userState As Object) MyBase.New(exception, cancelled, userState) Me.results = results End Sub \'\'\'<remarks/> Public ReadOnly Property Result() As Object() Get Me.RaiseExceptionIfNecessary Return CType(Me.results(0),Object()) End Get End Property
这一段复制到全局代码,对应的DLL引用好.
此主题相关图片如下:无标题.jpg

此主题相关图片如下:无标题1.jpg
 有点甜老师,有报错信息,还有需要引用dll文件,是指上面图片的dll文件吗(System.Data.dll和System.XML.dll 两个foxtable还像已经引用了,是不是将System.dll和System.Web.Services.dll补上引用就可以了)?
[此贴子已经被作者于2013-12-24 14:56:09编辑过]
|