axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Murphy <jmur...@mindreef.com>
Subject Re: axis_1.1 does not supports substitutionGroup feature of XML schema correctly
Date Mon, 02 Feb 2004 14:42:34 GMT

I can't answer all of this but perhaps provide a clue or two.  At least
something to try out!

IIRC, substitution groups only work for global element decls and maybe
global type decls but I'm a little fuzzy on that.  I noticed your
abstract types are global but your concrete type definition in local.

Try this:

Make the concrete element decl that is part of the substitution group
reference a new global type decl.

like:

<xs:element name="CreateCSAttributes" type="CreateCSAttributesType"
substitutionGroup="cai3g:CreateMODefinition"/>

and:

     <xs:complexType name="CreateCSAttributesType">
      <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>

xuliujuan wrote:

> 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