Community forum

Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Lasse Lehtinen
2014-04-17T09:21:49Z
I am trying to make a simple Web Service task, but seems like I am having trouble sending null values. Please see the images below, that is how I have setup the LookupRequest and how the query should look like.

UserPostedImage

UserPostedImage

With that request I get the following error from the Web Service:

One and only one of the fields DomainName and DomainNumber must be set

So seems like VisualCron is sending the DomainName field even though I have set it to null?

Is there also any way to debug this? For example see the actual payload sent to the Web Service?
Sponsor
Forum information
Support
2014-04-17T13:22:52Z
Could you add some screenshots of settings of that value? Which version of VC are you running now?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Lasse Lehtinen
2014-04-17T13:29:24Z
Originally Posted by: Support 

Could you add some screenshots of settings of that value? Which version of VC are you running now?



In VisualCron:

UserPostedImage

In the WSDL:

UserPostedImage

Is this what you wanted? We are using VisualCron 7.1.6.
Support
2014-04-17T13:52:53Z
Thanks, we will try to set up a web service and test this and get back to you next week.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2014-04-21T21:11:03Z
We did some tests and this seems to be the way null strings are serialized when using web service requests. We got the same result when manually calling a web service with a string object with value null. It is transformed to string.empty when received.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Lasse Lehtinen
2014-04-28T07:17:18Z
Originally Posted by: Support 

We did some tests and this seems to be the way null strings are serialized when using web service requests. We got the same result when manually calling a web service with a string object with value null. It is transformed to string.empty when received.



So basically the actual request does not send <DomainName xsi:nil="true"/> but <DomainName></DomainName> instead and this is picked by the Web Service since null != empty? Is there any workaround for this?

Support
2014-04-28T07:35:03Z
Originally Posted by: Lasse Lehtinen 

Originally Posted by: Support 

We did some tests and this seems to be the way null strings are serialized when using web service requests. We got the same result when manually calling a web service with a string object with value null. It is transformed to string.empty when received.



So basically the actual request does not send <DomainName xsi:nil="true"/> but <DomainName></DomainName> instead and this is picked by the Web Service since null != empty? Is there any workaround for this?



The best workaround is to change the behavior at server level as the other part is out of control.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Lasse Lehtinen
2014-04-28T11:48:34Z
Quote:


The best workaround is to change the behavior at server level as the other part is out of control.



Thanks for your input, I have forwarded this to our Web Service vendor.
Lasse Lehtinen
2014-04-29T12:51:12Z
Originally Posted by: Support 

Originally Posted by: Lasse Lehtinen 

Originally Posted by: Support 

We did some tests and this seems to be the way null strings are serialized when using web service requests. We got the same result when manually calling a web service with a string object with value null. It is transformed to string.empty when received.



So basically the actual request does not send <DomainName xsi:nil="true"/> but <DomainName></DomainName> instead and this is picked by the Web Service since null != empty? Is there any workaround for this?



The best workaround is to change the behavior at server level as the other part is out of control.



I contacted the vendor and they had good reasons for not changing the implementations. But they very much said that this should work as is in the current .Net Web Service classes. Here is one quote:

The standard webservice framework in .Net correctly sends xsi:nil=true for fields that are set to null in the call.

I also kind of understood that it should be like this, since you have the "Is Null" checkmark. So if this checkmark is on, you should xsi:nil="true" instead of empty value?
Scroll to Top