Developing Matt

My Technical Journal

Nil on Sending Nil

leave a comment »

Some things fall into a category that I don’t know how to explain.  I struggled for some time with a project that was sending some data using a web service method call.  The problem arose: I needed to send a null value in one of the parameters and unfortunately the documentation was so poor on this web service.  It didn’t discuss how to pass a null value.  That is to say, there was nil on how to send a nil.

After some time agonizing over this I was able to use a different application to call the webservice without the use of the parameter, which enabled me to track what was being sent.

So for this particular web api the way you can do it is by adding another property to the node and leave the value empty:

        <ParameterName xsi:nil="true"/>


Written by matt

November 30, 2011 at 5:02 pm

Posted in

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: