[jboss-svn-commits] JBL Code SVN: r10787 - in labs/jbossesb/trunk/product: core and 16 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Apr 5 11:55:28 EDT 2007
Author: tfennelly
Date: 2007-04-05 11:55:28 -0400 (Thu, 05 Apr 2007)
New Revision: 10787
Added:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisher.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-in.wsdl
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractInfo.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractPublisher.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publish.java
labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publisher.java
labs/jbossesb/trunk/product/tools/jboss-esb.war/
labs/jbossesb/trunk/product/tools/jboss-esb.war/WEB-INF/
labs/jbossesb/trunk/product/tools/jboss-esb.war/contract.jsp
labs/jbossesb/trunk/product/tools/jboss-esb.war/index.jsp
labs/jbossesb/trunk/product/tools/jboss-esb.war/styles.css
Modified:
labs/jbossesb/trunk/product/build.xml
labs/jbossesb/trunk/product/core/build.xml
labs/jbossesb/trunk/product/core/listeners/build.xml
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerUtil.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java
labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
labs/jbossesb/trunk/product/core/services/build.xml
labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/jboss-esb.xml
Log:
Contract Publication stuff - to support wsdl publication, but can also support others - through annotation of the action class.
Modified: labs/jbossesb/trunk/product/build.xml
===================================================================
--- labs/jbossesb/trunk/product/build.xml 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/build.xml 2007-04-05 15:55:28 UTC (rev 10787)
@@ -372,6 +372,7 @@
<copy todir="${org.jboss.esb.internal.jar.dest}">
<fileset dir="build" includes="jbossesb.sar/**"/>
</copy>
+ <jar basedir="tools/jboss-esb.war" destfile="${org.jboss.esb.internal.dest}/jboss-esb.war" />
<zip zipfile="${org.jboss.esb.internal.dest}/jbossesb.zip" basedir="${org.jboss.esb.internal.dest}/jbossesb"/>
<zip zipfile="${org.jboss.esb.internal.dest}/${esb.server.name}.zip" basedir="${org.jboss.esb.internal.dest}/${esb.server.name}"/>
<property name="esb.server.name" value="jbossesb-server-${version}"/>
Modified: labs/jbossesb/trunk/product/core/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/build.xml 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/build.xml 2007-04-05 15:55:28 UTC (rev 10787)
@@ -36,9 +36,12 @@
<!-- =================================================================== -->
<target name="org.jboss.esb.core.compile" depends="org.jboss.esb.core.prepare" description="Compile subprojects">
<echo message="Compiling submodules"/>
- <ant dir="rosetta"/>
- <ant dir="services"/>
- <ant dir="listeners"/>
+
+ <ant dir="listeners" target="generate-config-model"/>
+
+ <ant dir="rosetta"/>
+ <ant dir="services"/>
+ <ant dir="listeners"/>
</target>
<!-- =================================================================== -->
@@ -66,7 +69,10 @@
<!-- =================================================================== -->
<target name="jar" description="Build jar files">
<echo message="Building jar"/>
- <ant dir="rosetta" target="jar"/>
+
+ <ant dir="listeners" target="generate-config-model"/>
+
+ <ant dir="rosetta" target="jar"/>
<ant dir="services" target="jar"/>
<ant dir="listeners" target="jar"/>
</target>
Modified: labs/jbossesb/trunk/product/core/listeners/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/build.xml 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/build.xml 2007-04-05 15:55:28 UTC (rev 10787)
@@ -46,26 +46,27 @@
</target>
<target name="generate-config-model" depends="org.jboss.esb.listeners.prepare">
- <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="xbeans-classpath" />
- <delete dir="${gendir}" /><mkdir dir="${gendir}" />
-
- <xmlbean
- classgendir="${gendir}/classes"
- javasource="1.5"
- srcgendir="${gendir}/src"
- destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar"
- classpathref="xbeans-classpath">
- <fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.1.xsd,jbossesb-1.0.1.xsdconfig"/>
- </xmlbean>
- <!-- now add the xsd to it -->
- <jar destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar" update="true"
- basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/"
- includes="jbossesb-1.0.1.xsd"/>
- </target>
- <path id="xbeans-classpath">
- <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
- </path>
+ <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean" classpathref="xbeans-classpath" />
+ <delete dir="${gendir}" /><mkdir dir="${gendir}" />
+
+ <xmlbean
+ classgendir="${gendir}/classes"
+ javasource="1.5"
+ srcgendir="${gendir}/src"
+ destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar"
+ classpathref="xbeans-classpath">
+ <fileset dir="${org.jboss.esb.root.dir}/etc/schemas/xml/" includes="jbossesb-1.0.1.xsd,jbossesb-1.0.1.xsdconfig"/>
+ </xmlbean>
+ <!-- now add the xsd to it -->
+ <jar destfile="${org.jboss.esb.listeners.distrib.dir}/lib/jbossesb-config-model-1.0.1.jar" update="true"
+ basedir="${org.jboss.esb.root.dir}/etc/schemas/xml/"
+ includes="jbossesb-1.0.1.xsd"/>
+ </target>
+
+ <path id="xbeans-classpath">
+ <fileset dir="${org.jboss.esb.ext.lib.dir}" includes="*.jar"/>
+ </path>
<target name="org.jboss.esb.listeners.compile">
@@ -76,7 +77,7 @@
<ant inheritAll="true" dir="tests" target="org.jboss.esb.listeners.tests.compile"/>
</target>
- <target name="org.jboss.esb.listeners.internal.compile" depends="generate-config-model"
+ <target name="org.jboss.esb.listeners.internal.compile"
description="Compile all classes">
<javac
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapter.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -28,6 +28,7 @@
import org.jboss.ws.server.ServiceEndpointManagerFactory;
import org.jboss.ws.server.ServiceEndpointManager;
import org.jboss.ws.server.ServiceEndpoint;
+import org.jboss.internal.soa.esb.publish.Publish;
import javax.management.ObjectName;
import javax.xml.soap.SOAPMessage;
@@ -39,8 +40,11 @@
* JBoss Webservices endpoint adapter.
* @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
*/
+ at Publish(JBossWSAdapterContractPublisher.class)
public class JBossWSAdapter extends AbstractActionPipelineProcessor {
+ public static final String JBOSSWS_ENDPOINT = "jbossws-endpoint";
+
private static ThreadLocal<Message> messageTL = new ThreadLocal<Message>();
private String jbossws_endpoint;
@@ -50,7 +54,7 @@
* @throws ConfigurationException "jbossws-endpoint" not specified.
*/
public JBossWSAdapter(ConfigTree config) throws ConfigurationException {
- jbossws_endpoint = config.getRequiredAttribute("jbossws-endpoint");
+ jbossws_endpoint = config.getRequiredAttribute(JBOSSWS_ENDPOINT);
}
/**
@@ -62,12 +66,13 @@
* @throws ActionProcessingException
*/
public Message process(final Message message) throws ActionProcessingException {
- ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
- ServiceEndpointManager epManager = factory.getServiceEndpointManager();
- ObjectName sepID = getServiceEndpointForDestination(epManager, jbossws_endpoint);
- ServiceEndpoint sep = epManager.getServiceEndpointByID(sepID);
+ ServiceEndpoint sep = getServiceEndpoint(jbossws_endpoint);
byte[] soapMessage;
+ if(sep == null) {
+ throw new ActionProcessingException("Unknown Service Endpoint '" + jbossws_endpoint + "'.");
+ }
+
soapMessage = getSOAPMessagePayload(message);
try {
messageTL.set(message);
@@ -111,15 +116,23 @@
return messageTL.get();
}
- private ObjectName getServiceEndpointForDestination(ServiceEndpointManager epManager, String endpointName) throws ActionProcessingException {
- for (ObjectName aux : epManager.getServiceEndpoints()) {
- String endpoint = aux.getKeyProperty("endpoint");
+ /**
+ * Get the Service Endpoint based on the endpoint name.
+ * @param endpointName Service Endpoint name.
+ * @return The service endpoint, or null if the endpoint is not found.
+ */
+ protected static ServiceEndpoint getServiceEndpoint(String endpointName) {
+ ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
+ ServiceEndpointManager epManager = factory.getServiceEndpointManager();
+ for (ObjectName epObjectName : epManager.getServiceEndpoints()) {
+ String endpoint = epObjectName.getKeyProperty("endpoint");
+
if (endpoint != null && endpoint.equals(endpointName)) {
- return aux;
+ return epManager.getServiceEndpointByID(epObjectName);
}
}
- throw new ActionProcessingException("Service Endpoint '" + endpointName + "' not deployed.");
+ return null;
}
}
\ No newline at end of file
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisher.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisher.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisher.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.actions.soap;
+
+import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
+import org.jboss.internal.soa.esb.publish.ContractInfo;
+import org.jboss.soa.esb.listeners.config.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.config.PropertyDocument.Property;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.dom.YADOMUtil;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.ws.server.ServiceEndpoint;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.Attr;
+import org.xml.sax.SAXException;
+import org.milyn.xml.XmlUtil;
+
+import javax.xml.transform.stream.StreamResult;
+import java.util.List;
+import java.io.ByteArrayOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URI;
+
+/**
+ * Contract publisher for a JBossWS endpoint.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBossWSAdapterContractPublisher implements ActionContractPublisher {
+
+ private String endpointName;
+
+ /**
+ * Set the JBossWS action configuration.
+ * @param actionConfig action config.
+ * @throws ConfigurationException Bad config.
+ */
+ public void setActionConfig(Action actionConfig) throws ConfigurationException {
+ List<Property> properties = actionConfig.getPropertyList();
+
+ for(Property property : properties) {
+ if(property.getName().equals(JBossWSAdapter.JBOSSWS_ENDPOINT)) {
+ endpointName = property.getValue();
+ break;
+ }
+ }
+
+ if(endpointName == null) {
+ throw new ConfigurationException("Property '" + JBossWSAdapter.JBOSSWS_ENDPOINT + "' not specified.");
+ }
+ }
+
+ /**
+ * Get the contract configuration.
+ * <p/>
+ * This method impl basically returns the JBossWS WSDL, modified for
+ * the supplied EPR and its channel.
+ *
+ * @param epr Endpoint EPR.
+ * @return WSDL Contract.
+ */
+ public ContractInfo getContractInfo(EPR epr) {
+ ServiceEndpoint endpoint = JBossWSAdapter.getServiceEndpoint(endpointName);
+ ByteArrayOutputStream wsdlStream = new ByteArrayOutputStream();
+
+ try {
+ // Generate the WSDL...
+ endpoint.handleWSDLRequest(wsdlStream, new URL("http://x.y.z"), null);
+ String wsdl = updateWsdl(new String(wsdlStream.toByteArray()), epr);
+
+ return new ContractInfo("text/xml", wsdl);
+ } catch (Exception e) {
+ return new ContractInfo("text/plain", "Unavailable: " + e.getMessage());
+ }
+ }
+
+ /**
+ * Update the supplied wsdl to take account of the ESB endpoint proxying of the JBossWS
+ * invocation, as well as the fact that the transport may be different.
+ *
+ * @param wsdl WSDL input.
+ * @param epr The SOAP endpoint from the ESB perspective.
+ * @return The updated WSDL.
+ */
+ protected String updateWsdl(String wsdl, EPR epr) throws SAXException, IOException, ConfigurationException {
+ URI endpointURI = URI.create(epr.getAddr().getAddress());
+ ByteArrayOutputStream wsdlStream = new ByteArrayOutputStream();
+
+ // Now, fudge it to fix up the binding transport and endpoint addressing info...
+ Document wsdlDoc = YADOMUtil.parseStream(
+ new ByteArrayInputStream(wsdl.getBytes("UTF-8")), false, false);
+ Attr transport = (Attr) XmlUtil.getNode(wsdlDoc, "/definitions/binding/binding/@transport");
+ Attr address = (Attr) XmlUtil.getNode(wsdlDoc, "/definitions/service/port/address/@location");
+
+ // TODO: Doubt this is the correct thing to do!!
+ transport.setNodeValue("http://schemas.xmlsoap.org/soap/" + endpointURI.getScheme());
+ address.setNodeValue(endpointURI.toString());
+
+ YADOMUtil.serialize(wsdlDoc, new StreamResult(wsdlStream), true);
+
+ return new String(wsdlStream.toByteArray()).trim();
+ }
+}
Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisher.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerUtil.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/ListenerUtil.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -138,7 +138,7 @@
String jndiContextFactory = tree.getAttribute(JMSEpr.JNDI_CONTEXT_FACTORY_TAG);
if (jndiContextFactory!=null) environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndiContextFactory);
String jndiPkgPrefix = tree.getAttribute(JMSEpr.JNDI_PKG_PREFIX_TAG);
- if (jndiContextFactory!=null) environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
+ if (jndiPkgPrefix!=null ) environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
String jmsFactoryClass = getAttrAndWarn(tree,
JMSEpr.CONNECTION_FACTORY_TAG, "ConnectionFactory");
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Configuration.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -22,6 +22,7 @@
package org.jboss.soa.esb.listeners.config;
import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.listeners.LifecycleUtil;
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycle;
@@ -99,7 +100,13 @@
ByteArrayInputStream gatewayIs = new ByteArrayInputStream(gatewayBytes);
ConfigTree gatewayConfig = ConfigTree.fromInputStream(gatewayIs);
instances.addAll(LifecycleUtil.getGateways(gatewayConfig));
- return new ManagedLifecycleController(instances);
+
+ ManagedLifecycleController controller = new ManagedLifecycleController(instances);
+
+ // In parallel, create a map of the contract publication info...
+ ServicePublisher.addServicePublishers(controller, generator.getModel());
+
+ return controller;
}
}
catch (Exception e)
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ConfigurationController.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -44,7 +44,9 @@
import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException;
import org.jboss.soa.esb.parameters.ParamRepositoryFactory;
import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.soa.esb.listeners.config.ServicePublisher;
import org.xml.sax.InputSource;
+
/**
* The controller monitors changes in the jbossesb configuration file call jbossesb.xml. When
* changes are detected it validates the XML, and when it passes validation it goes on and
@@ -70,9 +72,9 @@
private long mPreviousFileTimestamp;
private boolean mIsEndRequested;
private boolean ended;
- private ManagedLifecycleController controller ;
-
- /**
+ private ManagedLifecycleController controller ;
+
+ /**
* Start the Controller externally.
* @param args - arg[0] - the parameter file name
*/
@@ -117,7 +119,7 @@
} else {
mValidationFileName = validationFileName;
}
-
+
processConfiguration() ;
}
/**
@@ -253,17 +255,17 @@
* To request the end of processing.
*/
public void requestEnd()
+ {
+ endedLock.lock() ;
+ try
{
- endedLock.lock() ;
- try
- {
- mIsEndRequested = true;
- endRequested.signalAll() ;
- }
- finally
- {
- endedLock.unlock() ;
- }
+ mIsEndRequested = true;
+ endRequested.signalAll() ;
+ }
+ finally
+ {
+ endedLock.unlock() ;
+ }
}
/**
@@ -303,22 +305,26 @@
" the generation process of the jbossesb-listener.xml and the jbossesb-gateway.xml.");
Generator generator = new Generator(new ByteArrayInputStream(configXml.getBytes()));
generator.generate(mConfigDirectory);
- mLogger.info("Parameter reload completed.");
- stopController() ;
-
- final List<ManagedLifecycle> instances = LifecycleUtil.getListeners(mListenerConfigFile) ;
- instances.addAll(LifecycleUtil.getGateways(mGatewayConfigFile)) ;
-
- controller = new ManagedLifecycleController(instances) ;
- try
- {
- controller.start() ;
- }
- catch (final ManagedLifecycleException mle)
- {
- controller = null ;
- mLogger.error("Unexpected exception starting controller", mle) ;
- }
+
+ mLogger.info("Parameter reload completed.");
+ stopController() ;
+
+ final List<ManagedLifecycle> instances = LifecycleUtil.getListeners(mListenerConfigFile) ;
+ instances.addAll(LifecycleUtil.getGateways(mGatewayConfigFile)) ;
+
+ controller = new ManagedLifecycleController(instances) ;
+ try
+ {
+ controller.start() ;
+
+ // In parallel, create a map of the contract publication info...
+ ServicePublisher.addServicePublishers(controller, generator.getModel());
+ }
+ catch (final ManagedLifecycleException mle)
+ {
+ controller = null ;
+ mLogger.error("Unexpected exception starting controller", mle) ;
+ }
} else {
StringBuffer buffer = new StringBuffer("The configuration file "
+ mConfigFileName + "\n did not pass validation for the following reasons: \n");
@@ -339,8 +345,8 @@
}
}
}
-
- /**
+
+ /**
* Check the file timestamp and return true when it changes. In other
* words this only works for files for now.
*
@@ -374,6 +380,7 @@
{
try
{
+ ServicePublisher.removeServicePublishers(controller);
controller.stop();
}
catch (final ManagedLifecycleException mle)
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/Generator.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -217,9 +217,9 @@
* @return The Service to which the
*/
public Service getService(Listener listener) {
- List<ServiceDocument.Service> services = jbossesb.getServices().getServiceList();
-
- for(Service service : services) {
+ List<Service> services = getServices();
+
+ for(Service service : services) {
for(Listener serviceListener : service.getListeners().getListenerList()) {
if(serviceListener == listener) {
return service;
@@ -230,7 +230,15 @@
throw new IllegalStateException("No Service instance found for the supplied Listener instance. This should not be possible if the Listener instance was provided by this configuration. Where has this Listener instance come from?");
}
- /**
+ /**
+ * Get the Service list.
+ * @return Service list.
+ */
+ public List<Service> getServices() {
+ return jbossesb.getServices().getServiceList();
+ }
+
+ /**
* Get the <bus> configuration matching the supplied busid reference value.
* @param busid The required <bus> configuration reference value.
* @return The Bus configuration instance.
@@ -281,9 +289,9 @@
private List<Listener> getListeners(boolean isGateway) {
List<Listener> gateways = new ArrayList<Listener>();
if (jbossesb.getServices() != null) {
- List<Service> services = jbossesb.getServices().getServiceList();
-
- for(Service service : services) {
+ List<Service> services = getServices();
+
+ for(Service service : services) {
for(Listener listener : service.getListeners().getListenerList()) {
if(listener.getIsGateway() == isGateway) {
gateways.add(listener);
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/JBoss4ESBDeployment.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -92,6 +92,7 @@
try
{
Thread.currentThread().setContextClassLoader(classloader);
+ ServicePublisher.removeServicePublishers(controller);
controller.stop();
}
finally
Added: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,144 @@
+package org.jboss.soa.esb.listeners.config;
+
+import org.jboss.soa.esb.listeners.config.Generator.XMLBeansModel;
+import org.jboss.soa.esb.listeners.config.ServiceDocument.Service;
+import org.jboss.soa.esb.listeners.config.ActionDocument.Action;
+import org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController;
+import org.jboss.soa.esb.util.ClassUtil;
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+import org.jboss.internal.soa.esb.publish.ContractPublisher;
+import org.jboss.internal.soa.esb.publish.ActionContractPublisher;
+import org.jboss.internal.soa.esb.publish.Publish;
+
+import java.util.*;
+
+/**
+ * Service contract publisher.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ServicePublisher {
+
+ private String serviceName;
+ private String category;
+ private ContractPublisher contractPublisher;
+ private static Map<ManagedLifecycleController, List<ServicePublisher>> servicePublishers = new LinkedHashMap<ManagedLifecycleController, List<ServicePublisher>>();
+
+ /**
+ * Public constructor.
+ *
+ * @param name Service name.
+ * @param category Service category.
+ * @paaram contractPublisher Contract publisher implementation.
+ */
+ protected ServicePublisher(String name, String category, ContractPublisher contractPublisher) {
+ AssertArgument.isNotNullAndNotEmpty(name, "name");
+ AssertArgument.isNotNullAndNotEmpty(category, "category");
+
+ this.serviceName = name;
+ this.category = category;
+ this.contractPublisher = contractPublisher;
+ }
+
+ /**
+ * Get the name of the Service.
+ *
+ * @return The service name.
+ */
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ /**
+ * Get the Service category.
+ *
+ * @return The service category.
+ */
+ public String getCategory() {
+ return category;
+ }
+
+ /**
+ * Get the contract publisher for the Service associated with this publisher.
+ *
+ * @return The contract publisher.
+ */
+ public ContractPublisher getContractPublisher() {
+ return contractPublisher;
+ }
+
+ /**
+ * Add service publication from the suppplied configuration, keying them under the
+ * controller that is managing these services.
+ * <p/>
+ * This is used later to publish as service list, their EPRs (from the reg),
+ * links to their contract definitions, and the contract definitions
+ * (e.g. wsdls) themselves.
+ *
+ * @param model The configuration model.
+ */
+ public static void addServicePublishers(ManagedLifecycleController controller, XMLBeansModel model) {
+ List<Service> serviceConfigs = model.getServices();
+ List<ServicePublisher> publishers = new ArrayList<ServicePublisher>();
+
+ publishers.clear();
+ for (Service service : serviceConfigs) {
+ ContractPublisher publisher = getConractPublisher(service);
+
+ publishers.add(new ServicePublisher(service.getName(), service.getCategory(), publisher));
+ }
+
+ servicePublishers.put(controller, publishers);
+ }
+
+ public static List<ServicePublisher> getServicePublishers() {
+ List<ServicePublisher> publishers = new ArrayList<ServicePublisher>();
+ Collection<List<ServicePublisher>> allPublishers = servicePublishers.values();
+
+ for(List<ServicePublisher> curPublisherList : allPublishers) {
+ publishers.addAll(curPublisherList);
+ }
+
+ return publishers;
+ }
+
+ /**
+ * Remove the service publications for the services under the control of the supplied controller.
+ * @param controller Controller.
+ */
+ public static void removeServicePublishers(ManagedLifecycleController controller) {
+ servicePublishers.remove(controller);
+ }
+
+ private static ContractPublisher getConractPublisher(Service service) {
+ for (Action action : service.getActions().getActionList()) {
+ Class actionClass;
+
+ try {
+ actionClass = ClassUtil.forName(action.getClass1(), ServicePublisher.class);
+ } catch (ClassNotFoundException e) {
+ throw new RuntimeException("Failed to find action class '" + action.getClass1() + "'.");
+ }
+
+ Publish publishAnnotation = (Publish) actionClass.getAnnotation(Publish.class);
+ if (publishAnnotation != null) {
+ Class publisherClass;
+ ActionContractPublisher publisher = null;
+
+ publisherClass = publishAnnotation.value();
+ try {
+ publisher = (ActionContractPublisher) publisherClass.newInstance();
+ publisher.setActionConfig(action);
+ return publisher;
+ } catch (ClassCastException e) {
+ throw new RuntimeException("Action Contract Publisher class '" + publisherClass.getName() + "' must implement " + ActionContractPublisher.class.getName());
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to instantiate Contract Publisher '" + publisherClass.getName() + "'. Class must implement a public default constructor.", e);
+ }
+ }
+ }
+
+ // No publisher configured on any of the actions in the processing chain...
+ return null;
+ }
+}
Property changes on: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/config/ServicePublisher.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListener.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -26,12 +26,15 @@
import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.listeners.message.AbstractMessageComposer;
import org.jboss.soa.esb.listeners.ListenerTagNames;
+import org.jboss.soa.esb.listeners.ListenerUtil;
import org.jboss.soa.esb.helpers.ConfigTree;
import org.jboss.soa.esb.helpers.KeyValuePair;
import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.addressing.EPR;
import org.jboss.soa.esb.actions.ActionUtils;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.services.registry.RegistryException;
+import org.jboss.soa.esb.services.registry.RegistryFactory;
import org.jboss.remoting.ServerInvocationHandler;
import org.jboss.remoting.ServerInvoker;
import org.jboss.remoting.InvokerLocator;
@@ -116,6 +119,18 @@
* Simple flag marking the listener instance as being initialised or un-initialised.
*/
private boolean initialised;
+ /**
+ * Service category to which this listener is associated.
+ */
+ private String serviceCategory;
+ /**
+ * Service name to which this listener is associated.
+ */
+ private String serviceName;
+ /**
+ * Listener endpoint EPR.
+ */
+ private EPR endpointReference;
/**
* Construct the threaded managed lifecycle.
@@ -126,6 +141,8 @@
*/
public JBossRemotingGatewayListener(ConfigTree config) throws ConfigurationException {
super(config);
+ serviceCategory = config.getAttribute(ListenerTagNames.TARGET_SERVICE_CATEGORY_TAG);
+ serviceName = config.getAttribute(ListenerTagNames.TARGET_SERVICE_NAME_TAG);
}
/**
@@ -162,6 +179,7 @@
}
try {
+ endpointReference = new EPR(getJbrServerLocatorURI());
initialiseESBDeliveryAdapter();
initaliseJBRConnectorConfiguration(connectorConfig);
} catch (ConfigurationException e) {
@@ -179,7 +197,30 @@
throw new ManagedLifecycleException("Unexpected request to start JBoss Remoting Gateway listener '" + getConfig().getName() + "'. Gateway already started.");
}
+ // Start the JBR Server...
+ startJBRServer();
+
+ // Regsiter the JBR Endpoint...
try {
+ registerEndpoint();
+ } catch (Throwable t) {
+ logger.error("Unable to register service endpoint '" + endpointReference.getAddr().getAddress()
+ + "' for service '" + serviceCategory + ":" + serviceName + "'. Stopping JBossRemoting Server...", t);
+ stopJBRServer();
+ }
+ }
+
+ protected void doStop() throws ManagedLifecycleException {
+ if(!isStarted()) {
+ throw new ManagedLifecycleException("Unexpected request to stop JBoss Remoting Gateway listener '" + getConfig().getName() + "'. Gateway not running.");
+ }
+
+ unregisterEndpoint();
+ stopJBRServer();
+ }
+
+ private void startJBRServer() throws ManagedLifecycleException {
+ try {
InvokerLocator locator = new InvokerLocator(jbrServerLocatorURI);
connector = new Connector(locator, connectorConfig);
@@ -194,11 +235,7 @@
}
}
- protected void doStop() throws ManagedLifecycleException {
- if(!isStarted()) {
- throw new ManagedLifecycleException("Unexpected request to stop JBoss Remoting Gateway listener '" + getConfig().getName() + "'. Gateway not running.");
- }
-
+ private void stopJBRServer() throws ManagedLifecycleException {
try {
connector.stop();
logger.info("JBoss Remoting Gateway listener '" + getConfig().getName() + "' stopped.");
@@ -209,6 +246,21 @@
}
}
+ private void registerEndpoint() throws ConfigurationException, RegistryException {
+ String serviceDescription = getConfig().getAttribute(ListenerTagNames.SERVICE_DESCRIPTION_TAG);
+ RegistryFactory.getRegistry().registerEPR(serviceCategory, serviceName, serviceDescription,
+ endpointReference, endpointReference.getAddr().getAddress());
+ }
+
+ private void unregisterEndpoint() {
+ try {
+ RegistryFactory.getRegistry().unRegisterEPR(serviceCategory, serviceName, endpointReference);
+ } catch (Throwable t) {
+ logger.error("Unable to unregister service endpoint '" + endpointReference.getAddr().getAddress()
+ + "' for service '" + serviceCategory + ":" + serviceName + "'.", t);
+ }
+ }
+
protected void doDestroy() throws ManagedLifecycleException {
}
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/gateway/JmsGatewayListener.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -404,7 +404,7 @@
return null;
} // ________________________________
- /**
+ /**
* Default gateway action for plain jms messages <p/>It will just drop the
* jms message contents into a esb Message
*
Added: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.soa.esb.actions.soap;
+
+import junit.framework.TestCase;
+import org.jboss.soa.esb.addressing.EPR;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.soa.esb.StringUtils;
+import org.jboss.internal.soa.esb.util.StreamUtils;
+import org.xml.sax.SAXException;
+
+import java.net.URI;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class JBossWSAdapterContractPublisherUnitTest extends TestCase {
+
+ public void test() throws ConfigurationException, IOException, SAXException {
+ JBossWSAdapterContractPublisher publisher = new JBossWSAdapterContractPublisher();
+ String wsdlIn = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-in.wsdl")));
+ String wsdlOutExpected = new String(StreamUtils.readStream(getClass().getResourceAsStream("test-out-expected.wsdl")));
+ EPR epr = new EPR(URI.create("socket://x.y.x:8989/"));
+
+ String wsdlOut = publisher.updateWsdl(wsdlIn, epr);
+ System.out.println(wsdlOut);
+ assertTrue("WSDL Update failed.", StringUtils.equalsIgnoreLinebreaks(wsdlOutExpected, wsdlOut, false));
+ }
+}
Property changes on: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/JBossWSAdapterContractPublisherUnitTest.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-in.wsdl
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-in.wsdl (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-in.wsdl 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld">
+ <types/>
+ <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
+ <part name="String_1" type="xsd:string"/>
+
+ </message>
+ <message name="GoodbyeWorldWS_sayGoodbye">
+ <part name="String_1" type="xsd:string"/>
+ </message>
+ <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+ <message name="GoodbyeWorldWS_sayGoodbyeResponse">
+ <part name="result" type="xsd:string"/>
+ </message>
+ <portType name="GoodbyeWorldWS">
+
+ <operation name="sayGoodbye" parameterOrder="String_1">
+ <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
+ <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
+ </operation>
+ <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
+ <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
+ <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="GoodbyeWorldWSBinding" type="tns:GoodbyeWorldWS">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="sayGoodbye">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+ </output>
+ </operation>
+ <operation name="sayGoodbyeWithoutResponse">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+ </output>
+ </operation>
+ </binding>
+ <service name="GoodbyeWorldWSService">
+ <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+ <soap:address location="http://tfennelly:8080/Quickstart_webservice_jbossws_adapter_01/GoodbyeWorldWS"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl (rev 0)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/soap/test-out-expected.wsdl 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,54 @@
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice_war1/goodbyeworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="GoodbyeWorldWSService" targetNamespace="http://webservice_war1/goodbyeworld">
+ <types/>
+ <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponse">
+ <part name="String_1" type="xsd:string"/>
+
+ </message>
+ <message name="GoodbyeWorldWS_sayGoodbye">
+ <part name="String_1" type="xsd:string"/>
+ </message>
+ <message name="GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+ <message name="GoodbyeWorldWS_sayGoodbyeResponse">
+ <part name="result" type="xsd:string"/>
+ </message>
+ <portType name="GoodbyeWorldWS">
+
+ <operation name="sayGoodbye" parameterOrder="String_1">
+ <input message="tns:GoodbyeWorldWS_sayGoodbye"/>
+ <output message="tns:GoodbyeWorldWS_sayGoodbyeResponse"/>
+ </operation>
+ <operation name="sayGoodbyeWithoutResponse" parameterOrder="String_1">
+ <input message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponse"/>
+ <output message="tns:GoodbyeWorldWS_sayGoodbyeWithoutResponseResponse"/>
+ </operation>
+ </portType>
+
+ <binding name="GoodbyeWorldWSBinding" type="tns:GoodbyeWorldWS">
+ <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/socket"/>
+ <operation name="sayGoodbye">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+ </output>
+ </operation>
+ <operation name="sayGoodbyeWithoutResponse">
+ <soap:operation soapAction=""/>
+ <input>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+ </input>
+ <output>
+ <soap:body namespace="http://webservice_war1/goodbyeworld" use="literal"/>
+
+ </output>
+ </operation>
+ </binding>
+ <service name="GoodbyeWorldWSService">
+ <port binding="tns:GoodbyeWorldWSBinding" name="GoodbyeWorldWSPort">
+ <soap:address location="socket://x.y.x:8989/"/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/config/GeneratorUnitTest.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -108,7 +108,7 @@
}
}
- private String removeEOL(String string) {
+ public static String removeEOL(String string) {
StringBuffer stringBuf = new StringBuffer(string.length());
for(int i = 0; i < string.length(); i++) {
Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/gateway/JBossRemotingGatewayListenerUnitTest.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -212,7 +212,8 @@
listener.doInitialise();
fail("Expected a ManagedLifecycleException.");
} catch (ConfigurationException e) {
- fail("Unexpected ConfigurationException.");
+ e.printStackTrace();
+ fail("Unexpected ConfigurationException. " + e.getMessage());
} catch (ManagedLifecycleException e) {
Throwable cause = e.getCause();
Modified: labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java
===================================================================
--- labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/rosetta/src/org/jboss/soa/esb/dom/YADOMUtil.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -23,9 +23,13 @@
import java.io.File;
import java.io.OutputStream;
+import java.io.InputStream;
+import java.io.IOException;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
@@ -38,6 +42,7 @@
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
/**
* Yet another set of DOM utility methods.
@@ -71,7 +76,48 @@
return doc;
}
- /**
+ /**
+ * Parse the XML stream and return the associated W3C Document object.
+ *
+ * @param stream
+ * The stream to be parsed.
+ * @param validate
+ * True if the document is to be validated, otherwise false.
+ * @param expandEntityRefs
+ * Expand entity References as per
+ * {@link DocumentBuilderFactory#setExpandEntityReferences(boolean)}.
+ * @return The W3C Document object associated with the input stream.
+ */
+ public static Document parseStream(InputStream stream, boolean validate,
+ boolean expandEntityRefs) throws SAXException, IOException {
+ if (stream == null) {
+ throw new IllegalArgumentException(
+ "null 'stream' arg in method call.");
+ }
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory
+ .newInstance();
+ DocumentBuilder docBuilder = null;
+
+ factory.setValidating(validate);
+ factory.setExpandEntityReferences(expandEntityRefs);
+ docBuilder = factory.newDocumentBuilder();
+
+ return docBuilder.parse(stream);
+ } catch (ParserConfigurationException e) {
+ IllegalStateException state = new IllegalStateException(
+ "Unable to parse XML stream - XML Parser not configured correctly.");
+ state.initCause(e);
+ throw state;
+ } catch (FactoryConfigurationError e) {
+ IllegalStateException state = new IllegalStateException(
+ "Unable to parse XML stream - DocumentBuilderFactory not configured correctly.");
+ state.initCause(e);
+ throw state;
+ }
+ }
+
+ /**
* Add an Element node to the supplied parent name.
* @param parent The parent to to which the new Element node is to be added.
* @param elementName The name of the Element to be added.
@@ -119,22 +165,39 @@
serialize(node, new StreamResult(new File(outdir, fileName)));
}
- public static void serialize(Node node, OutputStream out) throws ConfigurationException {
+ public static void serialize(Node node, OutputStream out) throws ConfigurationException {
serialize(node, new StreamResult(out));
- }
+ }
+ /**
+ * Serialize the supplied DOM node to the supplied DOM StreamResult instance.
+ * @param node The DOM node to be serialised.
+ * @param streamRes The StreamResult into which the node is to be serialised.
+ * @throws ConfigurationException Unable to serialise the node.
+ */
+ public static void serialize(Node node, StreamResult streamRes) throws ConfigurationException {
+ serialize(node, streamRes, false);
+ }
+
/**
* Serialize the supplied DOM node to the supplied DOM StreamResult instance.
* @param node The DOM node to be serialised.
* @param streamRes The StreamResult into which the node is to be serialised.
+ * @param omitXmlDecl Omit the XML declaration.
* @throws ConfigurationException Unable to serialise the node.
*/
- public static void serialize(Node node, StreamResult streamRes) throws ConfigurationException {
+ public static void serialize(Node node, StreamResult streamRes, boolean omitXmlDecl) throws ConfigurationException {
DOMSource domSource = new DOMSource(node);
try {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
+
+ // There's a bug in Java 5 re this code (formatting).
+ // See http://forum.java.sun.com/thread.jspa?threadID=562510&start=0 and it explains the
+ // whys of the following code.
+ // transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "4");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, (omitXmlDecl?"yes":"no"));
transformer.transform(domSource, streamRes);
} catch (Exception e) {
throw new ConfigurationException("Failed to serialize ESB Configuration Document instance.", e);
Modified: labs/jbossesb/trunk/product/core/services/build.xml
===================================================================
--- labs/jbossesb/trunk/product/core/services/build.xml 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/core/services/build.xml 2007-04-05 15:55:28 UTC (rev 10787)
@@ -98,6 +98,7 @@
<path refid="org.jboss.esb.services.base.classpath"/>
<pathelement location="${org.jboss.esb.internal.dest}/classes/rosetta"/>
<pathelement location="${org.jboss.esb.internal.dest}/classes/listeners"/>
+ <pathelement location="${org.jboss.esb.internal.dest}/schema-model/classes"/>
</path>
<!-- =================================================================== -->
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ActionContractPublisher.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,21 @@
+package org.jboss.internal.soa.esb.publish;
+
+import org.jboss.soa.esb.listeners.config.ActionDocument.Action;
+import org.jboss.soa.esb.ConfigurationException;
+import org.jboss.internal.soa.esb.publish.ContractPublisher;
+
+/**
+ * Action contract Publisher.
+ *
+ * @author
+ */
+public interface ActionContractPublisher extends ContractPublisher {
+
+ /**
+ * Set the action configuration.
+ *
+ * @param actionConfig The action configuration instance.
+ * @throws org.jboss.soa.esb.ConfigurationException Configuration exception.
+ */
+ public void setActionConfig(Action actionConfig) throws ConfigurationException;
+}
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractInfo.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractInfo.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractInfo.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.publish;
+
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
+
+/**
+ * Endpoint contract publication information.
+ * <p/>
+ * The contract definition e.g. WSDL.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public class ContractInfo {
+
+ private String mimeType;
+ private String data;
+
+ /**
+ * Public constructor.
+ * @param mimeType Contract data MIME type.
+ * @param data Contract data.
+ */
+ public ContractInfo(String mimeType, String data) {
+ AssertArgument.isNotNullAndNotEmpty(mimeType, "mimeType");
+ AssertArgument.isNotNullAndNotEmpty(data, "data");
+
+ this.mimeType = mimeType;
+ this.data = data;
+ }
+
+ /**
+ * Get the contract data MIME type.
+ * @return Contract data mime type.
+ */
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Get the contract data.
+ * @return Contract data.
+ */
+ public String getData() {
+ return data;
+ }
+}
Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractInfo.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractPublisher.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractPublisher.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractPublisher.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,24 @@
+package org.jboss.internal.soa.esb.publish;
+
+import org.jboss.soa.esb.addressing.EPR;
+
+/**
+ * Contract Publisher.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+public abstract interface ContractPublisher extends Publisher {
+
+ /**
+ * Get the contract information.
+ * <p/>
+ * A Service may publish a number of addressable endpoints. The publisher
+ * will likely return different contract info depending on the endpoint EPR.
+ * <p/>
+ * This info can be stored and published from a global registry of some sort.
+ *
+ * @param epr Endpoint EPR.
+ * @return Contract information.
+ */
+ public ContractInfo getContractInfo(EPR epr);
+}
Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/ContractPublisher.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publish.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publish.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publish.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.internal.soa.esb.publish;
+
+import java.lang.annotation.*;
+
+/**
+ * Publish annotation.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Documented
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface Publish {
+
+ /**
+ * The get the {@link org.jboss.internal.soa.esb.publish.Publisher} class runtime.
+ * @return The {@link org.jboss.internal.soa.esb.publish.Publisher} class runtime.
+ */
+ public Class value();
+}
Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publish.java
___________________________________________________________________
Name: svn:eol-style
+ native
Added: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publisher.java
===================================================================
--- labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publisher.java (rev 0)
+++ labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publisher.java 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,7 @@
+package org.jboss.internal.soa.esb.publish;
+
+/**
+ * @author
+ */
+public interface Publisher {
+}
Property changes on: labs/jbossesb/trunk/product/core/services/src/org/jboss/internal/soa/esb/publish/Publisher.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/jboss-esb.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/jboss-esb.xml 2007-04-05 13:43:50 UTC (rev 10786)
+++ labs/jbossesb/trunk/product/samples/quickstarts/webservice_jbossws_adapter_01/jboss-esb.xml 2007-04-05 15:55:28 UTC (rev 10787)
@@ -51,6 +51,19 @@
</action>
</actions>
</service>
+
+ <!-- service category="AnotherServiceCategory" name="AnotherService" description="WS Frontend speaks natively to the ESB">
+
+ <listeners>
+ <jms-listener name="JMS-ESBListener" busidref="quickstartEsbChannel" maxThreads="1"/>
+ </listeners>
+ <actions>
+ <action name="print-before" class="org.jboss.soa.esb.actions.SystemPrintln">
+ <property name="message"
+ value="[Quickstart_webservice_jbossws_adapter_01] Message before invoking jbossws endpoint"/>
+ </action>
+ </actions>
+ </service -->
</services>
</jbossesb>
Added: labs/jbossesb/trunk/product/tools/jboss-esb.war/contract.jsp
===================================================================
--- labs/jbossesb/trunk/product/tools/jboss-esb.war/contract.jsp (rev 0)
+++ labs/jbossesb/trunk/product/tools/jboss-esb.war/contract.jsp 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,59 @@
+<%@ page import="java.util.List" %>
+<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
+<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
+<%@ page import="java.net.URI" %>
+<%@ page import="org.jboss.internal.soa.esb.publish.ContractInfo" %>
+<%
+ List publishers = ServicePublisher.getServicePublishers();
+ Registry registry = RegistryFactory.getRegistry();
+ String targetServiceCat = request.getParameter("serviceCat");
+ String targetServiceName = request.getParameter("serviceName");
+ String targetProtocol = request.getParameter("protocol");
+ ContractInfo contractInfo = null;
+ String contractData = null;
+
+ for (int i = 0; i < publishers.size() && contractInfo == null; i++) {
+ ServicePublisher publisher = (ServicePublisher) publishers.get(i);
+ String serviceCategory = publisher.getCategory();
+ String serviceName = publisher.getServiceName();
+ List eprs;
+
+ if(publisher.getContractPublisher() == null) {
+ continue;
+ } else if (!serviceCategory.equalsIgnoreCase(targetServiceCat) ||
+ !serviceName.equalsIgnoreCase(targetServiceName)) {
+ continue;
+ }
+
+ try {
+ eprs = (List) registry.findEPRs(serviceCategory + "-gateway", serviceName);
+ } catch (RegistryException e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ }
+
+ for (int ii = 0; ii < eprs.size(); ii++) {
+ EPR epr = (EPR) eprs.get(ii);
+ URI eprURI = URI.create(epr.getAddr().getAddress());
+ String protocol = eprURI.getScheme();
+
+ if (protocol.equalsIgnoreCase(targetProtocol)) {
+ contractInfo = publisher.getContractPublisher().getContractInfo(epr);
+ break;
+ }
+ }
+
+ if(contractInfo != null) {
+ contractData = contractInfo.getData();
+ response.setContentType(contractInfo.getMimeType());
+ } else {
+ contractData = "<Unavailable/>";
+ response.setContentType("text/xml");
+ }
+ }
+%>
+<%=contractData%>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/tools/jboss-esb.war/index.jsp
===================================================================
--- labs/jbossesb/trunk/product/tools/jboss-esb.war/index.jsp (rev 0)
+++ labs/jbossesb/trunk/product/tools/jboss-esb.war/index.jsp 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,76 @@
+<%@ page import="org.jboss.soa.esb.listeners.config.ServicePublisher" %>
+<%@ page import="java.util.List" %>
+<%@ page import="org.jboss.soa.esb.services.registry.Registry" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryFactory" %>
+<%@ page import="org.jboss.soa.esb.addressing.EPR" %>
+<%@ page import="java.net.URI" %>
+<%@ page import="org.jboss.soa.esb.services.registry.RegistryException" %>
+<%@ page import="java.util.ArrayList" %>
+<html>
+<head>
+ <title>JBoss ESB - Service List</title>
+ <link rel='stylesheet' href='./styles.css'>
+</head>
+<body>
+
+<div class="pageSection">
+<h2>JBoss ESB Service Deployments</h2>
+</div>
+
+<div class="pageSection">
+ <%
+ List publishers = ServicePublisher.getServicePublishers();
+ Registry registry = RegistryFactory.getRegistry();
+
+ for (int i = 0; i < publishers.size(); i++) {
+ ServicePublisher publisher = (ServicePublisher) publishers.get(i);
+ String serviceCategory = publisher.getCategory();
+ String serviceName = publisher.getServiceName();
+ List eprs;
+
+ try {
+ eprs = (List) registry.findEPRs(serviceCategory, serviceName);
+ } catch (RegistryException e) {
+ // ignore for now - just return an empty list
+ eprs = new ArrayList();
+ }
+ %>
+ <fieldset>
+ <legend><b><%=serviceCategory%>:<%=serviceName%></b></legend>
+ <%
+ for (int ii = 0; ii < eprs.size(); ii++) {
+ EPR epr = (EPR) eprs.get(ii);
+ URI eprURI = URI.create(epr.getAddr().getAddress());
+ String protocol = eprURI.getScheme();
+ String relContractURI = "contract.jsp?serviceCat=" + serviceCategory + "&serviceName=" + serviceName + "&protocol=" + protocol;
+ URI thisPage = URI.create(request.getRequestURL().toString());
+ URI contractURI = thisPage.resolve(relContractURI);
+ %>
+ <fieldset>
+ <legend><b><%=protocol.toUpperCase()%></b></legend>
+
+ <ul>
+ <li><b>Endpoint</b>: <%=eprURI%></li>
+ <%
+ if(publisher.getContractPublisher() != null) {
+ %>
+ <li><b>Contract</b>: <a href="<%=relContractURI%>"><%=contractURI%></a></li>
+ <%
+ } else {
+ %>
+ <li><b>Contract</b>: Unavailable</li>
+ <%
+ }
+ %>
+ </ul>
+ </fieldset>
+ <%
+ }
+ %>
+ </fieldset>
+ <%
+ }
+ %>
+</div>
+</body>
+</html>
Added: labs/jbossesb/trunk/product/tools/jboss-esb.war/styles.css
===================================================================
--- labs/jbossesb/trunk/product/tools/jboss-esb.war/styles.css (rev 0)
+++ labs/jbossesb/trunk/product/tools/jboss-esb.war/styles.css 2007-04-05 15:55:28 UTC (rev 10787)
@@ -0,0 +1,185 @@
+
+/* table for list views */
+.table_list {
+}
+
+/* table for detail views */
+.table_form {
+}
+
+.pageHeader {
+ font-size: 14pt;
+ font-weight: BOLD;
+ color: #ffffff;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-color:#000066;
+ margin-bottom:15px;
+ padding-left:15px;
+ padding-top:5px;
+ padding-bottom:5px;
+ background-color: #aaaadd;
+ max-width: 900px;
+}
+
+.pageSection {
+ padding-left:15px;
+ margin-bottom: 5px;
+}
+
+.metrics
+{
+ font-size: 6pt;
+ background-color: #dddddd;
+ width: 100%;
+}
+
+/* table row header */
+.list_tr_head {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ font-weight: 600;
+ text-align: center;
+ background-color: #aaaadd;
+}
+
+/* table row list view */
+.list_tr {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view odd lines */
+.list_tr_even {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #ffffff;
+}
+
+/* table row list view even lines */
+.list_tr_odd {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+}
+
+/* form label */
+.form_label {
+ font-family: Verdana, sans-serif;
+ font-weight: 500;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: top;
+ background-color: #dddddd;
+ padding-top: 2px;
+ padding-bottom: 2px;
+}
+
+/* form value */
+.form_value {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ vertical-align: baseline;
+}
+
+/* tiny writing */
+.tiny {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #666666;
+}
+
+/* required input fields */
+.inputmust {
+ background-color: #dddddd;
+}
+
+/* error message */
+.error {
+ font-family: Courier New;
+ color: #990000;
+}
+
+/* error message */
+.error_trace {
+ font-family: Courier New;
+}
+
+/* active tree node */
+.tree_active_label {
+ font-weight: bold;
+}
+
+body {
+ font-family: Verdana,, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+ background-color: #ffffff;
+}
+
+/* title style */
+h1 {
+ font-family: Verdana, sans-serif;
+ font-size: 14pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h2 {
+ font-family: Verdana, sans-serif;
+ font-size: 12pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h3 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 600;
+ color: #000066;
+}
+
+h4 {
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ font-weight: 500;
+ color: #000066;
+}
+
+/* table desk */
+td {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ padding-left: 5px;
+ padding-right: 5px;
+}
+
+input, textarea, select, option {
+ font-family: Verdana, sans-serif;
+ font-size: 8pt;
+ color: #000066;
+}
+
+a {
+ font-family: Verdana, sans-serif;
+ color: #0000dd;
+ text-decoration: none;
+}
+
+a:hover{
+ font-family: Verdana, sans-serif;
+ color: #cc0000;
+ text-decoration: none;
+}
+
+pre {
+ background:#dddddd
+}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list