views:

32

answers:

1

hey all i have a problem in webservice that i am consuming. it takes a string parameter which if i sent empty it does not return anything but if i check the output in the soap ui by removing this string parameter then it return fine. can somebody help me out that how can i do this in vb.net that i either not send this parameter or if i send then it let return records from the webservice. thanks

A: 

You should be able to exclude the offending property by adding the

[NonSerialized()] // This is C# syntax.  Not sure of VB.Net :-)

attribute to it.

The web service you are calling should ignore anything it doesn't understand, but if that's not happening, you can prevent a given property of your class from being serialized, and therefore from becoming part of the SOAP message, using that attribute.

Eric J.