Changeset 2481
- Timestamp:
- 09/30/08 16:22:24 (3 months ago)
- Location:
- trunk/otis
- Files:
-
- 4 added
- 1 removed
- 7 modified
- 2 copied
-
build.xml (modified) (7 diffs)
-
config/otis-config.client.ldap.xml (added)
-
config/otis-config.client.local.xml (modified) (4 diffs)
-
config/otis-config.client.remote.xml (modified) (1 diff)
-
config/otis-config.client.xmlfile.xml (added)
-
config/otis-config.server.xml (modified) (1 diff)
-
lib/cp-jndi/higgins-util-idas-cp_1.0.100.jar (deleted)
-
lib/cp-rest-xml/higgins-idas-spi_1.0.100.jar (copied) (copied from trunk/otis/lib/cp-jndi/higgins-idas-spi_1.0.100.jar) (1 prop)
-
lib/cp-xmlfile/dom4j-1.6.1.jar (added)
-
lib/srv/config (copied) (copied from trunk/otis/lib/test.junit/config)
-
otis.war.targets.xml (modified) (1 diff)
-
samples/HelloWorld.java (added)
-
src/org/bandit/otis/server/OtisServlet.java (modified) (6 diffs)
-
src/org/bandit/otis/utils/Constants.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/otis/build.xml
r2477 r2481 96 96 <include name="org/bandit/otis/impl/**" /> 97 97 <include name="org/bandit/otis/utils/**" /> 98 <classpath refid="sdk.classpath"/> 99 </javac> 100 </target> 101 102 <target name="compile.samples" depends="-init,compile.sdk"> 103 <javac destdir="${build.dir}/classes" 104 srcdir="samples" 105 deprecation="on" 106 target="1.5" 107 source="1.5" 108 debug="on" 109 verbose="off"> 98 110 <classpath refid="sdk.classpath"/> 99 111 </javac> … … 197 209 </target> 198 210 199 <fileset id="warconfigfiles" dir="${config.dir}"200 includes=" web.xml,201 otis-config.client.local.xml,202 otis-config.server.xml,203 AuthenticatedSessionResponse.fmt,204 GET_AttributeResponse.fmt,205 GET_AuthEntityResponse.fmt,206 GET_EntityResponse.fmt,207 GET_PropertiesResponse.fmt,208 GET_RoleResponse.fmt209 "/>210 211 <target name="-copy.warconfigs" depends="-init"> 211 212 <condition property="war.filter.properties.match"> … … 216 217 <antcall target="-update.warconfigs" /> 217 218 <copy todir="${war.config.dir}"> 218 <fileset refid=" warconfigfiles" />219 <fileset refid="${war.config.fileset.id}" /> 219 220 <filterset> 220 221 <filtersfile file="${war.config.dir}/filter.properties"/> … … 231 232 <target name="-warbuilder" depends="jar.nosrc,compile.srv"> 232 233 <war 233 destfile="${build.dir}/${ project.war.file}"234 destfile="${build.dir}/${war.file.name}" 234 235 webxml="${build.dir}/config/war/web.xml" 235 236 duplicate="preserve" … … 248 249 <!-- dependencies of server classes --> 249 250 <lib dir="${lib.dir}/srv" includes="*.jar" /> 251 <lib dir="${lib.dir}/srv/config" includes="*.jar" /> 250 252 <!-- cp and dependencies (set by caller) --> 251 <lib refid=" war.cp.fileset" />253 <lib refid="${war.cp.fileset.id}" /> 252 254 253 255 </war> … … 335 337 </target> 336 338 337 <target name="tar.client" depends="jar.nosrc ">339 <target name="tar.client" depends="jar.nosrc,compile.samples"> 338 340 <concat destfile="${out.config.root.dir}/filter.properties"> 339 341 OTIS.ENDPOINT=http://example.org/otis/ … … 353 355 <include name="PUT_ContextChangesRequest.fmt"/> 354 356 </tarfileset> 357 <tarfileset dir="${build.dir}/classes" prefix="/"> 358 <include name="HelloWorld.class"/> 359 </tarfileset> 360 <tarfileset dir="samples" prefix="/"> 361 <include name="HelloWorld.java"/> 362 </tarfileset> 355 363 </tar> 356 364 </target> -
trunk/otis/config/otis-config.client.local.xml
r2475 r2481 30 30 <Setting Name="OTISConfiguration" Type="htf:map"> 31 31 32 <Setting Name="defaultContextId" Type="xsd:string"> urn:Corporate-LDAP-Server</Setting>32 <Setting Name="defaultContextId" Type="xsd:string">@DEFAULT.CONTEXT.ID@</Setting> 33 33 34 34 <Setting Name="lenientReauth" Type="xsd:boolean">false</Setting> … … 122 122 <Setting Name="JNDIContextFactory" Type="htf:map" /> 123 123 <Setting Name="InMemoryContextFactory" Type="htf:map" /> 124 <Setting Name="XMLFileContextFactory" Type="htf:map" /> 124 125 </Setting> 125 126 <Setting Name="JNDIContextFactory" Type="htf:classinstance">org.eclipse.higgins.idas.cp.jndi.JNDIContextFactory</Setting> 126 127 <Setting Name="InMemoryContextFactory" Type="htf:classinstance">org.eclipse.higgins.idas.cp.inmem.InMemoryContextFactory</Setting> 128 <Setting Name="XMLFileContextFactory" Type="htf:classinstance">org.eclipse.higgins.idas.cp.xmlfile.NonsharedContextFactory</Setting> 127 129 <Setting Name="ContextFactoryInstancesList" Type="htf:list"> 128 130 <Setting Name="JNDIContextFactory" Type="htf:map"> … … 138 140 </Setting> 139 141 </Setting> 142 <Setting Name="XMLFileContextFactory" Type="htf:map"> 143 <Setting Name="Instance" Type="xsd:string">XMLFileContextFactory</Setting> 144 <Setting Name="ContextTypes" Type="htf:list"> 145 <Setting Name="XMLFileContextType" Type="xsd:string">$context+xmlfile</Setting> 146 </Setting> 147 </Setting> 140 148 </Setting> 141 149 <Setting Name="ContextIdsList" Type="htf:list"> … … 151 159 <Setting Name="AuditRecordClass" Type="xsd:string">org.bandit.otis.impl.OtisAuditRecord</Setting> 152 160 --> 161 </Setting> 162 <Setting Name="urn:XmlFileProvider" Type="htf:map" > <!-- The Name of this setting is ignored because the parent setting is a list --> 163 <Setting Name="ContextId" Type="xsd:string">urn:XmlFileProvider</Setting> 164 <Setting Name="ContextTypes" Type="htf:list"> 165 <Setting Name="XMLFileContextType" Type="xsd:string">$context+xmlfile</Setting> 166 </Setting> 167 <Setting Name="ContextUris" Type="htf:list"> 168 <Setting Name="DefaultContextUri" Type="xsd:anyURI">urn:Local-XMLFile</Setting> 169 </Setting> 170 <!-- Context provider specific settings go here --> 171 <XmlFileName>@XMLFILE.CP.DATA.FILENAME@</XmlFileName> 153 172 </Setting> 154 173 <Setting Name="urn:Corporate-LDAP-Server" Type="htf:map"> -
trunk/otis/config/otis-config.client.remote.xml
r2475 r2481 20 20 <SettingHandler Type="htf:classinstance" Class="java.lang.Object" Handler="org.eclipse.higgins.configuration.xml.ClassInstanceHandler"/> 21 21 <SettingHandler Type="htf:classsingleton" Class="java.lang.Object" Handler="org.eclipse.higgins.configuration.xml.ClassSingletonHandler"/> 22 <SettingHandler Type="htf:jscriptexec" Class="org.eclipse.higgins.util.jscript.JScriptExec" Handler="org.eclipse.higgins.util.idas.cp.jscript.JScriptExecSettingHandler"/>23 <SettingHandler Type="htf:jscriptscope" Class="org.eclipse.higgins.util.jscript.JScriptScope" Handler="org.eclipse.higgins.util.idas.cp.jscript.JScriptScopeSettingHandler"/>24 22 <SettingHandler Type="htf:include" Class="java.util.Map" Handler="org.eclipse.higgins.configuration.xml.IncludeHandler"/> 25 23 <SettingHandler Type="htf:remoteEndPointHandler" Class="org.bandit.otis.impl.RemoteEndPointClient" Handler="org.bandit.otis.impl.RemoteEndPointClientHandler"/> -
trunk/otis/config/otis-config.server.xml
r2475 r2481 630 630 631 631 <!-- Settings that are passed to the local session object --> 632 <Setting Name="LocalAuthSession" Type="htf:include"> otis-config.client.local.xml</Setting>632 <Setting Name="LocalAuthSession" Type="htf:include">@LOCAL.AUTH.CONFIG@</Setting> 633 633 634 634 </Setting> -
trunk/otis/lib/cp-rest-xml/higgins-idas-spi_1.0.100.jar
-
trunk/otis/otis.war.targets.xml
r2477 r2481 17 17 <import file="build.xml"/> 18 18 19 <fileset id="war.config.fileset" dir="${config.dir}" 20 includes=" web.xml, 21 otis-config.client.xmlfile.xml, 22 otis-config.server.xml, 23 AuthenticatedSessionResponse.fmt, 24 GET_AttributeResponse.fmt, 25 GET_AuthEntityResponse.fmt, 26 GET_EntityResponse.fmt, 27 GET_PropertiesResponse.fmt, 28 GET_RoleResponse.fmt 29 "/> 30 <fileset id="war.cp.fileset" dir="${lib.dir}/cp-xmlfile" includes="*.jar" /> 19 31 <target name="war"> 20 32 <concat destfile="${out.config.root.dir}/filter.properties"> 21 SERVER.CONF.DIR= otis22 LDAP.SERVER.ADDR=ldap://example.org:38923 SESSION.SECRET.BITSIZE= 102433 SERVER.CONF.DIR=@@PATH.CONTAINER@@ 34 XMLFILE.CP.DATA.FILENAME=example.identities.xml 35 SESSION.SECRET.BITSIZE=0 24 36 ALLOW.INSECURE.CHANNEL=false 37 LOCAL.AUTH.CONFIG=otis-config.client.xmlfile.xml 25 38 </concat> 26 <property name="project.war.file" value="otis-${project.version}.war" /> 27 <fileset id="war.cp.fileset" dir="${lib.dir}/cp.jndi" includes="*.jar" /> 39 <property name="war.file.name" value="otis-${project.version}.war" /> 40 <property name="war.config.fileset.id" value="war.config.fileset" /> 41 <property name="war.cp.fileset.id" value="war.cp.fileset" /> 28 42 <antcall target="-copy.warconfigs" /> 29 43 <antcall target="-warbuilder" /> 30 44 </target> 31 45 46 <fileset id="war.wag.config.fileset" dir="${config.dir}" 47 includes=" web.xml, 48 otis-config.client.ldap.xml, 49 otis-config.server.xml, 50 AuthenticatedSessionResponse.fmt, 51 GET_AttributeResponse.fmt, 52 GET_AuthEntityResponse.fmt, 53 GET_EntityResponse.fmt, 54 GET_PropertiesResponse.fmt, 55 GET_RoleResponse.fmt 56 "/> 57 <fileset id="war.wag.cp.fileset" dir="${lib.dir}/cp-jndi" includes="*.jar" /> 32 58 <target name="war.wag"> 33 59 <concat destfile="${out.config.root.dir}/filter.properties"> 34 60 SERVER.CONF.DIR=/usr/share/java/otis-config 61 DEFAULT.CONTEXT.ID=urn:Corporate-LDAP-Server 35 62 LDAP.SERVER.ADDR=ldap://wag.bandit-project.org:389 36 63 SESSION.SECRET.BITSIZE=1024 37 64 ALLOW.INSECURE.CHANNEL=false 65 LOCAL.AUTH.CONFIG=otis-config.client.local.xml 38 66 </concat> 39 <fileset id="war.cp.fileset" dir="${lib.dir}/cp.jndi" includes="*.jar" /> 40 <property name="project.war.file" value="otis.war" /> 67 <property name="war.file.name" value="otis.war" /> 68 <property name="war.config.fileset.id" value="war.wag.config.fileset" /> 69 <property name="war.cp.fileset.id" value="war.wag.cp.fileset" /> 41 70 <antcall target="-copy.warconfigs" /> 42 71 <antcall target="-warbuilder" /> 43 72 </target> 44 73 74 <fileset id="war.test.config.fileset" dir="${config.dir}" 75 includes=" web.xml, 76 otis-config.client.test.xml, 77 otis-config.server.xml, 78 AuthenticatedSessionResponse.fmt, 79 GET_AttributeResponse.fmt, 80 GET_AuthEntityResponse.fmt, 81 GET_EntityResponse.fmt, 82 GET_PropertiesResponse.fmt, 83 GET_RoleResponse.fmt 84 "/> 85 <fileset id="war.test.cp.fileset" dir="${lib.dir}/cp-jndi" includes="*.jar" /> 45 86 <target name="war.test"> 46 87 <concat destfile="${out.config.root.dir}/filter.properties"> 47 88 SERVER.CONF.DIR=otis-test 89 DEFAULT.CONTEXT.ID=urn:Corporate-LDAP-Server 48 90 LDAP.SERVER.ADDR=ldap://localhost:50389 49 91 SESSION.SECRET.BITSIZE=0 50 92 ALLOW.INSECURE.CHANNEL=true 93 LOCAL.AUTH.CONFIG=otis-config.client.local.xml 51 94 </concat> 52 <fileset id="war.cp.fileset" dir="${lib.dir}/cp-jndi" includes="*.jar" /> 53 <property name="project.war.file" value="${war.test.file}" /> 95 <property name="war.file.name" value="${war.test.file}" /> 96 <property name="war.config.fileset.id" value="war.test.config.fileset" /> 97 <property name="war.cp.fileset.id" value="war.test.cp.fileset" /> 54 98 <antcall target="-copy.warconfigs" /> 55 99 <antcall target="-warbuilder" /> -
trunk/otis/src/org/bandit/otis/server/OtisServlet.java
r2462 r2481 61 61 import org.apache.commons.logging.LogFactory; 62 62 63 import java.io.ByteArrayOutputStream; 63 64 import java.io.IOException; 65 import java.io.PrintStream; 64 66 import java.io.PrintWriter; 65 67 import java.io.StringWriter; … … 163 165 { 164 166 log.debug( errMsg.outString( false)); 167 OtisException otisException = new OtisException(errMsg.outString( true)); 165 168 if (responseMap != null) 166 169 { … … 171 174 { 172 175 responseMap.put( Constants.TEMPLATE_EXCEPTION, e); 173 } 174 return( new OtisException( errMsg.outString( true))); 176 otisException.setStackTrace(e.getStackTrace()); 177 } 178 return( otisException); 175 179 } 176 180 … … 182 186 Map responseMap) throws OtisException 183 187 { 188 ByteArrayOutputStream bs = new ByteArrayOutputStream(); 189 PrintStream ps = new PrintStream(bs); 190 e.printStackTrace(ps); 191 log.debug("Originating exception's stack:\n" + bs.toString()); 184 192 throw OtisServlet.getOtisException( log, errMsg, e, iHttpResponseCode, responseMap); 185 193 } … … 191 199 Map responseMap) throws OtisException 192 200 { 193 throw OtisServlet.getOtisException(m_log, errMsg, e, iHttpResponseCode, responseMap);201 throwException(m_log, errMsg, e, iHttpResponseCode, responseMap); 194 202 } 195 203 … … 692 700 else 693 701 { 702 if (m_strConfigDir.startsWith(Constants.PATH_CWD)) 703 { 704 String replacement = servletContext.getRealPath(""); 705 m_strConfigDir = m_strConfigDir.replace(Constants.PATH_CWD, replacement); 706 } 694 707 m_log.debug( "Got configuration params: configDir='" + m_strConfigDir + "', configFile='" + m_strConfigFile + "'"); 695 708 -
trunk/otis/src/org/bandit/otis/utils/Constants.java
r2447 r2481 314 314 public static final String SCHEME_USER_ID = OTIS_NAMESPACE + "#" + NOUN_ENTITY_ID; 315 315 public static final String TERM_USER_ID = OTIS_NAMESPACE + "#" + NOUN_ENTITY_ID; 316 public static final String PATH_CWD = "@@PATH.CONTAINER@@"; 316 317 317 318 }