SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question cvc-complex-type.5.2: In element 'wsp:Policy', attribute 'Id' is a Wild ID?

    I'm using Eclipse Indigo to try to generate a Java-based web service. The WSDL file I'm using works fine if I remove "security stuff", but as soon as I regenerate WITH the "security stuff", I begin to see error messages.

    So here's the "security stuff" I'm talking about...

    Code:
    <wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordOptional"
          xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <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>
    I'm not sure why, but whenever I try to generate a stub with this code, I receive the following error message (prior to generation, I mean):
    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}.
    It came to my attention that this can sometimes happen if the version of XSD you try to reference through name spacing is inconsistent to the elements you're trying to use. For the most part, I'm not even sure if this is right but if someone on here could throw me some suggestions or tips, I would appreciate it. If I've inadvertently left something out or if you need more detail about this, just let me know. This has me stumped.

  2. #2
    SitePoint Wizard Wolf_22's Avatar
    Join Date
    Jul 2005
    Posts
    1,714
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For whatever it's worth, it seemed that I needed a more up-to-date DTD reference. I was referencing one back from 2002. Seemed to fix it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •