serializing in client
-
Hello, I have a data class in my Web Service server. Its name is User. When I include this web service to the client and name it "WSA" the User class will be WSA.User. the problem is when I serialize a User instance in client its type will be WSA.User and I can not deserialize it to a User instance in server. the types will be different. What can I do?
-
Hello, I have a data class in my Web Service server. Its name is User. When I include this web service to the client and name it "WSA" the User class will be WSA.User. the problem is when I serialize a User instance in client its type will be WSA.User and I can not deserialize it to a User instance in server. the types will be different. What can I do?
Don't define User on both the client and server. Define User in a seperate dll, referenced by the service and client.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Horrific Minnesota Radio Judah Himango
-
Don't define User on both the client and server. Define User in a seperate dll, referenced by the service and client.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Horrific Minnesota Radio Judah Himango
-
Do you mean that... I should define a User dll on server. And both webservice and client should reference them?? I haven't experience of dlls. will it not be a problem for client to reference a dll in remote server?
Create a dll that contains the User class. When you build the client, add a reference to the dll containing the user class. When you build the service, add a reference to the dll containing the user class. The client doesn't need to reference a remote dll, the user dll can be copied locally to both client and service. This way, both the client and service will be using the same object.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Horrific Minnesota Radio Judah Himango