O
Oscar Thornell
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
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