You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/02/06 02:25:51 UTC
DO NOT REPLY [Bug 26703] New: -
axis_1.1 does not supports substitutionGroup feature of XML schema correctly
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26703>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26703
axis_1.1 does not supports substitutionGroup feature of XML schema correctly
Summary: axis_1.1 does not supports substitutionGroup feature of
XML schema correctly
Product: Axis
Version: 1.1
Platform: Sun
OS/Version: Solaris
Status: NEW
Severity: Blocker
Priority: Other
Component: WSDL processing
AssignedTo: axis-dev@ws.apache.org
ReportedBy: xuliujuan@hotmail.com
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"/>
</xs:sequence>
</xs:complexType>
<xs:key name="CreateServicePackageId" id="CAI3GKey">
<xs:selector xpath="./cpm:cdsCSServicePackageId"/>
<xs:field xpath="@cdsSPId"/>
</xs:key>
<xs:keyref name="CSPIdRef" refer="cpm:CreateServicePackageId">
<xs:selector xpath="./cpm:cdsCSServicePackageId"/>
<xs:field xpath="cpm:cdsSPId"/>
</xs:keyref>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:key name="CreateCSMsg" id="CAI3GKey">
<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>
And I have tried according to Jim Murphy 's comments:
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>
But it still have differences compared to the expected xml:
and it still does not work
The actual xml we got:
<CreateMODefinition type="CreateCSAttributesType">
<cdsCSId>8888001</cdsCSId>
<cdsCSName>PreviligeCS</ns3: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>
Can someone help me to solve it?
Thanks a lot ^_^
Best wishes.
/Liujuan