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:09:51 UTC

[jira] Created: (WSIF-65) wrong namespace for element's type in schema.ElementType

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
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:08 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


[jira] Closed: (WSIF-65) wrong namespace for element's type in schema.ElementType

Posted by "Aleksander Slominski (JIRA)" <ws...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/WSIF-65?page=all ]
     
Aleksander Slominski closed WSIF-65:
------------------------------------


I think all is now applied as part of  (WSIF-68) "schema parsing incorrect/incomplete for <element>"?
http://issues.apache.org/jira/browse/WSIF-68?page=all

> wrong namespace for element's type in schema.ElementType
> --------------------------------------------------------
>
>          Key: WSIF-65
>          URL: http://issues.apache.org/jira/browse/WSIF-65
>      Project: Axis-WSIF
>         Type: Bug
>   Components: Basic Architecture
>     Versions: current (nightly)
>  Environment: Windows 2000 SP4, WSIF 2.0 and later, Java jdk 1.4.2_05
>     Reporter: Jeff Greif
>     Assignee: Aleksander Slominski

>
> 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.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (WSIF-65) wrong namespace for element's type in schema.ElementType

Posted by ws...@ws.apache.org.
The following comment has been added to this issue:

     Author: Jeff Greif
    Created: Sun, 10 Oct 2004 1:58 PM
       Body:
There is a simpler fix than the previously proposed one:

    ElementType(Element el, String tns) {
    	elementType = getAttributeQName(el, "type");
        typeName = getAttributeQName(el, "name", tns);

For getting the type attribute, just use the 2-arg form of getAttributeQName.  It does the right thing to find the default namespace using DOMUtils.getNamespaceURIFromPrefix.


---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/WSIF-65?page=comments#action_53874

---------------------------------------------------------------------
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: Sun, 10 Oct 2004 1:58 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


[jira] Resolved: (WSIF-65) wrong namespace for element's type in schema.ElementType

Posted by "Aleksander Slominski (JIRA)" <ws...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/WSIF-65?page=all ]
     
Aleksander Slominski resolved WSIF-65:
--------------------------------------

    Resolution: Fixed
     Assign To: Aleksander Slominski

I think all is now applied as part of  (WSIF-68) "schema parsing incorrect/incomplete for <element>"?
http://issues.apache.org/jira/browse/WSIF-68?page=all


> wrong namespace for element's type in schema.ElementType
> --------------------------------------------------------
>
>          Key: WSIF-65
>          URL: http://issues.apache.org/jira/browse/WSIF-65
>      Project: Axis-WSIF
>         Type: Bug
>   Components: Basic Architecture
>     Versions: current (nightly)
>  Environment: Windows 2000 SP4, WSIF 2.0 and later, Java jdk 1.4.2_05
>     Reporter: Jeff Greif
>     Assignee: Aleksander Slominski

>
> 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.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (WSIF-65) wrong namespace for element's type in schema.ElementType

Posted by ws...@ws.apache.org.
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