wcf - How to get rid of XmlIgnoreAttribute() when creating proxy dynamically from wsdl? -
I am using WebClient to read wsdl from the URI.
WebClient Customer = New WebClient (); Stream wsdlStream = client.OpenRead (wsdlURI); Description of Service wsdl = Service Details. Read (wsdlStream);
Then I use the namespace and CompileUnit and GenerateCodeFromCompileUnit method of ServiceDescriptionImporter to generate the .cs class file.
Then I call it assembly and assembly methods from reflection and use. The problem is that the CC file I created has additional XML properties and like extra parameters :
public zero calc (an int, [System.Xml. Serialization.XmlIgnoreAttribute ()] bool aSpecified
. When I create the assembly from this source file, I get methods with more parameters, compared to the basic method they should be Looks like:
public integer Calc (int one, int b)
and generated sources Looks like the method in the code:
public int calc (int a, bool specify a, int b, bool specify bS, out of calc result, calcResultSpecified bool outside)
< / Pre>Can I dynamically generate the source file without these extra parameters? So can I call this assembly and use reflection to call the original methods?
ignored areas there because the original WA CDLs are alternatively, but are specifying some of the price types of parameters, and the XmlSerializer does not support Nullable & lt; T>, Therefore xxx specify the specified character parameter, whether the value is zero or does not seem to be stuck with them.
Comments
Post a Comment