About
Welcome to Crows Programming.
This is my place to rant, rave, and discuss various things mostly related to software engineering. I have been known divulge into politics, sport, etc as well.
I am currently a software engineer in the U.S. working in the automotive diagnostics industry. My real passion is making video games yet doing so professionaly would require a far relocation — something I can’t bring myself to do at this point in time.
So, be sure to leave a message if you find something interesting on this site or just feel like rambling about something.
~Crow–

6 Responses
Hi, Crows.
I read your post — Dynamically Invoke Web Service At Runtime, it is very helpful to me. thanks
here, i met a problem. i hope if you have time, you can unscramble my confusion. i’m very appreciated about your help and your time.
I write a function like this:
public struct Test
{
public string str;
public int num;
}
[WebMethod]
public string TestFun(Test ts)
{
return ts.str + ts.num.ToString();
}
Then, i found this time, i got 2 AvailableServices ,
one is “MyService”, and the other is “Test”.
also, I found for service “Test”, there are 4 corresponding methods : get_str, set_str, get_num, set_num
Do you know how to invoke the function TestFun???
Thanks.
Hi,
I Am Really Intrested In Dot Net Scripting.
So I Want To Know Is There Any Book Availbale Specially For This Which Can Help Me To Move Further.
And I Also Want To Know Is There Any Way To Get Data From Another Application (Like DataGridView’s Data,Textbox’s Text etc) Using C#.net or Vb.net.
Please Reply Me,I Will Be Very Gratefull
Thanks In Advance
I really like your articles so that read all of your articles
buy mlb jerseys
hi i implemented your webserviceinvoker in my own web service but when i call the methos “invokemethod” i received a error about “the method cannot be foun …system.serviceprotocol.soapexception…… can you help me about it
if you ill want i can send you my web service solution to your email.
in my case i tryed to create a web services with the capacity to invoke others web services from the windows aplication:
windows app—->webserviceinvoker—->googlesearchservices
—->otherwebservices
—->anotherwebservices
^
|
|
my problem here
System.Web.Services.Protocols.SoapException: El servidor no puede procesar la solicitud. —> System.MissingMethodException: No se puede encontrar el método ‘DynamicWebExample.HelloWorld’.
en System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
en System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
en WebServiceGates.DynamicWebExample.InvokeMethod(String webServiceUri, String serviceName, String methodName, Object[] args) en C:\Users\CharlieGuerra\Documents\Visual Studio 2010\Projects\WebServiceGates\WebServiceGates\DynamicWebExample.asmx.vb:lÃnea 276
— Fin del seguimiento de la pila de la excepción interna —
this is the codebehind in my webservicegeneric.asmx…..
Public Function InvokeMethod(ByVal webServiceUri As String, ByVal serviceName As String, ByVal methodName As String, ByVal ParamArray args As Object()) As String
Dim args_result() As [Object]
webServiceAssembly = BuildAssemblyFromWSDL(New Uri(webServiceUri))
Dim obj As Object = webServiceAssembly.CreateInstance(serviceName)
Dim methods As New List(Of String)
Dim type As Type = obj.[GetType]()
‘For Each minfo As MethodInfo In type.GetMethods(BindingFlags.Instance Or BindingFlags.[Public] Or BindingFlags.DeclaredOnly)
‘ methods.Add(minfo.Name)
‘Next
Dim result As String
result = type.InvokeMember(methodName, BindingFlags.InvokeMethod, Nothing, obj, args)
Return result
End Function
Leave a Reply