I see, btw I have a fast question here (not worth opening new thread): How
can I build a valid XML message from my juddi object (for instance
FindBusiness) which I could pass directly to decent wsdl (for instance via
SaopUI) ? I mean I have such a code:

        Name name = new Name();
>         name.setValue("%");
>         FindQualifiers qualifiers = new FindQualifiers();
>         qualifiers.getFindQualifier().add("approximateMatch");
>         FindBusiness findBusiness = new FindBusiness();
>         findBusiness.getName().add(name);
>         findBusiness.setFindQualifiers(qualifiers);
>

I would like to get something like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:urn="urn:uddi-org:api_v3">
>    <soapenv:Header/>
>    <soapenv:Body>
>       <urn:find_business>
>          <urn:findQualifiers>
>             <urn:findQualifier>approximateMatch</urn:findQualifier>
>          </urn:findQualifiers>
>          <urn:name>%</urn:name>
>       </urn:find_business>
>    </soapenv:Body>
> </soapenv:Envelope>
>

I guess there should be an easy way to do that.

--Martin

2011/4/18 Kurt T Stam <[email protected]>

> 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
>>>
>>>
>

Reply via email to