Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » CVC-complex-type.5.2 error message that nobody seems to be able to understand...(I'm getting an error in Eclipse Indigo when trying to import a WSDL file: cvc-complex-type.5.2: In element 'wsp:Policy', attribute 'Id' is a Wild ID. But there is already an attribute 'Id' derived fro)
CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #720955] Wed, 31 August 2011 10:39 Go to next message
caseyburk is currently offline caseyburk
Messages: 5
Registered: July 2011
Junior Member
I'm trying to import a WSDL file into a project (Eclipse Indigo / Dynamic Web Project) but keep receiving an error indicator next to the "wsp:Policy" line of the WSDL file:

Quote:
cvc-complex-type.5.2: In element 'wsp:Policy', attribute 'Id' is a Wild ID. But there is already an attribute 'Id' derived from ID among the {attribute uses}.


Here's the code of my WSDL file:

<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions xmlns:soap="http: //schemas.xmlsoap.org/wsdl/soap/" 
	xmlns:tns="http: //www.education.edu/department/client/MemberCheck" 
	xmlns:xsd="http: //www.w3.org/2001/XMLSchema" 
	xmlns:wsdl="http: //schemas.xmlsoap.org/wsdl/" 
	xmlns:wsp="http: //schemas.xmlsoap.org/ws/2002/12/policy" 
	xmlns:wsu="http: //docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
	targetNamespace="http: //www.education.edu/department/client/MemberCheck" name="MemberCheck">
  <wsp:UsagePolicy wsdl:Required="true" />
  <wsdl:types>
    <xsd:schema xmlns:tns="http: //www.education.edu/department/client/MemberCheck" 
    	xmlns:xsd="http: //www.w3.org/2001/XMLSchema" 
    	version="1.0" 
    	targetNamespace="http: //www.education.edu/department/client/MemberCheck">
      <xsd:element name="checkMemberRequest" type="tns:checkMemberRequest" />
      <xsd:element name="checkMemberResponse" type="tns:checkMemberResponse" />
      <xsd:complexType name="checkMemberRequest">
        <xsd:sequence>
          <xsd:choice>
            <xsd:element name="memberId" type="xsd:string" />
            <xsd:element name="memberMatch" type="tns:memberMatch" />
          </xsd:choice>
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="memberMatch">
        <xsd:sequence>
          <xsd:element name="dateOfBirth" type="xsd:date" minOccurs="0" />
          <xsd:element name="degree" type="xsd:string" minOccurs="0" />
          <xsd:element name="yearGraduated" type="xsd:string" minOccurs="0" />
          <xsd:element name="firstYearAttended" type="xsd:string" minOccurs="0" />
          <xsd:element name="lastYearAttended" type="xsd:string" minOccurs="0" />
          <xsd:element name="ssnLast4" type="xsd:string" minOccurs="0" />
          <xsd:element name="previousSchool" type="xsd:string" minOccurs="0" />
          <xsd:element name="memberId" type="xsd:string" minOccurs="0" />
          <xsd:element name="firstName" type="xsd:string" minOccurs="0" />
          <xsd:element name="lastName" type="xsd:string" minOccurs="0" />
          <xsd:element name="middleName" type="xsd:string" minOccurs="0" />
          <xsd:element name="custom" type="tns:customData" minOccurs="0" maxOccurs="unbounded" />
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="customData">
        <xsd:sequence>
          <xsd:element name="name" type="xsd:string" />
          <xsd:element name="value" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="checkMemberResponse">
        <xsd:sequence>
          <xsd:element name="memberId" type="xsd:string" minOccurs="0" />
          <xsd:element name="memberStatus" type="tns:memberStatus" />
          <xsd:element name="memberStatusMessage" type="xsd:string" />
          <xsd:element name="ude" type="tns:userDefinedExtension" minOccurs="0" />
        </xsd:sequence>
      </xsd:complexType>
      <xsd:simpleType name="memberStatus">
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="NOMATCH" />
          <xsd:enumeration value="TRAP" />
          <xsd:enumeration value="OK" />
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:complexType name="userDefinedExtension">
        <xsd:sequence>
          <xsd:any namespace="##other" processContents="lax"/>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="checkMemberRequest">
    <wsdl:part name="parameters" element="tns:checkMemberRequest" />
  </wsdl:message>
  <wsdl:message name="checkMemberResponse">
    <wsdl:part name="parameters" element="tns:checkMemberResponse" />
  </wsdl:message>
  <wsdl:portType name="MemberCheck">
    <wsdl:operation name="checkMember">
      <wsdl:input message="tns:checkMemberRequest" />
      <wsdl:output message="tns:checkMemberResponse" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="MemberCheckPortBinding" type="tns:MemberCheck">
    <soap:binding transport="http: //schemas.xmlsoap.org/soap/http"
    style="document" />
    <wsdl:operation name="checkMember">
      <soap:operation soapAction="" style="document" />
      <wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordOptional">
        <wsp:ExactlyOne>
          <wsp:All>
            <wsse:SecurityToken wsp:Usage="wsp:Required"
            xmlns:wsse="http: //docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
              <wsse:TokenType>wsse:UserNameToken</wsse:TokenType>
              <Claims>
                <SubjectName MatchType="wsse:Exact" />
                <UsePassword wsp:Usage="wsp:Optional" />
              </Claims>
            </wsse:SecurityToken>
          </wsp:All>
        </wsp:ExactlyOne>
      </wsp:Policy>
      <wsdl:input>
        <soap:body encodingStyle="http: //schemas.xmlsoap.org/soap/encoding/" use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body encodingStyle="http: //schemas.xmlsoap.org/soap/encoding/" use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="MemberCheck">
    <wsdl:port name="MemberCheckPort" binding="tns:MemberCheckPortBinding">
      <soap:address location="http: //www.education.edu:9999/department/client/MemberCheck" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


Again, I think the culprit code in question here is the following line:
<wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordOptional">

I'm not sure what's causing this, but for whatever it's worth, it seems that the people I've consulted about it believes that there's something involved here that coincides with either the version of DTD / schema being used or something else to do with implied arguments that are defined in said DTDs as originally expecting a fewer amount of parameters.

Anyway, if someone could help me out with this, I'd be forever in your debt.

(Note that the definitions of schema / DTDs, etc. have a space character between the colon and the first slash of the URI. I did this due to how this bulletin board thought I was trying to post spam.)
Re: CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #720972 is a reply to message #720955] Wed, 31 August 2011 11:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25747
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Casey,<br>
<br>
My guess would be that the XML Schema definition for Policy
element's complex type already defines an attribute called "Id"
that's meant to be the ID for that type.  It likely also defines a
wildcard that allows you to include attributes from other
namespaces, so superficially, wsu:Id would seem like a valid thing
to include. <br>
<blockquote>wsu:Id="UsernameTokenSecurityPolicyPasswordOptional"<br>
</blockquote>
But, it's not valid for there to be more than one ID so the
validator isn't happy you're using a ID attribute from some other
namespace.  Why don't you use this?<br>
<blockquote>Id="UsernameTokenSecurityPolicyPasswordOptional"<br>
</blockquote>
<br>
On 31/08/2011 7:39 AM, caseyburk wrote:
<blockquote cite="mid:j3lgei$jme$1@news.eclipse.org" type="cite">I'm
trying to import a WSDL file into a project (Eclipse Indigo /
Dynamic Web Project) but keep receiving an error indicator next to
the "wsp:Policy" line of the WSDL file:
<br>
<br>
Quote:
<br>
<blockquote type="cite">cvc-complex-type.5.2: In element
'wsp:Policy', attribute 'Id' is a Wild ID. But there is already
an attribute 'Id' derived from ID among the {attribute uses}.
<br>
</blockquote>
<br>
<br>
Here's the code of my WSDL file:
<br>
<br>
&lt;?xml version='1.0' encoding='UTF-8'?&gt;
<br>
&lt;wsdl:definitions xmlns:soap=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/wsdl/soap/">"http:
//schemas.xmlsoap.org/wsdl/soap/"</a>     xmlns:tns=<a class="moz-txt-link-rfc2396E" href="http://www.education.edu/department/client/MemberCheck">"http:
//www.education.edu/department/client/MemberCheck"</a>
    xmlns:xsd="http: //www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http: //schemas.xmlsoap.org/wsdl/"
    xmlns:wsp="http: //schemas.xmlsoap.org/ws/2002/12/policy"
    xmlns:wsu=<a class="moz-txt-link-rfc2396E" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">"http:
//docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"</a><br>
    targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.education.edu/department/client/MemberCheck">"http:
//www.education.edu/department/client/MemberCheck"</a>
name="MemberCheck"&gt;
<br>
 &lt;wsp:UsagePolicy wsdl:Required="true" /&gt;
<br>
 &lt;wsdl:types&gt;
<br>
   &lt;xsd:schema xmlns:tns=<a class="moz-txt-link-rfc2396E" href="http://www.education.edu/department/client/MemberCheck">"http:
//www.education.edu/department/client/MemberCheck"</a>       
xmlns:xsd="http: //www.w3.org/2001/XMLSchema"        version="1.0"
       targetNamespace=<a class="moz-txt-link-rfc2396E" href="http://www.education.edu/department/client/MemberCheck">"http:
//www.education.edu/department/client/MemberCheck"</a>&gt;
<br>
     &lt;xsd:element name="checkMemberRequest"
type="tns:checkMemberRequest" /&gt;
<br>
     &lt;xsd:element name="checkMemberResponse"
type="tns:checkMemberResponse" /&gt;
<br>
     &lt;xsd:complexType name="checkMemberRequest"&gt;
<br>
       &lt;xsd:sequence&gt;
<br>
         &lt;xsd:choice&gt;
<br>
           &lt;xsd:element name="memberId" type="xsd:string" /&gt;
<br>
           &lt;xsd:element name="memberMatch"
type="tns:memberMatch" /&gt;
<br>
         &lt;/xsd:choice&gt;
<br>
       &lt;/xsd:sequence&gt;
<br>
     &lt;/xsd:complexType&gt;
<br>
     &lt;xsd:complexType name="memberMatch"&gt;
<br>
       &lt;xsd:sequence&gt;
<br>
         &lt;xsd:element name="dateOfBirth" type="xsd:date"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="degree" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="yearGraduated" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="firstYearAttended"
type="xsd:string" minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="lastYearAttended" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="ssnLast4" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="previousSchool" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="memberId" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="firstName" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="lastName" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="middleName" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="custom" type="tns:customData"
minOccurs="0" maxOccurs="unbounded" /&gt;
<br>
       &lt;/xsd:sequence&gt;
<br>
     &lt;/xsd:complexType&gt;
<br>
     &lt;xsd:complexType name="customData"&gt;
<br>
       &lt;xsd:sequence&gt;
<br>
         &lt;xsd:element name="name" type="xsd:string" /&gt;
<br>
         &lt;xsd:element name="value" type="xsd:string" /&gt;
<br>
       &lt;/xsd:sequence&gt;
<br>
     &lt;/xsd:complexType&gt;
<br>
     &lt;xsd:complexType name="checkMemberResponse"&gt;
<br>
       &lt;xsd:sequence&gt;
<br>
         &lt;xsd:element name="memberId" type="xsd:string"
minOccurs="0" /&gt;
<br>
         &lt;xsd:element name="memberStatus"
type="tns:memberStatus" /&gt;
<br>
         &lt;xsd:element name="memberStatusMessage"
type="xsd:string" /&gt;
<br>
         &lt;xsd:element name="ude"
type="tns:userDefinedExtension" minOccurs="0" /&gt;
<br>
       &lt;/xsd:sequence&gt;
<br>
     &lt;/xsd:complexType&gt;
<br>
     &lt;xsd:simpleType name="memberStatus"&gt;
<br>
       &lt;xsd:restriction base="xsd:string"&gt;
<br>
         &lt;xsd:enumeration value="NOMATCH" /&gt;
<br>
         &lt;xsd:enumeration value="TRAP" /&gt;
<br>
         &lt;xsd:enumeration value="OK" /&gt;
<br>
       &lt;/xsd:restriction&gt;
<br>
     &lt;/xsd:simpleType&gt;
<br>
     &lt;xsd:complexType name="userDefinedExtension"&gt;
<br>
       &lt;xsd:sequence&gt;
<br>
         &lt;xsd:any namespace="##other"
processContents="lax"/&gt;
<br>
       &lt;/xsd:sequence&gt;
<br>
     &lt;/xsd:complexType&gt;
<br>
   &lt;/xsd:schema&gt;
<br>
 &lt;/wsdl:types&gt;
<br>
 &lt;wsdl:message name="checkMemberRequest"&gt;
<br>
   &lt;wsdl:part name="parameters"
element="tns:checkMemberRequest" /&gt;
<br>
 &lt;/wsdl:message&gt;
<br>
 &lt;wsdl:message name="checkMemberResponse"&gt;
<br>
   &lt;wsdl:part name="parameters"
element="tns:checkMemberResponse" /&gt;
<br>
 &lt;/wsdl:message&gt;
<br>
 &lt;wsdl:portType name="MemberCheck"&gt;
<br>
   &lt;wsdl:operation name="checkMember"&gt;
<br>
     &lt;wsdl:input message="tns:checkMemberRequest" /&gt;
<br>
     &lt;wsdl:output message="tns:checkMemberResponse" /&gt;
<br>
   &lt;/wsdl:operation&gt;
<br>
 &lt;/wsdl:portType&gt;
<br>
 &lt;wsdl:binding name="MemberCheckPortBinding"
type="tns:MemberCheck"&gt;
<br>
   &lt;soap:binding transport=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/http">"http:
//schemas.xmlsoap.org/soap/http"</a>
<br>
   style="document" /&gt;
<br>
   &lt;wsdl:operation name="checkMember"&gt;
<br>
     &lt;soap:operation soapAction="" style="document" /&gt;
<br>
     &lt;wsp:Policy
wsu:Id="UsernameTokenSecurityPolicyPasswordOptional"&gt;
<br>
       &lt;wsp:ExactlyOne&gt;
<br>
         &lt;wsp:All&gt;
<br>
           &lt;wsse:SecurityToken wsp:Usage="wsp:Required"
<br>
           xmlns:wsse=<a class="moz-txt-link-rfc2396E" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">"http:
//docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"</a>&gt;<br>
            
&lt;wsse:TokenType&gt;wsse:UserNameToken&lt;/wsse:TokenType&gt;
<br>
             &lt;Claims&gt;
<br>
               &lt;SubjectName MatchType="wsse:Exact" /&gt;
<br>
               &lt;UsePassword wsp:Usage="wsp:Optional" /&gt;
<br>
             &lt;/Claims&gt;
<br>
           &lt;/wsse:SecurityToken&gt;
<br>
         &lt;/wsp:All&gt;
<br>
       &lt;/wsp:ExactlyOne&gt;
<br>
     &lt;/wsp:Policy&gt;
<br>
     &lt;wsdl:input&gt;
<br>
       &lt;soap:body encodingStyle=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/encoding/">"http:
//schemas.xmlsoap.org/soap/encoding/"</a> use="literal" /&gt;
<br>
     &lt;/wsdl:input&gt;
<br>
     &lt;wsdl:output&gt;
<br>
       &lt;soap:body encodingStyle=<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/soap/encoding/">"http:
//schemas.xmlsoap.org/soap/encoding/"</a> use="literal" /&gt;
<br>
     &lt;/wsdl:output&gt;
<br>
   &lt;/wsdl:operation&gt;
<br>
 &lt;/wsdl:binding&gt;
<br>
 &lt;wsdl:service name="MemberCheck"&gt;
<br>
   &lt;wsdl:port name="MemberCheckPort"
binding="tns:MemberCheckPortBinding"&gt;
<br>
     &lt;soap:address location=<a class="moz-txt-link-rfc2396E" href="http://www.education.edu:9999/department/client/MemberCheck">"http:
//www.education.edu:9999/department/client/MemberCheck"</a> /&gt;
<br>
   &lt;/wsdl:port&gt;
<br>
 &lt;/wsdl:service&gt;
<br>
&lt;/wsdl:definitions&gt;
<br>
<br>
Again, I think the culprit code in question here is the following
line: &lt;wsp:Policy
wsu:Id="UsernameTokenSecurityPolicyPasswordOptional"&gt;
<br>
<br>
I'm not sure what's causing this, but for whatever it's worth, it
seems that the people I've consulted about it believes that
there's something involved here that coincides with either the
version of DTD / schema being used or something else to do with
implied arguments that are defined in said DTDs as originally
expecting a fewer amount of parameters.
<br>
<br>
Anyway, if someone could help me out with this, I'd be forever in
your debt.
<br>
<br>
(Note that the definitions of schema / DTDs, etc. have a space
character between the colon and the first slash of the URI. I did
this due to how this bulletin board thought I was trying to post
spam.)
<br>
</blockquote>
</body>
</html>
Re: CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #720992 is a reply to message #720972] Wed, 31 August 2011 12:14 Go to previous messageGo to next message
caseyburk is currently offline caseyburk
Messages: 5
Registered: July 2011
Junior Member
Thanks for the insight, Ed, but bear with me here: are you trying to say that adding / removing one of the WSDL definitions inside the definitions element (see top of code) will fix this? If so, which one should I remove?

I guess I'm confused about figuring out which parameters are expected and understanding how exactly one figures this out using the definitions declared in the definitions element. Do you do this by viewing the attributes of each element to see which name space they belong to within the definitions element and then proceed to look that given element up in the name space document or is there something more to it than that?

Sorry for the verbose response. I just want to make sure I understand what you're saying here.
Re: CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #721020 is a reply to message #720992] Wed, 31 August 2011 13:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25747
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Casey,<br>
<br>
Comments below.<br>
<br>
On 31/08/2011 9:14 AM, caseyburk wrote:
<blockquote cite="mid:j3llvq$ptf$1@news.eclipse.org" type="cite">Thanks
for the insight, Ed, but bear with me here: are you trying to say
that adding / removing one of the WSDL definitions inside the
definitions element (see top of code) will fix this?</blockquote>
Keep in mind that I'm not expert on WSDL nor on all this SOAP
stuff.  But no, I'm not suggesting removing any definitions.<br>
<br>
<blockquote cite="mid:j3llvq$ptf$1@news.eclipse.org" type="cite"> If
so, which one should I remove? <br>
I guess I'm confused about figuring out which parameters are
expected and understanding how exactly one figures this out using
the definitions declared in the definitions element. </blockquote>
You'd really need to see all the schemas involved but XML Schema is
horribly unreadable.<br>
<blockquote cite="mid:j3llvq$ptf$1@news.eclipse.org" type="cite">Do
you do this by viewing the attributes of each element to see which
name space they belong to within the definitions element and then
proceed to look that given element up in the name space document
or is there something more to it than that?
<br>
<br>
Sorry for the verbose response. I just want to make sure I
understand what you're saying here.
<br>
</blockquote>
<br>
I see the schema has this:<br>
<br>
&lt;xs:element name="Policy" type="wsp:PolicyExpression"/&gt;<br>
&lt;xs:complexType name="PolicyExpression"&gt;<br>
&lt;xs:group ref="wsp:CompositorContent" minOccurs="0"
maxOccurs="unbounded"/&gt;<br>
&lt;xs:attribute name="Name" type="xs:NCName" use="optional"/&gt;<br>
&lt;xs:attribute name="TargetNamespace" type="xs:anyURI"
use="optional"/&gt;<br>
<b>&lt;xs:attribute ref="wsu:Id" use="optional"/&gt;</b><br>
&lt;xs:anyAttribute namespace="##any" processContents="lax"/&gt;<br>
&lt;/xs:complexType&gt;<br>
<br>
It also has an import of
<a class="moz-txt-link-rfc2396E" href="http://schemas.xmlsoap.org/ws/2002/07/utility">"http://schemas.xmlsoap.org/ws/2002/07/utility"</a> so it declares there
can be an Id attribute with that as this namespace because the
schema for that has:<br>
<br>
&lt;xsd:attribute name="Id"
type="xsd:ID"&gt;&lt;xsd:annotation&gt;&lt;xsd:documentation&gt;This
global attribute supports annotating arbitrary elements with an ID.<br>
         
&lt;/xsd:documentation&gt;&lt;/xsd:annotation&gt;&lt;/xsd:attribute&gt;<br>
<br>
There's also a wildcard (xs:anyAttribute) that allows anything... <br>
<br>
In your instance you have wsu:Id but the namespace you've defined
for it is
<a class="moz-txt-link-freetext" href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a>. 
That schema does also define Id<br>
<br>
&lt;xsd:attribute name="Id"
type="xsd:ID"&gt;&lt;xsd:annotation&gt;&lt;xsd:documentation&gt;<br>
This global attribute supports annotating arbitrary elements with an
ID.<br>
         
&lt;/xsd:documentation&gt;&lt;/xsd:annotation&gt;&lt;/xsd:attribute&gt;<br>
<br>
But it's<b> a different Id</b> from a different namespace and XML
isn't happy about allow an ID as part of the wildcard attributes
when there is a ID already defined in the none wilcard content.<br>
<br>
None of this is really a question about the XSD model itself, so I
should be sending you elsewhere for answers...<br>
</body>
</html>
Re: CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #721316 is a reply to message #721020] Thu, 01 September 2011 08:52 Go to previous messageGo to next message
caseyburk is currently offline caseyburk
Messages: 5
Registered: July 2011
Junior Member
Thanks for your feedback and patience, Ed.

I think the team I work with was finally able to resolve this immediate issue (at least as far as we know so far). It turned out that the policy element we were using was referencing an older ws-policy schema, one from 2002 (see xmlns:wsp="http: //schemas.xmlsoap.org/ws/2002/12/policy").

Now granted, this wasn't really the issue with all this to begin with because like you implied, the duplicity revolving around what was implied with that "Id" parameter was the real culprit in all this (or so I think), but in order to get past that, we had to change the how it was resolved by finding a better "wsp reference". So with all that being said, we changed the "xmlns:wsp" reference to "http: //www.w3.org/ns/ws-policy" inside the definitions element toward the top of the file. This allowed us to successfully import the WSDL into Eclipse without error.

(I hope this helps someone in the future. It's pretty gross when you realize that there's almost no documentation about this specific occurrence when you're in this hole! For everyone: feel free to PM me if you happen to come across this page and need further help. I'll try to do what I can, but no guarantees!)

Note to moderators / admins: What's the virtue of locking down the number of links people on here can post when it prevents people posting code from posting everything ranging from schema references to simple coded anchors and HREFs? Can we please come up with a better formula? It's causing all sorts of problems for posting code on here...
Re: CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #722023 is a reply to message #721316] Sun, 04 September 2011 00:10 Go to previous messageGo to next message
cu2sr is currently offline cu2sr
Messages: 5
Registered: August 2011
Junior Member
For what it's worth, I believe this to be an issue with WSDL4J code that validates the WSDL. My $.02 is it should be treating what you have as an overloaded parameter - see the same named parameter and replace the namespace with what's defined in your WSDL. Instead, it sees a new namespace and thinks you're trying to add a new parameter - one that's the same name. Anyway, you can follow a similar conversation www.eclipse.org/forums/index.php/mv/msg/224122/720694/
(no subject) [message #722045 is a reply to message #721316] Sun, 04 September 2011 00:10 Go to previous messageGo to next message
cu2sr is currently offline cu2sr
Messages: 5
Registered: August 2011
Junior Member
For what it's worth, I believe this to be an issue with WSDL4J code that validates the WSDL. My $.02 is it should be treating what you have as an overloaded parameter - see the same named parameter and replace the namespace with what's defined in your WSDL. Instead, it sees a new namespace and thinks you're trying to add a new parameter - one that's the same name. Anyway, you can follow a similar conversation www.eclipse.org/forums/index.php/mv/msg/224122/720694/
Re: CVC-complex-type.5.2 error message that nobody seems to be able to understand... [message #722139 is a reply to message #722023] Sun, 04 September 2011 12:09 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25747
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I totally disagree that it's a bug in anything.  It's simply correct
schema validation as produced by Xerces.   See
<a class="moz-txt-link-freetext" href="http://www.w3.org/TR/xmlschema-1/#cvc-complex-type">http://www.w3.org/TR/xmlschema-1/#cvc-complex-type</a> section 5.2<br>
<blockquote>
<div class="clnumber">5 Let <span class="termdef"><a id="key-ida"
name="key-ida">[Definition:]  </a>the <b>wild
IDs</b> be the set of all
attribute information item to which clause <a
href="http://www.w3.org/TR/xmlschema-1/#c-avaw">3.2</a>
applied and whose <a class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-vn"><span
class="arrow">·</span>validation<span class="arrow">·</span></a>
resulted in
a <a class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-dd"><span
class="arrow">·</span>context-determined declaration<span
class="arrow">·</span></a> of
<i>mustFind</i> or no <a class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-dd"><span
class="arrow">·</span>context-determined
declaration<span class="arrow">·</span></a> at all, and
whose <a class="xpropref"
href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[local
name]</a> and <a class="xpropref"
href="http://www.w3.org/TR/xml-infoset/#infoitem.attribute">[namespace
name]</a> resolve (as defined by <a
href="http://www.w3.org/TR/xmlschema-1/#cvc-resolve-instance">QName
resolution (Instance) (§3.15.4)</a>) to an attribute
declaration whose <a class="propref"
href="http://www.w3.org/TR/xmlschema-1/#a-simple_type_definition">{type
definition}</a> is or is derived from <a
href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID">ID</a></span>.
Then <b>all</b> of the following must be true:
<div class="constraintlist">
<div class="clnumber">5.1 There must be no more than one item
in <a class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-ida"><span
class="arrow">·</span>wild IDs<span class="arrow">·</span></a>.</div>
<div class="clnumber">5.2 If <a class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-ida"><span
class="arrow">·</span>wild IDs<span class="arrow">·</span></a>
is non-empty, there must not be any attribute uses among the
<a class="propref"
href="http://www.w3.org/TR/xmlschema-1/#ct-attribute_declarations">{attribute
uses}</a> whose <a class="propref"
href="http://www.w3.org/TR/xmlschema-1/#attribute">{attribute
declaration}</a>'s <a class="propref"
href="http://www.w3.org/TR/xmlschema-1/#a-simple_type_definition">{type
definition}</a> is or is derived from <a
href="http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#ID">ID</a>.</div>
</div>
<div class="note"><b>Note: </b>This clause serves to ensure that
even via attribute
wildcards no element has more than one attribute of type ID,
and that even when
an element legitimately lacks a declared attribute of type ID,
a
wildcard-validated attribute must not supply it. That is, if
an element has a
type whose attribute declarations include one of type ID, it
either has that
attribute or no attribute of type ID.</div>
</div>
<div class="note"><b>Note: </b>When an <a class="propref"
href="http://www.w3.org/TR/xmlschema-1/#ct-attribute_wildcard">{attribute
wildcard}</a> is present, this does
<em>not</em> introduce any ambiguity with respect to how
attribute
information items for
which an attribute use is present amongst the <a
class="propref"
href="http://www.w3.org/TR/xmlschema-1/#ct-attribute_declarations">{attribute
uses}</a> whose name and target namespace match are <a
class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-va"><span
class="arrow">·</span>assessed<span class="arrow">·</span></a>.
In such cases the attribute use <em>always</em> takes
precedence, and the <a class="termref"
href="http://www.w3.org/TR/xmlschema-1/#key-va"><span
class="arrow">·</span>assessment<span class="arrow">·</span></a>
of such items stands or falls entirely on the basis of the
attribute use and its <a class="propref"
href="http://www.w3.org/TR/xmlschema-1/#attribute">{attribute
declaration}</a>. This follows from the details of clause <a
href="http://www.w3.org/TR/xmlschema-1/#c-aam">3</a>.</div>
</blockquote>
Nothing in the XML Schema specification spells out "overloading" as
you've described it.  There's just no such concept.  The example
clearly violates 5.2 because the namespace of the Id attribute is
one different from that specified in the schema so it matches the
wildcard, not the locally defined attribute.<br>
<br>
Looking at your other thread, of course making the attribute match
the expected namespace fixes the problem.  The comment about
removing
<blockquote><span class="MsgBodyText"><span>
<pre>xmlns:wsu="&lt;LOCATION&gt;/oasis-200401-wss-wssecurity-utility-1.0.xsd"</pre>
</span></span></blockquote>
must not be entirely accurate because without an xmlns declaration
for wsu, the XML isn't well formed.<br>
<br>
On 03/09/2011 9:10 PM, cu2sr wrote:
<blockquote cite="mid:j3ut3h$ofj$1@news.eclipse.org" type="cite">For
what it's worth, I believe this to be an issue with WSDL4J code
that validates the WSDL. My $.02 is it should be treating what you
have as an overloaded parameter - see the same named parameter and
replace the namespace with what's defined in your WSDL. Instead,
it sees a new namespace and thinks you're trying to add a new
parameter - one that's the same name. Anyway, you can follow a
similar conversation
<a class="moz-txt-link-abbreviated" href="http://www.eclipse.org/forums/index.php/mv/msg/224122/720694/">www.eclipse.org/forums/index.php/mv/msg/224122/720694/</a>
<br>
</blockquote>
</body>
</html>
Previous Topic:reading inside a xml
Next Topic:NewXMLGenerator.createCMDocument() returns null
Goto Forum:
  


Current Time: Mon Apr 21 00:52:25 EDT 2014

Powered by FUDForum. Page generated in 0.03459 seconds