You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juddi.apache.org by "Mingfang Wang (JIRA)" <ju...@ws.apache.org> on 2005/03/11 16:23:53 UTC
[jira] Created: (JUDDI-64) bindingTemplate does not check empty description
bindingTemplate does not check empty description
------------------------------------------------
Key: JUDDI-64
URL: http://issues.apache.org/jira/browse/JUDDI-64
Project: jUDDI
Type: Bug
Versions: 0.9rc3
Environment: windows XP, Tomcat 4.1.31, JDK1.4
Reporter: Mingfang Wang
Assigned to: Steve Viens
Hi,
I have just found one more bug from the Sun Micro implementation of Jaxr. It generates an empty description element on a bindingTemplate element. According to uddi.xsd, empty description element under a bindingTemplate element is a violation.
The jaxr code looks like this:
ServiceBinding bnd = m_buzLfCyclMgr.createServiceBinding();
bnd.setValidateURI(false);
// InternationalString
is=m_buzLfCyclMgr.createInternationalString(Locale.US,
// "Just another access point");
// bnd.setDescription(is);
bnd.setAccessURI("http://localhost:8080/axis/services/urn:xmltoday-delay
ed-quotes");
svc.addServiceBinding(bnd);
With these three lines commented out, the section of uddi XML looks
like:
<bindingTemplate bindingKey="" serviceKey="A2B392F0-90DD-11D9-BF4F-FAA2D4FA8F92">
<description xml:lang="en-US"/>
<accessPoint URLType="http">
http://localhost:8080/axis/services/urn:xmltoday-delayed-quotes
</accessPoint>
<tModelInstanceDetails/>
</bindingTemplate>
According to UDDI schema, this <description> element can be missing but cannot be empty. When Juddi tries to insert the comment, a sql exception is thrown, complaining null value instead into a null value disallowed column.
Solution, do not comment these lines.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Closed: (JUDDI-64) bindingTemplate does not check empty description
Posted by "Steve Viens (JIRA)" <ju...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/JUDDI-64?page=history ]
Steve Viens closed JUDDI-64:
----------------------------
Resolution: Fixed
Fix Version: 0.9
The recommended fix has been implemented and tested.
> bindingTemplate does not check empty description
> ------------------------------------------------
>
> Key: JUDDI-64
> URL: http://issues.apache.org/jira/browse/JUDDI-64
> Project: jUDDI
> Type: Bug
> Versions: 0.9rc3
> Environment: windows XP, Tomcat 4.1.31, JDK1.4
> Reporter: Mingfang Wang
> Assignee: Steve Viens
> Fix For: 0.9
>
> Hi,
> I have just found one more bug from the Sun Micro implementation of Jaxr. It generates an empty description element on a bindingTemplate element. According to uddi.xsd, empty description element under a bindingTemplate element is a violation.
> The jaxr code looks like this:
> ServiceBinding bnd = m_buzLfCyclMgr.createServiceBinding();
> bnd.setValidateURI(false);
> // InternationalString
> is=m_buzLfCyclMgr.createInternationalString(Locale.US,
> // "Just another access point");
> // bnd.setDescription(is);
>
> bnd.setAccessURI("http://localhost:8080/axis/services/urn:xmltoday-delay
> ed-quotes");
> svc.addServiceBinding(bnd);
> With these three lines commented out, the section of uddi XML looks
> like:
> <bindingTemplate bindingKey="" serviceKey="A2B392F0-90DD-11D9-BF4F-FAA2D4FA8F92">
> <description xml:lang="en-US"/>
> <accessPoint URLType="http">
>
> http://localhost:8080/axis/services/urn:xmltoday-delayed-quotes
> </accessPoint>
> <tModelInstanceDetails/>
> </bindingTemplate>
> According to UDDI schema, this <description> element can be missing but cannot be empty. When Juddi tries to insert the comment, a sql exception is thrown, complaining null value instead into a null value disallowed column.
> Solution, do not comment these lines.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
[jira] Commented: (JUDDI-64) bindingTemplate does not check empty description
Posted by "Steve Viens (JIRA)" <ju...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/JUDDI-64?page=comments#action_60785 ]
Steve Viens commented on JUDDI-64:
----------------------------------
A solution that should eliminate this problem from a dozen (or more) places.
Update the unmarshal() methods in DescriptionHandler and NameHandler classes so that they ignore description and name elements which do not contain a text node (the problem you've encountered). For instance. The updated DescriptionHandler.unmarshal() method would look like this:
public RegistryObject unmarshal(Element element)
{
// Attributes
String langCode = element.getAttribute("xml:lang");
// Text Node Value
String descValue = XMLUtils.getText(element);
// Child Elements
// {none}
// Only create Description instance if descValue not null and not zero-length
Description obj = null;
if ((descValue != null) && (descValue.trim().length() > 0))
obj = new Description(descValue,langCode);
return obj;
}
The new unmarshal method in NameHandler will look (almost) identical. Unfortunately all dependent handlers will need to be updated as well to potentially expect to receive a null value from this method. It's an easy change but it must be made to the following 19 Handler classes:
BindingTemplateHandler
BusinessEntityHandler
BusinessInfoHandler
BusinessServiceHandler
ContactHandler
FindBusinessHandler
FindPublisherHandler
FindServiceHandler
FindTModelHandler
InstanceDetailsHandler
OverviewDocHandler
PublisherInfoHandler
RelatedBusinessInfoHandler
ServiceInfoHandler
SubscriptionHandler
TModelHandler
TModelInfoHandler
TModelInstanceInfoHandler
> bindingTemplate does not check empty description
> ------------------------------------------------
>
> Key: JUDDI-64
> URL: http://issues.apache.org/jira/browse/JUDDI-64
> Project: jUDDI
> Type: Bug
> Versions: 0.9rc3
> Environment: windows XP, Tomcat 4.1.31, JDK1.4
> Reporter: Mingfang Wang
> Assignee: Steve Viens
>
> Hi,
> I have just found one more bug from the Sun Micro implementation of Jaxr. It generates an empty description element on a bindingTemplate element. According to uddi.xsd, empty description element under a bindingTemplate element is a violation.
> The jaxr code looks like this:
> ServiceBinding bnd = m_buzLfCyclMgr.createServiceBinding();
> bnd.setValidateURI(false);
> // InternationalString
> is=m_buzLfCyclMgr.createInternationalString(Locale.US,
> // "Just another access point");
> // bnd.setDescription(is);
>
> bnd.setAccessURI("http://localhost:8080/axis/services/urn:xmltoday-delay
> ed-quotes");
> svc.addServiceBinding(bnd);
> With these three lines commented out, the section of uddi XML looks
> like:
> <bindingTemplate bindingKey="" serviceKey="A2B392F0-90DD-11D9-BF4F-FAA2D4FA8F92">
> <description xml:lang="en-US"/>
> <accessPoint URLType="http">
>
> http://localhost:8080/axis/services/urn:xmltoday-delayed-quotes
> </accessPoint>
> <tModelInstanceDetails/>
> </bindingTemplate>
> According to UDDI schema, this <description> element can be missing but cannot be empty. When Juddi tries to insert the comment, a sql exception is thrown, complaining null value instead into a null value disallowed column.
> Solution, do not comment these lines.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira