Hi Martin,
The specification uddi_v3.xsd
http://svn.apache.org/repos/asf/juddi/tags/juddi-3.0.4/uddi-ws/src/main/resources/uddi_v3.xsd
says:
<xsd:attribute name="useType" type="uddi:useType" use="optional"
default=""/>
<xsd:attribute name="sortCode" type="uddi:sortCode" use="optional"
default=""/>
So that explains why it is implemented that way.
Cheers,
--Kurt
On 4/18/11 8:41 AM, chainerlt wrote:
I looked into source code:
/**
* Gets the value of the useType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUseType() {
if (useType == null) {
return "";
} else {
return useType;
}
}
Whats the purpose of returning empty String here?
chainerlt wrote:
Hello,
(org.uddi.api_v3.Address)
I guess that's another bug: getSortCode() and getUseType() returns
non-null value (empty String) if values are nulls:
code:
org.uddi.api_v3.Address a = new org.uddi.api_v3.Address();
System.out.println("Lang:" + a.getLang());
System.out.println("SortCode:" + a.getSortCode());
System.out.println("UseType:" + a.getUseType());
System.out.println();
a.setLang("lang");
a.setSortCode("sortcode");
a.setUseType("usetype");
System.out.println("Lang:" + a.getLang());
System.out.println("SortCode:" + a.getSortCode());
System.out.println("UseType:" + a.getUseType());
System.out.println();
a.setLang(null);
a.setSortCode(null);
a.setUseType(null);
System.out.println("Lang:" + a.getLang());
System.out.println("SortCode:" + a.getSortCode());
System.out.println("UseType:" + a.getUseType());
output:
Lang:null
SortCode:
UseType:
Lang:lang
SortCode:sortcode
UseType:usetype
Lang:null
SortCode:
UseType:
--Martin