[jbossws-issues] [JBoss JIRA] Created: (JBWS-1417) J2eeApplicationMetaData does not give access to <web-context>

Thomas Diesler (JIRA) jira-events at jboss.com
Mon Dec 11 07:17:38 EST 2006


J2eeApplicationMetaData does not give access to <web-context>
-------------------------------------------------------------

                 Key: JBWS-1417
                 URL: http://jira.jboss.com/jira/browse/JBWS-1417
             Project: JBoss Web Services
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: jaxws
            Reporter: Thomas Diesler
             Fix For: jbossws-2.0.0


Review and fix. mmd is null for

<jboss-app>
  <module>
    <web>
      <web-uri>jaxws-eardeployment.war</web-uri>
      <context-root>/earjse</context-root>
    </web>
  </module>
</jboss-app>


   private static String getContextRoot(WebMetaData wmd, DeploymentUnit unit)
   {
      String ctxRoot = wmd.getContextRoot();
      DeploymentContext parentContext = unit.getDeploymentContext().getParent();
      if (ctxRoot == null && parentContext != null)
      {
         DeploymentUnit parentUnit = parentContext.getDeploymentUnit();
         Set<? extends J2eeApplicationMetaData> amdSet = parentUnit.getAllMetaData(J2eeApplicationMetaData.class);
         if (amdSet.size() < 1)
            throw new IllegalStateException("Cannot find parent meta data");
            
         J2eeApplicationMetaData amd = amdSet.iterator().next();
         J2eeModuleMetaData mmd = amd.getModule(unit.getDeploymentContext().getSimpleName());
         if (mmd != null)
         {
            ctxRoot = mmd.getWebContext();
         }
      }
      return ctxRoot;
   }

[tdiesler at localhost test]$ ant -Dtest=jaxws/eardeployment test



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list