views:

31

answers:

1

I'm helping out a colleague on this one so if I'm missing some details that's why.

We have an asp.net 3.5 web application calling a WCF service. Originally the app used a "Web Reference" to register the service however after having some trouble and burning an incident with Microsoft their solution was to replace the "Web Reference" with a "Service Reference" to the WCF service.

This is great except the problem is that when we create a Service Reference, the method signatures are different than they were when a Web Reference was used.

From what I've read this may be expected, however in our case this would mean some significant changes to the application and of course it was due yesterday...so...

...I'm wondering two things:

  1. Is it normal/expected that method signatures will change based on the reference type?
  2. Is there a way to create the Service Reference that will generate method signatures identical to the original Web Reference?
+2  A: 

You could create another layer between your current Web Reference calls and the new Service Reference proxy.

  1. Create your service ref with a different name and/or namespace then what exists today.
  2. Create a class with the name/namespace of the old Web Reference proxy.
  3. Create the method signatures in the new class and wrap your calls to the Service Reference proxy.

Does this make sense. It's a very simple Adapter pattern.

Corey Coogan