[ 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

Reply via email to