facebook

security-roles and "automatic update of application.xml

  1. MyEclipse IDE
  2.  > 
  3. WebSphere Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #294933 Reply

    mst98sub
    Member

    We use MyEclipse 7.0 Blue Edition together with WebSphere 6.1.
    Our application defines some j2ee security roles in its application.xml.

    MyEclipse updates this application.xml automatically as defined in the EAR project’s settings. But unfortunately it always generates an invalid application.xml, as it places the security-role section before the module sections. Thereafter the WebSphere deployment fails because of xml validtion errors.

    Valid application.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
      <display-name>SomeEAR</display-name>
      <module id="myeclipse.1233924967857">
        <ejb>Some.jar</ejb>
      </module>
    
      <security-role id="SecurityRole_1200812849770">
        <description>Security role that protects access to ...</description>
        <role-name>UserRole</role-name>
      </security-role>
    
    </application>

    Invalid application.xml (after automatic MyEclipse application.xml update):

    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
      <display-name>SomeEAR</display-name>
      <security-role id="SecurityRole_1200812849770">
        <description>Security role that protects access to ...</description>
        <role-name>UserRole</role-name>
      </security-role>
      <module id="myeclipse.1233924967857">
        <ejb>Some.jar</ejb>
      </module>
    </application>
    #295069 Reply

    Riyad Kalla
    Member

    Ahh, looks like you dug up a bug. The code in the application.xml management right now assumes that ME has full control over the file contents and doesn’t honor the XSD ordering. Thanks for pointing this out.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: security-roles and "automatic update of application.xml

You must be logged in to post in the forum log in