[ 
https://issues.apache.org/jira/browse/AXIS2-3159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Boyan Yurukov updated AXIS2-3159:
---------------------------------

    Description: 
I am trying to generate a web service from a wsdl that imports several schemes. 
Most of the schema types are global, but some a local. What happens is that in 
the schemes I get after the code generation, Those local types get names like 
"XXX_type0". If they are complexType, they are deleted altogether and swapped 
with references, but the type itself is not added anywhere in the schema. The 
same inconsistencies can be seen in the genereated code.

Here are some examples:

>>>>>>>>Original Schema [rs_original.xsd]
<complexType name="ResponseOptionType">
    <attribute default="RegistryObject" name="returnType">
      <simpleType>
        <restriction base="NCName">
          <enumeration value="ObjectRef"/>
          <enumeration value="RegistryObject"/>
          <enumeration value="LeafClass"/>
          <enumeration value="LeafClassWithRepositoryItem"/>
        </restriction>
      </simpleType>
    </attribute>
    <attribute default="false" name="returnComposedObjects" type="boolean"/>
  </complexType>

>>>>>>>>Axis2-generated Schema [rs_axis2-generated.xsd]
<complexType name="ResponseOptionType">
        <attribute default="RegistryObject" name="returnType">
            <simpleType name="returnType_type0">
                <restriction base="NCName">
                    <enumeration value="ObjectRef"/>
                    <enumeration value="RegistryObject"/>
                    <enumeration value="LeafClass"/>
                    <enumeration value="LeafClassWithRepositoryItem"/>
                </restriction>
            </simpleType>
        </attribute>
        <attribute default="false" name="returnComposedObjects" type="boolean"/>
    </complexType>

-------------------------------------------------------------

>>>>>>>>Original Schema [query_original.xsd]
<element name="RegistryError">
    <complexType>
      <simpleContent>
        <extension base="string">
          <attribute name="codeContext" type="string" use="required"/>
          <attribute name="errorCode" type="string" use="required"/>
          <attribute 
default="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" 
name="severity" type="rim:referenceURI" />
          <attribute name="location" type="string" use="optional"/>
        </extension>
      </simpleContent>
    </complexType>
  </element>

>>>>>>>>Axis2-generated Schema [query_axis2-generated.xsd]
<element name="RegistryError" type="tns:RegistryError_type0"/>
>>> and RegistryError_type0 is not defined anywhere


I guess that is I make all types - both simple and complex - global it would 
work, but still the schema will be still changed.


  was:
I am trying to generate a web service from a wsdl that imports several schemes. 
Most of the schema types are global, but some a local. What happens is that in 
the schemes I get after the code generation, Those local types get names like 
"XXX_type0". If they are complexType, they are deleted altogether and swapped 
with references, but the type itself is not added anywhere in the schema. The 
same inconsistencies can be seen in the genereated code.

Here are some examples:

>>>>>>>>Original Schema
<complexType name="ResponseOptionType">
    <attribute default="RegistryObject" name="returnType">
      <simpleType>
        <restriction base="NCName">
          <enumeration value="ObjectRef"/>
          <enumeration value="RegistryObject"/>
          <enumeration value="LeafClass"/>
          <enumeration value="LeafClassWithRepositoryItem"/>
        </restriction>
      </simpleType>
    </attribute>
    <attribute default="false" name="returnComposedObjects" type="boolean"/>
  </complexType>

>>>>>>>>Axis2-generated Schema
<complexType name="ResponseOptionType">
        <attribute default="RegistryObject" name="returnType">
            <simpleType name="returnType_type0">
                <restriction base="NCName">
                    <enumeration value="ObjectRef"/>
                    <enumeration value="RegistryObject"/>
                    <enumeration value="LeafClass"/>
                    <enumeration value="LeafClassWithRepositoryItem"/>
                </restriction>
            </simpleType>
        </attribute>
        <attribute default="false" name="returnComposedObjects" type="boolean"/>
    </complexType>

-------------------------------------------------------------

>>>>>>>>Original Schema
<element name="RegistryError">
    <complexType>
      <simpleContent>
        <extension base="string">
          <attribute name="codeContext" type="string" use="required"/>
          <attribute name="errorCode" type="string" use="required"/>
          <attribute 
default="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" 
name="severity" type="rim:referenceURI" />
          <attribute name="location" type="string" use="optional"/>
        </extension>
      </simpleContent>
    </complexType>
  </element>

>>>>>>>>Axis2-generated Schema
<element name="RegistryError" type="tns:RegistryError_type0"/>
>>> and RegistryError_type0 is not defined anywhere


I guess that is I make all types - both simple and complex - global it would 
work, but still the schema will be still changed.



I added a comment to each example showing from which of the attached files it 
was taken from.

> Local types in schemes not supported
> ------------------------------------
>
>                 Key: AXIS2-3159
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3159
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3, 1.2
>         Environment: Windows XP SP2, Tomcat 5.5
>            Reporter: Boyan Yurukov
>            Priority: Critical
>         Attachments: query_axis2-generated.xsd, query_original.xsd, 
> rs_axis2-generated.xsd, rs_original.xsd
>
>
> I am trying to generate a web service from a wsdl that imports several 
> schemes. Most of the schema types are global, but some a local. What happens 
> is that in the schemes I get after the code generation, Those local types get 
> names like "XXX_type0". If they are complexType, they are deleted altogether 
> and swapped with references, but the type itself is not added anywhere in the 
> schema. The same inconsistencies can be seen in the genereated code.
> Here are some examples:
> >>>>>>>>Original Schema [rs_original.xsd]
> <complexType name="ResponseOptionType">
>     <attribute default="RegistryObject" name="returnType">
>       <simpleType>
>         <restriction base="NCName">
>           <enumeration value="ObjectRef"/>
>           <enumeration value="RegistryObject"/>
>           <enumeration value="LeafClass"/>
>           <enumeration value="LeafClassWithRepositoryItem"/>
>         </restriction>
>       </simpleType>
>     </attribute>
>     <attribute default="false" name="returnComposedObjects" type="boolean"/>
>   </complexType>
> >>>>>>>>Axis2-generated Schema [rs_axis2-generated.xsd]
> <complexType name="ResponseOptionType">
>         <attribute default="RegistryObject" name="returnType">
>             <simpleType name="returnType_type0">
>                 <restriction base="NCName">
>                     <enumeration value="ObjectRef"/>
>                     <enumeration value="RegistryObject"/>
>                     <enumeration value="LeafClass"/>
>                     <enumeration value="LeafClassWithRepositoryItem"/>
>                 </restriction>
>             </simpleType>
>         </attribute>
>         <attribute default="false" name="returnComposedObjects" 
> type="boolean"/>
>     </complexType>
> -------------------------------------------------------------
> >>>>>>>>Original Schema [query_original.xsd]
> <element name="RegistryError">
>     <complexType>
>       <simpleContent>
>         <extension base="string">
>           <attribute name="codeContext" type="string" use="required"/>
>           <attribute name="errorCode" type="string" use="required"/>
>           <attribute 
> default="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error" 
> name="severity" type="rim:referenceURI" />
>           <attribute name="location" type="string" use="optional"/>
>         </extension>
>       </simpleContent>
>     </complexType>
>   </element>
> >>>>>>>>Axis2-generated Schema [query_axis2-generated.xsd]
> <element name="RegistryError" type="tns:RegistryError_type0"/>
> >>> and RegistryError_type0 is not defined anywhere
> I guess that is I make all types - both simple and complex - global it would 
> work, but still the schema will be still changed.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to