Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5972

missing namespace declaration - attribute present in multiple XSD's not parsed correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7.8
    • Fix Version/s: None
    • Component/s: wsdl
    • Labels:
      None
    • Environment:
      debian

      Description

      The namespace is missing. The created java File stated:

      java.lang.String tempAttribContentType = reader.getAttributeValue(null",
      "contentType");

       

      While in the wsdl we define a namespace xmlns:cr which links to an xsd in which we have:

       

      at the top:

      ...

      xmlns:xmime="http://www.w3.org/2005/05/xmlmime" version="1.0">

      <xs:import namespace="http://www.w3.org/2005/05/xmlmime"
      schemaLocation="http://www.w3.org/2005/05/xmlmime.xsd"/>

       

      and then:

      <xs:complexType name="FileRefType">
      <xs:annotation>
      <xs:documentation xml:lang="DE">.....</xs:documentation>
      </xs:annotation>
      <xs:attribute ref="xmime:contentType" use="required"/>
      <xs:attribute name="filename" type="xs:normalizedString" use="required"/>
      <xs:attribute name="hash" type="xs:normalizedString" use="required"/>
      <xs:attribute name="hashAlgo" type="juspace:HashAlgoEnum" use="required"/>
      <xs:attribute name="fileType" type="cr:FileTypeEnum" use="required"/>
      </xs:complexType>

       

      All attribute besides ref="xmime:contentType" get parsed correctly.

       

      We did a manual workaround by:
      java.lang.String tempAttribContentType = reader.getAttributeValue("http://www.w3.org/2005/05/xmlmime",
      "contentType");

       

      For a solid solution to the root cause, please make the java2wsdl robust to multiple XSD's containing equally named attributes (or maybe differing only in capitalisation).

       

      See also: https://issues.apache.org/jira/browse/AXIS2-5949

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ll Lino Lendi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: