We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

only string data is saved from WCF service when using Web Reference instead of Service Reference in VS 2008

emcict
emcict asked
on
Medium Priority
464 Views
Last Modified: 2012-06-27
I have created a WCF webservice that accepts a collection of an object of made of simple datatypes (int, string datettime)

when i test the service from the client side (a mobile application created in VS2008)  using and add a Service Reference, all the data is saved to the database, however if I add a Web Reference, only datatypes of type string are saved. Also no exception is generated.

I am using basicHTTPBinding in the webservice to make it compatible with older client applications.

I cannot use a service reference at the client side because i need to implement a mobile solution on the compact framework 3.5 which is not supported.

Any help please?
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Aaron JabamaniTechnical Architect

Commented:
Use channel factory to create proxy instead of any references. Link has more details.
http://msdn.microsoft.com/en-us/library/ms751400.aspx

Author

Commented:
it has worked for me and posted it so it might help others.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.