all groups > asp.net webservices > april 2008 >
You're in the

asp.net webservices

group:

Consuming Web Service with Nullable DateTime in .net 1.1



Consuming Web Service with Nullable DateTime in .net 1.1 Rob Hill
4/15/2008 11:16:12 AM
asp.net webservices: 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

RE: Consuming Web Service with Nullable DateTime in .net 1.1 jialge@online.microsoft.com
4/16/2008 6:23:57 AM
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 (jialge@online.microsoft.com, 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:
msdnmg@microsoft.com.

==================================================
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.
RE: Consuming Web Service with Nullable DateTime in .net 1.1 jialge@online.microsoft.com
4/18/2008 2:25:34 AM
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 (jialge@online.microsoft.com, 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:
msdnmg@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
Re: Consuming Web Service with Nullable DateTime in .net 1.1 Rob Hill
4/18/2008 1:41:56 PM
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

[quoted text, click to view]

Re: Consuming Web Service with Nullable DateTime in .net 1.1 jialge@online.microsoft.com
4/22/2008 3:47:59 AM
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 (jialge@online.microsoft.com, 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:
msdnmg@microsoft.com.

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