 |
|
 |
can you tell me what is the meaning of the poetry written in farsi near your name in the end,
|
|
|
|
 |
|
 |
UI is not de-coupled, but still: very good!
|
|
|
|
 |
|
 |
HI EHSAN, I NEED YOUR HELP, ALL DOES WORK BUT WHEN I INVOKE THE METHOD WITH STRING PARAMETER I GOT THIS MESSAGE, EXCEPTION HAS BEEN THROWN BY THE TARGET OF AN INVOCATION, I WAS READING AND THE ERROR IS ABOUT UNAUTHENTICATED(401), WHERE CAN I INCLUDE THE CREDENCIALS FOR NOT GOT THIS ERROR, CAN YOU HELP ME PLEASE?
MARCO ALFARO
mvac1985@hotmail.com
|
|
|
|
 |
|
 |
hello
why can't open the site: http://www.esynaps.com/WebServices/SearchWS.asmx?WSDL,recently in china??
and ask where can be find the other the web service of SearchWS??
|
|
|
|
 |
|
 |
HI, I have gone through this code and stuck in two places.
1. Method name with space in between. eg. if i have a method name as "Multiply Factor" it doesnt work and throws out an error An unhandled exception of type 'System.NullReferenceException' occurred in New WSDL.exe Additional information: Object reference not set to an instance of an object.
2. I have number of outputs for a particular WSDL. and i cannot access it them. I always get my type in the output tree
Please try to solve and send the solution.
Thanks
|
|
|
|
 |
|
 |
Thanks mate. It's a great article that helped me a lot.
|
|
|
|
 |
|
|
 |
|
 |
This looks to be a really useful and informative article.
Unfortunately When I try to run it against this API http://marketinformation.natgrid.co.uk/MIPIws-public/public/publicwebservice.asmx [^]
I receive an Invalid Operation Exception at line 51.
"There is an error in XML document (3, 2). ---> System.InvalidOperationException: <html xmlns=''> was not expected."
I havent, so far, been able to track this down and would be grateful for your advice.
Many Thanks
|
|
|
|
 |
|
 |
I too receive the same error.Can anyone help regarding this
|
|
|
|
 |
|
 |
I Put ?wsdl in the end of my URL...
|
|
|
|
 |
|
 |
Thank you very much for the article...it really saved my day...
Priyan
B.S.Priyan Perera BSc(MIS), MCP
Sri Lanka
|
|
|
|
 |
|
 |
if it's ok, please vote it
|
|
|
|
 |
|
 |
Sure mate...! I have given it a high five...
B.S.Priyan Perera BSc(MIS), MCP
Sri Lanka
|
|
|
|
 |
|
 |
This is an awesome starter program for consuming a web service dynamically. I have to handle complex types however so I will need some more work to handle that. Thanks for posting.
|
|
|
|
 |
|
 |
Hi,
there's error when using WSDL which generated from Web Service I made from netbean 5.5. It said "Unable to Import Binding from namespace"
any suggestion?
|
|
|
|
 |
|
 |
Hi, This is very helpful, thank you very much for a job well done !. I have a run time error whith your code. I tried so many solutions but couldn't figure it out.. I run the DynamicInvocation() class with no problems I add my credentials using webRequest.Credentials = new System.Net.NetworkCredential("user", "password", "domain"); and everything goes very well, it returns all the functions. But I ran into a problem when I try to invoke one of the methods : Object obj = Activator.CreateInstance(service); it creates the obj. but it fails on the second line of code: Object response = t.Invoke(obj, param1); with the following error: ex.Message = "Exception has been thrown by the target of an invocation." ex. ex.InnerException ="The request failed with HTTP status 401: Unauthorized."} System.Exception {System.Net.WebException} ex.ToString() = been thrown by the target of an invocation. ---> System.Net.WebException: The request failed with HTTP status 401: Unauthorized.\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)\r\n at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)\r\n at SiteData.EnumerateFolder(String strFolderUrl, _sFPUrl[]& vUrls)\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)\r\n at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\r\n at WsdlReader.Form1.invokeButton_Click(Object sender, EventArgs e) in C:\\Documents and Settings\\almans\\Desktop\\WsdlReader\\Wsdl Reader\\WsdlReader\\Form1.cs:line 233" string
|
|
|
|
 |
|
 |
I found the solution in MSDN....
https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1772251&SiteID=1
Hi Guys,
After banging my head for sometime in the wall. This is what i have figured out.
You have to do something like this in my code above.
if (t.Name == cbMethods.Text)
{
//Invoke Method
Object obj = Activator.CreateInstance(service);
PropertyInfo propInfo = service.GetProperty("Credentials");
propInfo.SetValue(obj, new NetworkCredential("username","password"), null);
Object response = t.Invoke(obj, param1);
break;
}
Thanks,,
|
|
|
|
 |
|
 |
Hi,
this exception "Exception has been thrown by the target of an invocation" needed to think !
very easy problem and u could solve it.
so plz create simple webservise and then test it to find solve this problem
|
|
|
|
 |
|
 |
Take a look at ex.InnerException.Message you may see the reason is a 401 for example:
{"The request failed with HTTP status 401: Unauthorized."}
MessageBox.Show(ex.Message + "\n" + ex.InnerException.Message, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
|
 |
|
 |
Hi,
The topic was really useful. I have an application which returns an object of user defined class type, that class is kept in a separate dll file and its reference is added in the web service, This works perfectly with the static discovery.. ie just adding the web reference of the web service, But in the Dynamical discovery and invocation how should i receive the returned object, typecast it to user defined type and display it?
pleas help me....
SiddarthPrem
SiddarthPrem
|
|
|
|
 |
|
 |
Is there any way to add a soap header in the invocation of the web service?
Stew
|
|
|
|
 |
|
 |
of course yes, you could parsing WSDL ( get proceduries and parameters) and whit soket programing send or reciving data from stub.
|
|
|
|
 |
|
 |
Hi....thanks for this wonderful article.
I tried using a WCF service, but it comes back with errors.
I tried following the code and buliding my own logic from yours, with the namespace System.ServiceModel.Description
but i keep running into a wall...
could you please show how this could be done?
Thanks
Yugi...
|
|
|
|
 |
|
 |
Hi,
Your code works perfectly good. But only works for Publicly available service. How can i use Secure Web Service...where i can provide username/ password. After looking at your code. Initially you make a WebRequest call. there is Authentication and Proxy seeting fields which i can use to provide everything but i dont know if that is gone work..
|
|
|
|
 |
|
 |
Thanks
It is so logical only works publicly available service.
For Authentication just add this command after definition webRequest
webRequest.Credentials = new NetworkCredential(string username,string Password);
|
|
|
|
 |