{"id":51,"date":"2004-11-26T13:14:22","date_gmt":"2004-11-26T13:14:22","guid":{"rendered":"http:\/\/www.pleus.net\/blog\/?p=51"},"modified":"2010-08-13T00:11:34","modified_gmt":"2010-08-12T22:11:34","slug":"web-services-and-null-values-part-iii","status":"publish","type":"post","link":"https:\/\/www.pleus.net\/blog\/?p=51","title":{"rendered":"Web Services and Null Values &#8211; Part III"},"content":{"rendered":"<p>As mentioned in Web Services and Null Values &#8211; Part I-II one should not return a Java wrapper type, e.g. <b>Boolean<\/b>, from a Web Service as this type is modeled as <b>xsd:boolean<\/b> in the WSDL file.<br \/>\nIf the service returns a <b>null<\/b> value for an <b>xsd:boolean<\/b> the caller might get in throuble.<br \/>\nIn .NET it&#8217;s not a problem to return a <b>Boolean<\/b> because it can&#8217;t be <b>null<\/b>. That&#8217;s because Boolean is a value type.<br \/>\nWhereas in Java <b>boolean<\/b> and <b>Boolean<\/b> are different types in .NET they are the same <b>System::Boolean<\/b>.<\/p>\n<p><u>Java<\/u><\/p>\n<p>boolean (native)<br \/>\nBoolean (java.lang.Boolean reference type)<\/p>\n<p><u>C#<\/u><\/p>\n<p>bool (System.Boolean value type)<br \/>\nBoolean (System.Boolean value type)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As mentioned in Web Services and Null Values &#8211; Part I-II one should not return a Java wrapper type, e.g. Boolean, from a Web Service as this type is modeled as xsd:boolean in the WSDL file. If the service returns a null value for an xsd:boolean the caller might get in throuble. In .NET it&#8217;s &hellip; <a href=\"https:\/\/www.pleus.net\/blog\/?p=51\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Web Services and Null Values &#8211; Part III<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-soa","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":2,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":333,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions\/333"}],"wp:attachment":[{"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pleus.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}