[jboss-svn-commits] JBL Code SVN: r7851 - in labs/jbossesb/trunk: product/console product/console/resources/WEB-INF product/console/resources/WEB-INF/classes product/console/src/org/jboss/soa/esb/admin/console/contract product/console/src/org/jboss/soa/esb/admin/console/exchange product/console/src/org/jboss/soa/esb/admin/console/transform product/console/src/org/jboss/soa/esb/admin/console/transform/configimport product/console/test/src/org/jboss/soa/esb/admin/console/transform product/console/view product/console/view/contract product/console/view/css product/console/view/participant product/console/view/transform product/core/listeners/src/org/jboss/soa/esb/actions/converters product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters qa/junit/src/org/jboss/soa/esb/actions
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Nov 27 12:46:41 EST 2006
Author: tfennelly
Date: 2006-11-27 12:45:40 -0500 (Mon, 27 Nov 2006)
New Revision: 7851
Added:
labs/jbossesb/trunk/product/console/view/about.xhtml
labs/jbossesb/trunk/product/console/view/features.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-finish.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-from.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-to.xhtml
Removed:
labs/jbossesb/trunk/product/console/view/transform/select-message-flow-finish.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from-type.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to-type.xhtml
labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to.xhtml
Modified:
labs/jbossesb/trunk/product/console/build.properties
labs/jbossesb/trunk/product/console/import.sql
labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml
labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/ManageContracts.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverter.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksUtils.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java
labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceImport.java
labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverterTest.java
labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/expected-1.txt
labs/jbossesb/trunk/product/console/view/contract/list-message-contracts.xhtml
labs/jbossesb/trunk/product/console/view/css/screen.css
labs/jbossesb/trunk/product/console/view/home.xhtml
labs/jbossesb/trunk/product/console/view/participant/manage-participants.xhtml
labs/jbossesb/trunk/product/console/view/participant/template.xhtml
labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml
labs/jbossesb/trunk/product/console/view/transform/import-resources.xhtml
labs/jbossesb/trunk/product/console/view/transform/list-resources.xhtml
labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml
labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml
labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-target.xhtml
labs/jbossesb/trunk/product/console/view/transform/view-resource.xhtml
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/SmooksTransformer.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/SmooksTransformerUnitTest.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/smooks-test.cdrl
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerTest.java
labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/smooks-test.cdrl
Log:
Console and transformation updates. Removed all reference to "Service", "Endpoint" and "EPR" from Transformation related components. Now just deal in terms of "Message Exchange Participants" and "Message Exchanges".
Modified: labs/jbossesb/trunk/product/console/build.properties
===================================================================
--- labs/jbossesb/trunk/product/console/build.properties 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/build.properties 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,2 +1,2 @@
-deploy.dir=/home/tfennelly/jboss-4.0.4.GA/server/default/deploy
-#deploy.dir=/home/tfennelly/packages/apache-tomcat-5.5.20/webapps
+#deploy.dir=/home/tfennelly/jboss-4.0.4.GA/server/default/deploy
+deploy.dir=/home/tfennelly/packages/apache-tomcat-5.5.20/webapps
Modified: labs/jbossesb/trunk/product/console/import.sql
===================================================================
--- labs/jbossesb/trunk/product/console/import.sql 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/import.sql 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,34 +1,34 @@
-delete from epr;
+delete from participant;
delete from messagecontract;
delete from transformationresourceparameter;
delete from transformationresource;
delete from transformationresourceparameterspec;
delete from transformationresourcespec;
-INSERT INTO epr (id, uri) VALUES (1, 'DVDStore:OrderDispatchService');
-INSERT INTO epr (id, uri) VALUES (2, 'DVDWarehouse_1:OrderHandlingService');
-INSERT INTO epr (id, uri) VALUES (3, 'DVDWarehouse_2:OrderHandlingService');
-INSERT INTO epr (id, uri) VALUES (4, 'DataWarehouse:OrderTrackingService');
+INSERT INTO participant (id, name) VALUES (1, 'DVDStore:OrderDispatchService');
+INSERT INTO participant (id, name) VALUES (2, 'DVDWarehouse_1:OrderHandlingService');
+INSERT INTO participant (id, name) VALUES (3, 'DVDWarehouse_2:OrderHandlingService');
+INSERT INTO participant (id, name) VALUES (4, 'DataWarehouse:OrderTrackingService');
-INSERT INTO messagecontract (id, epr, usage, mime, namespace, messagedescription) VALUES
+INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES
(1, 'DVDStore:OrderDispatchService', 'PRODUCES', 'text/xml', 'fullFillOrder', 'http://org.acme/OrderDispatchService/fullFillOrder.xsd');
-INSERT INTO messagecontract (id, epr, usage, mime, namespace, messagedescription) VALUES
+INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES
(2, 'DVDWarehouse_1:OrderHandlingService', 'CONSUMES', 'text/xml', 'shipOrder', 'http://org.acme/OrderHandlingService/shipOrder-post.dtd');
-INSERT INTO messagecontract (id, epr, usage, mime, namespace, messagedescription) VALUES
+INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES
(3, 'DVDWarehouse_2:OrderNotificationService', 'CONSUMES', 'application/EDI-X12', 'notifyCustomer', 'http://org.acme/OrderHandlingService/notifyCustomer.xsd');
-INSERT INTO messagecontract (id, epr, usage, mime, namespace, messagedescription) VALUES
+INSERT INTO messagecontract (id, participant, usage, mime, namespace, messagedescription) VALUES
(4, 'DataWarehouse:OrderTrackingService', 'CONSUMES', 'text/xml', 'recordOrder', 'http://org.acme/OrderTrackingService/recordOrder.xsd');
--########################################################################
--# Templating cdu-creators.
--########################################################################
insert into transformationresource (id, name, path, selector, useragent) values
- (1, 'XSLT Content Delivery Unit Creator', 'org.milyn.templating.xslt.XslContentDeliveryUnitCreator', 'cdu-creator', '*');
+ (1, '* XSLT Content Delivery Unit Creator (This resource is targeted at all Message Exchanges and is required for interpreting "xsl" resource types)', 'org.milyn.templating.xslt.XslContentDeliveryUnitCreator', 'cdu-creator', '*');
insert into transformationresourceparameter (id, name, value, transresource_id) values
(1, 'restype', 'xsl', 1);
insert into transformationresource (id, name, path, selector, useragent) values
- (2, 'StringTemplate Content Delivery Unit Creator', 'org.milyn.templating.stringtemplate.StringTemplateContentDeliveryUnitCreator', 'cdu-creator', '*');
+ (2, '* StringTemplate Content Delivery Unit Creator (This resource is targeted at all Message Exchanges and is required for interpreting "st" resource types)', 'org.milyn.templating.stringtemplate.StringTemplateContentDeliveryUnitCreator', 'cdu-creator', '*');
insert into transformationresourceparameter (id, name, value, transresource_id) values
(2, 'restype', 'st', 2);
@@ -36,7 +36,7 @@
--# XSLT Templatelet Resource Template.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values
- (1, 'XSLT (Templatelet)', 'N/A',
+ (1, 'XSLT (Templatelet)', 'See ''resdata'' parameter value',
'Perform an XML Fragment Transform using an XSLT Templatelet. The targeted XML fragment is transformed using the XSLT Templatelet and the transformation result is used in accordance with the value of the "action" parameter. Can be used in conjunction with the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Javabean Cartridge</a> Cartridge. <p/>Examples of using this resource can be seen on the <a href="http://milyn.codehaus.org/Tutorials">Milyn Smooks</a> website.<p/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Templating Cartridge</a> to be installed.',
'http://milyn.codehaus.org/javadoc/smooks-cartridges/templating/org/milyn/templating/xslt/XslContentDeliveryUnitCreator.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values
@@ -141,7 +141,7 @@
--# XSLT Templatelet Resource Template.
--########################################################################
insert into transformationresourcespec (id, name, path, description, reference) values
- (9, 'XSLT (Full Stylesheet)', 'N/A',
+ (9, 'XSLT (Full Stylesheet)', 'See ''resdata'' parameter value',
'Perform an XML Fragment Transform using a fully XSLT Stylesheet. The targeted XML fragment is transformed using the XSLT Stylesheet and the transformation result is used in accordance with the value of the "action" parameter. Can be used in conjunction with the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Javabean Cartridge</a> Cartridge. <p/>Examples of using this resource can be seen on the <a href="http://milyn.codehaus.org/Tutorials">Milyn Smooks</a> website.<p/>Resources derived from this template will require the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Templating Cartridge</a> to be installed.',
'http://milyn.codehaus.org/javadoc/smooks-cartridges/templating/org/milyn/templating/xslt/XslContentDeliveryUnitCreator.html');
insert into transformationresourceparameterspec (id, name, value, description, required, resourcespec_id) values
Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/classes/hibernate.cfg.xml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -14,7 +14,7 @@
<property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
- <mapping class="org.jboss.soa.esb.admin.console.EPR"/>
+ <mapping class="org.jboss.soa.esb.admin.console.exchange.participant.Participant"/>
<mapping class="org.jboss.soa.esb.admin.console.contract.MessageContract"/>
<mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResource"/>
<mapping class="org.jboss.soa.esb.admin.console.transform.TransformationResourceParameter"/>
Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/faces-config.xml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -26,26 +26,26 @@
=============================================================================================== -->
<navigation-case>
- <from-outcome>select-message-flow</from-outcome>
- <to-view-id>/transform/select-message-flow-from.xhtml</to-view-id>
+ <from-outcome>select-message-exchange</from-outcome>
+ <to-view-id>/transform/select-message-exchange-from.xhtml</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
- <from-outcome>select-message-flow-from</from-outcome>
- <to-view-id>/transform/select-message-flow-from.xhtml</to-view-id>
+ <from-outcome>select-message-exchange-from</from-outcome>
+ <to-view-id>/transform/select-message-exchange-from.xhtml</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
- <from-outcome>select-message-flow-to</from-outcome>
- <to-view-id>/transform/select-message-flow-to.xhtml</to-view-id>
+ <from-outcome>select-message-exchange-to</from-outcome>
+ <to-view-id>/transform/select-message-exchange-to.xhtml</to-view-id>
<redirect />
</navigation-case>
<navigation-case>
- <from-outcome>select-message-flow-finish</from-outcome>
- <to-view-id>/transform/select-message-flow-finish.xhtml</to-view-id>
+ <from-outcome>select-message-exchange-finish</from-outcome>
+ <to-view-id>/transform/select-message-exchange-finish.xhtml</to-view-id>
<redirect />
</navigation-case>
@@ -127,7 +127,7 @@
<navigation-case>
<from-outcome>manage-participants</from-outcome>
- <to-view-id>/endpoint/manage-participants.xhtml</to-view-id>
+ <to-view-id>/participant/manage-participants.xhtml</to-view-id>
<redirect />
</navigation-case>
@@ -148,11 +148,6 @@
<lifecycle>
<phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
</lifecycle>
-
- <converter>
- <converter-id>EPRConverter</converter-id>
- <converter-class>org.jboss.soa.esb.admin.console.EPRConverter</converter-class>
- </converter>
<converter>
<converter-id>SmooksResourceListConverter</converter-id>
Modified: labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml
===================================================================
--- labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/resources/WEB-INF/pages.xml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,10 +1,7 @@
<pages>
<!-- Make sure that the Message Exchange gets initialised... -->
- <page view-id="/transform/select-message-flow-from.xhtml" action="#{messageExchangeSelect.initialise}"/>
+ <page view-id="/transform/select-message-exchange-from.xhtml" action="#{messageExchangeSelect.initialise}"/>
<!-- Support GET requests for the configuration data i.e. the ESB reading the configurations... -->
<page view-id="/transform/smooks-config.xhtml" action="#{listAllResources.list}"/>
-
- <!-- Support GET requests for performing imports... -->
- <page view-id="/transform/import-resources.xhtml" action="#{resourceImport.show}"/>
</pages>
\ No newline at end of file
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/ManageContracts.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/ManageContracts.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/contract/ManageContracts.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -62,7 +62,7 @@
* Get the {@link MessageContract} list factory method.
*/
public void readContracts() {
- contracts = esbDatabase.createQuery("from MessageContract order by epr").list();
+ contracts = esbDatabase.createQuery("from MessageContract order by participant").list();
}
@Begin(join=true)
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/exchange/SelectMessageExchange.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -27,7 +27,6 @@
import java.util.List;
import org.hibernate.Session;
-import org.jboss.seam.annotations.Create;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
@@ -80,8 +79,10 @@
messageExchange = new MessageExchange();
Contexts.getSessionContext().set(MessageExchange.class.getName(), "set");
- fromParticipants = esbDatabase.createQuery("from Participant order by uri").list();
- toParticipants = esbDatabase.createQuery("from Participant order by uri").list();
+ fromParticipants = esbDatabase.createQuery("from Participant order by name").list();
+ toParticipants = esbDatabase.createQuery("from Participant order by name").list();
+ fromMessageTypes = null;
+ toMessageTypes = null;
}
}
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverter.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverter.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverter.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -86,24 +86,35 @@
List<TransformationResourceParameter> parameters = resource.getParameters();
if(parameters != null && !parameters.isEmpty()) {
- appendParameters(parameters, stringBuffer);
+ appendParameters(resource, parameters, stringBuffer);
}
stringBuffer.append("\n\t</smooks-resource>");
}
- private static void appendParameters(List<TransformationResourceParameter> parameters, StringBuffer stringBuffer) {
+ private static void appendParameters(TransformationResource resource, List<TransformationResourceParameter> parameters, StringBuffer stringBuffer) {
+ TransformationResourceParameter nameParameter =
+ new TransformationResourceParameter(SmooksUtils.RESOURCE_NAME_PARAM, null, resource.getName());
+
+ // Append the "Name" parameter. This is not a "real" parameter. It's just how we get over the fact that the SmooksResourceConfiguration
+ // class doesn't have "name" attribute like the TransformationResource class. So, we import and export
+ // as a resource parameter.
+ appendParameter(stringBuffer, nameParameter);
for(TransformationResourceParameter param : parameters) {
- stringBuffer.append("\n\t\t<param name=\"").append(param.getName()).append("\"");
- if(param.getType() != null && !param.getType().trim().equals("")) {
- stringBuffer.append(" type=\"").append(param.getType()).append("\"");
- }
- stringBuffer.append(">");
-
- stringBuffer.append("<![CDATA[");
- stringBuffer.append(param.getValueAsString());
- stringBuffer.append("]]>");
- stringBuffer.append("</param>");
+ appendParameter(stringBuffer, param);
}
}
+
+ private static void appendParameter(StringBuffer stringBuffer, TransformationResourceParameter param) {
+ stringBuffer.append("\n\t\t<param name=\"").append(param.getName()).append("\"");
+ if(param.getType() != null && !param.getType().trim().equals("")) {
+ stringBuffer.append(" type=\"").append(param.getType()).append("\"");
+ }
+ stringBuffer.append(">");
+
+ stringBuffer.append("<![CDATA[");
+ stringBuffer.append(param.getValueAsString());
+ stringBuffer.append("]]>");
+ stringBuffer.append("</param>");
+ }
}
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksUtils.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksUtils.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/SmooksUtils.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -39,6 +39,13 @@
public class SmooksUtils {
/**
+ * {@link SmooksResourceConfiguration} doesn't have a config "name" attribute as does the
+ * {@link TransformationResource} class. For import and export of configs, we add and get this
+ * as a resource parameter.
+ */
+ public static final String RESOURCE_NAME_PARAM = "RESERVED:RESOURCE_NAME_PARAM";
+
+ /**
* Get the ordered set of message {@link TransformationResource}s targetd at the supplied message exchange.
* <p/>
* The resource are grouped by selector and ordered according to their specificity. See
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/TransformationResourceParameter.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -118,8 +118,9 @@
public void setValueAsString(String value) {
if(value == null) {
this.value = null;
+ } else {
+ this.value = value.getBytes();
}
- this.value = value.getBytes();
}
/**
Modified: labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceImport.java
===================================================================
--- labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceImport.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/src/org/jboss/soa/esb/admin/console/transform/configimport/ResourceImport.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -42,16 +42,14 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.FacesMessages;
import org.jboss.soa.esb.admin.console.transform.NewResource;
+import org.jboss.soa.esb.admin.console.transform.SmooksUtils;
import org.jboss.soa.esb.admin.console.transform.TransformationResource;
import org.jboss.soa.esb.admin.console.transform.TransformationResourceParameter;
import org.milyn.cdr.Parameter;
import org.milyn.cdr.SmooksResourceConfiguration;
import org.milyn.cdr.SmooksResourceConfigurationList;
-import org.milyn.cdr.SmooksResourceConfigurationStore;
import org.milyn.cdr.UseragentExpression;
import org.milyn.cdr.XMLConfigDigester;
-import org.milyn.container.standalone.StandaloneContainerContext;
-import org.milyn.device.MockUAContext;
import org.xml.sax.SAXException;
/**
@@ -70,8 +68,9 @@
private ResourceLocation resourceLocation;
@Begin(join=true)
- public void show() {
+ public String show() {
resourceLocation = new ResourceLocation();
+ return "import-resources";
}
@End
@@ -125,29 +124,36 @@
List smooksParams = configuration.getParameters();
resource.setParameters(new ArrayList<TransformationResourceParameter>());
for(int i = 0; i < smooksParams.size(); i++) {
- TransformationResourceParameter parameter = null;
-
Object listEntry = smooksParams.get(i);
if(listEntry instanceof List) {
List parameterGroup = (List)listEntry;
for(int ii = 0; ii < parameterGroup.size(); ii++) {
Parameter param = (Parameter)parameterGroup.get(ii);
- parameter = new TransformationResourceParameter(param.getName(), param.getType(), param.getValue());
+ addParameter(resource, param);
}
} else if(listEntry instanceof Parameter) {
Parameter param = (Parameter)listEntry;
- parameter = new TransformationResourceParameter(param.getName(), param.getType(), param.getValue());
+ addParameter(resource, param);
}
-
- if(parameter != null) {
- parameter.setTransResource(resource);
- resource.getParameters().add(parameter);
- }
}
return resource;
}
+ private void addParameter(TransformationResource resource, Parameter param) {
+ if(param.getName().equals(SmooksUtils.RESOURCE_NAME_PARAM)) {
+ // This is not a "real" parameter. It's just how we get over the fact that the SmooksResourceConfiguration
+ // class doesn't have "name" attribute like the TransformationResource class. So, we import and export
+ // as a resource parameter.
+ resource.setName(param.getValue());
+ } else {
+ TransformationResourceParameter parameter;
+ parameter = new TransformationResourceParameter(param.getName(), param.getType(), param.getValue());
+ parameter.setTransResource(resource);
+ resource.getParameters().add(parameter);
+ }
+ }
+
private String getUseragentString(UseragentExpression[] useragentExpressions) {
StringBuffer string = new StringBuffer();
Modified: labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverterTest.java
===================================================================
--- labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverterTest.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/SmooksResourceListConverterTest.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -43,6 +43,7 @@
List<TransformationResource> transList = new ArrayList<TransformationResource>();
TransformationResource res = new TransformationResource();
+ res.setName("res-name");
res.setNamespace("ns");
res.setPath("path");
res.setSelector("selector");
Modified: labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/expected-1.txt
===================================================================
--- labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/expected-1.txt 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/test/src/org/jboss/soa/esb/admin/console/transform/expected-1.txt 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,7 +1,9 @@
<smooks-resource selector="selector" useragent="ua" namespace="ns" path="path" >
+ <param name="RESERVED:RESOURCE_NAME_PARAM"><![CDATA[res-name]]></param>
<param name="name"><![CDATA[value]]></param>
</smooks-resource>
<smooks-resource selector="selector" useragent="ua" namespace="ns" path="path" >
+ <param name="RESERVED:RESOURCE_NAME_PARAM"><![CDATA[res-name]]></param>
<param name="name"><![CDATA[value]]></param>
</smooks-resource>
\ No newline at end of file
Added: labs/jbossesb/trunk/product/console/view/about.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/about.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/about.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -0,0 +1,180 @@
+<!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">
+ <div id="main" class="section">
+ <h2>About JBoss ESB Message Transformation & Analysis</h2>
+ <a href="#features">1. Features</a><br/>
+ <a href="#configuring">2. Configuring JBoss ESB Transformations</a><br/>
+ <a href="#custom-java">3. Creating and Using Customer Java Transformations</a><br/>
+ <a href="#faqs">4. FAQs</a>
+
+ <div id="jboss-esb-trans-analysis" class="section">
+
+ <div class="section">
+ <h2 id="features">1. Features</h2>
+ The features of JBoss ESB Transformation are based largely on those of <a href="http://milyn.codehaus.org/Smooks">Milyn Smooks</a>.
+ <a href="features.jsf">Read more...</a>
+ </div>
+
+ <div class="section">
+ <h2 id="configuring">2. Configuring JBoss ESB Transformations</h2>
+ Under JBoss ESB, message transformations are performed relative to a <a href="#message-exchange">Message Exchange</a>. Transformations
+ are carried out on messages as they are exchanged between 2 <a href="#message-exchange-participant">Message Exchange Particpants</a>.
+ <p/>
+ The basic steps taken to configure a Transformation Resource under JBoss ESB are as follows:
+ <div class="indent">
+ <ol>
+ <li><b>Create the Message Exchange Participants</b>. This is done through the "Manage Message Exchange Participants" wizard off the console main menu. Obviously, this only
+ needs to be done once for the lifetime of each participant. If the participant is a Service, use the Service Logical Name. Otherwise,
+ simply make up a meaningful unique name for the Participant (e.g. the component name).</li>
+ <li><b>Configure the "<a href="#message-contract">Message Contracts</a>"</b> associated with each Message Exchange Participant . This is done through the
+ "Configure New Message Contract" wizard off the console main menu. This is basically
+ a process of defining the types of messages that a Participant can produce or consume. Note that a Participant can potentially produce or consume more than 1 message type.</li>
+ <li><b>Set the active <a href="#message-exchange">Message Exchange</a></b> for the browser session. This sets the Message Exchange to be associated with all future
+ transformation configurations made on this browser session. If not already set, the console will automatically redirect the user to set the active Message Exchange.</li>
+ <li><b>Configure and target the new Resource</b>. This is a 4 step process:
+ <ol style="list-style-type: lower-roman">
+ <li>Select "Configure New Resource" from the console main menu.</li>
+ <li>Select a template upon which to base the new configuration. For example, if you simply wish to specify an XSLT transformation, select one of the XSLT Resource
+ templates from the list.</li>
+ <li>Fill in the template. This may include setting execution parameters for the resource.</li>
+ <li>Target the new resource configuration at a Message Exchange (and Fragment within the message). The Message Exchange details will be pre-populated
+ based on the active Message Exchange selection, <a href="#how-do-i-modify-the-default-exchange-targeting">but can be tweaked</a>
+ in order to widen or narrow the selection.
+ </li>
+ </ol>
+ </li>
+ </ol>
+ </div>
+ Transforming a message in JBoss ESB may involve "targeting" multiple resources at a Message Exchange - basically repeating step 4 (above) multiple times.
+ Creating these configurations is not enough however. You also need to tell the ESB when to perform a transformation. This is done by configuring the
+ <i>org.jboss.soa.esb.actions.converters.SmooksTransformer</i> ActionProcessor in an Action Pipeline at the point at which the message transformation
+ needs to take place i.e. at the point of message exchange between 2 components (Message Exchange Participants). The transformation specific pipeline
+ <action> attributes specify the Message Exchange for which transformation needs to take place.
+<pre>
+ <action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
+ <b>from</b>="DVDStore:OrderManagementService"
+ <b>from-type</b>="text/xml:createOrder"
+ <b>to</b>="DVDStore:NotificationService"
+ <b>to-type</b>="text/xml:notify" />
+</pre>
+ </div>
+
+ <div class="section">
+ <h2 id="custom-java">3. Creating Custom Java Transformations</h2>
+ TODO!!
+ </div>
+
+ <div class="section">
+ <h2 id="faqs">4. FAQs</h2>
+ <a href="#message-exchange">What is a Message Exchange?</a><br/>
+ <a href="#message-exchange-participant">What is a Message Exchange Participant?</a><br/>
+ <a href="#message-contract">What is a Message Contract?</a><br/>
+ <a href="#why-not-just-type-info">Why can't I define transformations purely in terms of message typing information?</a><br/>
+ <a href="#how-do-i-modify-the-default-exchange-targeting">How do I modify the default Message Exchange Targeting information?</a><br/>
+
+ <div id="message-exchange" class="section">
+ <h3>What is a "Message Exchange"?</h3>
+ Within the context of JBoss ESB, message transformations are performed in order to make a messages "produced" by one entity "<i>A</i>",
+ "consumable" by another entity "<i>B</i>". We refer to this interaction as a "Message Exchange", with entities "<i>A</i>" and "<i>B</i>"
+ being the "Exchange Participants".
+ <p/>
+ We use the term "Participant" (Vs terms like "Service" or "Endpoint") simply because JBoss ESB acknowledges the fact that transformations often need to
+ happen in many different scenarios and between all sorts of "participants", not just Service Endpoints.
+ <p/>
+ All JBoss ESB Transformations are defined in terms of a "Message Exchange". This therefore means they are defined with respect to the two Participants
+ involved in that Message Exchange, as well as the message typing information associated with the message being exchanged between the 2 participants.
+ Therefore, the 4 properties of all Message Exchanges are:
+ <div class="indent">
+ <ol>
+ <li><b>from</b>: Message producer participant name,</li>
+ <li><b>from-type</b>: Message producer message type (message type produced), </li>
+ <li><b>to</b>: Message consumer participant name,</li>
+ <li><b>to-type</b>: Message consumer message type (message type consumed), </li>
+ </ol>
+ </div>
+ Note that any message exchange participant can potentially produce or consume multiple message types.
+ <p/>
+ This approach to targeting transformation resources often raises the question
+ "<a href="#why-not-just-type-info">Why can't I define transformations purely in terms of message typing information?</a>".
+ </div>
+
+ <div id="message-exchange-participant" class="section">
+ <h3>What is a "Message Exchange Participant"?</h3>
+ See <a href="#message-exchange">What is a Message Exchange?</a>
+ </div>
+
+ <div id="message-contract" class="section">
+ <h3>What is a "Message Contract"?</h3>
+ A "Message Contract" is effective half of a full <a href="#message-exchange">Message Exchange</a>. It simply associates a Message Participant
+ with a Message Type, indicating whether the participant "Produces" or "Consumes" that Message Type. Message Contracts are required to
+ support easier setting of the <a href="#message-exchange">Message Exchange</a> associated with a Transformation or Analysis resource configuration.
+ </div>
+
+ <div id="why-not-just-type-info" class="section">
+ <h3>Why can't I define transformations purely in terms of message typing information?</h3>
+ In many situations (possibly most), message transformations can be defined purely in terms of message typing information i.e.
+ transform from message "Type-A" to message "Type-B". JBoss ESB, adds additional selection properties based on the two
+ participants involved in the <a href="#message-exchange">message exchange</a>. We do this simply because these parameters
+ can often be very relevant to both structural and non-structural transformations within a message:
+ <div class="indent">
+ <ul>
+ <li><b>Structural</b>: In situations where the message consumer doesn't properly support the incoming message format, it may
+ be necessary to tweak a valid message in order to make it consumable. An example of this could be where the message consumer fails
+ to consume the message because it fails to adopt default values for optional attributes. The transformation could be simply to
+ make sure the message contains an appropriate attribute value for that exchange participant.</li>
+ <li><b>Non-Structural</b>: Many transformations are non-structural in nature. They don't involve modifying the basic message structure, but
+ instead operate on inter-structural content e.g. attribute or element values. Proper execution of these types of transformation will often
+ be sensitive to the message exchange participants producing or consuming the message.</li>
+ </ul>
+ </div>
+ Future versions of JBoss ESB will likely offer multiple ways of defining and targeting message transformation resources such that
+ information like message exchange participants can be ignored/invisible where not relevant. With this version of JBoss ESB, the message
+ exchange participants can be excluded from the targeting information by manually editing the "Message Exchange Targeting Expression"
+ on the "Target New Resource Configuration" form of the "Configure New Resource" wizard. So, from this point of view, it is actually
+ possible to "define transformations purely in terms of message typing information", it's just not the default. See the
+ <a href="#how-do-i-modify-the-default-exchange-targeting">How do I modify the default Message Exchange Targeting information?</a> FAQ
+ for more details.
+ </div>
+
+ <div id="how-do-i-modify-the-default-exchange-targeting" class="section">
+ <h3>How do I modify the default Message Exchange Targeting information?</h3>
+ All new message Transformation or Analysis configurations must be targeted at a "<a href="#message-exchange">Message Exchange</a>".
+ This information is stored in the browser session - the Message Exchange must be set on the browser session before
+ being allowed create or manage message transformation/analysis resources. The targeting expression associated with the current
+ message exchange is shown (pre-populated) in the "Message Exchange Targeting Expression" field
+ of the "Target New Resource Configuration" form of the "Configure New Resource" wizard. This expression takes the form:
+<pre>
+ <b>from-type</b>:text/xml:createOrder AND <b>from</b>:DVDStore:OrderManagementService AND <b>to-type</b>:text/xml:notify AND <b>to</b>:DVDStore:NotificationService
+</pre>
+ In it's default form, the expression contains the 4 properties of all <a href="#message-exchange">Message Exchanges</a>. However,
+ the "Target New Resource Configuration" form leaves this field editable in order to allow the user modify this expression. A typical
+ modification might be to remove one or both of the <a href="#message-exchange">Message Exchange Participants</a>, leaving an expression of the
+ form:
+<pre>
+ <b>from-type</b>:text/xml:createOrder AND <b>to-type</b>:text/xml:notify
+</pre>
+ Another option is to "NOT" components of the expression, producing expressions of the form:
+<pre>
+ <b>from-type</b>:text/xml:createOrder AND <b><u>not:</u>to-type</b>:text/xml:notify
+</pre>
+ </div>
+ </div>
+ </div>
+ </div>
+
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <b><h:form><h:commandButton value="Home" action="/home.xhtml" /></h:form></b>
+</ui:define>
+
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/contract/list-message-contracts.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/contract/list-message-contracts.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/contract/list-message-contracts.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -13,15 +13,14 @@
<h:form>
<h2>Manage Message Contracts</h2>
<div class="section">
- This wizard allows you define details about a message <b>produced</b> or <b>consumed</b> by one of the
- message Transformation "<h:commandLink action="/participants/index.xhtml">Participants</h:commandLink>"
+ This wizard allows you manage "<a href="../about.jsf#message-contract">Message Contracts</a>".
</div>
<div class="section">
<h:outputText value="There are no Message Contracts configured!" rendered="#{contracts != null and contracts.rowCount==0}"/>
<h:dataTable value="#{contracts}" var="contractSelection" rendered="#{contracts.rowCount>0}">
<h:column>
<f:facet name="header">Participant Name (Message Producer/Consumer)</f:facet>
- #{contractSelection.epr}
+ #{contractSelection.participant}
</h:column>
<h:column>
<f:facet name="header">Usage</f:facet>
@@ -59,4 +58,4 @@
<ui:define name="sidebar">
</ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/css/screen.css
===================================================================
--- labs/jbossesb/trunk/product/console/view/css/screen.css 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/css/screen.css 2006-11-27 17:45:40 UTC (rev 7851)
@@ -8,7 +8,6 @@
----------------------------------------------- */
html {
height: 100%;
- background-color: #DBD4C6;
}
img {
border: 0;
@@ -33,6 +32,9 @@
margin: 5px 0;
background: #fff url(../img/input.bg.gif) 0 0 repeat-x;
}
+.indent {
+ margin-left: 20px;
+}
ol, ul {
margin: 10px 0px 10px 6px;
}
@@ -238,4 +240,4 @@
}
#pgHome .button {
height: 30px;
-}
\ No newline at end of file
+}
Added: labs/jbossesb/trunk/product/console/view/features.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/features.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/features.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -0,0 +1,52 @@
+<!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">
+ <div class="section">
+ <h2 id="features">JBoss ESB Transformation Features</h2>
+ The features of JBoss ESB Transformation are based largely on those of <a href="http://milyn.codehaus.org/Smooks">Milyn Smooks</a>.
+ From a JBoss ESB perspective, these can be summarised as follows:
+ <div class="indent">
+ <ul>
+ <li><b>Profile based XML/non-XML Processing</b>. In situations where there are many different messages to be Analysed
+ and/or Transformed, it is often the case that a lot of logic and configuration becomes duplicated where the same
+ or similar operations need to be performed on more than one message. Through its use of
+ <a href="http://milyn.codehaus.org/Smooks">Milyn Smooks</a>, JBoss ESB supports the notion of Message Profiles based on the
+ properties of a <a href="about.xhtml#message-exchange">Message Exchange</a>. This allows transformation configurations to be
+ shared across <a href="about.xhtml#message-exchange">Message Exchanges</a> e.g. you can target transformation resources at all messages
+ produced by "X", irrespective of who is consuming that message.</li>
+ <li><b>Fragment based XML/non-XML Processing</b>. Target data Analysis or Transformation resources
+ down to the fragment level of a message. This gives more fine-grained control. For example, you don't
+ need to define a message transformation as a single monolithic operation. Instead, you can define
+ multiple smaller (more reusable) transformations and target them at message fragments on a message exchange/profile basis.</li>
+ <li><b>Mix and Match</b> different tools and languages in the process of transforming a single message e.g. it may be
+ easier to transform one part of the document using pure Java and another part using XSLT.</li>
+ <li><b>Simplify your XSLT and StringTemplate Templates</b> by combining the power of XSLT/StringTemplate with that of Java in
+ a clean way using the Smooks <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Javabean</a> and
+ <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Templating</a> Cartiridges. This allows you to get that
+ tricky/ugly string data manipulation code out of your templates and into Java (Javabeans), where it can be manipulated more easily.
+ The populated Javabeans are automatically made available to your XSLT or StringTemplate templates through
+ <a href="http://www.ognl.org/">OGNL</a>.</li>
+ <li><b>Analyse/Read</b> XML and non-XML data into named Javabeans using the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks Javabean</a>
+ Cartiridge. The message data doesn't need to follow any prescribed format e.g. populate the same "Order" Javabean from 2 "Order" messages that comply with different schemas.</li>
+ <li><b>Non-XML Message Processing</b>. JBoss ESB supports processing of non-XML character based data by allowing you "target" SAX Parsers on a
+ message-by-message basis (using Message Exchange properties). For example, the <a href="http://milyn.codehaus.org/Smooks#Smooks-smookscartridges">Smooks CSV</a> Cartiridge
+ provides support for processing of Comma Separated Value (CSV) data streams.</li>
+ </ul>
+ </div>
+ </div>
+
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <b><h:form><h:commandButton value="Home" action="/home.xhtml" /></h:form></b>
+</ui:define>
+
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/home.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/home.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/home.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -12,19 +12,25 @@
<div class="section">
<div class="section">
- <h2>Message Management:</h2>
+ <h2>Message Transformation/Analysis Management:</h2>
+ </div>
+ <div class="section">
<ul>
+ <li><s:link action="/about.xhtml" value="About JBoss ESB Message Transformation & Analysis" /></li>
+ </ul>
+ </div>
+ <div class="section">
+ <ul>
+ <li><s:link action="#{manageParticipants.show}" value="Manage Message Exchange Participants" /></li>
<li><s:link action="#{newContract.showForm}" value="Configure New Message Contract" /></li>
<li><s:link action="#{manageContracts.list}" value="Manage Message Contracts" /></li>
- <li><s:link action="#{manageEndpoints.show}" value="Manage Message Endpoints" /></li>
</ul>
</div>
-
<div class="section">
- <h2>Message Transformation/Analysis Management:</h2>
<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="#{resourceImport.show}" value="Import Configurations" /></li>
</ul>
</div>
<div class="section">
@@ -45,4 +51,4 @@
</p>
</ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/participant/manage-participants.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/participant/manage-participants.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/participant/manage-participants.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -9,22 +9,20 @@
<!-- content -->
<ui:define name="content">
<div class="section">
- <h2>Manage Message Endpoints</h2>
+ <h2>Manage Message Exchange Participants</h2>
</div>
<div class="section">
- This form allows you to manage "Message Endpoints". <i>This functionality will soon be replaced through integration with the Registry Service</i>.
- <p/>
- A Message Endpoint is the "Logical" name associated with an entity that can "Produce" or "Consume" messages on the ESB.
+ This form allows you to manage "<a href="../about.jsf#message-exchange-participant">Message Exchange Participants</a>".
</div>
<h:form>
<s:validateAll>
<div class="section">
- <h3>Add Message Endpoint</h3>
+ <h3>Add Message Exchange Participant</h3>
<div class="entry">
- <div class="label"><h:outputLabel for="Endpoint">Endpoint Logical Name (e.g. Service Logical Name):</h:outputLabel></div>
+ <div class="label"><h:outputLabel for="Participant">Participant Name:</h:outputLabel></div>
<div class="input">
- <h:inputText id="Endpoint" value="#{newEndpoint.uri}" size="50" required="true" />
- <br/><span class="errors"><h:message for="Endpoint" /></span>
+ <h:inputText id="Participant" value="#{newParticipant.name}" size="50" required="true" />
+ <br/><span class="errors"><h:message for="Participant" /></span>
</div>
</div>
@@ -33,7 +31,7 @@
<div class="entry">
<div class="label"><f:verbatim> </f:verbatim></div>
<div class="input">
- <h:commandButton value="Add" action="#{manageEndpoints.addEndpoint}" class="button"/>
+ <h:commandButton value="Add" action="#{manageParticipants.addParticipant}" class="button"/>
</div>
</div>
</div>
@@ -41,15 +39,15 @@
</h:form>
<h:form>
<div class="section">
- <h:outputText value="There are no Message Endpoints configured!" rendered="#{endpoints != null and endpoints.rowCount==0}"/>
- <h:dataTable value="#{endpoints}" var="endpointSelection" rendered="#{endpoints.rowCount>0}">
+ <h:outputText value="There are no Message Exchange Participants configured!" rendered="#{participants != null and participants.rowCount==0}"/>
+ <h:dataTable value="#{participants}" var="participantSelection" rendered="#{participants.rowCount>0}">
<h:column>
- <f:facet name="header">Endpoint Logical Name</f:facet>
- #{endpointSelection.uri}
+ <f:facet name="header">Participant Name</f:facet>
+ #{participantSelection.name}
</h:column>
<h:column>
<f:facet name="header">Manage</f:facet>
- <h:commandLink action="#{manageEndpoints.deleteEndpoint}">Delete</h:commandLink>
+ <h:commandLink action="#{manageParticipants.deleteParticipant}">Delete</h:commandLink>
</h:column>
</h:dataTable>
</div>
Modified: labs/jbossesb/trunk/product/console/view/participant/template.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/participant/template.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/participant/template.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -42,7 +42,7 @@
</div>
<div id="container">
<div id="sidebar">
- <b><h:form><h:commandButton value="Home" action="#{manageEndpoints.end}" /></h:form></b>
+ <b><h:form><h:commandButton value="Home" action="#{manageParticipants.end}" /></h:form></b>
<p/>
<ui:insert name="sidebar"/>
</div>
Modified: labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/add-resource-parameter.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -57,7 +57,7 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromEPRs}" /></h:form></b>
+ <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromParticipants}" /></h:form></b>
<p/>
<h1>Create Transformation/Analysis Configuration</h1>
Create a message transformation/analysis configuration for the chosen Message Exchange.
Modified: labs/jbossesb/trunk/product/console/view/transform/import-resources.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/import-resources.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/import-resources.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -9,25 +9,31 @@
<!-- content -->
<ui:define name="content">
<div class="section">
- <fieldset>
- <h:form>
- <h2>Import Transformation/Analysis Resources</h2>
- <s:validateAll>
- <div class="section">
- <div class="entry">
- <div class="label"><h:outputLabel for="Location">Location (URI or filesystem path):</h:outputLabel></div>
- <div class="input">
- <h:inputText id="Location" value="#{resourceLocation.location}" size="100" required="true" />
- <br/><span class="errors"><h:message for="Location" /></span>
- </div>
+ <h2>Import Transformation/Analysis Resources</h2>
+ This form allows you import exsting transformation configurations from a URI.
+ <h:form>
+ <s:validateAll>
+ <div class="section">
+ <div class="entry">
+ <div class="label"><h:outputLabel for="Location">Location (URI or filesystem path):</h:outputLabel></div>
+ <div class="input">
+ <h:inputText id="Location" value="#{resourceLocation.location}" size="100" required="true" />
+ <br/><span class="errors"><h:message for="Location" /></span>
</div>
</div>
- <div class="section">
- <h:commandButton value="Import" action="#{resourceImport.importResources}" />
- </div>
- </s:validateAll>
- </h:form>
- </fieldset>
+ </div>
+ <div class="section">
+ <h:commandButton value="Import" action="#{resourceImport.importResources}" />
+ </div>
+ </s:validateAll>
+ </h:form>
+ <p/>
+ Resources can also be exported from the console, but the XML needs to be captured from the browser. Adding a nicer wizard
+ for performing this task is something that needs to be done. The URL to use for exporting is:
+<pre>
+ http://<console-host>:<console-port>/jboss-esb-console/transform/smooks-config.jsf
+</pre>
+ Once you access this URL, view the browser page-source for the exported XML.
</div>
</ui:define>
Modified: labs/jbossesb/trunk/product/console/view/transform/list-resources.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/list-resources.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/list-resources.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -13,13 +13,13 @@
<h:form>
<h2>Manage Resource Configuration</h2>
<div class="section">
- This wizard lists all message Transformation/Analysis resource configurations targeted at the current message flow.
+ This wizard lists all message Transformation/Analysis resource configurations targeted at the currently selected message exchange.
</div>
<div class="section">
<div class="entry">
<div class="label"><h:outputLabel for="MessageExchange">Selected Message Exchange:</h:outputLabel></div>
<div class="output">
- <f:verbatim id="MessageExchange">#{messageExchange.flowAsHtml}</f:verbatim>
+ <f:verbatim id="MessageExchange">#{messageExchange.exchangeAsHtml}</f:verbatim>
</div>
</div>
</div>
@@ -37,7 +37,7 @@
</h:column>
<h:column>
<f:facet name="header">Applied Resource</f:facet>
- #{configSelection.path}
+ #{configSelection.name}
</h:column>
<h:column>
<f:facet name="header">Manage</f:facet>
@@ -59,8 +59,8 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromEPRs}" /></h:form></b>
+ <b><h:form><h:commandButton value="Reset Message Exchange" action="#{messageExchangeSelect.showFrom}" /></h:form></b>
<p/>
</ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-create.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -89,7 +89,7 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromEPRs}" /></h:form></b>
+ <b><h:form><h:commandButton value="Reset 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/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-select-spec.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -49,11 +49,11 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromEPRs}" /></h:form></b>
+ <b><h:form><h:commandButton value="Reset 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.
<p/>
</ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Modified: labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-target.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-target.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/new-trans-resource-target.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -14,22 +14,21 @@
<s:validateAll>
<h2>Target New Resource Configuration</h2>
<div class="section">
- The new Transformation/Analysis configuration needs to be targeted at a specific "Message Useragent" and execution "Selector" combination. The
- Message Useragent field defines an expression that identifies the physical message at which the transformation/analysis configuration is to be targeted. This has already been
- defined through setting of the Message Exchange (but can be manually modified). Defining the execution "Selector" depends on the actual transformation/analysis resource.
- If the resource is a unit of Java/XSLT/etc logic for performing an XML transformation on an XML Fragment, the "Selector"
- will be the XML element name (possibly contextual). See <a href="http://milyn.codehaus.org/javadoc/smooks">SmooksResourceConfiguration</a>.
+ The new Transformation/Analysis configuration needs to be targeted at a specific "Message Exchange" and execution "Selector" combination. The Message Exchange
+ has already been selected for the session but can be manually modified to widen or narrow the selection. Defining the execution "Selector" depends on the actual
+ transformation/analysis resource type. If the resource is a unit of Java/XSLT/etc logic for performing an XML transformation on an XML Fragment,
+ the "Selector" will be the XML element name (possibly contextual). See <a href="http://milyn.codehaus.org/javadoc/smooks">SmooksResourceConfiguration</a>.
</div>
<div class="section">
<div class="entry">
- <div class="label"><h:outputLabel for="MessageUseragent">Message Targeting Useragent Expression:</h:outputLabel></div>
+ <div class="label"><h:outputLabel for="Exchange">Message Exchange Targeting Expression:</h:outputLabel></div>
<div class="input">
- <h:inputText id="MessageUseragent" value="#{transResource.useragent}" size="100" required="true" />
- <br/><span class="errors"><h:message for="MessageUseragent" /></span>
+ <h:inputText id="Exchange" value="#{transResource.useragent}" size="100" required="true" />
+ <br/><span class="errors"><h:message for="Exchange" /></span>
</div>
</div>
<div class="entry">
- <div class="label"><h:outputLabel for="Selector">Execution Selector:</h:outputLabel></div>
+ <div class="label"><h:outputLabel for="Selector">Execution Selector (e.g. XML Fragment):</h:outputLabel></div>
<div class="input">
<h:inputText id="Selector" value="#{transResource.selector}" required="true" size="100" disabled="#{transResource.selector}"/>
<br/><span class="errors"><h:message for="Selector" /></span>
@@ -70,11 +69,11 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromEPRs}" /></h:form></b>
+ <b><h:form><h:commandButton value="Reset 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.
<p/>
</ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Copied: labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-finish.xhtml (from rev 7799, labs/jbossesb/trunk/product/console/view/transform/select-message-flow-finish.xhtml)
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-finish.xhtml 2006-11-23 15:18:42 UTC (rev 7799)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-finish.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -0,0 +1,38 @@
+<!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>
+ <h2>Select Message Exchange : <i>Finished...</i></h2>
+
+ <div class="section">
+ <div class="entry">
+ <div class="label"><h:outputLabel for="MessageExchange">Selected Message Exchange:</h:outputLabel></div>
+ <div class="output">
+ <f:verbatim id="MessageExchange">#{messageExchange.exchangeAsHtml}</f:verbatim>
+ </div>
+ </div>
+ </div>
+
+ <div class="section">
+ <s:link action="#{transConfigRejoin.rejoin}" value="Done" linkStyle="button" buttonClass="button" />
+ </div>
+
+ </h:form>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <h1>Select Message Exchange</h1>
+ <p>
+ Select the message exchange on which you would like to perform message transformation configurations.
+ </p>
+</ui:define>
+
+</ui:composition>
Copied: labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-from.xhtml (from rev 7799, labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from.xhtml)
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from.xhtml 2006-11-23 15:18:42 UTC (rev 7799)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-from.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -0,0 +1,67 @@
+<!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>
+ <h2>Select Message Exchange : <i>From (Message Producer)...</i></h2>
+ <div class="section">
+ An "active" <a href="../about.jsf#message-exchange">Message Exchange</a> must be selected before making any JBoss ESB Transformation configurations.
+ This wizard allows you select and activate a message exchange, storing your selection in the browser session. You can reset the active message exchange at any
+ time by pressing the "Reset Message Exchange" button on the left toolbar.
+ <p/>
+ If you wish to cover all message exchanges (i.e. browse all configurations -OR - create a configuration targeted at all message flows), simply
+ click through the selection screens without selecting any message exchange properties.
+ </div>
+
+ <div class="section">
+ <h:outputText value="No From Producer Definitions Found" rendered="#{fromParticipants != null and fromParticipants.rowCount==0}"/>
+ <h:dataTable value="#{fromParticipants}" var="participantFromSelection" rendered="#{fromParticipants.rowCount>0}">
+ <h:column>
+ <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
+ <h:outputText value="+" rendered="#{participantFromSelection.id==messageExchange.from.id}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Exchange Participant</f:facet>
+ <s:link action="#{messageExchangeSelect.selectFrom}" value="#{participantFromSelection.name}" />
+ </h:column>
+ </h:dataTable>
+ </div>
+
+ <div class="section">
+ <h:dataTable value="#{fromMessageTypes}" var="messageTypeSelection">
+ <h:column>
+ <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
+ <h:outputText value="+" rendered="#{messageTypeSelection.id==messageExchange.fromMessageType.id}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Messages <u>Produced</u> by selected Participant</f:facet>
+ <s:link action="#{messageExchangeSelect.selectFromMessageType}" value="#{messageTypeSelection}" />
+ </h:column>
+ </h:dataTable>
+ </div>
+
+ <div class="section">
+ <h:commandButton value="Continue..." action="#{messageExchangeSelect.showTo}" class="button" />
+ </div>
+ <div class="section">
+ <h:commandButton value="Cancel" action="#{messageExchangeSelect.cancel}" class="button" />
+ </div>
+
+ </h:form>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <h1>Select Message Exchange</h1>
+ <p>
+ Select the message exchange on which you would like to perform message transformation configurations.
+ </p>
+</ui:define>
+
+</ui:composition>
Copied: labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-to.xhtml (from rev 7799, labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to.xhtml)
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to.xhtml 2006-11-23 15:18:42 UTC (rev 7799)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-exchange-to.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -0,0 +1,59 @@
+<!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>
+ <h2>Select Message Exchange : <i>To (Message Consumer)...</i></h2>
+
+ <div class="section">
+ <h:outputText value="No To Producer Definitions Found" rendered="#{toParticipants != null and toParticipants.rowCount==0}"/>
+ <h:dataTable value="#{toParticipants}" var="participantToSelection" rendered="#{toParticipants.rowCount>0}">
+ <h:column>
+ <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
+ <h:outputText value="+" rendered="#{participantToSelection.id==messageExchange.to.id}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Exchange Participant</f:facet>
+ <s:link action="#{messageExchangeSelect.selectTo}" value="#{participantToSelection.name}" />
+ </h:column>
+ </h:dataTable>
+ </div>
+
+ <div class="section">
+ <h:dataTable value="#{toMessageTypes}" var="messageTypeSelection">
+ <h:column>
+ <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
+ <h:outputText value="+" rendered="#{messageTypeSelection.id==messageExchange.toMessageType.id}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">Messages <u>Consumed</u> by selected Participant</f:facet>
+ <s:link action="#{messageExchangeSelect.selectToMessageType}" value="#{messageTypeSelection}" />
+ </h:column>
+ </h:dataTable>
+ </div>
+
+ <div class="section">
+ <h:commandButton value="Finish..." action="#{messageExchangeSelect.showFinish}" class="button" />
+ </div>
+ <div class="section">
+ <h:commandButton value="Cancel" action="#{messageExchangeSelect.cancel}" class="button" />
+ </div>
+
+ </h:form>
+</ui:define>
+
+<!-- sidebar -->
+<ui:define name="sidebar">
+ <h1>Select Message Exchange</h1>
+ <p>
+ Select the message exchange on which you would like to perform message transformation configurations.
+ </p>
+</ui:define>
+
+</ui:composition>
Deleted: labs/jbossesb/trunk/product/console/view/transform/select-message-flow-finish.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-finish.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-flow-finish.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,41 +0,0 @@
-<!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>
- <h2>Select Message Exchange : <i>Finished...</i></h2>
- <div class="section">
- Review selected message flow...
- </div>
-
- <div class="section">
- <div class="entry">
- <div class="label"><h:outputLabel for="MessageExchange">Selected Message Exchange:</h:outputLabel></div>
- <div class="output">
- <f:verbatim id="MessageExchange">#{messageExchange.flowAsHtml}</f:verbatim>
- </div>
- </div>
- </div>
-
- <div class="section">
- <s:link action="#{transConfigRejoin.rejoin}" value="Done" linkStyle="button" buttonClass="button" />
- </div>
-
- </h:form>
-</ui:define>
-
-<!-- sidebar -->
-<ui:define name="sidebar">
- <h1>Select Message Exchange</h1>
- <p>
- Select the message flow on which you would like to perform message transformation configurations.
- </p>
-</ui:define>
-
-</ui:composition>
\ No newline at end of file
Deleted: labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from-type.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from-type.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from-type.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,51 +0,0 @@
-<!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>
- <h2>Select Message Exchange : <i>Message <u>From</u>...</i></h2>
-
- <div class="section">
- <f:verbatim rendered="#{fromMessageTypes != null and fromMessageTypes.rowCount==0}">
- Sorry, there are no <u>PRODUCES</u> Message Contracts defined for the selected "From" Endpoint "<b>#{messageExchange.fromEPR}</b>".
- <p/>
- Message Contract definitions can be created from the main menu.
- </f:verbatim>
-
- <h:dataTable value="#{fromMessageTypes}" var="messageTypeSelection" rendered="#{fromMessageTypes.rowCount>0}">
- <h:column>
- <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
- <h:outputText value="+" rendered="#{messageTypeSelection.id==messageExchange.fromMessageType.id}"/>
- </h:column>
- <h:column>
- <f:facet name="header">Messages <u>Produced</u> by Endpoint "<i>#{messageExchange.fromEPR}</i>"</f:facet>
- <s:link action="#{messageExchangeSelect.selectFromMessageType}" value="#{messageTypeSelection}" />
- </h:column>
- </h:dataTable>
- </div>
-
- <div class="section">
- <h:commandButton value="Continue..." action="#{messageExchangeSelect.showToEPRs}" class="button" />
- </div>
- <div class="section">
- <h:commandButton value="Cancel" action="#{messageExchangeSelect.cancel}" class="button" />
- </div>
-
- </h:form>
-</ui:define>
-
-<!-- sidebar -->
-<ui:define name="sidebar">
- <h1>Select Message Exchange</h1>
- <p>
- Select the message flow on which you would like to perform message transformation configurations.
- </p>
-</ui:define>
-
-</ui:composition>
\ No newline at end of file
Deleted: labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-flow-from.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,74 +0,0 @@
-<!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>
- <h2>Select Message Exchange : <i>From (Message Producer)...</i></h2>
- <div class="section">
- Select the Message Exchange to be associated with all Transformation/Analysis Configurations made on the current browser session. Note that you don't
- have to specify a complete message flow. The selected message flow can, for example, simply specify the "From" property of of the flow i.e. you
- may wish to define/view message transformation/analysis configurations for all messages produced by a specific message Producer. Any combination
- is supported.
- <p/>
- If you wish to cover all message flows (i.e. browse all configurations -OR - create a configuration targeted at all message flows), simply
- "reset" the current flow and click through the selection screens without selecting any Message Exchange properties.
- </div>
-
- <div class="section">
- <h:outputText value="No From Producer Definitions Found" rendered="#{fromEPRs != null and fromEPRs.rowCount==0}"/>
- <h:dataTable value="#{fromEPRs}" var="eprFromSelection" rendered="#{fromEPRs.rowCount>0}">
- <h:column>
- <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
- <h:outputText value="+" rendered="#{eprFromSelection.id==messageExchange.fromEPR.id}"/>
- </h:column>
- <h:column>
- <f:facet name="header">From Endpoints (Logical Name)</f:facet>
- <s:link action="#{messageExchangeSelect.selectFromEPR}" value="#{eprFromSelection.uri}" />
- </h:column>
- </h:dataTable>
- </div>
-
- <div class="section">
- <f:verbatim rendered="#{messageExchange.fromEPR != null and fromMessageTypes != null and fromMessageTypes.rowCount==0}">
- Sorry, there are no <u>PRODUCES</u> Message Contracts defined for the selected "From" Endpoint "<b>#{messageExchange.fromEPR}</b>".
- <p/>
- Message Contract definitions can be created from the main menu.
- </f:verbatim>
-
- <h:dataTable value="#{fromMessageTypes}" var="messageTypeSelection" rendered="#{messageExchange.fromEPR != null and fromMessageTypes.rowCount>0}">
- <h:column>
- <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
- <h:outputText value="+" rendered="#{messageTypeSelection.id==messageExchange.fromMessageType.id}"/>
- </h:column>
- <h:column>
- <f:facet name="header">Messages <u>Produced</u> by Endpoint "<i>#{messageExchange.fromEPR}</i>"</f:facet>
- <s:link action="#{messageExchangeSelect.selectFromMessageType}" value="#{messageTypeSelection}" />
- </h:column>
- </h:dataTable>
- </div>
-
- <div class="section">
- <h:commandButton value="Continue..." action="#{messageExchangeSelect.showToEPRs}" class="button" />
- </div>
- <div class="section">
- <h:commandButton value="Cancel" action="#{messageExchangeSelect.cancel}" class="button" />
- </div>
-
- </h:form>
-</ui:define>
-
-<!-- sidebar -->
-<ui:define name="sidebar">
- <h1>Select Message Exchange</h1>
- <p>
- Select the message flow on which you would like to perform message transformation configurations.
- </p>
-</ui:define>
-
-</ui:composition>
\ No newline at end of file
Deleted: labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to-type.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to-type.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to-type.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,51 +0,0 @@
-<!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>
- <h2>Select Message Exchange : <i>Message <u>To</u>...</i></h2>
-
- <div class="section">
- <f:verbatim rendered="#{toMessageTypes != null and toMessageTypes.rowCount==0}">
- Sorry, there are no <u>CONSUMES</u> Message Contracts defined for the selected "To" Endpoint "<b>#{messageExchange.toEPR}</b>".
- <p/>
- Message Contract definitions can be created from the main menu.
- </f:verbatim>
-
- <h:dataTable value="#{toMessageTypes}" var="messageTypeSelection" rendered="#{toMessageTypes.rowCount>0}">
- <h:column>
- <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
- <h:outputText value="+" rendered="#{messageTypeSelection.id==messageExchange.toMessageType.id}"/>
- </h:column>
- <h:column>
- <f:facet name="header">Messages <u>Consumed</u> by Endpoint "<i>#{messageExchange.toEPR}</i></f:facet>
- <s:link action="#{messageExchangeSelect.selectToMessageType}" value="#{messageTypeSelection}" />
- </h:column>
- </h:dataTable>
- </div>
-
- <div class="section">
- <h:commandButton value="Continue..." action="#{messageExchangeSelect.showFinish}" class="button" />
- </div>
- <div class="section">
- <h:commandButton value="Cancel" action="#{messageExchangeSelect.cancel}" class="button" />
- </div>
-
- </h:form>
-</ui:define>
-
-<!-- sidebar -->
-<ui:define name="sidebar">
- <h1>Select Message Exchange</h1>
- <p>
- Select the message flow on which you would like to perform message transformation configurations.
- </p>
-</ui:define>
-
-</ui:composition>
\ No newline at end of file
Deleted: labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/select-message-flow-to.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -1,46 +0,0 @@
-<!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>
- <h2>Select Message Exchange : <i>To Endpoint...</i></h2>
-
- <div class="section">
- <h:outputText value="No Endpoint Definitions Found" rendered="#{toEPRs != null and toEPRs.rowCount==0}"/>
- <h:dataTable value="#{toEPRs}" var="eprToSelection" rendered="#{toEPRs.rowCount>0}">
- <h:column>
- <f:facet name="header"><f:verbatim> </f:verbatim></f:facet>
- <h:outputText value="+" rendered="#{eprToSelection.id==messageExchange.toEPR.id}"/>
- </h:column>
- <h:column>
- <f:facet name="header">To Endpoints (Logical Name)</f:facet>
- <s:link action="#{messageExchangeSelect.selectToEPR}" value="#{eprToSelection.uri}" />
- </h:column>
- </h:dataTable>
- </div>
-
- <div class="section">
- <h:commandButton value="Continue..." action="#{messageExchangeSelect.showToTypes}" class="button" />
- </div>
- <div class="section">
- <h:commandButton value="Cancel" action="#{messageExchangeSelect.cancel}" class="button" />
- </div>
-
- </h:form>
-</ui:define>
-
-<!-- sidebar -->
-<ui:define name="sidebar">
- <h1>Select Message Exchange</h1>
- <p>
- Select the message flow on which you would like to perform message transformation configurations.
- </p>
-</ui:define>
-
-</ui:composition>
\ No newline at end of file
Modified: labs/jbossesb/trunk/product/console/view/transform/view-resource.xhtml
===================================================================
--- labs/jbossesb/trunk/product/console/view/transform/view-resource.xhtml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/console/view/transform/view-resource.xhtml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -14,7 +14,7 @@
<div class="entry">
<div class="label"><h:outputLabel for="Resource">Applied Resource:</h:outputLabel></div>
<div class="output">
- <f:verbatim id="Resource">#{selectedConfig.path}</f:verbatim>
+ <f:verbatim id="Resource">#{selectedConfig.name} (#{selectedConfig.path})</f:verbatim>
</div>
</div>
<div class="entry">
@@ -63,8 +63,8 @@
<!-- sidebar -->
<ui:define name="sidebar">
- <b><h:form><h:commandButton value="Set Message Exchange" action="#{messageExchangeSelect.showFromEPRs}" /></h:form></b>
+ <b><h:form><h:commandButton value="Reset Message Exchange" action="#{messageExchangeSelect.showFrom}" /></h:form></b>
<p/>
</ui:define>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/SmooksTransformer.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/SmooksTransformer.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/actions/converters/SmooksTransformer.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -76,18 +76,18 @@
*/
public static final String SET_BEANHASH_TO_PAYLOAD = "set-beanhash-to-payload";
- public static final String FROM_EPR = "from-epr";
+ public static final String FROM = "from";
public static final String FROM_TYPE = "from-type";
- public static final String TO_EPR = "to-epr";
+ public static final String TO = "to";
public static final String TO_TYPE = "to-type";
private static Logger logger = Logger.getLogger(SmooksTransformer.class);
private static final String SMOOKS_CDR_LST = "smooks-cdr.lst";
private static SmooksStandalone smooks;
private String defaultMessageFromType;
- private String defaultMessageFromEPR;
+ private String defaultMessageFrom;
private String defaultMessageToType;
- private String defaultMessageToEPR;
+ private String defaultMessageTo;
private boolean setPayloadToBeanHash = false;
/**
@@ -119,13 +119,13 @@
if(defaultMessageToType != null && defaultMessageToType.trim().equals("")) {
throw new ConfigurationException("Empty '" + TO_TYPE + "' config attribute supplied.");
}
- defaultMessageFromEPR = KeyValuePair.getValue(FROM_EPR, properties);
- if(defaultMessageFromEPR != null && defaultMessageFromEPR.trim().equals("")) {
- throw new ConfigurationException("Empty '" + FROM_EPR + "' config attribute supplied.");
+ defaultMessageFrom = KeyValuePair.getValue(FROM, properties);
+ if(defaultMessageFrom != null && defaultMessageFrom.trim().equals("")) {
+ throw new ConfigurationException("Empty '" + FROM + "' config attribute supplied.");
}
- defaultMessageToEPR = KeyValuePair.getValue(TO_EPR, properties);
- if(defaultMessageToEPR != null && defaultMessageToEPR.trim().equals("")) {
- throw new ConfigurationException("Empty '" + TO_EPR + "' config attribute supplied.");
+ defaultMessageTo = KeyValuePair.getValue(TO, properties);
+ if(defaultMessageTo != null && defaultMessageTo.trim().equals("")) {
+ throw new ConfigurationException("Empty '" + TO + "' config attribute supplied.");
}
// Get the set-beanhash-to-payload property...
@@ -237,17 +237,11 @@
String messageToType;
String messageTo;
- // Get the routing info from the message/configuration (mandatory)...
- messageFrom = getFromEPR(message);
- if(messageFrom == null) {
- throw new ActionProcessingException("'from-epr' address not set on message/configuration.");
- }
- messageTo = getToEPR(message);
- if(messageTo == null) {
- throw new ActionProcessingException("'to-epr' address not set on message/configuration.");
- }
+ // Get the routing info from the message...
+ messageFrom = (String)message.getProperties().getProperty(FROM, defaultMessageFrom);
+ messageTo = (String)message.getProperties().getProperty(TO, defaultMessageTo);
- // Get the message typing info from the message/configuration (optional)...
+ // Get the message typing info from the message...
messageFromType = (String)message.getProperties().getProperty(FROM_TYPE, defaultMessageFromType);
messageToType = (String)message.getProperties().getProperty(TO_TYPE, defaultMessageToType);
@@ -269,82 +263,12 @@
return messageUseragent;
}
- /**
- * Get the "From" EPR address from the message.
- * <p/>
- * Returns the default "from-epr" (from the action configurations) if not set on the message.
- * @param message The message.
- * @throws ActionProcessingException
- */
- private String getFromEPR(Message message) throws ActionProcessingException {
- try {
- Header header = message.getHeader();
- if(header == null) {
- return defaultMessageFromEPR;
- }
- Call call = header.getCall();
- if(call == null) {
- return defaultMessageFromEPR;
- }
- EPR from = call.getFrom();
- if(from == null) {
- return defaultMessageFromEPR;
- }
- if(from.getAddr() == null) {
- return defaultMessageFromEPR;
- }
- String eprAddress = from.getAddr().getAddress();
- if(eprAddress == null || eprAddress.trim().equals("")) {
- return defaultMessageFromEPR;
- }
-
- return eprAddress;
- } catch (Throwable thrown) {
- throw new ActionProcessingException("Message validation failure.", thrown);
- }
- }
-
- /**
- * Get the "To" EPR address from the message.
- * <p/>
- * Returns the default "to-epr" (from the action configurations) if not set on the message.
- * @param message The message.
- * @throws ActionProcessingException
- */
- private String getToEPR(Message message) throws ActionProcessingException {
- try {
- Header header = message.getHeader();
- if(header == null) {
- return defaultMessageToEPR;
- }
- Call call = header.getCall();
- if(call == null) {
- return defaultMessageToEPR;
- }
- EPR to = call.getTo();
- if(to == null) {
- return defaultMessageToEPR;
- }
- if(to.getAddr() == null) {
- return defaultMessageToEPR;
- }
- String eprAddress = to.getAddr().getAddress();
- if(eprAddress == null || eprAddress.trim().equals("")) {
- return defaultMessageToEPR;
- }
-
- return eprAddress;
- } catch (Throwable thrown) {
- throw new ActionProcessingException("Message validation failure.", thrown);
- }
- }
-
/**
* Get the profile list based on the supplied message flow properties.
* @param messageFromType The type string for the message source.
- * @param messageFrom The EPR string for the message source.
+ * @param messageFrom The Message Exchange Participant name for the message source.
* @param messageToType The type string for the message target.
- * @param messageTo The EPR srting for the message target.
+ * @param messageTo The Message Exchange Participant name for the message target.
* @return The list of profiles.
*/
protected static String[] getMessageUseragentProfiles(String messageFromType, String messageFrom, String messageToType, String messageTo) {
@@ -355,13 +279,13 @@
profiles.add(FROM_TYPE + ":" + messageFromType);
}
if(messageFrom != null) {
- profiles.add(FROM_EPR + ":" + messageFrom);
+ profiles.add(FROM + ":" + messageFrom);
}
if(messageToType != null) {
profiles.add(TO_TYPE + ":" + messageToType);
}
if(messageTo != null) {
- profiles.add(TO_EPR + ":" + messageTo);
+ profiles.add(TO + ":" + messageTo);
}
profileArray = new String[profiles.size()];
@@ -386,7 +310,7 @@
string.append((messageFrom!=null || messageToType!=null || messageTo!=null?":":""));
}
if(messageFrom != null) {
- string.append(FROM_EPR + ":" + messageFrom);
+ string.append(FROM + ":" + messageFrom);
string.append((messageToType!=null || messageTo!=null?":":""));
}
if(messageToType != null) {
@@ -394,7 +318,7 @@
string.append((messageTo!=null?":":""));
}
if(messageTo != null) {
- string.append(TO_EPR + ":" + messageTo);
+ string.append(TO + ":" + messageTo);
}
return string.toString();
Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/SmooksTransformerUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/SmooksTransformerUnitTest.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/SmooksTransformerUnitTest.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -83,7 +83,9 @@
// Set the message properties in order to trigger the appropriate transformations
// on the message...
+ properties.setAttribute(SmooksTransformer.FROM, from);
properties.setAttribute(SmooksTransformer.FROM_TYPE, fromType);
+ properties.setAttribute(SmooksTransformer.TO, to);
properties.setAttribute(SmooksTransformer.TO_TYPE, toType);
// The smooks-cdr.lst and device-profile.xml files are located in the root of the
@@ -111,22 +113,6 @@
Message message;
message = MessageFactory.getInstance().getMessage();
- Call call = new Call();
- EPR fromEPR = new EPR();
- EPR toEPR = new EPR();
- PortReference fromAddr = new PortReference();
- PortReference toAddr = new PortReference();
-
- message.getHeader().setCall(call);
-
- call.setFrom(fromEPR);
- fromEPR.setAddr(fromAddr);
- fromAddr.setAddress(from);
-
- call.setTo(toEPR);
- toEPR.setAddr(toAddr);
- toAddr.setAddress(to);
-
return message;
}
Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/smooks-test.cdrl
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/smooks-test.cdrl 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/actions/converters/smooks-test.cdrl 2006-11-27 17:45:40 UTC (rev 7851)
@@ -6,21 +6,21 @@
<!--
"Acme-Order-XML" messages going from "Acme" to "AcmePartner1"
-->
- <smooks-resource useragent="from-type:Acme-Order-XML AND from-epr:Acme AND to-type:Partner1-Order-XML AND to-epr:AcmePartner1" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
+ <smooks-resource useragent="from-type:Acme-Order-XML AND from:Acme AND to-type:Partner1-Order-XML AND to:AcmePartner1" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
<param name="replacementElement">b</param>
</smooks-resource>
<!--
"Acme-Order-XML" messages going from "Acme" to "AcmePartner2"
-->
- <smooks-resource useragent="from-type:Acme-Order-XML AND from-epr:Acme AND to-type:Partner2-Order-XML AND to-epr:AcmePartner2" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
+ <smooks-resource useragent="from-type:Acme-Order-XML AND from:Acme AND to-type:Partner2-Order-XML AND to:AcmePartner2" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
<param name="replacementElement">c</param>
</smooks-resource>
<!--
"Acme-Order-XML" messages going from "Acme" to anywhere
-->
- <smooks-resource useragent="from-type:Acme-Order-XML AND from-epr:Acme" selector="a" path="org.milyn.cdres.trans.RenameElementTU">
+ <smooks-resource useragent="from-type:Acme-Order-XML AND from:Acme" selector="a" path="org.milyn.cdres.trans.RenameElementTU">
<param name="replacementElement">x</param>
</smooks-resource>
Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerConfig.xml 2006-11-27 17:45:40 UTC (rev 7851)
@@ -25,8 +25,8 @@
<SmooksTransformerTest>
<action class="org.jboss.soa.esb.actions.converters.SmooksTransformer"
from-type="Acme-Order-XML"
- from-epr="Acme"
+ from="Acme"
to-type="Partner2-Order-XML"
- to-epr="AcmePartner2"
+ to="AcmePartner2"
/>
</SmooksTransformerTest>
Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerTest.java
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerTest.java 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/SmooksTransformerTest.java 2006-11-27 17:45:40 UTC (rev 7851)
@@ -55,9 +55,9 @@
// Set the message type and routing info on the message - should override the
// configured typing and routing parameters...
+ message.getProperties().setProperty(SmooksTransformer.FROM, "Acme");
message.getProperties().setProperty(SmooksTransformer.FROM_TYPE, "Acme-Order-XML");
- message.getHeader().getCall().getFrom().getAddr().setAddress("Acme");
- message.getHeader().getCall().getTo().getAddr().setAddress("AcmePartner1");
+ message.getProperties().setProperty(SmooksTransformer.TO, "AcmePartner1");
message.getProperties().setProperty(SmooksTransformer.TO_TYPE, "Partner1-Order-XML");
// Set the message payload for processing...
ActionUtils.setTaskObject(message, "<a><ddd>value</ddd></a>");
@@ -85,18 +85,7 @@
private Message createEmptyMessage() {
Message message = MessageFactory.getInstance().getMessage();
- Call call = new Call();
- EPR fromEPR = new EPR();
- EPR toEPR = new EPR();
- PortReference fromAddr = new PortReference();
- PortReference toAddr = new PortReference();
- message.getHeader().setCall(call);
- call.setFrom(fromEPR);
- fromEPR.setAddr(fromAddr);
- call.setTo(toEPR);
- toEPR.setAddr(toAddr);
-
return message;
}
Modified: labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/smooks-test.cdrl
===================================================================
--- labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/smooks-test.cdrl 2006-11-27 11:22:08 UTC (rev 7850)
+++ labs/jbossesb/trunk/qa/junit/src/org/jboss/soa/esb/actions/smooks-test.cdrl 2006-11-27 17:45:40 UTC (rev 7851)
@@ -6,21 +6,21 @@
<!--
"Acme-Order-XML" messages going from "Acme" to "AcmePartner1"
-->
- <smooks-resource useragent="from-type:Acme-Order-XML AND from-epr:Acme AND to-type:Partner1-Order-XML AND to-epr:AcmePartner1" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
+ <smooks-resource useragent="from-type:Acme-Order-XML AND from:Acme AND to-type:Partner1-Order-XML AND to:AcmePartner1" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
<param name="replacementElement">b</param>
</smooks-resource>
<!--
"Acme-Order-XML" messages going from "Acme" to "AcmePartner2"
-->
- <smooks-resource useragent="from-type:Acme-Order-XML AND from-epr:Acme AND to-type:Partner2-Order-XML AND to-epr:AcmePartner2" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
+ <smooks-resource useragent="from-type:Acme-Order-XML AND from:Acme AND to-type:Partner2-Order-XML AND to:AcmePartner2" selector="ddd" path="org.milyn.cdres.trans.RenameElementTU">
<param name="replacementElement">c</param>
</smooks-resource>
<!--
"Acme-Order-XML" messages going from "Acme" to anywhere
-->
- <smooks-resource useragent="from-type:Acme-Order-XML AND from-epr:Acme" selector="a" path="org.milyn.cdres.trans.RenameElementTU">
+ <smooks-resource useragent="from-type:Acme-Order-XML AND from:Acme" selector="a" path="org.milyn.cdres.trans.RenameElementTU">
<param name="replacementElement">x</param>
</smooks-resource>
More information about the jboss-svn-commits
mailing list