Consuming Web Service with Nullable DateTime in .net 1.1

R

Rob Hill

I am consuming a web service that was written in VS 2008 and some of the
classes have DateTime values that are declared nullable as follows

DateTime? objDateTime = null;

If there is not a value assigned to objDateTime, then it is null.

I am consuming the service from .net 1.1 and I am getting an error before
even using the types that the value is not a valid DateTime. How can I
resolve this as .net 1.1 does not allow for this?

Thanks,

Rob
 
J

Jialiang Ge [MSFT]

Hello Rob,

From your post, my understanding on this issue is: how to use nullable
value type members declared in a .NET 2.0 or above web service from a .NET
1.1 client. If I'm off base, please feel free to let me know.

I think the KB article
http://support.microsoft.com/kb/929545/en-us
can help you with the issue.

The error occurs because the .NET Framework 1.1 does not support
deserialization of nullable value types. And the workaround is to modify
the proxy class for the client application to convert nullable value types
to reference types.

Please follow the detailed steps in the KB, and let me know if it works for
you.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Rob,

I am writing to check the status of the issue on your side. Would you mind
letting me know the result of the suggestions? If you need further
assistance, feel free to let me know. I will be more than happy to be of
assistance.

Have a great day!

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
R

Rob Hill

I'm not pleased with the solution, but I recognize that it is the best that
I can hope for. I opted to modify the web service to use strings (since they
are nullable) and I am handling validation/typing issues on the client.

I've bookmarked the page for future reference, but I think that this method
will have to do until I upgrade my client from .net 1.1

Thanks,

Rob
 
J

Jialiang Ge [MSFT]

Hello Rob,

I can understand why you said you are not pleased with the solution.
Editing the proxy class may result in troubles when developers update the
web service proxy (Update Web Service). However, the proxy class is the
only place where we can work around the issue in .NET 1.1 clients. I am
very sorry for the inconveniences and if there is anything else I can do
for you in this post, feel free to let me know.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top