Strange behaviour

Discussion in 'ASP .Net Web Services' started by Oscar Thornell, Apr 12, 2006.

  1. Hi,

    I use the xsd.exe tool to generate C# classes from an Xml schema. We can
    call the root object "MyObject" for simplicity...

    I expose "MyObject" in a web service like this... public void
    Upload(MyObject obj){..}

    When I set a web reference from a client to my web service the generated
    WSDL exposes the type "MyObject" as "obj" i.e. the variabel name I use in
    the method signature is used by the framework to generate the type name that
    clients will see and use. Pretty strange?

    In my client I read an xml file from disc and use XmlSerializer to
    deserialize the xml into an instance of "MyObject"...on the client it will
    actualy be an instance of "obj"...

    I then call my Service.Upload() and everything works as expected...I'll get
    the instance on the server side and can work with the data...

    If I manually edited the WSDL file and changes the type from "obj" to what
    it should be "MyObject"...the everything works on the client side...but when
    I hit the server side the instance is null...??

    Could some smart person out there explain this?

    Regards
    /Oscar
    Oscar Thornell, Apr 12, 2006
    #1
    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. Antonio

    Strange encoding behaviour

    Antonio, Dec 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    415
    Antonio
    Dec 29, 2004
  2. Jan
    Replies:
    2
    Views:
    1,417
    Mike Treseler
    Dec 16, 2004
  3. David Cantin

    Strange behaviour with perl and apache

    David Cantin, Nov 3, 2003, in forum: Perl
    Replies:
    1
    Views:
    449
    Jim Gibson
    Nov 3, 2003
  4. Dennis Johansson
    Replies:
    1
    Views:
    491
    Dennis Johansson
    Aug 21, 2003
  5. Andy Chambers
    Replies:
    1
    Views:
    376
    Daniel Dyer
    May 14, 2007
Loading...

Share This Page