Yes client.sent to endpoint :
<br />
Here is the config fle:
<br />
<code>
<br />
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:servlet="http://www.mulesoft.org/schema/mule/servlet" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.
;org/2001/XMLSchema-instance" version="CE-3.3.0" xsi:schemaLocation="
<br />
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
<br />
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
<br />
http://www.mulesoft.org/schema/mule/servlet http://www.mulesoft.org/schema/mule/servlet/current/mule-servlet.xsd
<br />
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd
<br />
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
<br />
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
<br />
<custom-transformer class="org.mule.example.hello.StringToNameString" name="StringToNameString" doc:name="Java"/>
<br />
<custom-transformer class="org.mule.example.hello.NameStringToChatString" name="NameStringToChatString" doc:name="Java"/>
<br />
<custom-transformer class="org.mule.example.hello.ChatStringToString" name="ChatStringToString" doc:name="Java"/>
<br />
<custom-transformer class="org.mule.example.hello.HttpRequestToNameString" name="HttpRequestToNameString" doc:name="Java"/>
<br />
<custom-transformer class="org.mule.example.hello.ExceptionToString" name="ExceptionToString" doc:name="Java"/>
<br />
<custom-transformer class="org.mule.transport.servlet.transformers.HttpRequestToParameter" name="HttpRequestToParameter" doc:name="Java"/>
<br />
<custom-transformer class="org.mule.transformer.simple.ObjectToString" name="ObjectToString" doc:name="Java"/>
<br />
<http:connector name="HTTP_HTTPS" cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" proxyHostname="localhost" proxyPort="8080" doc:name="HTTP\HTTPS"/>
<br />
<byte-array-to-string-transformer name="Byte_Array_to_String" doc:name="Byte Array to String"/>
<br />
<vm:connector name="VM" queueTimeout="1000" dynamicNotification="true" validateConnections="false" doc:name="VM">
<br />
<vm:queue-profile maxOutstandingMessages="10"/>
<br />
</vm:connector>
<br />
<flow name="HelloWorld" doc:name="HelloWorld" processingStrategy="synchronous">
<br />
<composite-source>
<br />
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8888" doc:name="Http Endpoint"/>
<br />
<servlet:inbound-endpoint path="name" responseTimeout="10000" doc:name="Servlet Endpoint"/>
<br />
</composite-source>
<br />
<message-filter doc:name="Filter favicon">
<br />
<not-filter>
<br />
<wildcard-filter pattern="/favicon.ico" caseSensitive="true"/>
<br />
</not-filter>
<br />
</message-filter>
<br />
<transformer ref="HttpRequestToNameString" doc:name="Transform Http Request to NameString"/>
<br />
<component class="org.mule.example.hello.Greeter" doc:name="Greeter Component">
<br />
<custom-interceptor class="org.mule.example.hello.EnveloppeInterceptor"/>
<br />
</component>
<br />
<catch-exception-strategy doc:name="Catch Exception Strategy">
<br />
<logger message="#[payload]" level="ERROR" doc:name="Log Error"/>
<br />
</catch-exception-strategy>
<br />
</flow>
<br />
<sub-flow name="ChitChat" doc:name="ChitChat">
<br />
<transformer ref="NameStringToChatString" doc:name="Transform NameString to ChatString"/>
<br />
<component class="org.mule.example.hello.ChitChatter" doc:name="ChitChatter"/>
<br />
<transformer ref="ChatStringToString" doc:name="Transform ChatString to String"/>
<br />
</sub-flow>
<br />
<flow name="Rest" doc:name="Rest" processingStrategy="synchronous">
<br />
<vm:inbound-endpoint exchange-pattern="one-way" path="Rest" doc:name="VM"/>
<br />
<custom-transformer class="org.mule.example.hello.VmToString" doc:name="Transform VmToString"/>
<br />
<jersey:resources doc:name="Rest">
<br />
<component class="org.mule.example.hello.RestComponent"/>
<br />
</jersey:resources>
<br />
</flow>
<br />
<flow name="EchoService" doc:name="EchoService" processingStrategy="synchronous">
<br />
<vm:inbound-endpoint exchange-pattern="one-way" path="Echo" doc:name="VM"/>
<br />
<custom-transformer class="org.mule.example.hello.VmToString" doc:name="Transformer VmToString"/>
<br />
<append-string-transformer message="...Have a nice day!" doc:name="Append String"/>
<br />
<echo-component doc:name="Echo"/>
<br />
</flow>
<br />
</mule>
<br />
</code>
<br /><br />
<code>
<br />
public class EnveloppeInterceptor extends AbstractEnvelopeInterceptor {
<br />
private MessageProcessor next;
<br />
ServiceChoice service = new ServiceChoice();
<br /><br />
public MuleEvent before(MuleEvent invocation){
<br />
//................................
<br />
return invocation;
<br />
}
<br /><br />
public MuleEvent after(MuleEvent invocation){
<br />
//................................
<br />
return invocation;
<br />
}
<br /><br />
@Override
<br />
public void setListener(MessageProcessor listener) {
<br />
next = listener;
<br />
}
<br /><br />
@Override
<br />
public MuleEvent last(MuleEvent event, ProcessingTime time, long startTime, boolean exceptionWasThrown)throws MuleException {
<br />
try {
<br />
if(exceptionWasThrown){
<br />
System.out.println("Process failed...Need to call another service :\n");
<br />
try {
<br />
service.serviceChoice(event);
<br />
} catch (IOException e) {
<br />
e.printStackTrace();
<br />
}
<br />
}else{
<br />
final String PATHFILE = ".\src\main\app\mule-config.xml" ;
<br />
//Create a MuleContextFactory
<br />
MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
<br />
//create the configuration builder and optionally pass in one or more of these
<br />
ConfigurationBuilder builder = new SpringXmlConfigurationBuilder(PATHFILE);
<br />
//The actual context builder to use
<br />
MuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
<br />
//Create the context
<br />
MuleContext context = muleContextFactory.createMuleContext(builder, contextBuilder);
<br />
//Start the context
<br />
context.start();
<br />
//Create the client with the context
<br />
MuleClient client = new MuleClient(context);
<br />
client.send("vm://Echo", event.getMessage());
<br />
}
<br />
} catch (Exception e) {
<br />
e.printStackTrace();
<br />
}
<br />
return event;
<br />
}
<br />
}
<br />
</code>
<br /><br />
Mule version : 1.3
<br /><br />
and I get no error message just this :
<br />
<a href="https://d37wxxhohlp07s.cloudfront.net/s3_images/793585/untitled.bmp?1348068362" rel="nofollow"><img alt="" src="https://d37wxxhohlp07s.cloudfront.net/s3_images/793585/untitled_inline.bmp?1348068362" /></a>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email