[
https://issues.apache.org/jira/browse/WODEN-141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517955
]
John Kaputin commented on WODEN-141:
------------------------------------
I have made the following minor changes/additions to Dan's patches:
BaseWSDLReader.java.2.patch:
There may only be 1 wsdl:types element in a wsdl:description, so in
parseTypes() we can just add a (new) TypesElement and if one already exists
(i.e we have already parsed a wsdl:types) then a WSDLException is thrown.
replaced;
TypesElement types = desc.getTypesElement();
if (types == null) {
types = desc.addTypesElement();
}
with;
TypesElement types = desc.addTypesElement();
DescriptionImpl.java.2.patch:
In the addTypesElement() method replaced hardcoded string msg with new
formatted msg WSDL523 and added WSDL523 to Messages.properties
DescriptionTest.java.patche:
In the setUp() method changed fDescriptionElement.getTypesElement() to
addTypesElement()
> 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: Dan Harvey
> Fix For: M8
>
> Attachments: BaseWSDLReader.java.2.patch, BaseWSDLReader.java.patch,
> DescriptionElement.java.patch, DescriptionImpl.java.2.patch,
> DescriptionImpl.java.patch, DescriptiontElementTest.java.patch,
> DescriptionTest.java.patch, DOMWSDLReader.java.patch,
> Messages.properties.patch, WSDLDocumentValidatorTest.java.patch
>
>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]