B
brian
Hi, this is probably a one-liner fix, but I can't find that one line!
I have two webservices, UserWS and TroubleWS.
UserWS has a method called GetUserData that accepts a username and
returns a User object filled with data (phone, pager, email, etc).
TroubleWS has methods GetTrouble and SaveTrouble. From the client, I
can call GetTrouble and get a Trouble object filled with data. When I
want to do a save, I pass the Trouble object and a User object. The
User object is that of the currently logged in user. (I can then do
authorization checks in my business logic this way.)
Inside the client, when I get the User object, it's filled with data.
Inside the TroubleWS.SaveTrouble method, the User object is
instantiated, default constructor run, but the properties are NOT
filled. The Trouble object is filled as expected. After I get back
form the SaveTrouble method, checking the User object still shows a
fully filled object.
Oddly enough, if I change the SaveTrouble method to accept a Trouble
object and a generic object instead of a User object, the generic
object has all of the User data. This leads me to believe that maybe
the serializer is ignoring the data when hydrating to the custom
object.
My namespaces on the webservice side are:
brian.data.user:
- UserWS.asmx
- User.cs
brian.data.trouble:
- TroubleWS.asmx
- Trouble.cs
I can try this in the reverse and I get similar results. That is, I
created a public void Test(Trouble trouble) method on UserWS. When I
call that method and check the Trouble object, it is blank just like
the other case.
I'm really stuck. None of the properties on my objects are marked
read only. All of them have setters implemented. No exceptions are
being thrown and I'm pulling my hair out! -
Thanks in advance,
-Brian
I have two webservices, UserWS and TroubleWS.
UserWS has a method called GetUserData that accepts a username and
returns a User object filled with data (phone, pager, email, etc).
TroubleWS has methods GetTrouble and SaveTrouble. From the client, I
can call GetTrouble and get a Trouble object filled with data. When I
want to do a save, I pass the Trouble object and a User object. The
User object is that of the currently logged in user. (I can then do
authorization checks in my business logic this way.)
Inside the client, when I get the User object, it's filled with data.
Inside the TroubleWS.SaveTrouble method, the User object is
instantiated, default constructor run, but the properties are NOT
filled. The Trouble object is filled as expected. After I get back
form the SaveTrouble method, checking the User object still shows a
fully filled object.
Oddly enough, if I change the SaveTrouble method to accept a Trouble
object and a generic object instead of a User object, the generic
object has all of the User data. This leads me to believe that maybe
the serializer is ignoring the data when hydrating to the custom
object.
My namespaces on the webservice side are:
brian.data.user:
- UserWS.asmx
- User.cs
brian.data.trouble:
- TroubleWS.asmx
- Trouble.cs
I can try this in the reverse and I get similar results. That is, I
created a public void Test(Trouble trouble) method on UserWS. When I
call that method and check the Trouble object, it is blank just like
the other case.
I'm really stuck. None of the properties on my objects are marked
read only. All of them have setters implemented. No exceptions are
being thrown and I'm pulling my hair out! -
Thanks in advance,
-Brian