You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Google Summer of Code

Summary

The aim of this page is to describe my work during the Google Summer of Code project on Fedora Repository. I have divided this page into x subcategories depending on into which part of "project's life cycle" it belongs. I have created the topic branch for this purpose in Git and all my changes are available from https://github.com/Jiri-Kremser/fcrepo/tree/fcrepo-452.



Changes to the build process

This section describes the changes within the build process scope such a dependencies and code generation from the WSDL files.

Dependencies

CXF can be attached by Maven to the fcrepo project in several ways:

1. two (three with embedded Jetty) Maven artifacts

<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-rt-frontend-jaxws</artifactId>
  <version>${cxf.version}</version>
</dependency>

<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-rt-transports-http</artifactId>
  <version>${cxf.version}</version>
</dependency>

<!-- Jetty is needed if you're using the CXFServlet -->
<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-rt-transports-http-jetty</artifactId>
  <version>${cxf.version}</version>
</dependency>

2. one Maven artifact with bundled CXF

<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-bundle</artifactId>
  <version>${cxf.version}</version>
  <exclusions>
    <exclusion>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </exclusion>
  </exclusions>
</dependency>

3. one Maven artifact with "minimal-bundled" CXF

<dependency>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-bundle-minimal</artifactId>
  <exclusions>
    <exclusion>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </exclusion>
  </exclusions>
  <version>${cxf.version}</version>
</dependency>

All the artifact are available in the Maven Central. Dependencies should be transitively distributed throughout the fcrepo project, but sometimes I had to add them again.

I have used the second variant, because it seems to be the simplest one, but if you find the size of the jar file of the CXF to be high, you can go with 1 or 3.

Because the CXF uses internally the Spring framework, I had to attach the Spring jars to the installed fedora client ($FEDORA_HOME/client) see GSoC Project Summary#fedoraHome

WSDL to Java code generation

Since the Fedora follow the contract-first method, the SEIs (Service Endpoint Interfaces) have to be generated from the attached WSDLs as well as classes for types defined in the XML Schema attached to the WSDLs. WSDL file define a contract by means of XML language meanwhile SEI and type classes are annotated POJOs in Java doing the same thing. This process is done four times: API-A, API-A-MTOM, API-M, API-M-MTOM.

The old WS stack (Axis 1.3) used the org.codehaus.mojo:axistools-maven-plugin Maven plugin and my solution uses the org.apache.cxf:cxf-codegen-plugin as it was proposed on the homepage of the CXF, but the more general wsimport plugin for maven can be used as well (com.sun.xml.ws:jaxws-rt see http://mojo.codehaus.org/jaxws-maven-plugin/usage.html)

Here is the maven pom file with the "wsdl2java" configuration. I have removed all the references and tasks related to axis, but I am not sure whether the "cleaning" is still needed, so I have only commented the old plugin definition in the pom.

When generating the SEIs, the default package is taken from the WSDLs targetNamespace. Hence, there has to be said, that another package should be taken. This is done in the bindings directory. For the generated types (xmls with the "JAX-B" prefix) and for the SEIs (xmls with the "JAX-WS" prefix). These xml binding files are configured in the pom.

Changes to the installation process

bla

Fedora home directory #fedoraHome

Changes to the deployment process including the Spring stuff

bla

Changes in the code

bla

WS implementations

Exceptions

fcrepo-client-admin

fcrepo-security-pep

  • No labels