You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-dev@ws.apache.org by ws...@ws.apache.org on 2004/10/08 06:21:51 UTC
[jira] Commented: (WSIF-65) wrong namespace for element's type in schema.ElementType
The following comment has been added to this issue:
Author: Jeff Greif
Created: Thu, 7 Oct 2004 9:19 PM
Body:
Probably in some future version of wsif, most of the schema package should be replaced by the use of the org.apache.xerces.xs stuff as specified in http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040122/ since it will probably be better supported over the long term and will represent a reference implementation of this api.
Jeff
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/WSIF-65?page=comments#action_53822
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/WSIF-65
Here is an overview of the issue:
---------------------------------------------------------------------
Key: WSIF-65
Summary: wrong namespace for element's type in schema.ElementType
Type: Bug
Status: Unassigned
Priority: Major
Project: Axis-WSIF
Components:
Basic Architecture
Versions:
current (nightly)
Assignee:
Reporter: Jeff Greif
Created: Thu, 7 Oct 2004 9:08 PM
Updated: Thu, 7 Oct 2004 9:19 PM
Environment: Windows 2000 SP4, WSIF 2.0 and later, Java jdk 1.4.2_05
Description:
Considering this schema found in a wsdl <types> section
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="something" elementFormDefault="qualified">
<element name="foo" type="string">
</schema>
you can see immediately that these lines from the org.apache.wsif.schema.ElementType constructor contain an error:
ElementType(Element el, String tns) {
elementType = getAttributeQName(el, "type", tns);
typeName = getAttributeQName(el, "name", tns);
Passing tns to serve as the default namespace for the element name attribute is correct, since only the local name is specified there, and the element is defined in the target namespace.
However, it is incorrect to pass tns to the extractor of the QName for the type attribute. In the example, the default namespace is the XSD namespace. The 2nd line of the code snippet above will incorrectly get the type of element foo as "tns:string".
The code should be replaced by
ElementType(Element el, String tns) {
elementType = getAttributeQName(el, "type", getDefaultNamespace(el));
typeName = getAttributeQName(el, "name", tns);
where the appropriate getDefaultNamespace(org.w3c.dom.Node) function needs to be provided. This could walk up from the current node toward the document root looking for the first xmlns="..." attribute and extracting its value. Presumably one of the jars on which wsif depends contains such a function.
---------------------------------------------------------------------
JIRA INFORMATION:
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