1

I have generated a SVC proxy client using following switches:

svcutil /wrapped /serializable /async /seralizer:XmlSerializer /out:Proxy1.cs http://url.zzz/name.wsdl

so far so good,I call methods, get response all fine.

A step further, I read about xmlSerializers here http://msdn.microsoft.com/en-us/library/aa751883.aspx and managed to generate one serialization assembly for Proxy1.cs (converted to dll also).

Followed naming convention of dll and added reference to both dll in a test console application, fine, works ok. (Although I didn't notice anything in performance, not even a slight placebo).

Tried another way to use xmlSerializer, generated serialization code into a separate assembly and used the XmlSerializerAssemblyAttribute on the service contract that uses the XmlSerializerFormatAttribute(I placed it everywhere I could see it's needed while digging in, just for test) & set the AssemblyName to point to the compiled serialization assembly.

Again, works fine but I don't notice any change in performance.

Why is it so? Am I doing something wrong? or I need to test it on more complicated responses. Are there more ways to verify this? Is it really needed to generate Xmlserializer for perofrmance reason?

Thank you. I am a newbie here, please also share your experience. I am not only looking for a to the point answer but some pointers are also appropriated.

SSA
  • 5,433
  • 4
  • 36
  • 50
  • 1
    Why do you want to use the XmlSerializer? It doesn't perform as well as the DataContractSerializer. – John Saunders Jan 31 '12 at 19:04
  • Hey John,thank you very much for reply. somehow I ended up on this article http://msdn.microsoft.com/en-us/library/aa751883.aspx that's why I tried. As you helped me before, so you know I am learning. Can you please shade some light, do you mean to say I should not use /serializable switch while generation of client proxy and generate only message contract.(when I generate I get only message contract only in code, as it says my methods are not RPC neither document) What is most performance effective thing? or do you mean I need not to use xmlSerializer?confused. I guess I need to read more. – SSA Jan 31 '12 at 19:17
  • 1
    I would suggest you read a little less :-) Just use "Add Service Reference" from Visual Studio until you need to do something different. – John Saunders Jan 31 '12 at 19:22
  • Ha ha ha that's good one.:-) Act. we are going to give client a DLL (SVC client) + config file,so I am trying to get best out of it.We also want to avoid any interference with WSDL and XSD so we keep client abstract,once generated move away WSDL and XSDs (only there for server),there is an asp page running on IIS, talking to WCF windows service and our client talk to that asp page(using windows authentication),This is all working fine, after a lot of struggle(but now looks easy).So finally if I generate client using SVC util,I can really leave it to default,no need to mess up with serializers? – SSA Jan 31 '12 at 19:26
  • 1
    Better, just use "Add Service Reference", and no need to mess with anything. – John Saunders Jan 31 '12 at 20:33

0 Answers0