Any idea how to stop the following complex type is my WSDL from creating code 
which doesn't compile ?

  <xs:complexType name="Comment">
    <xs:annotation>
      <xs:documentation>A free text comment with an optional date/time stamp 
that can be used by the operator to convey uncoded 
observations/information.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="comment" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>A free text comment that can be used by the 
operator to convey uncoded observations/information.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="value" maxOccurs="unbounded">
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="D2LogicalModel:MultiLingualString">
                    <xs:attribute name="lang" type="xs:language" />
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="commentDateTime" type="D2LogicalModel:DateTime" 
minOccurs="0" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>The date/time at which the comment was 
made.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="commentExtension" type="D2LogicalModel:ExtensionType" 
minOccurs="0" />
    </xs:sequence>
  </xs:complexType>

The code produced has a nexted Comment type inside an enclosing Comment type 
and I get the error message 'Next type Comment hides enclosing type'.

Code snipped -

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Comment", propOrder = {
    "comment",
    "commentDateTime",
    "commentExtension"
})
public class Comment {

    @XmlElement(namespace = "http://datex2.eu/schema/1_0/1_0";, required = true)
    protected Comment comment;
    @XmlElement(namespace = "http://datex2.eu/schema/1_0/1_0";)
    protected DateTime commentDateTime;
    @XmlElement(namespace = "http://datex2.eu/schema/1_0/1_0";)
    protected ExtensionType commentExtension;

....

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "value"
    })
    public static class Comment {

        @XmlElement(namespace = "http://datex2.eu/schema/1_0/1_0";, required = 
true)
        protected List<Value> value;

I can't change my wsdl because it is using a european standard XSD where the 
comment is defined. 

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems 

Atkins Highways and Transportation 
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [EMAIL PROTECTED]

www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If 
you are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in 
this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered 
in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, 
Surrey KT18 5BW. A list of wholly owned Atkins Group companies registered in 
the United Kingdom can be found at 
http://www.atkinsglobal.com/terms_and_conditions/index.aspx

Consider the environment. Please don't print this e-mail unless you really need 
to.

Reply via email to