Tuesday, October 7, 2008

WSE - Web Service Enhancements in VS2008

Web service Enhancements in Visual Studio 2008

Web Service Enhancements
It is a class library primarily focused on building the message-level security using the latest protocols, that includes security, trust and addressing. These capabilities can be added to the application at design time using code or at runtime using the policy file.

WSE in Visual Studio 2003
The addition of WSE to the visual studio 2003 project is straight forward.
• Create a project in Visual Studio 2003.
• Create the Web service reference in Visual Studio 2003.
• Right click on the project and select “WSE settings 2.0”

• Check the option “Enable this project for Web Service Enhancements”

• Notice the reference class file being generated with the WSE class members.

WSE in Visual Studio 2008
Visual studio 2008 doesn’t support or implement WSE in any way. The best way to get around this problem is
• Create a web reference in Visual studio 2008 (it doesn’t implement WSE).
• Copy the content of the web reference folder created in 2003. (Follow the steps mentioned under the section “WSE in Visual Studio 2003”)
• Paste it in the web reference folder of the VS2008 project.
• Refresh the VS2008 project.

1 comment:

Wolf5 said...

I have searched the web and noone has found a good solution to WSE3 and VS2008.

I solved it by creating my own Custom Tool that is called when I do a Update Web Reference. Default VS2008 uses MSDiscoCodeGenerator but I have made a MSDiscoCodeGeneratorWSE Custom Tool that I tell it to use instead. So everytime from now on when I do an update, it will call this code instead that invokes WseWsdl3.exe and generates the Wse code like it did in VS2005. So now my old 2005 solutions can easily be upgraded to 2008 without satellite projects with VS2005 for WSE web ref updates.

So the tip is. Check out Custom Tools for Visual Studio.