Discussion:
Failed to route event via endpoint
laji hajar
2012-09-18 10:47:29 UTC
Permalink
Hi Ian,
<br />
I am having the same problem with my project and I have tried all the tips David gave, but nothing is working, still having " org.mule.api.transport.NoReceiverForEndpointException: There is no receiver registered on connector "connector.VM.mule.default" for endpointUri vm://ChitChat"
<br />
Did you fix the problem ??

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Fake David Dossot
2012-09-18 14:37:29 UTC
Permalink
- Mule version?
<br />
- Mule config.
<br />
- Java code that throws the NoReceiverForEndpointException?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-18 15:43:29 UTC
Permalink
Hi ,
<br />
Thank you a lot , I already fixed it , I was using a sub-flow with a VM endpoint as entry of the service. I haven't noticed that mule did configure it as an outbound and not an inbound so obviously , no endpoint was listening on that address (vm://).
<br />
But I have a question if you can answer please :
<br />
Suppose we have an HTTP endpoint request-response as the inbound-outbound endpoint of a flow. In this flow we call another one flow2 . Can the flow2 use the HTTP outbound of the first flow to post its result ?? or we should definitly use another HTTP ?
<br />
Thanks again.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-18 15:45:29 UTC
Permalink
or is there another way to use an inbound vm endpoint in a sub-flow ?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
David Dossot
2012-09-18 15:50:29 UTC
Permalink
If you call flow2 from flow1 in a synchronous manner, its response will be used for the HTTP response.
<br /><br />
Also note that you can invoke flows directly with flow-ref without using VM endpoints.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-19 14:48:30 UTC
Permalink
Thank you. I my project there is 3 services proposed to the user and he chooses to which one he wants to send the MuleMessage that's why I can't use the flow-ref. I have also tryed to call the flow2 using client.send() (synchronously) but It doesn't return the result to the HTTP endpoint of the first flow. a dialog box appears and ask if I want to save or open the file (application/octet-stream)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
David Dossot
2012-09-19 15:08:29 UTC
Permalink
Post by laji hajar
the user and he chooses to which one he wants to send the MuleMessage that's why I can't use the flow-ref
<br /><br />
You could, with a choice router.
<br /><br />
Post by laji hajar
I have also tryed to call the flow2 using client.send() (synchronously) but It doesn't return the result to the HTTP endpoint of the first flow
<br /><br />
client.send to what endpoint? config?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-19 15:26:30 UTC
Permalink
Yes client.sent to endpoint :
<br />
Here is the config fle:
<br />
<code>
<br />
&lt;mule xmlns=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;core&quot; xmlns:vm=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;vm&quot; xmlns:http=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;http&quot; xmlns:servlet=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;servlet&quot; xmlns:jersey=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;jersey&quot; xmlns:doc=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;documentation&quot; xmlns:spring=&quot;http:&#47;&#47;www&#46;springframework&#46;org&#47;schema&#47;beans&quot; xmlns:core=&quot;http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;core&quot; xmlns:xsi=&quot;http:&#47;&#47;www&#46;w3&#46
;org&#47;2001&#47;XMLSchema-instance&quot; version=&quot;CE-3&#46;3&#46;0&quot; xsi:schemaLocation=&quot;
<br />
http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;vm http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;vm&#47;current&#47;mule-vm&#46;xsd
<br />
http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;http http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;http&#47;current&#47;mule-http&#46;xsd
<br />
http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;servlet http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;servlet&#47;current&#47;mule-servlet&#46;xsd
<br />
http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;jersey http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;jersey&#47;current&#47;mule-jersey&#46;xsd
<br />
http:&#47;&#47;www&#46;springframework&#46;org&#47;schema&#47;beans http:&#47;&#47;www&#46;springframework&#46;org&#47;schema&#47;beans&#47;spring-beans-current&#46;xsd
<br />
http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;core http:&#47;&#47;www&#46;mulesoft&#46;org&#47;schema&#47;mule&#47;core&#47;current&#47;mule&#46;xsd &quot;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;StringToNameString&quot; name=&quot;StringToNameString&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;NameStringToChatString&quot; name=&quot;NameStringToChatString&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;ChatStringToString&quot; name=&quot;ChatStringToString&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;HttpRequestToNameString&quot; name=&quot;HttpRequestToNameString&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;ExceptionToString&quot; name=&quot;ExceptionToString&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;transport&#46;servlet&#46;transformers&#46;HttpRequestToParameter&quot; name=&quot;HttpRequestToParameter&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;transformer&#46;simple&#46;ObjectToString&quot; name=&quot;ObjectToString&quot; doc:name=&quot;Java&quot;&#47;&gt;
<br />
&lt;http:connector name=&quot;HTTP_HTTPS&quot; cookieSpec=&quot;netscape&quot; validateConnections=&quot;true&quot; sendBufferSize=&quot;0&quot; receiveBufferSize=&quot;0&quot; receiveBacklog=&quot;0&quot; clientSoTimeout=&quot;10000&quot; serverSoTimeout=&quot;10000&quot; socketSoLinger=&quot;0&quot; proxyHostname=&quot;localhost&quot; proxyPort=&quot;8080&quot; doc:name=&quot;HTTP\HTTPS&quot;&#47;&gt;
<br />
&lt;byte-array-to-string-transformer name=&quot;Byte_Array_to_String&quot; doc:name=&quot;Byte Array to String&quot;&#47;&gt;
<br />
&lt;vm:connector name=&quot;VM&quot; queueTimeout=&quot;1000&quot; dynamicNotification=&quot;true&quot; validateConnections=&quot;false&quot; doc:name=&quot;VM&quot;&gt;
<br />
&lt;vm:queue-profile maxOutstandingMessages=&quot;10&quot;&#47;&gt;
<br />
&lt;&#47;vm:connector&gt;
<br />
&lt;flow name=&quot;HelloWorld&quot; doc:name=&quot;HelloWorld&quot; processingStrategy=&quot;synchronous&quot;&gt;
<br />
&lt;composite-source&gt;
<br />
&lt;http:inbound-endpoint exchange-pattern=&quot;request-response&quot; host=&quot;localhost&quot; port=&quot;8888&quot; doc:name=&quot;Http Endpoint&quot;&#47;&gt;
<br />
&lt;servlet:inbound-endpoint path=&quot;name&quot; responseTimeout=&quot;10000&quot; doc:name=&quot;Servlet Endpoint&quot;&#47;&gt;
<br />
&lt;&#47;composite-source&gt;
<br />
&lt;message-filter doc:name=&quot;Filter favicon&quot;&gt;
<br />
&lt;not-filter&gt;
<br />
&lt;wildcard-filter pattern=&quot;&#47;favicon&#46;ico&quot; caseSensitive=&quot;true&quot;&#47;&gt;
<br />
&lt;&#47;not-filter&gt;
<br />
&lt;&#47;message-filter&gt;
<br />
&lt;transformer ref=&quot;HttpRequestToNameString&quot; doc:name=&quot;Transform Http Request to NameString&quot;&#47;&gt;
<br />
&lt;component class=&quot;org&#46;mule&#46;example&#46;hello&#46;Greeter&quot; doc:name=&quot;Greeter Component&quot;&gt;
<br />
&lt;custom-interceptor class=&quot;org&#46;mule&#46;example&#46;hello&#46;EnveloppeInterceptor&quot;&#47;&gt;
<br />
&lt;&#47;component&gt;
<br />
&lt;catch-exception-strategy doc:name=&quot;Catch Exception Strategy&quot;&gt;
<br />
&lt;logger message=&quot;#[payload]&quot; level=&quot;ERROR&quot; doc:name=&quot;Log Error&quot;&#47;&gt;
<br />
&lt;&#47;catch-exception-strategy&gt;
<br />
&lt;&#47;flow&gt;
<br />
&lt;sub-flow name=&quot;ChitChat&quot; doc:name=&quot;ChitChat&quot;&gt;
<br />
&lt;transformer ref=&quot;NameStringToChatString&quot; doc:name=&quot;Transform NameString to ChatString&quot;&#47;&gt;
<br />
&lt;component class=&quot;org&#46;mule&#46;example&#46;hello&#46;ChitChatter&quot; doc:name=&quot;ChitChatter&quot;&#47;&gt;
<br />
&lt;transformer ref=&quot;ChatStringToString&quot; doc:name=&quot;Transform ChatString to String&quot;&#47;&gt;
<br />
&lt;&#47;sub-flow&gt;
<br />
&lt;flow name=&quot;Rest&quot; doc:name=&quot;Rest&quot; processingStrategy=&quot;synchronous&quot;&gt;
<br />
&lt;vm:inbound-endpoint exchange-pattern=&quot;one-way&quot; path=&quot;Rest&quot; doc:name=&quot;VM&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;VmToString&quot; doc:name=&quot;Transform VmToString&quot;&#47;&gt;
<br />
&lt;jersey:resources doc:name=&quot;Rest&quot;&gt;
<br />
&lt;component class=&quot;org&#46;mule&#46;example&#46;hello&#46;RestComponent&quot;&#47;&gt;
<br />
&lt;&#47;jersey:resources&gt;
<br />
&lt;&#47;flow&gt;
<br />
&lt;flow name=&quot;EchoService&quot; doc:name=&quot;EchoService&quot; processingStrategy=&quot;synchronous&quot;&gt;
<br />
&lt;vm:inbound-endpoint exchange-pattern=&quot;one-way&quot; path=&quot;Echo&quot; doc:name=&quot;VM&quot;&#47;&gt;
<br />
&lt;custom-transformer class=&quot;org&#46;mule&#46;example&#46;hello&#46;VmToString&quot; doc:name=&quot;Transformer VmToString&quot;&#47;&gt;
<br />
&lt;append-string-transformer message=&quot;&#46;&#46;&#46;Have a nice day!&quot; doc:name=&quot;Append String&quot;&#47;&gt;
<br />
&lt;echo-component doc:name=&quot;Echo&quot;&#47;&gt;
<br />
&lt;&#47;flow&gt;
<br />
&lt;&#47;mule&gt;
<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 />
&#47;&#47;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;
<br />
return invocation;
<br />
}
<br /><br />
public MuleEvent after(MuleEvent invocation){
<br />
&#47;&#47;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;&#46;
<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&#46;out&#46;println(&quot;Process failed&#46;&#46;&#46;Need to call another service :\n&quot;);
<br />
try {
<br />
service&#46;serviceChoice(event);
<br />
} catch (IOException e) {
<br />
e&#46;printStackTrace();
<br />
}
<br />
}else{
<br />
final String PATHFILE = &quot;&#46;\src\main\app\mule-config&#46;xml&quot; ;
<br />
&#47;&#47;Create a MuleContextFactory
<br />
MuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
<br />
&#47;&#47;create the configuration builder and optionally pass in one or more of these
<br />
ConfigurationBuilder builder = new SpringXmlConfigurationBuilder(PATHFILE);
<br />
&#47;&#47;The actual context builder to use
<br />
MuleContextBuilder contextBuilder = new DefaultMuleContextBuilder();
<br />
&#47;&#47;Create the context
<br />
MuleContext context = muleContextFactory&#46;createMuleContext(builder, contextBuilder);
<br />
&#47;&#47;Start the context
<br />
context&#46;start();
<br />
&#47;&#47;Create the client with the context
<br />
MuleClient client = new MuleClient(context);
<br />
client&#46;send(&quot;vm:&#47;&#47;Echo&quot;, event&#46;getMessage());
<br />
}
<br />
} catch (Exception e) {
<br />
e&#46;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
David Dossot
2012-09-19 15:40:30 UTC
Permalink
Mule 1.3?!? It's 6 years old! Time to upgrade, the latest community edition is 3.3.0.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
David Dossot
2012-09-19 15:41:30 UTC
Permalink
Oh, you're talking about the version of Studio, the IDE, not Mule.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
David Dossot
2012-09-19 15:44:30 UTC
Permalink
I really do not understand what you're trying to achieve.
<br /><br />
You use a custom interceptor to bootstrap a second Mule instance (within the main Mule instance) just to perform a VM send.
<br /><br />
Why not just using a VM outbound endpoint?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-20 10:25:30 UTC
Permalink
Sorry , yes it's the IDE

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-20 10:31:30 UTC
Permalink
Because we don't know the choice of the user before. so when he enters his choice, I use the second mule instance to send the mule message to the required service.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Fake David Dossot
2012-09-20 14:58:30 UTC
Permalink
This is just way too complex a design, I urge you to review it.
<br /><br />
Why don't you use a dynamic outbound VM endpoint, ie using an expression in it, so on the fly construct the dispatch address?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
laji hajar
2012-09-20 15:03:30 UTC
Permalink
Thank you this seems easier (I'll let my supervisor know). Thanks again

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Loading...