IMS Enterprise Services specifications

February 5th, 2006

IMS Enterprise - Version 1.1 is fully backwards-compatible with previous versions and includes support for a number of extensions used by WebCT, Blackboard and other Enterprise implementations. These extensions cover the person, group and membership data objects. Support for transmitting encrypted passwords has been added to the userid structure and multiple sourcedid and userid structures are now supported. ‘Internationalization’ of the core data objects is also now supported including Name structure for non-English conventions.

However, the element and attribute names are now all lower-case whereas the original V1.0 and V1.01 Enterprise DTDs used upper-case element and attribute names. This means that prior versions must have the element and attribute names converted to lower-case before it will be a valid V1.1 XML instance

IMS Enterprise Services - Version 1.0 defines the exchange of information in the form of Person Management Services, Group Management Services and Membership Management Services. Unified Modelling Language (UML) is used to provide reliable mapping of the information model into a range of different bindings, most notably, Web Services Description Language (WSDL).

Bodington-Enterprise database

February 5th, 2006

Work is now progressing with the Enterprise database ‘Minerva’ which will provide data for the BEWT services. We now have JDBC access to a view in the institutional SITS SRS which is used to populate Minerva with users’ membership of Module group data. The initial schema is a direct reflection of the current Bodington User, Group and Membership tables, but this maybe extended to provide further attributes (email, dob) which are currently held in the UHI Directory store and copied during LDAP authentication to the Bodington user_details table.

Deploying on JBoss Application Server

December 4th, 2005

If you’ve got this far you should be ready to deploy the demo. I’m using JBoss 3.2.x rather than 4.x - there’s a good reason for that! When deploying cetis-ws.ear on JBoss 3.2.x and 4.x we get the following EJB spec violation:

Bean : PersonQuery
Method : public abstract _listPersonsResponse listPersons(_listPersonsRequest) throws RemoteException
Section: 7.10.7
Warning: The methods in the local interface must not include java.rmi.RemoteException in their throws clause.

The cetis.bridge.server.session.PersonQueryBean implements the javax.ejb.SessionBean interface (which is is implemented by every session enterprise Bean class) and includes methods ejbRemove, ejbActivate etc. which throw EJBException and RemoteException. The API for the SessionBean interface notes “RemoteException - This exception is defined in the method signature to provide backward compatibility for enterprise beans written for the EJB 1.0 specification. Enterprise beans written for the EJB 1.1 specification should throw the javax.ejb.EJBException instead of this exception. Enterprise beans written for the EJB2.0 and higher specifications must throw the javax.ejb.EJBException instead of this exception.”

Now JBoss 3.2.x implements the EJB 2.0 speification whilst JBoss 4.x implements the EJB 2.1 speification so deploying on both versions produces the above error and deployment fails. When RemoteException is removed from PersonQueryBean no warnings are reported and deployment succeeds with JBoss 3.2.x however the problems remains with JBoss 4.x. So I’m sticking with JBoss 3.2.7 for now! (N.B. the same error is cause by cetis.bridge.server.session.PersonQueryLocal interface which extends javax.ejb.EJBLocalObject but incorrectly throws RemoteException. As this is a local interface which defines the business methods for local clients no rmi is involved.)

So before deploying comment out RemoteException in PersonQueryBean and PersonQueryLocal and rebuild the cetis-ws.ear.

I’m deploying in the default server (JBOSS_HOME /server/default/deploy) so have put the following jars in /default/lib.

axis.jar
standard.jar
jstl.jar

standard.jar and jstl.jar are part of the JSP Standard Tag Library (JSTL) and can be downloaded from Jakarta Taglibs.

You will also need to copy jpostgres-ds.xmlto the JBoss deploy directory.

Now for the moment of truth! Start JBoss, make sure postgres is running and copy cetis-ws.ear to JBOSS_HOME /server/default/deploy and if everything goes according to plan, you should get something like this:

14:09:20,459 INFO [EjbModule] Deploying GroupMapping
14:09:20,647 INFO [EjbModule] Deploying PersonMapping
14:09:20,661 INFO [EjbModule] Deploying MembershipMapping
14:09:20,694 INFO [EjbModule] Deploying PersonQuery
14:09:20,715 INFO [EjbModule] Deploying MembershipManagementSync
14:09:20,723 INFO [EjbModule] Deploying PersonManagementSync
14:09:20,743 INFO [EjbModule] Deploying GroupQuery
14:09:20,755 INFO [EjbModule] Deploying GroupManagementSync
14:09:21,239 INFO [EjbModule] Deploying Organisation
14:09:21,249 INFO [EjbModule] Deploying InstitutionRole
14:09:21,261 INFO [EjbModule] Deploying GroupType
14:09:21,271 INFO [EjbModule] Deploying Membership
14:09:21,284 INFO [EjbModule] Deploying GroupTypeValue
14:09:21,301 INFO [EjbModule] Deploying ResultValues
14:09:21,314 INFO [EjbModule] Deploying Result
14:09:21,325 INFO [EjbModule] Deploying Group
14:09:21,337 INFO [EjbModule] Deploying Demographics
14:09:21,350 INFO [EjbModule] Deploying Telephone
14:09:21,360 INFO [EjbModule] Deploying Person
14:09:21,370 INFO [EjbModule] Deploying Photo
14:09:21,379 INFO [EjbModule] Deploying Address
14:09:21,394 INFO [EjbModule] Deploying UserId
14:09:21,406 INFO [EjbModule] Deploying Relationship
14:09:21,416 INFO [EjbModule] Deploying MembershipRole

You should also see logs indicating that database tables are being created, or that they already exist.

Pat yourself on the back and have a cup of tea!

Database - postgres configuration

December 3rd, 2005

The data source name used in the builds is defined in build.properties - I’m using the default name java:/PostgresDS. To create data source bound to PostgresDS using the standard port edit postgres-ds.xml as below and copy this to the deploy directory (JBOSS_HOME /server/default/deploy). This is the data source referenced by jbosscmp-jdbc.xml in the cetis-es.ear.

<data sources>
 <local-tx-datasource>
  <jndi-name>PostgresDS</jndi-name>
  <connection-url>jdbc:postgresql://localhost:5432/cetis-es</connection-url>
  <driver-class>org.postgresql.Driver</driver-class>
  <user-name>cetis</user-name>
  <password>cetis</password>
 </local-tx-datasource>
</datasources>

Next, we need to create a database, associate a user and specify the data source for the entity beans.
In unix (Mac OS X)

su postgres
createdb -E UNICODE cetis-es
psql cetis-es
create user cetis with password ‘cetis’;
\q
exit

We also need the postgres JDBC driver in the classpath so copy this to the JBoss server lib directory (see Deploying on JBoss Application Server)

Libraries

December 1st, 2005

The cetis-es takes advantage of some neat open source projects, so make sure you have the libraries listed below before running the ant builds.

Paths to the following are defined in global.properties

axis (webservice build)
junit (webservice build)
struts (webservice build)
xdoclet (generate-src.xml)
tidy (generate-src.xml)

The following java libraries should also be in your classpath

jsp-api.jar
servlet-api.jar
bsf.jar
js.jar

XDoclet parses source files and generates artifacts such as XML descriptors and/or source code. The files are generated from templates that use the information provided in the source code and its JavaDoc tags.

HTML tidy fixes errors and tidies up generated markup.

Bean Scripting Framework (bsf.jar) is a set of Java classes which provides scripting language support within Java applications, and access to Java objects and methods from scripting languages.

Rhino (js.jar) is an implementation of JavaScript written in Java
N.B must use rhino1.5R3 with BS_F2.3.0

These jars are also required when deploying on JBoss (see Deploying on JBoss Application Server) including the appropriate database driver.

axis.jar
standard.jar
jstl.jar

Other useful links
Ant dependencies
Apache downloads

Ant builds

December 1st, 2005

I’m using the latest version of the demo and ws projects from cetis-es cvs HEAD on sourceforge and I must admit it’s taken a little while to sort out the various ant builds, properties settings and dependencies before successful(?!) deployment on the JBoss 3.2 Application Server.

First lets have a look at the ant builds and in the next post I’ll list dependencies required for the various builds. Properties for the ant builds can be set in global.properties and build.properties. The former provides settings for project libraries used in compilation and builds whilst the latter is used for configuring datasources, build directories, deployment and server etc. The build files provide support for a number of different databases, the default being MySql, however we want to use Postgres so it’s important to use correct targets which use the properties defined in this file.

Build steps (postgres)

We need to generate ejb-jar.xml, jbosscmp-jdbc.xml and jboss.xml with the correct datasource and local/localhome interfaces for EJBs. ejb-jar.xml is the standard deployment descriptor for EJB application servers and describes the EJBs to be deployed including the home and localhome interfaces (sets properties for naming, security, transactions etc.). jbosscmp-jdbc.xml is the custom deployment descriptor for configuring JBoss container managed persistence (CMP - maps java properties to database etc.) for entity beans. As before, this file goes in the META-INF directory of the EJB jar file. jboss.xml is the custom deployment descriptor for naming (JNDI) EJBs and other JBoss specific properties.

target: generate-src-pg in demo/ejb/generate-src.xml
target: generate-src-pg in demo/bridge/generate-src.xml
(I’m not absolutely sure if it’s necessary to run both of these!)

The following ant targets can all be found in demo/build.xml and build the webservice, demo and webclient.
target: build-ws
target: build-demo
target: webservice-app

and for the web-client
target: build-webclient
target: webclient-war

Below, are a few possible errors in the build files mentioned above.
In the build.properties settings you’ll notice that for datasources other than MySql the conf and _dist directories use a subdirectory for each datasource e.g. _dist/postgres. When sticking with these settings and building the webservice-app using postgres properties I’ve found that cetis-bridge-ejb.jar and cetis-ejb.jar are not found in _dist/postgres directories. To solve this I’ve updated build.properties so default build is for postgres datasource i.e. in conf and _dist dirs rather than conf/postgres and _dist/postgres.

In the bridge and ejb build files the target props-pg sets properties for postgres builds, however they are overridden by <target name=”prepare” depends=”props-mysql”> so I’ve changed this to depends=”props-pg”. I also found that the demo/ejb/generate-src.xml generate-src target depends on prepare which sets mysql props so I removed this dependency in <target name=”prepare” depends=”db-props-mysql”>. One other thing I noticed was that it seems the property name ejb.config.dir in demo/bridge/generate-src.xml isn’t correct so I replaced ejb.config.dir with ejb.conf.dir in targets db-props-mysql, db-props-ms and db-props-pg.

Onwards and Upwards!

November 23rd, 2005

So, I have succeeded in getting the example to run and have managed to deploy the demo using jboss. I’m impressed with the technologies involved but as I’m sure you’re aware, there isn’t a huge amount of documentation (the example how-to was very useful) concerning dependencies, ant scripts etc! However, one of the aims of BEWT is to provide feedback on this blog and with the help of Scott Wilson and Nick Sharples we should be able to build up some useful resources. The next few posts will give details of errors etc. encountered during deployment on Jboss - I can assure you that when those beans are all successfully deployed, it is indeed a joyous and fulfilling moment!

What is BEWT?

November 23rd, 2005

The BEWT project intends to benefit from the work of the contributors of the CETIS IMS Enterprise Webservices Toolkit (cetis-es) by integrating the toolkit into the UHI institutional VLE, Bodington, which is an important VLE used by many UK HE and FE institutions for teaching and learning. UHI also manages student and staff information through its institutional MIS, SITS:Vision, which interacts with other UHI elearning service components through a system called Siva which allows MIS information to drive account management in the related systems, including the VLE Bodington. Through integration of CETIS-ES into Bodington and into Siva, these systems will be better able to manage Enterprise type data in everyday activities and transactions.

BEWT is funded under the JISC E-Learning Framework and Tools Strand: Demonstrator Projects