Andrew.
Lets see... find in the attached files a mule configuration file (
testCaseConfig.xml ) a xslt ( testXslt.xsl, this file a have it under
lib/user ) and a simple client program ( MuleClienteTest.java ).
The catch here is that with the current configuration the
testTransformer is not executed. Changed the connector vmQueue
queveEvents property to false and everything is Ok, also changing the
http endpoint synchronous property to true makes the transformer
execute. It seems that the outbound transformer don't get executed when
the descriptor is asynchronous and the message goes?/comes? to a
persistent queue.
Adding other queues makes no difference nor assigning the echo vm
endpoint to a non-persistent queue
This config is running under linux, mule 1.3.3, java 1.5.0_06.
See the output on the mule console.
Thank's.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mule-configuration PUBLIC "-//SymphonySoft //DTD mule-configuration XML V1.0//EN"
"
http://mule.mulesource.org/dtds/mule-configuration.dtd" >
<mule-configuration id="Aseguramiento_de_Entrega_del_Servicio_Infinitum" version="1.0">
<mule-environment-properties synchronous="false" serverUrl="tcp://localhost:60514" >
<queue-profile persistent="true" maxOutstandingMessages="1000000"/>
<persistence-strategy className="org.mule.util.queue.FilePersistenceStrategy"/>
</mule-environment-properties>
<connector name="vmQueue" className="org.mule.providers.vm.VMConnector">
<properties>
<property name="queueEvents" value="true"/>
</properties>
</connector>
<transformers>
<transformer name="testTransformer"
className="org.mule.transformers.xml.XsltTransformer"
returnClass="org.dom4j.Document" >
<properties>
<property name="xslFile" value="testXslt.xsl" />
</properties>
</transformer>
<transformer name="ObjectToXml" className="org.mule.transformers.xml.DomDocumentToXml"
returnClass="java.lang.String" />
</transformers>
<interceptor-stack name="default">
<interceptor className="org.mule.interceptors.LoggingInterceptor"/>
<interceptor className="org.mule.interceptors.TimerInterceptor"/>
</interceptor-stack>
<model name="TEST">
<mule-descriptor name="ReceiverUMO"
implementation="org.mule.components.simple.PassThroughComponent">
<inbound-router>
<endpoint name="HttpEndPoint"
address="
http://localhost:8888/testMule/"
synchronous="false" >
<!-- filter out the favicon request -->
<filter className="org.mule.routing.filters.logic.NotFilter" >
<filter pattern="/favicon.ico"
className="org.mule.providers.http.filters.HttpRequestWildcardFilter" />
</filter>
<properties>
<property name="Content-Type" value="text/html"/>
</properties>
</endpoint>
</inbound-router>
<outbound-router>
<router className="org.mule.routing.outbound.OutboundPassThroughRouter" >
<endpoint address="vm://echo"
transformers="testTransformer" />
</router>
</outbound-router>
<interceptor name="default" />
</mule-descriptor>
<mule-descriptor name="EchoUMO"
implementation="org.mule.components.simple.EchoComponent">
<inbound-router>
<endpoint address="vm://echo"
transformers="ObjectToXml"/>
</inbound-router>
<outbound-router>
<router className="org.mule.routing.outbound.OutboundPassThroughRouter" >
<endpoint address="stream://System.out" />
</router>
</outbound-router>
<interceptor name="default" />
</mule-descriptor>
</model>
</mule-configuration>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="xsl" version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<transformedDocument>
<xsl:for-each select="inputDocument/inputNode">
<transformedNode>
<xsl:value-of select="."/>
</transformedNode>
</xsl:for-each>
</transformedDocument>
</xsl:template>
</xsl:stylesheet>
import org.mule.extras.client.MuleClient;
import org.mule.umo.UMOMessage;
public class MuleClientTest {
public static void main(String[] args) throws Exception {
MuleClient client = new MuleClient();
UMOMessage result = client.send("
http://147.15.81.203:8888/testMule/","<inputDocument><inputNode>Value of node</inputNode></inputDocument>", null);
if ( result != null ) {
System.out.println("Result: '"+result.getPayloadAsString()+"'");
} else {
System.out.println("Result: null");
}
}
}
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email