axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuliujuan" <xuliuj...@hotmail.com>
Subject axis_1.1 does not supports substitutionGroup feature of XML schema correctly
Date Mon, 02 Feb 2004 10:18:17 GMT

----- Original Message ----- 
From: xuliujuan 
To: axis-dev@ws.apache.org 
Sent: Monday, February 02, 2004 6:00 PM
Subject: axis_1.1 does not supports substitutionGroup feature of XML schema correctly


Hi all,
I found axis_1.1  does not supports substitutionGroup feature of XML schema correctly.While
I using substitutionGroup ,it does
not work .

in Generic schema definition is:
...
<xs:complexType name="AbstractCreateAttributeType" abstract="true"/>
<xs:element name="CreateMODefinition" type="AbstractCreateAttributeType" abstract="true"/>
...

 

substutionGroup element schema definition is:
...
<xs:element name="CreateCSAttributes" substitutionGroup="cai3g:CreateMODefinition">
  <xs:annotation>
   <xs:documentation>The attributes for creating customer segment</xs:documentation>
  </xs:annotation>
  <xs:complexType>
   <xs:complexContent>
    <xs:extension base="cai3g:AbstractCreateAttributeType">
     <xs:sequence>
      <xs:element name="cdsCSId" type="xs:unsignedLong"/>
      <xs:element name="cdsCSName" type="xs:string" minOccurs="0"/>
      <xs:element name="cdsCSDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="cdsCSServicePackageId" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
        <xs:sequence>
         <xs:element name="cdsSPId" type="xs:unsignedLong"/>
        </xs:sequence>
        <xs:attribute name="cdsSPId" type="xs:unsignedLong" use="required"/>
       </xs:complexType>
       <xs:key name="CreateServicePackageId" id="CAI3GKeyCreateServicePackageId">
        <xs:selector xpath="."/>
        <xs:field xpath="@cdsSPId"/>
       </xs:key>
       <xs:keyref name="CSPIdRef" refer="cpm:CreateServicePackageId">
        <xs:selector xpath="."/>
        <xs:field xpath="cpm:cdsSPId"/>
       </xs:keyref>
      </xs:element>
     </xs:sequence>
     <xs:attribute name="cdsCSId" type="xs:unsignedLong" use="required"/>
    </xs:extension>
   </xs:complexContent>
  </xs:complexType>
  <xs:key name="CreateCSMsg" id="CAI3GKeyCreateCSMsg">
   <xs:selector xpath="."/>
   <xs:field xpath="@cdsCSId"/>
  </xs:key>
  <xs:keyref name="CCSMsgRef" refer="cpm:CreateCSMsg">
   <xs:selector xpath="."/>
   <xs:field xpath="cpm:cdsCSId"/>
  </xs:keyref>
 </xs:element>
...

The actual xml we got:

 

                   <CreateMODefinition>
                     <cdsCSId>8888001</cdsCSId>
                     <cdsCSName>PreviligeCS</cdsCSName>
                     <cdsCSDescription> Previlige Customers</cdsCSDescription>
                     <cdsCSServicePackageId>
                          <cdsSPId>8888001</cdsSPId>
                     <cdsCSServicePackageId>
                   </CreateMODefinition>
           

 

The expected xml should be like below in SubstituionGroup case:

 
                   <CreateCSAttributes cdsCSId="8888001">
                     <cdsCSId>8888001</cdsCSId>
                     <cdsCSName>PreviligeCS</cdsCSName>
                     <cdsCSDescription> Previlige Customers</cdsCSDescription>
                     <cdsCSServicePackageId>
                          <cdsSPId>8888001</cdsSPId>
                     <cdsCSServicePackageId>
                   </CreateCSAttributes>
           


axis_1.1  does not supports substitutionGroup feature of XML schema correctly
 
in Generic schema definition is:
...
<xs:complexType name="AbstractCreateAttributeType" abstract="true"/>
<xs:element name="CreateMODefinition" type="AbstractCreateAttributeType" abstract="true"/>
...

 

substutionGroup element schema definition is:
...
<xs:element name="CreateCSAttributes" substitutionGroup="cai3g:CreateMODefinition">
  <xs:annotation>
   <xs:documentation>The attributes for creating customer segment</xs:documentation>
  </xs:annotation>
  <xs:complexType>
   <xs:complexContent>
    <xs:extension base="cai3g:AbstractCreateAttributeType">
     <xs:sequence>
      <xs:element name="cdsCSId" type="xs:unsignedLong"/>
      <xs:element name="cdsCSName" type="xs:string" minOccurs="0"/>
      <xs:element name="cdsCSDescription" type="xs:string" minOccurs="0"/>
      <xs:element name="cdsCSServicePackageId" minOccurs="0" maxOccurs="unbounded">
       <xs:complexType>
        <xs:sequence>
         <xs:element name="cdsSPId" type="xs:unsignedLong"/>
        </xs:sequence>
        <xs:attribute name="cdsSPId" type="xs:unsignedLong" use="required"/>
       </xs:complexType>
       <xs:key name="CreateServicePackageId" id="CAI3GKeyCreateServicePackageId">
        <xs:selector xpath="."/>
        <xs:field xpath="@cdsSPId"/>
       </xs:key>
       <xs:keyref name="CSPIdRef" refer="cpm:CreateServicePackageId">
        <xs:selector xpath="."/>
        <xs:field xpath="cpm:cdsSPId"/>
       </xs:keyref>
      </xs:element>
     </xs:sequence>
     <xs:attribute name="cdsCSId" type="xs:unsignedLong" use="required"/>
    </xs:extension>
   </xs:complexContent>
  </xs:complexType>
  <xs:key name="CreateCSMsg" id="CAI3GKeyCreateCSMsg">
   <xs:selector xpath="."/>
   <xs:field xpath="@cdsCSId"/>
  </xs:key>
  <xs:keyref name="CCSMsgRef" refer="cpm:CreateCSMsg">
   <xs:selector xpath="."/>
   <xs:field xpath="cpm:cdsCSId"/>
  </xs:keyref>
 </xs:element>
...

The actual xml we got:

 

                   <CreateMODefinition>
                     <cdsCSId>8888001</cdsCSId>
                     <cdsCSName>PreviligeCS</cdsCSName>
                     <cdsCSDescription> Previlige Customers</cdsCSDescription>
                     <cdsCSServicePackageId>
                          <cdsSPId>8888001</cdsSPId>
                     <cdsCSServicePackageId>
                   </CreateMODefinition>
           

 

The expected xml should be like below in SubstituionGroup case:

 
                   <CreateCSAttributes cdsCSId="8888001">
                     <cdsCSId>8888001</cdsCSId>
                     <cdsCSName>PreviligeCS</cdsCSName>
                     <cdsCSDescription> Previlige Customers</cdsCSDescription>
                     <cdsCSServicePackageId>
                          <cdsSPId>8888001</cdsSPId>
                     <cdsCSServicePackageId>
                   </CreateCSAttributes>

 But I did not know how to solve the problem.
 Can someone help me to solve it?
 Thanks a lot .
 
 Best wishes.
/Liujuan

 

Mime
View raw message