Ask a Question related to ASP.NET Web Services, Design and Development.
-
JC Voon #1
How to publish the WebServicesClientProtocol.Invoke method
Hi:
I need your help, please read the following code:
* The actual WebService
Dim proxy As Microsoft.Web.Services2.WebServicesClientProtocol
= New CompanyProfileWS.CompanyProfileServiceWse
** The BusinessObject Base Class
Public Class ServiceProxy
Inherits Microsoft.Web.Services2.WebServicesClientProtocol
Public Shadows Function Invoke(ByVal methodName As String, ByVal
params As Object()) As Object()
Return MyBase.Invoke(methodName, params)
End Function
End Class
public class BusinessObjectBaseClass
Private m_Proxy as
Microsoft.Web.Services2.WebServicesClientProtocol
Private m_InnerDataSet as DataSet
public sub New(ws as
Microsoft.Web.Services2.WebServicesClientProtocol)
m_Proxy = ws
m_InnerDataSet = new DataSet
end sub
Public Overridable Sub RetrieveSchemaInfo()
Dim results() As Object = DirectCast(m_Proxy,
ServiceProxy).Invoke("RetrieveSchemaInfo", New Object(-1) {})
Dim xn As XmlNode = CType(results(0), XmlNode)
LoadDataSetFromXMLDocument(m_InnerDataSet,
XMLNodeToXMLDocument(xn))
End Sub
end class
And here is what i'm trying to do:
The actual WebService proxy will be create* and pass into the
BusinessObject class inherited from BusinessObjectBaseClass**
In the BusinessObjectBaseClass i need to invoke a method in the
WebService, since it is the base class, i don't know the
actual type of the WebService that passed in, so i've to use invoke to
call the webmethod, since the invoke method is protected,
i try to publish it using the ServiceProxy class, but when i cast the
actual web service to ServiceProxy it give me the
InvalidCastException
Any idea ? Please Help.
Thanks
JCVoon
JC Voon Guest
-
SoapHttpClientProtocol.Invoke method problem
I have to call a web services and i only know the method name at runtime. I create a proxy class and then modify the method: public... -
Error: Cannot invoke method
I meet such a error message when invoke a remote java object call. Any one can tell me how to deal with it? Thanks! -
Test page for ASMX (invoke method)
Is there a way to get Windows Server 2003 to loosen up on the auto-generated test page for an .ASMX file. At present I can only invoke the method... -
Problem to invoke a method of webservice from a C++ SoapClient
Hi, I used SoapClient Libray provided by SQLData to invoke a method exposed by Webservices of weblogic over HTTP.(using WSDL). I'm not successful... -
how to invoke a method in a DLL
I want to create date and return them on the fly. I wonder I I could create a DLL with some static method in it and invoke directly with an URL...



Reply With Quote

