You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by chainerlt <ch...@gmail.com> on 2011/04/18 14:35:37 UTC
org.uddi.api_v3.Address getSortCode()/getUseType() bug
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
--
View this message in context: http://old.nabble.com/org.uddi.api_v3.Address-getSortCode%28%29-getUseType%28%29-bug-tp31423435p31423435.html
Sent from the jUDDI - User mailing list archive at Nabble.com.
Re: org.uddi.api_v3.Address getSortCode()/getUseType() bug
Posted by "Martynas A. (chainer)" <ch...@gmail.com>.
Well I looked into a wrapper but it seemed like a black forest to me. Maybe
if any of you would have time, I would appreciate for any code examples or
smth. Thanks
--Martin
2011/4/18 Tom Cunningham <tc...@redhat.com>
> Check out the code in
> ./juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper.
> I think it does this in a few places.
>
> --Tom
>
>
Re: org.uddi.api_v3.Address getSortCode()/getUseType() bug
Posted by Tom Cunningham <tc...@redhat.com>.
Check out the code in
./juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper.
I think it does this in a few places.
--Tom
On 04/18/2011 10:35 AM, Martynas A. (chainer) wrote:
> 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 <kurt.stam@gmail.com <ma...@gmail.com>>
>
> 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
>
>
>
Re: org.uddi.api_v3.Address getSortCode()/getUseType() bug
Posted by Kurt T Stam <ku...@gmail.com>.
If you are using CXF, you can turn on logging:
http://cxf.apache.org/docs/debugging-and-logging.html
"CXF uses Java SE Logging
<http://www.oracle.com/technology/pub/articles/hunter_logging.html> for
both client- and server-side logging of SOAP requests and responses.
Logging is activated by use of separate in/out interceptors that can be
attached to the client and/or service as required. These interceptors
can be specified either programmatically (via Java code and/or
annotations) or via use of configuration files."
--K
On 4/18/11 10:35 AM, Martynas A. (chainer) wrote:
> 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 <kurt.stam@gmail.com <ma...@gmail.com>>
>
> 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
>
>
>
Re: org.uddi.api_v3.Address getSortCode()/getUseType() bug
Posted by "Martynas A. (chainer)" <ch...@gmail.com>.
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 <ku...@gmail.com>
> 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
>>>
>>>
>
Re: org.uddi.api_v3.Address getSortCode()/getUseType() bug
Posted by Kurt T Stam <ku...@gmail.com>.
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
>>
Re: org.uddi.api_v3.Address getSortCode()/getUseType() bug
Posted by chainerlt <ch...@gmail.com>.
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
>
--
View this message in context: http://old.nabble.com/org.uddi.api_v3.Address-getSortCode%28%29-getUseType%28%29-bug-tp31423435p31423464.html
Sent from the jUDDI - User mailing list archive at Nabble.com.