Issue Details (XML | Word | Printable)

Key: WODEN-3
Type: Improvement Improvement
Status: Resolved Resolved
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

Add the component name to the Schema-1066 assertion method

Created: 23/Jan/06 08:43 PM   Updated: 06/Aug/07 11:12 AM
Return to search
Component/s: Validation
Affects Version/s: None
Fix Version/s: M8

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works patch-item-3.txt 2007-07-20 09:50 AM John Kaputin 7 kB
Text File Licensed for inclusion in ASF works WODEN 3 - patch_Message dot Properties.txt 2007-05-17 05:42 PM Sriram Rao 13 kB
Text File Licensed for inclusion in ASF works WODEN 3 - patch_WSDLDocumentValidator.txt 2007-05-17 05:42 PM Sriram Rao 4 kB
Text File Licensed for inclusion in ASF works WODEN 3 - patch_WSDLDocumentValidatorTest.txt 2007-05-17 05:42 PM Sriram Rao 4 kB
Text File Licensed for inclusion in ASF works WODEN-3_patchV2_Messages_dot_properties.txt 2007-06-13 04:19 PM John Kaputin 2 kB

Resolution Date: 06/Aug/07 11:12 AM


 Description  « Hide
The message for Schema-0016 assertion just reports the namespace URI in error. It might be more useful to report the name of the schema component as well. This could be achieved by specifying two message parameters (local name and namespace URI) and changing the testAssertionSchema0016 method in the validator to accept a QName argument rather than a namespace string. The message could then be formatted with the element or type's local name as well as its namespace URI.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Sriram Rao added a comment - 15/May/07 01:33 PM
As described in the relevant JIRA, I have modified testAssertionSchema0016 method to accept a QName instead of a namespaceURI. Within the method, I get the NameSpaceURI and the localpart from the QName supplied. The reportError will then use both the namespace and the localpart to log an error.

The error message has been modified to
"Schema-0016 = The component ''{1}'' refers to the XML Schema namespace ''{0}''. But this namespace is not available. In order to reference components from a XML Schema namespace the namespace must be imported or defined inline."

with the {1} referring to the local part and {0} referring to the namespace.

I have also modified the 2 calls to this testAssertionSchema0016 method to send QName instead of the namespaceURI.

This has not been tested this against any WSDL or a JUnit test case. I have attached the modified Class WSDLDocumentValidator and the Messages.properties files with this email.


Sriram Rao added a comment - 17/May/07 05:42 PM
John:

Attached are the patch files for the 3 code components that were changed:
Message.properties
WSDLDocumentValidator.java
WSDLDocumentValidatorTest.java

Sriram

John Kaputin added a comment - 25/May/07 01:59 PM
r541655
Assertion Schema-0016 has been removed from the WSDL2 spec, so this JIRA can be cancelled. For now, I have modified Woden by commenting out the calls for testing Schema-0016. The whole Validator and ValidatorTest code is to be re-implemented soon when a new plugin/extension mechanism is available for validation.

Arthur Ryman added a comment - 29/May/07 01:45 PM
John,

All the assertions were renamed as part of the WSDL 2.0 PR spec publication.


Arthur Ryman added a comment - 29/May/07 01:47 PM
The new number for this assertion is Schema-1066.

John - I can do a batch rename using the script. Shall I do this?

John Kaputin added a comment - 13/Jun/07 04:19 PM
Patch of the Messages.properties file with the new message required for assertion Schema-1066

John Kaputin added a comment - 09/Jul/07 12:35 PM
I used Arthur's batch script to renumber the existing WSDL assertions (WODEN-149). The classes WSDLDocumentValidator and WSDLDocumentValidatorTest must be modified to support the new message format for assertion Schema-1066 (see latest patch file for Messages.properties for new msg format). I'll ask Dan Harvey to have a go at this.

John Kaputin added a comment - 20/Jul/07 09:50 AM
Fix supplied by Dan Harvey.

John Kaputin added a comment - 20/Jul/07 11:07 AM
Dan's fix is in the file patch-item-3.txt

John Kaputin added a comment - 02/Aug/07 12:33 PM
Fix supplied by Dan, assigning JIRA to him.

John Kaputin added a comment - 06/Aug/07 11:10 AM
Changed JIRA title from Schema-0016 to Schema-1066

John Kaputin added a comment - 06/Aug/07 11:12 AM
r563107