axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "xuliujuan" <xuliuj...@hotmail.com>
Subject Re: axis_1.1 does not supports substitutionGroup feature of XML schemacorrectly
Date Tue, 03 Feb 2004 03:00:55 GMT
Hi ,
I have tried according to Jim's comments,but it still does not work
The actual xml we got:
<CreateMODefinition
xsi:type="ns3:CreateCSAttributesType"xmlns:ns3="http://schemas.ericsson.com/
snf/cpm1.0/">
     <ns3:cdsCSId>123\</ns3:cdsCSId>
     <ns3:cdsCSName>customer segment AA\</ns3:cdsCSName>
     <ns3:cdsCSDescription>pink\</ns3:cdsCSDescription>
     <ns3:cdsCSServicePackageId>
      <ns3:cdsSPId>123\</ns3:cdsSPId>
     </ns3:cdsCSServicePackageId>
</CreateMODefinition>

The expected xml should be like below in SubstituionGroup case:
<CreateCSAttributes cdsCSId="123">
    <cdsCSId>123\</cdsCSId>
    <cdsCSName>customer segment AA\</cdsCSName>
    <cdsCSDescription> pink\</cdsCSDescription>
    <cdsCSServicePackageId>
        <cdsSPId>123</cdsSPId>
    <cdsCSServicePackageId>
</CreateCSAttributes>
Could someone have more comments to solve the problem?

Thanks ^_^
/Liujuan
original Message -----
From: Jim Murphy <jmurphy@mindreef.com>
To: <axis-dev@ws.apache.org>
Sent: Monday, February 02, 2004 10:42 PM
Subject: Re: axis_1.1 does not supports substitutionGroup feature of XML
schemacorrectly


>
> 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