|
|
|
|
|
|
|
|
Installation in PageBox framework Implementation
Support of Publishing framework is implemented through a new class loader, ClassPathLoader. ClassPathLoader has been tested with Cocoon, SOAP, Xerces, Xalan but it can be used with most Java libraries. Functions: Version 1.0.4 introduces a mapping mechanism similar to <servlet-mapping>. Why don't we support standard web.xml for Presentation archives and ClassPathLoader libraries? We could support <servlet-mapping> and <servlet-name>/<servlet-class> without too much effort. <init-param> has more impact. We need to give access to initialization parameters through ServletConfig.getInitParameter; therefore we have to implement our own implementation of Servlet objects or reuse the Application implementation. In the first case we significantly increase the footprint of PageBox. The second option compromizes portability and raises legal issues with commercial products. We consider the first option but for the moment we only provide a simple mappping using a property file. Installation steps
Example: <init-param><param-name>ClassPath</param-name> <param-value>
<description>Archive to check in classloader</description> </init-param> <init-param> <param-name>PageboxMapping</param-name> <param-value>C:/TEMP/cocoonSupport/mapping-cocoon.properties</param-value> <description>Mapping property file</description> </init-param> <!-- Cocoon properties --> <init-param> <param-name>properties</param-name> <param-value>WEB-INF/cocoon.properties</param-value> <description>Cocoon properties</description> </init-param> <!-- SOAP properties --> <init-param> <param-name>faultListener</param-name> <param-value>org.apache.soap.server.DOMFaultListener</param-value> </init-param> ClassPath ClassPath contains the list of the libraries loaded by ClassPathLoader, separated by the OS-dependent path separator. For Cocoon 1.8,2 we need the following libraries in that order: For Apache SOAP 2.1, we need the following libraries in that order: In case of Cocoon, all needed (and supported) libraries are included in Cocoon package. In case of Soap, you can use the Cocoon Xerces but you need to download JavaMail and JavaBeans Activation Framework (JAF). We used JavaMail 1.2 and JAF 1.0.1 in our tests. Note that if you use SOAP in SMTP mode, you need additional JavaMail archive. As you can see we need large set of libraries with potential incompatibilities - which is good news for ClassPathLoader because it allows to run different sets of libraries in the same JVM :-) We also need to add Xerces and Cocoon patches, InputSource.jar and CocoonPatch.jar. They are described in components. Patches must be put in front of the patched archives. Eventually we need to add Network process archive, named cocoonSupport.jar. On the example, we also added loopback.jar that contains HTTP and SOAP loopback Web services - for demo purpose we invoke ourself -. PageboxMapping PageboxMapping contains the path of a property file like this:
rpcrouter=org.apache.soap.server.http.RPCRouterServlet messagerouter=org.apache.soap.server.http.MessageRouterServlet loopbackHTTP=loopback.loopbackServlet When the key starts with a dot (.), then it is considered as a suffix. We write here every URL ending with .xml must be served by org.apache.cocoon.Cocoon. The example means the same as <url-pattern>*.xml</url-pattern> When the key doesn't start with a dot, then it is considered as the last part of URL. We write .../rpcrouter must be served by org.apache.soap.server.http.RPCRouterServlet. Cocoon and SOAP parameters As embedded servlets are served the ServletConfig of the handling JSPservlet, you simply need to specify embedded servlet parameters in JSPservlet <init-param> like on the example.Cocoon parameters are specified in a cocoon.properties file. For the support of our processors you simply need to add two lines in cocoon.properties:
SOAP registration You must register loopbackSOAP with the following command: java org.apache.soap.server.ServiceManagerClient rpcrouter_url deploy DeploymentDescriptor.xmlwhere DeploymentDescriptor.xml was defined like this: <?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
Installation
Constellations
Versions
Demo
Contact:support@pagebox.net |