Can I use WSE3 within a .NET 4 app, to communicate with an old webservice?

7.5k views Asked by At

I have a .NET 3.5 library assembly which uses WSE 3.0 to communicate with an outside webservice. We're upgrading our system to .NET 4, but the outside webservice will remain unchanged. (Edit: not sure if it's relevant, but the outside webservice is implemented in Java)

To make the migration process as fast as possible, I don't want to change our system code except where absolutely necessary. Will the WSE3 library still work, once I update the system to .NET 4?

I've seen a couple questions indicating that we should no longer be using WSE to build webservices (see references below). However, I'm using it purely as a client, to communicate with an outside webservice, so I'm confused as to whether or not it will work.

References:

2

There are 2 answers

2
David On BEST ANSWER

I had the same situation last week, and the answer is no (or at least not easily, and in no way that can be found after 6 hours of googling.) Part of the problem is that there's no option to enable WSE from Visual Studio in VS 2010 (or VS 2008, for that matter).

However, on the bright side, it was very easy to point to the web services using the "Add Service Reference" tool in VS2010, and adding a Service Reference (new style) as opposed to a "Web Reference". After banging my head against the wall trying to figure out how to get support for WSE with a Web Service reference, I just gave the new way a shot, and Visual Studio was smart enough to handle it properly. It was able to create a client that could communicate with the server with no additional configuration.

The main difference is that instead of generating a proxy class for the service that allows you to call functions on the proxy class, the new tool creates a Client class for the service, that allows you to use the client to execute methods. It's actually a very small change when you get used to it. Once I figured out the differences, a few global find and replace operations handled updating the necessary code.

Edit

Go figure. This time around I found an answer in the first minute of googling.

You can enable that option mentioned in the first paragraph, and I bet it will work.

However, I'm leaving the rest of my answer as it's still probably better to switch to the new way now.

http://www.junasoftware.com/blog/how-to-use-wse-3-in-visual-studio-2010.aspx

1
Shiraz Bhaiji On

It should work fine, see these references:

http://msdn.microsoft.com/en-us/library/aa717042.aspx

http://devlicio.us/blogs/ziemowit_skowronski/archive/2007/07/18/interoperability-between-wcf-and-wse-3-0.aspx

The advice to upgrade is due to better performance and more functionality.

Also as John Saunders says based on WSE being obsolete, and being very close to unsupported