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 12:02:50 GMT
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=3D"AbstractCreateAttributeType" abstract=3D"true"/>
<xs:element name=3D"CreateMODefinition" =
type=3D"AbstractCreateAttributeType" abstract=3D"true"/>
..



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



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