Issue Details (XML | Word | Printable)

Key: WODEN-178
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Harvey
Reporter: John Kaputin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Woden

DescriptionImpl methods addElementDeclaration and addTypeDefinition should not be public

Created: 15/Aug/07 01:11 PM   Updated: 19/Aug/08 04:24 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: M8

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works Woden-178.patch.txt 2007-08-23 01:57 PM Dan Harvey 25 kB

Resolution Date: 31/Aug/07 09:58 PM


 Description  « Hide
These two methods are defined as public methods on DescriptionImpl but as we don't yet have an updatable Component API, they are not defined on the Description component interface. The component model is currently derived from the element model and these methods are only used by ComponentModelBuilder. As this is now in the same package as DescriptionImpl, these two methods should be made package private. We can make them public later if they are added to the Woden API.

That's the easy part. There are also several testcases that call these methods as they 'hack together'' a WSDL model for their tests. These will need to be changed so that the ElementDeclarations and TypeDefinitions are derived from the Element model, rather than instantiated directly then explicitly added to the model by the test client. To do this, the test code will need to parse a <xs:schema> element as a XmlSchema object and access it via the normal Woden API.

For an example, see the code in WSDLDocumentValidatorTest.testTestAssertionSchema1066(). It parse a string representation of an xs:schema and adds this to a TypesElement that has been created via the Woden programming model. The getElementDeclarations and getTypesDefinitions can then be called on DescriptionElement.toComponent().

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dan Harvey added a comment - 23/Aug/07 01:57 PM
Woden-162 needs to be applied before this Patch as some tests in WSDLComponentValidatorTest.java are commented out as there no longer valid, these tests are broken with this patch and have also been commented out in it as there is no need to fix them.

John Kaputin added a comment - 31/Aug/07 09:48 PM
r571605
Committed Dan's patch with a few changes to the testcases - mainly to fix resulting NPEs by coding the tests to use the proper Woden API programming model and to complete some missing tests for testGetXmlSchemaElement, testGetMessageContentModel and testGetElementDeclarations.

John Kaputin added a comment - 31/Aug/07 09:58 PM
Fixed.