incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r904108 [3/3] - in /incubator/hise/trunk: hise-distro/src/distro/examples/ hise-distro/src/distro/examples/claimsHandling/ hise-docs/src/main/resources/ hise-services/src/main/java/org/apache/hise/engine/jaxws/ hise-web/ hise-web/src/main/r...
Date Thu, 28 Jan 2010 14:58:29 GMT
Propchange: incubator/hise/trunk/hise-distro/src/distro/examples/claimsHandling/claimsHandling-soapui-project.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-docs/src/main/resources/developer-guide.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-docs/src/main/resources/developer-guide.xml?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-docs/src/main/resources/developer-guide.xml (original)
+++ incubator/hise/trunk/hise-docs/src/main/resources/developer-guide.xml Thu Jan 28 14:58:28
2010
@@ -12,34 +12,35 @@
       <itemizedlist>
         <listitem>
           <para>
-            install oracle XE and create hise user with hise password (easiest way is via
http://localhost:8980/apex/apex)
+            Execute mvn install in hise directory
           </para>
         </listitem>
         <listitem>
           <para>
-            mvn clean install
+            enter hise-web, run mvn jetty:run and enter http://localhost:8080/ - it will
show published WS Services and operations.
           </para>
-        </listitem>
-        <listitem>
           <para>
-            enter hise-web, run mvn jetty:run, enter http://localhost:8080/ - it will show
published WS Services and operations
+            This will deploy hise-test-example project and start HISE on Jetty.
           </para>
         </listitem>
         <listitem>
           <para>
             run soapui 3.5-beta1 and run tests from project hise-web/soapui-tests/hise-soapui-project.xml
         </para>
+        <para>
+        This will run integration tests for HISE.
+        </para>
         </listitem>
       </itemizedlist>
 
-      Each time you do mvn jetty:run, whole DB is erased.
+      Each time you do mvn jetty:run, a whole DB is erased. 
+      Additionally, for tests, there is exposed cleanup POJO Web Service, which cleans up
DB Tables.
     </para>
     <para>
-      I prefer to use default configuration as Oracle instead of in memory
-      DB, because it's better for monitoring and shows more errors.
-      On Debian like systems, you can easily install oracle-xe package. 
-      But you can modify data source in /hise-test-example/src/main/resources/hise-ds.xml.
-      There exists a configuration for H2 Database, which is commented out. 
+      By default, HISE integration tests are run using H2 Database. 
+      This can be changed, for example to Oracle, by commenting out 
+      ojdbc deps in hise-web/pom.xml and Oracle datasource in
+      hise-web/src/test/resources/hise-ds.xml. 
    </para>
    <para>
       HISE has two types of tests:

Modified: incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml (original)
+++ incubator/hise/trunk/hise-docs/src/main/resources/user-guide.xml Thu Jan 28 14:58:28 2010
@@ -6,20 +6,73 @@
   </info>
 
   <index/>
-  
+
   <chapter>
     <title>Quick Introduction</title>
     <para>
-    In order to have something running, you need to do following steps:
-    <itemizedlist>
-      <listitem><para>Download HISE distribution</para></listitem>
-      <listitem><para>Then you need to unzip HISE WAR contents into your application
server directory (like Apache Tomcat). Name it hise.</para></listitem>
-      <listitem><para>Copy example files from examples/claims-approval into WEB-INF
directory</para></listitem>
-      <listitem><para>Start your application server</para></listitem>
-      <listitem><para>Enter hise URL into your browser. For Tomcat, this will
be http://localhost:8080/hise. 
-      There will be a list of services exposed by HISE. It will contain approve operation
from example task. 
-      </para></listitem>
-    </itemizedlist>
+      In order to have something running, you need to do following steps:
+      <itemizedlist>
+        <listitem>
+          <para>Download HISE distribution</para>
+        </listitem>
+        <listitem>
+          <para>Then you need to unzip HISE WAR contents into your application server
directory (like Apache Tomcat). Name it hise.</para>
+        </listitem>
+        <listitem>
+          <para>
+            Copy example files from examples/claims-approval/* into WEB-INF/classes directory.
+            HISE looks up *-hise-dd.xml files for Human Tasks definitions.  
+          </para>
+        </listitem>
+        <listitem>
+          <para>Start your application server. This will create H2 database schema
in files hise-h2-db.*.db. </para>
+        </listitem>
+        <listitem>
+          <para>Enter hise URL into your browser. For Tomcat, this will be http://localhost:8080/hise.
+            There will be a list of services exposed by HISE. It will contain approve operation
from example task. 
+          </para>
+        </listitem>
+        <listitem>
+          <para>
+          You can import WSDL http://localhost:8080/hise/ClaimsHandlingService/?wsdl into
SoapUI to start interacting with Human Task.
+          There is also a prepared project in examples/claimsHandling/claimsHandling-soapui-project.xml.

+          </para>
+        </listitem>
+        <listitem>
+          <para>
+            You need to import some user and group definitions.
+            By default, HISE uses H2 file database named hise-h2-db.
+            So you can run addUsers.sql script from HISE distribution, by following command:
+            <programlisting>
+              java -cp webapps/hise/WEB-INF/lib/h2-1.1.108.jar org.h2.tools.RunScript -url
'jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false' -user sa -showResults -script addUsers.sql
+            </programlisting>
+            addUsers.sql looks like this:
+            <programlisting>
+              insert into ORG_ENTITY (name, type, userpassword) values ('user1', 'USER',
'pass1');
+              insert into ORG_ENTITY (name, type, userpassword) values ('group1', 'GROUP',
null);
+              insert into USER_GROUPS (USERGROUPS_NAME, ORGENTITY_NAME) values ('user1',
'group1');
+            </programlisting>
+            This defines Organizational Entities and specifies associations between users
and groups.
+          </para>
+        </listitem>
+        <listitem>
+           <para>
+             Next, you need to enter claimsHandling-soapui-project.xml and start Resolving
Mock Service
+             and run ClaimsHandling test suite. 
+             This will register a claim by sending approve operation and send back response
to Mock Service on complete.
+           </para>
+           <para>
+              Note that approve operation is meant to be sent by external system to HISE
deployed Human Task.
+              This differs from TaskOperations Web Service, which is meant to be used by
Task Operator. 
+              TaskOperations operations require operator's authentication via WS Security.
+              So in SoapUI operators need to fill fields like "user", "password", "password
type" (digest or plain text).
+              When operator completes or fails a task, HISE sends response to external system.

+              This yields to receiving a request in Resolving MockService in SoapUI. 
+              Additionally, when WS Addressing reply-to field is specified in approve request,

+              HISE will send reply on task completion to a specified address. 
+           </para>
+        </listitem>
+      </itemizedlist>
     </para>
   </chapter>
 </book>

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSClient.java
Thu Jan 28 14:58:28 2010
@@ -82,11 +82,14 @@
 
     public Node invoke(Node message, Node epr) {
         try {            
-            String address = getAddressFromEpr(epr);
             
             Dispatch<SOAPMessage> dispatch = destinationService.createDispatch(destinationPort,
SOAPMessage.class, Service.Mode.MESSAGE);
-            __log.debug("sending to address " + address);
-            dispatch.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);
+            
+            String address = getAddressFromEpr(epr);
+            if (!address.equals("")) {
+                __log.debug("sending to address " + address);
+                dispatch.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);
+            }
             
             SOAPMessage m;
             m = messageFactory.createMessage();

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java
(original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/HISEJaxWSService.java
Thu Jan 28 14:58:28 2010
@@ -87,7 +87,7 @@
             public Object doInTransaction(TransactionStatus arg0) {
                 try {
                     // TransactionStatus tx = transactionManager.getTransaction(new DefaultTransactionDefinition());
-                    assert transactionManager.isValidateExistingTransaction();
+//                    assert transactionManager.isValidateExistingTransaction();
                     MessageContext c = context.getMessageContext();
                     Object operationInfo = c.get("org.apache.cxf.service.model.OperationInfo");
                     QName operation = (QName) operationInfo.getClass().getMethod("getName").invoke(operationInfo);

Modified: incubator/hise/trunk/hise-web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-web/pom.xml?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-web/pom.xml (original)
+++ incubator/hise/trunk/hise-web/pom.xml Thu Jan 28 14:58:28 2010
@@ -24,14 +24,16 @@
             <groupId>com.h2database</groupId>
             <artifactId>h2</artifactId>
             <version>1.1.108</version>
-            <scope>test</scope>
+            <scope>runtime</scope>
         </dependency>
+        <!--
         <dependency>
             <groupId>oracle</groupId>
             <artifactId>ojdbc5</artifactId>
             <version>11.1.0.6.0</version>
             <scope>test</scope>
         </dependency>
+        -->
 
         <dependency>
             <groupId>org.apache.hise</groupId>

Modified: incubator/hise/trunk/hise-web/src/main/resources/hise-ds.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-web/src/main/resources/hise-ds.xml?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-web/src/main/resources/hise-ds.xml (original)
+++ incubator/hise/trunk/hise-web/src/main/resources/hise-ds.xml Thu Jan 28 14:58:28 2010
@@ -29,13 +29,13 @@
 
     <bean id="htEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
         <property name="dataSource" ref="dataSource" />
-        <property name="jpaVendorAdapter" ref="htJPAVendorAdapter"/>
-        <property name="jpaPropertyMap" ref="htJPAPropertyMap"/>
+        <property name="jpaVendorAdapter" ref="jpaVendorAdapter"/>
+        <property name="jpaPropertyMap" ref="jpaPropertyMap"/>
         <property name="persistenceXmlLocation" value="classpath:/org/apache/hise/persistence.xml"
/>
         <property name="persistenceUnitName" value="org.apache.hise"/>
     </bean>
 
-    <util:map id="htJPAPropertyMap">
+    <util:map id="jpaPropertyMap">
         <!-- 
             <entry key="hibernate.search.default.directory_provider" value="org.hibernate.search.store.RAMDirectoryProvider"
 />   
             <entry key="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.SingletonEhCacheProvider"
/>
@@ -45,20 +45,27 @@
             <entry key="hibernate.cache.use_structured_entries" value="true" />
             <entry key="hibernate.jdbc.batch_size" value="0" />
             <entry key="hibernate.default_batch_fetch_size" value="20"/>
-             -->
             <entry key="hibernate.hbm2ddl.auto" value="create" />
+             -->
     </util:map>
     
-    
-    <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-        <property name="showSql" value="true" />
-        <property name="generateDdl" value="true" />
-        <property name="databasePlatform" value="org.hibernate.dialect.H2Dialect" />
-    </bean>
+    <!-- OpenJPA H2 Driver -->
+    <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
+    <property name="database" value="ORACLE"/>
+    <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
+    <property name="generateDdl"    value="true" />
+    <property name="showSql"      value="false" />
+    <property name="extProperties">
+      <util:map>
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='update')"/>
+      </util:map>
+    </property>
+  </bean>
+  
 
     <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
         <property name="driverClassName" value="org.h2.Driver" />
-        <property name="url" value="jdbc:h2:file:~/hise-db;DB_CLOSE_ON_EXIT=false" />
+        <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false"/>
         <property name="username" value="sa" />
         <property name="password">
             <value></value>
@@ -68,6 +75,9 @@
     </bean>
 
     <!-- 
+     -->
+
+    <!-- Hibernate MySQL Driver
     <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
         <property name="showSql" value="true" />
         <property name="generateDdl" value="true" />
@@ -84,12 +94,20 @@
     </bean>
      -->
 
-    <!--  
-    <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-        <property name="showSql" value="true" />
-        <property name="generateDdl" value="true" />
-        <property name="databasePlatform" value="org.hibernate.dialect.OracleDialect"
/>
-    </bean>
+
+<!-- OpenJPA Oracle Driver
+    <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
+    <property name="database" value="ORACLE"/>
+    <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.OracleDictionary"/>
+    <property name="generateDdl"    value="true" />
+    <property name="showSql"      value="true" />
+    <property name="extProperties">
+      <util:map>
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='drop,add')"/>
+      </util:map>
+    </property>
+  </bean>
+  
 
     <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
         <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
@@ -99,5 +117,5 @@
         <property name="autoCommit" value="false" />
         <property name="suppressClose" value="true" />
     </bean>
- -->
+    -->
  </beans>

Modified: incubator/hise/trunk/hise-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-web/src/main/webapp/WEB-INF/web.xml?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-web/src/main/webapp/WEB-INF/web.xml (original)
+++ incubator/hise/trunk/hise-web/src/main/webapp/WEB-INF/web.xml Thu Jan 28 14:58:28 2010
@@ -37,6 +37,7 @@
         org.springframework.web.context.ContextLoaderListener
       </listener-class>
     </listener>
+    <!-- 
     <filter>
         <filter-name>jpaFilter</filter-name>
         <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
@@ -49,6 +50,7 @@
         <filter-name>jpaFilter</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
+     -->
     <servlet>
         <servlet-name>HTTP Request Interceptor</servlet-name>
         <display-name>HTTP Request Interceptor</display-name>

Modified: incubator/hise/trunk/hise-web/src/test/resources/hise-ds.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-web/src/test/resources/hise-ds.xml?rev=904108&r1=904107&r2=904108&view=diff
==============================================================================
--- incubator/hise/trunk/hise-web/src/test/resources/hise-ds.xml (original)
+++ incubator/hise/trunk/hise-web/src/test/resources/hise-ds.xml Thu Jan 28 14:58:28 2010
@@ -51,16 +51,23 @@
              -->
     </util:map>
     
-    <!-- 
-    <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-        <property name="showSql" value="true" />
-        <property name="generateDdl" value="true" />
-        <property name="databasePlatform" value="org.hibernate.dialect.H2Dialect" />
-    </bean>
+    <!-- OpenJPA H2 Driver -->
+    <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
+    <property name="database" value="ORACLE"/>
+    <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.H2Dictionary"/>
+    <property name="generateDdl"    value="true" />
+    <property name="showSql"      value="false" />
+    <property name="extProperties">
+      <util:map>
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true,SchemaAction='drop,add')"/>
+      </util:map>
+    </property>
+  </bean>
+  
 
     <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
         <property name="driverClassName" value="org.h2.Driver" />
-        <property name="url" value="jdbc:h2:file:~/hise-db;DB_CLOSE_ON_EXIT=false" />
+        <property name="url" value="jdbc:h2:file:hise-h2-db;DB_CLOSE_ON_EXIT=false"/>
         <property name="username" value="sa" />
         <property name="password">
             <value></value>
@@ -68,32 +75,11 @@
         <property name="autoCommit" value="false" />
         <property name="suppressClose" value="true" />
     </bean>
-     -->
 
     <!-- 
-    <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-        <property name="showSql" value="true" />
-        <property name="generateDdl" value="true" />
-        <property name="databasePlatform" value="org.hibernate.dialect.MySQL5Dialect"
/>
-    </bean>
-
-    <bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
lazy-init="true">
-        <property name="driverClassName" value="com.mysql.jdbc.Driver" />
-        <property name="url" value="jdbc:mysql://localhost/hise"/>
-        <property name="username" value="root" />
-        <property name="password" value="abc"/>
-        <property name="autoCommit" value="false" />
-        <property name="suppressClose" value="true" />
-    </bean>
      -->
 
-<!-- 
-    <bean id="htJPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
-        <property name="showSql" value="false" />
-        <property name="generateDdl" value="true" />
-        <property name="databasePlatform" value="org.hibernate.dialect.OracleDialect"
/>
-    </bean>
-     -->
+<!-- OpenJPA Oracle Driver
     <bean id="jpaVendorAdapter" class="org.apache.hise.dao.vendor.OpenJpaVendorAdapter">
     <property name="database" value="ORACLE"/>
     <property name="databasePlatform" value="org.apache.openjpa.jdbc.sql.OracleDictionary"/>
@@ -115,5 +101,5 @@
         <property name="autoCommit" value="false" />
         <property name="suppressClose" value="true" />
     </bean>
-    
+    -->
  </beans>



Mime
View raw message