Type re-definitions in WebServices + Auto Generated Proxy Stubs

Discussion in 'ASP .Net Web Services' started by Arthur Mnev, Feb 2, 2004.

  1. Arthur Mnev

    Arthur Mnev Guest

    I'm a little confused about autogenerated stub for web service (If i
    create manual one everything works great) the automatic one creates
    XML structures (object stubs) corresponding to messages/schema used to
    transport XML; However the objects that I really need to deserialize
    data to are far more complex then what XML represents.

    to bring in a simple example:
    class AComplexClass
    private int v1; private int v2;
    public string v3
    get { v1.ToString() + "::" + v2.ToString(); }
    set { parse INT::INT string and place it into v1 & v2 };

    during serialization Web Service represents this object as
    <v3 type=string>string data</v3>

    When WSDL is transformed into Proxy Class proxy class will contain sub
    Class Called AutoComplexClass and the only propery of it wlll be v3.

    This is perfectly legal for as long as only one side knows what the
    object really is. In my case I have a library distributed to both, a
    web service and a client; therefore both a server and a client have
    access to the object and web service is only a way to deliver data.

    The question I guess is: is there anything special about proxy stubs
    and are they required by some internal mechanism to verify incoming
    data or can i just get rid of them and reference my real objects (this
    is what i have been doing thus far)

    part two of a question is there any way tell AutoGenerating process to
    use my REAL object types instad of creating its own half backed stubs
    when creating all WebService calls? Manually editing 200 functions is
    quite annoying:)

    Thanks in advance.
    Arthur Mnev, Feb 2, 2004
    1. Advertisements

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. David Van de Voorde
    David Van de Voorde
    Dec 16, 2005
  2. Replies:
    Arne Vajhøj
    Oct 21, 2010
  3. Greg
    Steven Simpson
    Aug 16, 2012
  4. Knute Johnson
    Knute Johnson
    Jul 29, 2012

Share This Page