Wasn't at first, but tried that also. All the property names changed unacceptably, so i stopped going down that route. i'll try it again on Monday just to make sure.
Main Topics
Browse All TopicsI have a custom object called Hours. This object is part of a class library that also contains the service and all other data contracts in the WCF Service. The service itself is hosted in a WCF Service Application (IIS). The Service funnels all calls to the class library for actual work. The binding for this Service is basicHttpBinding.
This setup works just fine for simply retrieving data from the service. It also works fine where I use primitive types as input parameters for a service method. However, when I try to use my custom object as an input parameter, and I debug it, I see that int32s and dates are reset to zero, but strings retain the values I set them to. As a result, operations that require non-default int and date values fail.
The crazy thing is that all other methods that simply return this custom object work just fine. Please help?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
have you checked:
- Your custom class has the DataContract attribute.
- Your required members/properties has the DataMember attribute.
(See link the sample PurchaseOrder class : http://msdn.microsoft.com/
Just in case, check that your client create the new object and set the properties before calling the wcf method.
if not solved. can you post your custom class and wcf method stubs (I do not need implementation just declarations)
None of your suggestions worked, though I'll award partial points for your efforts. The problem, it turns out, was with the proxy generation. Something has either gotten corrupted in my hosting application, or there's an unknown bug in svcutil.exe. The clue for me was that all these items worked perfectly for several weeks but then stopped working as soon as I changed the signature for a particular method.
For some strange reason, the method (generated by svcutil.exe) that creates and sets the values of the request object array was not setting the values of the int or DateTime properties in one particular custom type... but this behavior was not consistent with the other custom types. The "make up" of all the custom types are identical except in property names and number, so there was nothing special about the one that was acting retarded.
The quickest solution was to alter the critical method to accept individual property values and set the custom type values AFTER they arrived on the server, then continue processing as normal.
Thanks.
Business Accounts
Answer for Membership
by: reza_radPosted on 2009-11-07 at 02:42:53ID: 25765748
Is the custom object Serializable ?