WSDL generation of types in different CLR namespaces

Discussion in 'ASP .Net Web Services' started by Henrik Gøttig, Oct 10, 2005.

  1. 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
    Henrik Gøttig, Oct 10, 2005
    #1
    1. Advertising

  2. Henrik Gøttig

    Jon Guest

    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.



    "Henrik Gøttig" <> wrote in message
    news:...
    > 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, Oct 11, 2005
    #2
    1. Advertising

  3. Jon wrote:
    > 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
    Henrik Gøttig, Oct 11, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    543
  2. Replies:
    0
    Views:
    616
  3. SenthilVel
    Replies:
    0
    Views:
    407
    SenthilVel
    Sep 7, 2006
  4. Ramunas Urbonas
    Replies:
    1
    Views:
    381
    Dino Chiesa [Microsoft]
    Jul 27, 2004
  5. John W. Long

    HTML Generation (Next Generation CGI)

    John W. Long, Nov 22, 2003, in forum: Ruby
    Replies:
    4
    Views:
    317
    John W. Long
    Nov 24, 2003
Loading...

Share This Page