Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Strange behaviour

Reply
Thread Tools

Strange behaviour

 
 
Oscar Thornell
Guest
Posts: n/a
 
      04-12-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
debugger behaviour different to execution behaviour Andy Chambers Java 1 05-14-2007 09:51 AM
a strange behaviour of FF Maurice Firefox 2 03-11-2005 11:53 PM
Strange mouse behaviour with flash in Mozilla 1.3.7 hpoppe Firefox 0 11-07-2004 12:16 PM
Strange taskbar behaviour (notification area) Falcon Wireless Networking 0 08-17-2004 09:03 AM
[mozilla1.6] strange behaviour with newsgroup joost68 Firefox 5 04-03-2004 03:48 AM



Advertisments