Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » XSD » Problem with attributeGroups
Problem with attributeGroups [message #718124] Tue, 23 August 2011 10:28
Paul Cooper is currently offline Paul CooperFriend
Messages: 11
Registered: July 2009
Junior Member
I've hit a problem with referencing attributeGroup constructs across namespaces within an inheritance hierarchy. I'm getting the following error message: "The attribute 'http://ns3#problemAttribute' must present as in the base" at line 7 and column 10 of my sample WSDL document.

I hit this problem with a complicated WSDL document from the finance industry, the sample below is what remains after my attempts to simplify the recreate as far as possible. It sill involves several namespaces though.

I'm using XSD 2.6.1, but I've recreated the issue with XSD 2.7.

I can't see any reason for the schemas to be invalid, and if I replace the attributeGroup reference at line 20 with the equivalent attribute currently commented out at line 21, then everything works as expected. So the problem seems to be specifically with attributeGroups. I may of course have done something silly, but I've not found anything in the schema specification to explain this behaviour.

Any assistance will be appreciated!



<?xml version="1.0" encoding="ISO-8859-1"?>
<wsdl:definitions xmlns:xs="" xmlns:wsdl="" xmlns:soap="" xmlns:ns3="http://ns3" xmlns:ns2="http://ns2" xmlns:ns1="http://ns1" targetNamespace="http://ns1">
      <xs:schema targetNamespace="http://ns1">
         <xs:import namespace="http://ns2"/>
         <xs:element name="tagName" type="ns1:tagNameType"/>
         <xs:complexType name="tagNameType">
               <xs:extension base="ns2:tagNameBaseType"/>
      <xs:schema targetNamespace="http://ns2">
         <xs:import namespace="http://ns3"/>

         <xs:complexType name="rootType"/>
         <xs:complexType name="tagNameBaseType">
               <xs:extension base="ns2:rootType">
                  <xs:attributeGroup ref="ns3:otherAttrGroup"/>
                  <!--  <xs:attribute ref="ns3:problemAttribute"/> -->
      <xs:schema targetNamespace="http://ns3">
         <xs:attributeGroup name="otherAttrGroup">
            <xs:attribute ref="ns3:problemAttribute"/>
         <xs:attribute name="problemAttribute" type="xs:string"/>
   <wsdl:message name="message">
      <wsdl:part element="ns1:tagName"/>
   <wsdl:portType name="PortType">
      <wsdl:operation name="operationName">
         <wsdl:input message="ns1:message"/>
   <wsdl:binding name="BindingName" type="ns1:PortType">
      <soap:binding style="document" transport=""/>
      <wsdl:operation name="operationName">
            <soap:body parts="messagepart" use="literal"/>
Previous Topic:XSD Complex Type Inheritance
Next Topic:Rstricting Content of multiple nodes
Goto Forum:

Current Time: Thu Feb 20 12:06:21 GMT 2020

Powered by FUDForum. Page generated in 0.02681 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top