I have a web service that is used to populate a drop-down. The web service is defined with a single parameter that is of type Nullable(Of Guid). The idea is that if no Guid is passed the service will return an unfiltered list of items but when a Guid is sent, the an appropriately filtered list will be returned instead.
The problem I am having is sending the NULL from the InfoPath form. If I call the web service without selecting a drop-down value I get the following error
The formatter threw an exception while trying to deserialize the message: There
was an error while trying to deserialize parameter
http://tempuri.org/:parameter1. The InnerException message was 'There
was an error deserializing the object of type System.Nullable`1[[System.Guid, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]. The value ''
cannot be parsed as the type 'Guid'.'. Please see InnerException for more details.
I think the problem is ultimately that second to last sentence -- The value '' cannot be parsed as the type 'Guid'. I think that InfoPath is treating the unselected drop-down value as an empty string and is sending that.
My question is how do I get InfoPath to send a NULL?