Today I received an update from a customer of a url in order to execute the methods of a project, just the address changed from http to https. In this project we use a class in C # generated by wsdl.exe. I generated again to the new url and added to the project.
So far so good, but when I run the project could not pass the instantiation of the proxy class that I generated and gave me the following error: “Method can not be reflected.”
After googling and seeing some posts, I have concluded that the types that were being passed in the parameters of each method were not valid with what was supposed to receive. For example, the parameter was of type System.DateTime, but received the method parameter of type string, so it would not work.
I went through the proxy class looking for anything that might have these types (which was not string) and replaced it for string.
In this case was simple.
Code exemple:
What I had when generated the proxy class:
[System.Xml.Serialization.XmlElementAttribute(System.DateTime)] out string timeParameter,
What I had to do:
[System.Xml.Serialization.XmlElementAttribute()] out string timeParameter,