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 / October 2005

Tip: Looking for answers? Try searching our database.

WSDL generation of types in different CLR namespaces

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Henrik Gøttig - 10 Oct 2005 12:34 GMT
Hi all

Feeling a bit frustrated here. Maybe I did not find the correct info
yet, that's why I am asking you.

I have "developed" a .NET 2.0 WebService and generated (using wsdl.exe)
the WSDL for it.
The types I am returning from webmethod calls has a superclass
(BaseBusinessObject). So MyBusinessObject inherits from BaseBusinessObjects.
That gives me two schemas in the <types> section of my wsdl. One for the
superclass and one for the "real" business object.

Can I setup wsdl.exe somehow to generate the types in my wsdl to a
specific namespace, that is *not* the same as the namespacing I am
generating the WebService proxies to.
That way I can encourage type sharing between webmethods where it is
appropriate.
I have read somewhere that there is a way to "hook" in the schemaimport
process, but that is really a last resort....

One could always use the /sharetypes switch and then generate everything
(types, proxies, etc.) in one huge file.

Anyone has an idea, may be alternative..but anything..

Thanx in advance

Regards

Henrik
Jon - 11 Oct 2005 00:01 GMT
I too am interested in this. I have tried using [SoapInclude and [XmlInclude
as well as a lot of other XML and SOAP serialization things but still can't
get them to combine.
You basically want to hide your inheritance from the end user and show them
a single type. The consumer does not need to know what inherits from what
behind the scene.

> Hi all
>
[quoted text clipped - 27 lines]
>
> Henrik
Henrik Gøttig - 11 Oct 2005 07:42 GMT
> I too am interested in this. I have tried using [SoapInclude and [XmlInclude
> as well as a lot of other XML and SOAP serialization things but still can't
> get them to combine.
> You basically want to hide your inheritance from the end user and show them
> a single type. The consumer does not need to know what inherits from what
> behind the scene.

Hi Jon,

Thanx for taking your time to read my post.

What you want is not exactly what I want, but the "feature" you
described could be nice, too. Did you try the XML Attribute
IncludeInSchema (true/false) on your business object.

I fell back on using the sharetypes switch to wsdl.exe for generating
one huge file including all WS stuff (proxies, types, etc.)...but it is
not nice....

Maybe one could do some refactoring over the generated
file...dunno...but I'll give it a try.

Regards

Henrik

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.