WSDL generation of types in different CLR namespaces

H

Henrik Gøttig

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
 
J

Jon

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.
 
H

Henrik Gøttig

Jon said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top