[jboss-svn-commits] JBL Code SVN: r8606 - in labs/jbossesb/workspace/tfennelly2/product: console console/resources/WEB-INF console/src/org/jboss/soa/esb/admin/console/exchange console/src/org/jboss/soa/esb/admin/console/transform console/view console/view/transform lib/ext
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jan 2 06:59:12 EST 2007
Author: tfennelly
Date: 2007-01-02 06:59:02 -0500 (Tue, 02 Jan 2007)
New Revision: 8606
Added:
labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformation.java
labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformationView.java
labs/jbossesb/workspace/tfennelly2/product/console/view/transform/test-transformation.xhtml
labs/jbossesb/workspace/tfennelly2/product/lib/ext/milyn-smooks-csv-0.1.jar
labs/jbossesb/workspace/tfennelly2/product/lib/ext/opencsv-1.6.jar
Modified:
labs/jbossesb/workspace/tfennelly2/product/console/build.properties
labs/jbossesb/workspace/tfennelly2/product/console/build.xml
labs/jbossesb/workspace/tfennelly2/product/console/resources/WEB-INF/navigation.xml
labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/MessageExchange.java
labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java
labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceList.java
labs/jbossesb/workspace/tfennelly2/product/console/view/home.xhtml
labs/jbossesb/workspace/tfennelly2/product/console/view/transform/add-resource-parameter.xhtml
labs/jbossesb/workspace/tfennelly2/product/console/view/transform/list-resources.xhtml
labs/jbossesb/workspace/tfennelly2/product/console/view/transform/smooks-config.jsp
Log:
Added the Test Form - plus a bug fix to allow offline usage (wasn't able to parse the hibernate config becaue the XML parser was attempting to access the www to get a DTD - added a resolver to get it locally)
Modified: labs/jbossesb/workspace/tfennelly2/product/console/build.properties
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/build.properties 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/build.properties 2007-01-02 11:59:02 UTC (rev 8606)
@@ -1,5 +1,4 @@
deploy.dir=/home/tfennelly/jboss-4.0.4.GA/server/default/deploy
-#deploy.dir=/home/tfennelly/packages/apache-tomcat-5.5.20/webapps
db.host=localhost
db.port=5432
Modified: labs/jbossesb/workspace/tfennelly2/product/console/build.xml
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/build.xml 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/build.xml 2007-01-02 11:59:02 UTC (rev 8606)
@@ -52,7 +52,7 @@
<!-- Package -->
<delete file="${build.console.dir}/${package.name}.war" />
<copy todir="${resources.dir}/WEB-INF/lib">
- <fileset dir="${product.lib.ext.dir}" includes="milyn*.jar" />
+ <fileset dir="${product.lib.ext.dir}" includes="milyn*.jar,opencsv*.jar" />
</copy>
<jar destfile="${resources.dir}/WEB-INF/lib/${package.name}.jar">
<fileset dir="${resources.dir}/WEB-INF/classes" />
@@ -65,7 +65,7 @@
<fileset dir="${basedir}" includes="distro/**" />
<fileset dir="${basedir}" includes="import.sql" />
</jar>
- <delete dir="${resources.dir}/WEB-INF/lib" includes="milyn*.jar,${package.name}.jar" />
+ <delete dir="${resources.dir}/WEB-INF/lib" includes="milyn*.jar,opencsv*.jar,${package.name}.jar" />
</target>
<target name="assertTestsFailed" if="test.failed">
Modified: labs/jbossesb/workspace/tfennelly2/product/console/resources/WEB-INF/navigation.xml
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/resources/WEB-INF/navigation.xml 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/resources/WEB-INF/navigation.xml 2007-01-02 11:59:02 UTC (rev 8606)
@@ -102,6 +102,12 @@
<to-view-id>/transform/update-resource-parameter.xhtml</to-view-id>
<redirect />
</navigation-case>
+
+ <navigation-case>
+ <from-outcome>test-transformation</from-outcome>
+ <to-view-id>/transform/test-transformation.xhtml</to-view-id>
+ <redirect />
+ </navigation-case>
<navigation-case>
<from-outcome>smooks-config</from-outcome>
Modified: labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/MessageExchange.java
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/MessageExchange.java 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/MessageExchange.java 2007-01-02 11:59:02 UTC (rev 8606)
@@ -22,6 +22,8 @@
package org.jboss.soa.esb.admin.console.exchange;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -207,6 +209,33 @@
return stringBuffer.toString();
}
+ /**
+ * Get the profile list based on this message exchange.
+ * @return The list of profiles.
+ */
+ public String[] getUseragentProfiles() {
+ List<String> profiles = new ArrayList<String>();
+ String[] profileArray;
+
+ if(fromMessageType != null) {
+ profiles.add(FROM_TYPE + fromMessageType);
+ }
+ if(from != null) {
+ profiles.add(FROM + from);
+ }
+ if(toMessageType != null) {
+ profiles.add(TO_TYPE + toMessageType);
+ }
+ if(to != null) {
+ profiles.add(TO + to);
+ }
+
+ profileArray = new String[profiles.size()];
+ profiles.toArray(profileArray);
+
+ return profileArray;
+ }
+
/**
* Reset the message exchange.
*/
Modified: labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java 2007-01-02 11:59:02 UTC (rev 8606)
@@ -81,6 +81,7 @@
if(messageExchange == null || !isMessageExchangeSelected()) {
messageExchange = new MessageExchange();
Contexts.getSessionContext().set(MessageExchange.class.getName(), "set");
+ Contexts.getSessionContext().set(MessageExchange.class.getName() + "#instance", messageExchange);
fromParticipants = esbDatabase.createQuery("from Participant order by name").list();
toParticipants = esbDatabase.createQuery("from Participant order by name").list();
@@ -178,4 +179,16 @@
return (set != null && set.equals("set"));
}
+
+ /**
+ * Get the current MessageExchange instance.
+ * @return The current MessageExchange instance.
+ */
+ public static MessageExchange getMessageExchange() {
+ if(isMessageExchangeSelected()) {
+ return (MessageExchange) Contexts.getSessionContext().get(MessageExchange.class.getName() + "#instance");
+ }
+
+ throw new IllegalStateException("Call to 'getMessageExchange()' before an exchange has been selected. The calling code needs to protect itself against this condition!");
+ }
}
Modified: labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceList.java
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceList.java 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceList.java 2007-01-02 11:59:02 UTC (rev 8606)
@@ -23,14 +23,13 @@
import java.io.IOException;
import java.io.InputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.util.List;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
-import org.hibernate.MappingException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
@@ -38,6 +37,8 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
/**
@@ -51,11 +52,16 @@
private static Logger logger = Logger.getLogger(SmooksResourceList.class);
public static String getList() {
+ return getList(HibernateUtil.getSessionFactory().openSession());
+ }
+
+ public static String getList(Session session) {
StringBuffer stringBuffer = new StringBuffer();
- Session session = HibernateUtil.getSessionFactory().openSession();
List resList;
- session.beginTransaction();
+ stringBuffer.append("<?xml version=\"1.0\"?>\n");
+ stringBuffer.append("<!DOCTYPE smooks-resource-list PUBLIC \"-//MILYN//DTD SMOOKS 1.0//EN\" \"http://www.milyn.org/dtd/smooksres-list-1.0.dtd\">\n");
+ stringBuffer.append("<smooks-resource-list>\n");
resList = session.createQuery("from TransformationResource").list();
if(resList != null && !resList.isEmpty()) {
@@ -67,9 +73,9 @@
} else {
stringBuffer.append("<!-- No configurations found. -->");
}
+
+ stringBuffer.append("\n</smooks-resource-list>");
- session.getTransaction().commit();
-
return stringBuffer.toString();
}
@@ -149,8 +155,7 @@
throw new IllegalStateException("Failed to locate 'hibernate.cfg.xml' in the root fo the classpath.");
}
- DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- Document configDoc = docBuilder.parse(hibernateConfigStream);
+ Document configDoc = XmlUtil.parseStream(hibernateConfigStream, hibernateEntityResolver, false, false);
// Set the hibernate properties and mappings. There must be a "proper" way to do
// this!! I tried without doing this and I got exceptions all over the place.
@@ -196,4 +201,29 @@
}
}
+ private static HibernateEntityResolver hibernateEntityResolver = new HibernateEntityResolver();
+ private static class HibernateEntityResolver implements EntityResolver {
+
+ /* (non-Javadoc)
+ * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String)
+ */
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
+ try {
+ URI resourceURI = new URI(systemId);
+ InputStream resStream;
+
+ resStream = HibernateEntityResolver.class.getResourceAsStream("/org/hibernate" + resourceURI.getPath());
+ if(resStream == null) {
+ logger.warn("Failed to resolve Hibernate system entity [" + systemId + "].");
+ return null;
+ }
+
+ return new InputSource(resStream);
+ } catch (URISyntaxException e) {
+ logger.warn("The entity systemId was expected to be a valid URI. Was [" + systemId + "].");
+ }
+
+ return null;
+ }
+ }
}
Added: labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformation.java
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformation.java 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformation.java 2007-01-02 11:59:02 UTC (rev 8606)
@@ -0,0 +1,143 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.admin.console.transform;
+
+import static org.jboss.seam.ScopeType.SESSION;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.apache.log4j.Logger;
+import org.hibernate.Session;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.soa.esb.admin.console.SeamViewIdStack;
+import org.jboss.soa.esb.admin.console.exchange.MessageExchange;
+import org.jboss.soa.esb.admin.console.exchange.SelectMessageExchange;
+import org.milyn.SmooksException;
+import org.milyn.SmooksStandalone;
+import org.xml.sax.SAXException;
+
+/**
+ * Test Transformation action listener.
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Name("testTransformation")
+ at Scope(SESSION)
+public class TestTransformation {
+
+ private static Logger logger = Logger.getLogger(TestTransformation.class);
+
+ @In(create=true)
+ private Session esbDatabase;
+
+ @In(required=false) @Out(scope=SESSION)
+ private TestTransformationView testView;
+
+ public String show() {
+ if(testView == null) {
+ // How do we get Seam to autocreate the instance?? Tried the create=true annotation but no joy!
+ testView = new TestTransformationView();
+ }
+
+ if(!SelectMessageExchange.isMessageExchangeSelected()) {
+ SeamViewIdStack.getInstance().pushViewId("test-transformation");
+ return "select-message-exchange";
+ }
+
+ return "test-transformation";
+ }
+
+ public void applyResources() throws UnsupportedEncodingException {
+ SmooksStandalone smooks = new SmooksStandalone("UTF-8");
+ ByteArrayInputStream config = new ByteArrayInputStream(SmooksResourceList.getList(esbDatabase).getBytes("UTF-8"));
+ ByteArrayInputStream input = new ByteArrayInputStream(testView.getInput().getBytes("UTF-8"));
+ MessageExchange exchange = SelectMessageExchange.getMessageExchange();
+
+ try {
+ smooks.registerResources("Console Resources", config);
+ } catch (Throwable t) {
+ logger.error("Error loading transformation resources.", t);
+ testView.setOutput("Error Loading Transformation Resources...\n\n" + t.getClass().getName() + ": " + t.getMessage() + "\n\nCheck Java console.");
+ return;
+ }
+
+ try {
+ smooks.registerUseragent("TestUseragent", exchange.getUseragentProfiles());
+ } catch (Throwable t) {
+ logger.error("Error registering Smooks message profiles.", t);
+ testView.setOutput("Error registering Smooks message profiles...\n\n" + t.getClass().getName() + ": " + t.getMessage() + "\n\nCheck Java console.");
+ return;
+ }
+
+ try {
+ String output = smooks.filterAndSerialize("TestUseragent", input);
+ testView.setOutput(format(output));
+ } catch (Throwable t) {
+ logger.error("Error in applying Transformation/Analysis resources to message.", t);
+ if(t instanceof SmooksException && t.getCause() instanceof SAXException) {
+ testView.setOutput("Transformation Exception...\n\n" + t.getClass().getName() + ": " + t.getMessage() + "\n\nCheck Java console.\n\nNOTE: This particular error was caused by a " + t.getCause().getClass().getName() + " exception which can result from attempting to parse the incomming message with the wrong SAX Parser. If the message is not an XML message, you must specify an appropriate parser.");
+ } else {
+ testView.setOutput("Transformation Exception...\n\n" + t.getClass().getName() + ": " + t.getMessage() + "\n\nCheck Java console.");
+ }
+ }
+ }
+
+ private static TransformerFactory factory = TransformerFactory.newInstance();
+
+ /**
+ * Attempt to format the output.
+ * @param output Output to be formatted.
+ * @return Output.
+ */
+ private String format(String output) {
+ StreamSource source = new StreamSource(new ByteArrayInputStream(output.getBytes()));
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+
+ try {
+ Transformer transformer;
+
+ // 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 = factory.newTransformer();
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty("{http://xml.apache.org/xalan}indent-amount", "4");
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+ transformer.transform(source, new StreamResult(outStream));
+
+ return outStream.toString();
+ } catch (Exception e) {
+ return output;
+ }
+ }
+}
Added: labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformationView.java
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformationView.java 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/src/org/jboss/soa/esb/admin/console/transform/TestTransformationView.java 2007-01-02 11:59:02 UTC (rev 8606)
@@ -0,0 +1,61 @@
+/*
+ * 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,
+ * @author JBoss Inc.
+ */
+
+package org.jboss.soa.esb.admin.console.transform;
+
+import org.jboss.seam.annotations.Name;
+
+/**
+ * Test Transformation View.
+ *
+ * @author <a href="mailto:tom.fennelly at jboss.com">tom.fennelly at jboss.com</a>
+ */
+ at Name("testTransformationView")
+public class TestTransformationView {
+
+ private String input;
+ private String output;
+
+ /**
+ * @return Returns the input.
+ */
+ public String getInput() {
+ return input;
+ }
+ /**
+ * @param input The input to set.
+ */
+ public void setInput(String input) {
+ this.input = input;
+ }
+ /**
+ * @return Returns the output.
+ */
+ public String getOutput() {
+ return output;
+ }
+ /**
+ * @param output The output to set.
+ */
+ public void setOutput(String output) {
+ this.output = output;
+ }
+}
Modified: labs/jbossesb/workspace/tfennelly2/product/console/view/home.xhtml
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/view/home.xhtml 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/view/home.xhtml 2007-01-02 11:59:02 UTC (rev 8606)
@@ -30,6 +30,7 @@
<ul>
<li><s:link action="#{newResource.selectResourceSpec}" value="Configure New Resource" /></li>
<li><s:link action="#{manageResources.list}" value="Manage Configurations" /></li>
+ <li><s:link action="#{testTransformation.show}" value="Test Transformation" /></li>
<li><s:link action="#{resourceImport.show}" value="Import Configurations" /></li>
</ul>
</div>
Modified: labs/jbossesb/workspace/tfennelly2/product/console/view/transform/add-resource-parameter.xhtml
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/view/transform/add-resource-parameter.xhtml 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/view/transform/add-resource-parameter.xhtml 2007-01-02 11:59:02 UTC (rev 8606)
@@ -57,7 +57,7 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromParticipants}" /></h:form></b>
+ <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFrom}" /></h:form></b>
<p/>
<h1>Create Transformation/Analysis Configuration</h1>
Create a message transformation/analysis configuration for the chosen Message Exchange.
Modified: labs/jbossesb/workspace/tfennelly2/product/console/view/transform/list-resources.xhtml
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/view/transform/list-resources.xhtml 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/view/transform/list-resources.xhtml 2007-01-02 11:59:02 UTC (rev 8606)
@@ -59,6 +59,7 @@
<!-- sidebar -->
<ui:define name="sidebar">
+ <b><h:form><h:commandButton value="Test Transformation" action="#{testTransformation.show}" /></h:form></b>
<b><h:form><h:commandButton value="Reset Message Exchange" action="#{messageExchangeSelect.showFrom}" /></h:form></b>
<p/>
</ui:define>
Modified: labs/jbossesb/workspace/tfennelly2/product/console/view/transform/smooks-config.jsp
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/view/transform/smooks-config.jsp 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/view/transform/smooks-config.jsp 2007-01-02 11:59:02 UTC (rev 8606)
@@ -1,8 +1 @@
-<?xml version="1.0"?>
-<!DOCTYPE smooks-resource-list PUBLIC "-//MILYN//DTD SMOOKS 1.0//EN" "http://www.milyn.org/dtd/smooksres-list-1.0.dtd">
-
-<smooks-resource-list>
-
- <%=org.jboss.soa.esb.admin.console.transform.SmooksResourceList.getList()%>
-
-</smooks-resource-list>
+<%=org.jboss.soa.esb.admin.console.transform.SmooksResourceList.getList()%>
\ No newline at end of file
Added: labs/jbossesb/workspace/tfennelly2/product/console/view/transform/test-transformation.xhtml
===================================================================
--- labs/jbossesb/workspace/tfennelly2/product/console/view/transform/test-transformation.xhtml 2007-01-02 11:47:19 UTC (rev 8605)
+++ labs/jbossesb/workspace/tfennelly2/product/console/view/transform/test-transformation.xhtml 2007-01-02 11:59:02 UTC (rev 8606)
@@ -0,0 +1,56 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ template="template.xhtml">
+
+<!-- content -->
+<ui:define name="content">
+ <h:form>
+ <s:validateAll>
+ <div class="section">
+ <h2>Test Transformation</h2>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="InputMessage">Input Message --> <br/></h:outputLabel></div>
+ <b>from</b>: <u>#{messageExchange.from}</u><br/>
+ <b>type</b>: <u>#{messageExchange.fromMessageType}</u>
+ <div class="input">
+ <h:inputTextarea id="InputMessage" value="#{testView.input}" cols="100" rows="20" required="true" />
+ <br/><span class="errors"><h:message for="InputMessage" /></span>
+ </div>
+ </div>
+ <div class="entry errors"><h:messages globalOnly="true"/></div>
+ <div class="entry">
+ <div class="label"><f:verbatim> </f:verbatim></div>
+ <div class="input">
+ <h:commandButton value="Apply Resources To Message" action="#{testTransformation.applyResources}" class="button"/>
+ </div>
+ </div>
+ <div class="entry">
+ <div class="label"><h:outputLabel for="OutputMessage">Output Message --> </h:outputLabel></div>
+ <b>to</b>: <u>#{messageExchange.to}</u><br/>
+ <b>type</b>: <u>#{messageExchange.toMessageType}</u>
+ <div class="input">
+ <h:inputTextarea id="OutputMessage" value="#{testView.output}" cols="100" rows="20" />
+ <br/><span class="errors"><h:message for="OutputMessage" /></span>
+ </div>
+ </div>
+ </div>
+ </s:validateAll>
+ </h:form>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <b><h:form><h:commandButton value="Configure New Resource" action="#{newResource.selectResourceSpec}" /></h:form></b>
+ <b><h:form><h:commandButton value="Manage Configurations" action="#{manageResources.list}" /></h:form></b>
+ <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFrom}" /></h:form></b>
+ <p/>
+ <h1>Test Transformation/Analysis Configuration</h1>
+ Test the application of the Transformation/Analysis Resources targeted at the current Message Exchange using a sample input message.
+ <p/>
+</ui:define>
+
+</ui:composition>
Added: labs/jbossesb/workspace/tfennelly2/product/lib/ext/milyn-smooks-csv-0.1.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/tfennelly2/product/lib/ext/milyn-smooks-csv-0.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbossesb/workspace/tfennelly2/product/lib/ext/opencsv-1.6.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbossesb/workspace/tfennelly2/product/lib/ext/opencsv-1.6.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the jboss-svn-commits
mailing list