[prev in list] [next in list] [prev in thread] [next in thread]
List: woden-dev
Subject: [jira] Commented: (WODEN-141) DescriptionElement.getTypesElement()
From: "Dan Harvey (JIRA)" <jira () apache ! org>
Date: 2007-07-24 14:46:31
Message-ID: 24370318.1185288391037.JavaMail.jira () brutus
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/WODEN-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514986 \
]
Dan Harvey commented on WODEN-141:
----------------------------------
The only thing I'm not sure about with this is what to do when we already have a \
TypesElement. Do we throw an exception or return null? As this is not done anywhere \
else there is not really anything else to be consistent with.
Returning null would be very uninformative as there could be various reasons that has \
happened.
Throwing an exception would make most sense as at runtime the developers can react to \
the error on their half for not checking that a TypesElement doesn't already exists, \
using getTypesElement.
So for now I will throw a WSDLException with a message describing the problem.
> DescriptionElement.getTypesElement() should not be a factory method
> -------------------------------------------------------------------
>
> Key: WODEN-141
> URL: https://issues.apache.org/jira/browse/WODEN-141
> Project: Woden
> Issue Type: Bug
> Components: Parser
> Reporter: John Kaputin
> Assignee: John Kaputin
> Fix For: M8
>
>
> The behaviour of the DescriptionElement.getTypesElement() method is to return the \
> types element if it exists or if not, create it and return it. This means that the \
> model can never reflect an infoset that does not have a <wsdl:types> element \
> because this getter method will always create one even if there isn't one in the \
> WSDL. Instead, this method should return null if there is no types element and a \
> new factory method is required - createTypesElement(), which will create a \
> TypesElement, set the DescriptionElement as its parent and return a reference to \
> it. This is similar behaviour to the addXXXXElement methods that create sets of \
> child elements, except that it acts on a single types element only (hence the \
> method name 'create' rather than 'add').
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic