Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2006

Tip: Looking for answers? Try searching our database.

How to Modify the Proxy Class for a 2005 Web Project

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tyler Carver - 09 Feb 2006 22:40 GMT
I have created a web reference in a 2005 web project and need to change out
the generated complex class with the business oject that we have already
created.  In a library project there is a code file for the proxy class where
I can make the change.  However, there is no such file in a Web Project as
this class is generated on the fly.  So what I need to do is the following:

I have a business object Foo.
My Webservice has a method GetFoo() that returns MyNamespace.Foo.
In the Web Project I want to have my web reference to return
MyNamesapce.Foo, NOT the generated Foo.

I'm hoping I can make a change to the .wsdl file to get the GetFoo() method
to return my MyNamespace.Foo oject.

Thanks for your help,
Tyler
Steven Cheng[MSFT] - 10 Feb 2006 10:19 GMT
Hi Tyler,

Welcome to the MSDN newsgroup.

As for the webservice client proxy generate through .net tool, in ASP.NET
web application, since it no longer expose the autogenerated source file,
it will prevent us from modifying it manually. What we can do so far is use
custom soapExtensionImporter to do some customizing on the wsdl or cilent
proxy generation process, however, so far I haven't found any means to
modify the method's referenced parameter type. It can only help add new
proxy class type or apply some custom attributes:

#How to: Customize the Generation of Service Descriptions and Proxy Classes
 
http://msdn2.microsoft.com/en-us/library/f9hatst6.aspx

You can have a look at the WSE's extensionImporter
type(Microsoft.Web.Services3.Description.WseExtensionImporter) for
reference.  Anyway, creating such a custom importer is a bit too hard.

So IMO, I'd suggest you create the webservice class in a separate class
library project so that you can maintain the generated source file. Or you
can also manually use the wsdl.exe to generate the proxy outside the
project(in commandline).

Hope this helps.

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.