Last week I was on a client Program(A real-time processing program calls some underlying hardware. To facilitate debugging, I wrote a library that simulates the underlying hardware.) When calling a WebService method, I found that a method I want to call runs correctly on the debugging interface of IE. When I run a program using a simulated method, the call is also very OK, when real underlying hardware is used, the xmlexception error is always reported.
However, it is strange that other methods of calling this asmx in real hardware environments are always correct.
At first, I thought it was a problem with my simulator. Later I thought it was a problem with. Net itself.
So I started searching for related information in newgroups in Google. In particular, I found scanhexentity in Google and found something similar to me. We can see that this is. net XML serialization bug, and then when using web reference,. in the proxy automatically generated by net (that is, soaphttpclientprotocol), XML serialization is used, and an error occurs when a Web Service is called. Someone has encountered something similar to me. So this bug happened to me.
Although I have solved the problem of calling this WebService in a real hardware environment (my helpless tricks are described later), I still cannot figure out the following:
There is nothing special about the problematic method, that is, the simple Public String auth (string clientcode) and other normal methods have nothing special. Is there a problem with the encoding of this string when the clientcode is returned by the underlying hardware?
My solution to this depressing problem is to use soap toolkit3 in. Net Windows client to call the annoying error method. Is it helpless!