I have two soapui instances running on two different physical boxes, both have identical responses (~60kb) but they could be much bigger (10Mb), but I assume the warnings below are due to this size.
I am getting this soap fault in the mule log:
bq. <address> INFO 2010-06-08 10:52:15,398 [http://connector.http.0.receiver.2] org.mule.transport.vm.VMMessageDispatcher: Connected: endpoint.outbound.vm://search.service </address><address> INFO 2010-06-08 10:52:15,409 [http://connector.http.0.dispatcher.1] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.[http://localhost:9090/mockservices/searchService]</address><address> INFO 2010-06-08 10:52:15,419 [http://connector.http.0.dispatcher.2] org.mule.transport.http.HttpClientMessageDispatcher: Connected: endpoint.outbound.[http://remote:9090/mockservice/searchService]</address><address> WARN 2010-06-08 10:52:15,468 [http://connector.http.0.dispatcher.1] org.apache.commons.httpclient.cookie.CookieSpec: Invalid cookie state: domain not specified </address><address> WARN 2010-06-08 10:52:15,476 [http://connector.http.0.dispatcher.2] org.apache.commons.httpclient.cookie.CookieSpec: Invalid cookie state: domain not specified </address><address> WARN 2010-06-08 10:52:15,738 [http://connector.http.0.dispatcher.2] org.apache.commons.httpclient.HttpMethodBase: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. </address><address> ERROR 2010-06-08 10:52:15,738 [http://connector.http.0.dispatcher.2] org.mule.transport.http.HttpClientMessageDispatcher: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> </address><address> <soapenv:Body> </address><address> <soapenv:Fault> </address><address> <faultcode>Server</faultcode> </address><address> <faultstring>org.apache.xmlbeans.XmlException: error: Unexpected end of file after null</faultstring> </address><address> </soapenv:Fault> </address><address> </soapenv:Body> </address><address> </soapenv:Envelope></address>
Now soapui has apparently seen this error before: [[SOLVED]XmlException: Unexpected end of file after null|http://www.eviware.com/forum/viewtopic.php?f=5&t=2752&p=9975] but it's unknown to me if it was using mule.
I tried their suggestions about nightly builds and their config change, but it didn't make a difference.
Before I approach them (in fact I cannot register on their forums because my free email accounts apparently don't have MX records to their domains), I wanted to find out if mule (or my config) isn't working right.
Here's the async service:
<address> <service name="PerformSearch"></address>
<address> <inbound></address>
<address> <vm:inbound-endpoint address="vm://search.service" synchronous="true"></address>
<address> <message-properties-transformer></address>
<address> <add-message-property key="MULE_CORRELATION_GROUP_SIZE" value="2"/></address>
<address> </message-properties-transformer></address>
<address> </vm:inbound-endpoint></address>
<address> </inbound></address>
<address> <outbound></address>
<address> <multicasting-router></address>
<address> <outbound-endpoint address="http://localhost:9090/mockservices/searchService" synchronous="true" /></address>
<address> <outbound-endpoint address="http://remote:9090/mockservice/searchService" synchronous="true" /></address>
<address> <reply-to address="vm://search.responses"/></address>
<address> </multicasting-router></address>
<address> </outbound></address>
<address> <async-reply></address>
<address> <vm:inbound-endpoint path="search.responses"/></address>
<address> <collection-async-reply-router/></address>
<address> </async-reply></address>
<address> </service></address>
So, with all of that, I wanted to find out from others if I'm configuring Mule right to do what I want, and that it's soapui (or how I'm using it) that is the problem.
My current suspicion is that mule isn't sending all of the data to the other endpoint, namely because the data is fed through a java.io.InputStream (or similar streaming mechanism). One endpoint connects and gets data, but when the other one does the same, the data is gone (null), hence the error. From reading, the multicasting router *should* copy the data verbatim to make multiple copies but it's not happening? That's my best guess as to what's happening.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I added it to the service you suggested and got this:
INFO 2010-06-08 15:03:37,516 [connector.http.0.receiver.3] org.mule.component.simple.LogComponent:
********************************************************************************
* Message received in service: PerformSearch. Content is: *
* '<soapenv:Envelope *
* xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" *
* xmlns:xs="http://com.tes...[100 of 445]' *
********************************************************************************
I'm not sure how to make it show the rest of the message, but it seems valid so far.
I added the file:outbound-endpoint to write the data to a file to better debug the data (the entire message is valid), then I seemed to get Mule where it would contact both webservices correctly, but wait the default 10 seconds and then error out.
I fiddled with it further to see where the change-over happened but now I either get the original error, or "Attempted read from closed stream" on one of the now three endpoints. I tried messing with the correlation attribute and the group size variable but didn't get further.
I'm thinking I may not be configuring the multicasting router right and/therefore Mule doesn't know how many copies of its data to make?
I get this error:
ERROR 2010-06-08 16:16:49,417 [connector.http.0.receiver.2] org.mule.service.DefaultServiceExceptionStrategy:
********************************************************************************
Message : Response timed out (10000ms) waiting for message response id "beff3db6-733a-11df-b727-eb38e561c170" or this action was interrupted. Failed to route event via endpoint: null. Message payload is of type: CopyOnWriteArrayList
Type : org.mule.api.routing.ResponseTimeoutException
Code : MULE_ERROR-40999
Payload : []
JavaDoc : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/routing/ResponseTimeoutException.html
********************************************************************************
Exception stack is:
1. Response timed out (10000ms) waiting for message response id "beff3db6-733a-11df-b727-eb38e561c170" or this action was interrupted. Failed to route event via endpoint: null. Message payload is of type: CopyOnWriteArrayList (org.mule.api.routing.ResponseTimeoutException)
org.mule.routing.EventCorrelator:500 (http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/routing/ResponseTimeoutException.html)
********************************************************************************
Root Exception stack trace:
org.mule.api.routing.ResponseTimeoutException: Response timed out (10000ms) waiting for message response id "beff3db6-733a-11df-b727-eb38e561c170" or this action was interrupted. Failed to route event via endpoint: null. Message payload is of type: CopyOnWriteArrayList
at org.mule.routing.EventCorrelator.getResponse(EventCorrelator.java:500)
at org.mule.routing.EventCorrelator.getResponse(EventCorrelator.java:403)
(rest of the stacktrace cut out)
The two service calls are contacting a pair of mocked webservice via soapui. Soon they will be contacting real webservices though. How can I get soapui (to keep my testing environment going), and how can I know that the real webservices will respond with the HTTP headers? I realize you might not know the answer to the first or both questions, I am more questioning out loud. I'll try hitting real webservices to see how they respond, perhaps log the incoming responses and HTTP headers if possible.
If not, I think I'd be able to use an XPath. Fortunately the same person wrote both webservices, so the top-level structure a few elements in is generally same enough. Do I just have to identify if a response came from an endpoint in the router, not identify which response goes with which individual endpoint?
One final question: what did adding that transformer do? From what I know, it converts any object (a MuleMessage object?) to a byte array before the router got it? I also read that this specific transformer is used in asynchronous contexts when an efficient stream would normally exhausted after the first use. I had an idea this was happening but I didn't know how to fix it. Is that the cause here?
I'll take a look at the builtin expression-message-info-mapping and custom one to see which one works if it's needed.
Thanks for your help, it's been informative the entire way through.
marking question as answered.
The two service calls are contacting a pair of mocked webservice via soapui. Soon they will be contacting real webservices though. How can I get soapui (to keep my testing environment going), and how can I know that the real webservices will respond with the HTTP headers? I realize you might not know the answer to the first or both questions, I am more questioning out loud. I'll try hitting real webservices to see how they respond, perhaps log the incoming responses and HTTP headers if possible.
If not, I think I'd be able to use an XPath. Fortunately the same person wrote both webservices, so the top-level structure a few elements in is generally same enough. Do I just have to identify if a response came from an endpoint in the router, not identify which response goes with which individual endpoint?
One final question: what did adding that transformer do? From what I know, it converts any object (a MuleMessage object?) to a byte array before the router got it? I also read that this specific transformer is used in asynchronous contexts when an efficient stream would normally exhausted after the first use. I had an idea this was happening but I didn't know how to fix it. Is that the cause here?
I do see the request come in with a handful of mule headers: X-MULE_ORIGINATING_ENDPOINT, X-MULE_CORRELATION_ID, etc... and I can see them not going out, but I don't know why soapui isn't returning them, or what I'm doing wrong that's causing them not to show up. I can take that up with the soapui folks because the issue seems to be going out of scope with Mule.
> You will have to identify what pair of responses match with the incoming search request.
To clarify, in the async-reply tag, using the expression-message-info-mapping, I have to identify what would be an acceptable response from any endpoint specified in the source multicasting router? I do not have to tell which response came from which specific outbound endpoint? This is in case I have additional multicast routers and I need to discriminate against their responses here, and likewise exclude these responses there?
I apologize for returning to the subject again, this is all new to me.
You've been very helpful and I just don't want to learn this incorrectly while I have the chance to ask and not go down the wrong path and waste time.
Thank you for your time.
> SOAPui will show you the HTTP headers returned alongside the SOAP envelope.I do see the request come in with a handful of mule headers: X-MULE_ORIGINATING_ENDPOINT, X-MULE_CORRELATION_ID, etc... and I can see them not going out, but I don't know why soapui isn't returning them, or what I'm doing wrong that's causing them not to show up. I can take that up with the soapui folks because the issue seems to be going out of scope with Mule.
> You will have to identify what pair of responses match with the incoming search request.To clarify, in the async-reply tag, using the expression-message-info-mapping, I have to identify what would be an acceptable response from any endpoint specified in the source multicasting router? I do not have to tell which response came from which specific outbound endpoint? This is in case I have additional multicast routers and I need to discriminate against their responses here, and likewise exclude these responses there?
That's what I was searching for on the internet to find out for sure, but nobody could tell me for sure.
> you can then try to look into the actual payload of the message to extract a discriminant value that will allow you to perform this correlation without having a proper ID.
I spent some time looking around and haven't found exactly what should happen.
I have the collection router:
<collection-async-reply-router>
<expression-message-info-mapping
messageIdExpression=""
correlationIdExpression=""/>
</collection-async-reply-router>
But I haven't found anything that helps me identify what needs to go in those two sets of quotes.
The documentation seems to mention it but never shows how to use it.
I see a few examples of people using #[...] syntax to some tokens defined somewhere but I can't find where they're defined at, but I'll keep looking.
Thanks again.
Yikes, that's exactly what I've been looking for.
Thanks for your help again.