Derik Whittaker

Sponsors

The Lounge

Wicked Cool Jobs

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
WSE 3.0 Support in Visual Studio 2008 -- HACK

*****
DISCLAIMER - There may be a better way to do this (I hope there is), but I don't know of it.  Please share if you know of it.
*****

Today I ran into an interesting issue.  We are going to create an API on our end to access the web services of one of our vendors.  The problem is we are creating this code in VS 2008 and the vendors web services implement WSE 3.0. 

No big deal right, download the WSE 3.0 addin for VS and move on.... NOPE.  VS 2008 does not support the addin.  And from what I could tell, does not support/implement WSE 3.0 in any way.  Now what.....

Turns out there is a 'Great Hack' that will  get you around this issue.

  1. Create a project in VS 2005 (assuming you have that)
  2. Create you web service reference (in 2005)
  3. Right click your project and select WSE Settings 3.0
  4. Click 'Enable this project for Web Services Enhancements'
  5. Save and close your project.
  6. Create or Open a project in VS2008
  7. Create your web service reference, knowing it does not implement WSE
  8. Copy the contents of Web References folder under your 2005 solution to the Web References folder for your 2008 solution.
  9. Refresh your 2008 project

You should not have the correct WSE proxy classes.

*****
NOTE: You may need to add a reference to Microsoft.Web.Services3 in your VS 2008 solution.
*****

Yes I know this is weak, but it is the best I got.  Please, Please, Please for the love of god tell me there is a better, simpler way.

Till next time,


Posted 04-03-2008 3:05 PM by Derik Whittaker

[Advertisement]

Comments

Jeremy wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 04-03-2008 7:03 PM

Unfortunately, I think this may be it.  We hit the same thing moving a VS2005 project to VS2008 about two months back (more info here: www.jeremyjarrell.com/.../83.aspx)

It sounds like from this forum thread that MS won't be supporting WSE3 at all on VS2008 so this will have to be the 'official work around': forums.microsoft.com/.../ShowPost.aspx

Jeremy

Dew Drop - April 4, 2008 | Alvin Ashcraft's Morning Dew wrote Dew Drop - April 4, 2008 | Alvin Ashcraft's Morning Dew
on 04-04-2008 9:08 AM

Pingback from  Dew Drop - April 4, 2008 | Alvin Ashcraft's Morning Dew

Stuart wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 04-04-2008 9:46 AM

You can always use the commandline tool that comes with WSE3: WseWsdl3.exe to generate the proxy class for you.

Probably not as cumbersome as opening up VS2005 and VS2008, copying files over, etc.

Alles rund um Hack Angriffe » Blog Archive » RE: Verschl??sselung - Hack den BMW! wrote Alles rund um Hack Angriffe » Blog Archive » RE: Verschl??sselung - Hack den BMW!
on 04-24-2008 6:10 PM

Pingback from  Alles rund um Hack Angriffe  » Blog Archive   » RE: Verschl??sselung  -  Hack den BMW!

Jason wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 06-10-2008 7:40 AM

Thank you so much for posting these instructions, this really helped me out.  I have a Java CXF based web service with some operations that I wanted to use MTOM with, and one of our clients is written in .NET 2.0.  You really saved me a lot of frustration getting the client stood up and working!  

Prophet wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 07-27-2008 5:49 PM

Thank You for this workaround, Ive been looking around, being August 08, I would assume by now there are no updates or anything to support WSE 3.0...  I thought I was just 'out of the loop' when coming back into from VS 2003 to VS 2008, lots of differences.  I would assume the commandline tool will be the best option as I dont have VS 2005 at all. =o  Thank you again for your help, and if anyone finds an update or anything please post!

Thank You for your help!

wse wrote wse
on 08-02-2008 11:46 AM

Pingback from  wse

Rajashekar wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 08-25-2008 10:32 PM

You can use WSE -> Configuration Tool to enable the security instead of having to open from VS 2005 and then copy paste in VS 2008.

Tor wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 09-09-2008 8:57 AM

It's probably wiser to just upgrade to WCF.

It's the future after all, and supersedes all of WSE 3.0.

I'm doing it right now, and it seems pretty straightforward, actually.

Derik Whittaker wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 09-09-2008 9:02 AM

@Tor,

Sure that sounds great in theory.  But when the WSE service is not yours you cannot upgrade to WCF.

Jason Young wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 09-16-2008 7:38 AM

Check out this link: blogs.imeta.co.uk/.../345.aspx

Randolpho wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 09-22-2008 10:16 AM

Derik:

WCF can be used to consume a WSE web service with amazing ease. In VS 2008, it's as easy as creating a Service Reference rather than a Web Reference.

Caveat: By easy, I mean for most basic scenarios. It's quite possible that you'll end up having to monkey with the WCF configuration a bit. There's a learning curve there, and it frequently drives me nuts. Once you finally understand it things makes a *lot* of sense, but before then, ouch.

Still, I agree with Tor: it's wiser to upgrade to WCF if you can.

Jack Stockton wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 10-10-2008 7:19 PM

I cannot use the commandline tool on my computer...tells me to reinstall the .NET v2.0 SDK.  Was working before I upgrated to VS 2008.

I ended up using a virtual computer that still have VS2005 to generate the proxies I needed.

Jack

Jack Stockton wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 10-16-2008 7:00 PM

How would you convert this WSE code to WCF?

       UsernameToken token;

           userS.RequestSoapContext.Security.Tokens.Add(new UsernameToken(sUser, sPassword, PasswordOption.SendPlainText));

Jack Stockton wrote re: WSE 3.0 Support in Visual Studio 2008 -- HACK
on 10-16-2008 7:02 PM

How would you convert this WSE code to WCF?

UsernameToken token;

userS.RequestSoapContext.Security.Tokens.Add(new UsernameToken(sUser, sPassword, PasswordOption.SendPlainText));

401 While Accessing Web Service | keyongtech wrote 401 While Accessing Web Service | keyongtech
on 01-18-2009 11:39 AM

Pingback from  401 While Accessing Web Service | keyongtech

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)

CodeBetter.Com