Hi,
I found workaround for this, my new service looks like this:
user="jpalka" password="opunaela" method="GET" synchronous="true">
<response-transformers>
<byte-array-to-string-transformer />
<xmls:xml-to-dom-transformer
returnClass="org.w3c.dom.Document" />
<xmls:xpath-extractor-transformer
expression="/mb:metadata/mb:artist-list/mb:artist[1]/@id"
resultType="STRING">
<xmls:namespace uri="
http://musicbrainz.org/ns/mmd-1.0#"
prefix="mb" />
</xmls:xpath-extractor-transformer>
</response-transformers>
user="jpalka" password="opunaela" method="GET" synchronous="true">
<byte-array-to-string-transformer />
<message-properties-transformer>
<add-message-property key="http.method"
value="GET" />
</message-properties-transformer>
<http:object-to-http-request-transformer />
</http:outbound-endpoint>
<vm:outbound-endpoint path="get-artist-info.reply" />
</chaining-router>
</outbound>
</service>
It looks like a bug for me, I just manually set http.method property:
<message-properties-transformer>
<add-message-property key="http.method"
value="GET" />
</message-properties-transformer>
<http:object-to-http-request-transformer />
But I found another issues. As you see in my chaining router I have a third endpoint,which uses VM transport to return response to async replay router:
<service name="get-artist-info">
<inbound>
<vm:inbound-endpoint path="artist" synchronous="true" />
</inbound>
<outbound>
<multicasting-router>
<!--
vm:outbound-endpoint path="last.fm-service" />
<vm:outbound-endpoint path="jamendo.com-service" /
-->
<vm:outbound-endpoint path="musicbrainz.org-service" />
<reply-to address="vm://get-artist-info.reply" />
</multicasting-router>
</outbound>
<async-reply timeout="5000">
<vm:inbound-endpoint path="get-artist-info.reply" />
<collection-async-reply-router></collection-async-reply-router>
</async-reply>
</service>
Now I get following exception:
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.MuleSessionHandler: Adding property to session header: ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.MuleSessionHandler: Adding session header to message: ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9;ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Encoder: Applying transformer Base64Encoder (org.mule.transformer.codec.Base64Encoder)
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Encoder: Object before transform: ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9;ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Encoder: Object after transform: SUQ9Y2I2ZjM4NzItNGQ1Yi0xMWRlLWIxN2EtNWYxZjEwY2ZmMWM5O0lEPWNiNmYzODcyLTRkNWItMTFkZS1iMTdhLTVmMWYxMGNmZjFjOQ==
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Encoder: The transformed object is of expected type. Type is: String
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transport.vm.VMMessageReceiver: Message Received from: vm://get-artist-info.reply
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Decoder: Applying transformer Base64Decoder (org.mule.transformer.codec.Base64Decoder)
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Decoder: Object before transform: SUQ9Y2I2ZjM4NzItNGQ1Yi0xMWRlLWIxN2EtNWYxZjEwY2ZmMWM5O0lEPWNiNmYzODcyLTRkNWItMTFkZS1iMTdhLTVmMWYxMGNmZjFjOQ==
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Decoder: Object after transform: {73,68,61,99,98,54,102,51,56,55,50,45,52,100,53,98,45,49,49,100,101,45,98,49,55,97,45,53,102,49,102,49,48,99,102,102,49,99,57,59,73,68,61,99,98,54,102,51,56,55 [..]}
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.transformer.codec.Base64Decoder: The transformed object is of expected type. Type is: byte[]
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.MuleSessionHandler: Parsing session header: ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9;ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.MuleSessionHandler: Added MuleSession variable: ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.MuleSessionHandler: Added MuleSession variable: ID=cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,640 [connector.VM.0.dispatcher.3] org.mule.DefaultMuleSession: Got session with id: cb6f3872-4d5b-11de-b17a-5f1f10cff1c9
DEBUG 2009-05-30 22:52:33,656 [connector.VM.0.dispatcher.3] org.mule.routing.EventCorrelator: Adding event to aggregator group: cb6cc771-4d5b-11de-b17a-5f1f10cff1c9
WARN 2009-05-30 22:52:33,656 [connector.VM.0.dispatcher.3] org.mule.routing.CollectionCorrelatorCallback: Correlation Group Size not set, but correlation aggregator is being used. Message is being forwarded as is
DEBUG 2009-05-30 22:52:33,656 [connector.http.0.receiver.2] org.mule.routing.EventCorrelator: remaining locks : []
DEBUG 2009-05-30 22:52:33,656 [connector.http.0.receiver.2] org.mule.routing.EventCorrelator: remaining results: []
DEBUG 2009-05-30 22:52:33,656 [connector.VM.0.dispatcher.3] org.mule.transport.vm.VMMessageDispatcher: dispatched MuleEvent on endpointUri: vm://get-artist-info.reply
DEBUG 2009-05-30 22:52:33,656 [connector.http.0.receiver.2] org.mule.transport.vm.VMMessageDispatcher: sent event on endpointUri: vm://artist
DEBUG 2009-05-30 22:52:33,656 [connector.http.0.receiver.2] org.mule.transport.vm.VMConnector: Returning dispatcher for endpoint: vm://artist = VMMessageDispatcher{this=d75c47, endpoint=vm://artist, disposed=false}
DEBUG 2009-05-30 22:52:33,656 [connector.http.0.receiver.2] org.mule.routing.outbound.FilteringOutboundRouter: Response message from sending to: vm://artist
ERROR 2009-05-30 22:52:33,656 [connector.VM.0.dispatcher.2] org.mule.DefaultExceptionStrategy: Caught exception in Exception Strategy: null
java.lang.NullPointerException
at edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:769)
at org.mule.transport.vm.VMConnector.getReceiverByEndpoint(VMConnector.java:206)
at org.mule.transport.vm.VMConnector.getReceiver(VMConnector.java:154)
at org.mule.transport.vm.VMMessageDispatcher.doDispatch(VMMessageDispatcher.java:60)
at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:262)
at org.mule.work.WorkerContext.run(WorkerContext.java:310)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:619)
DEBUG 2009-05-30 22:52:33,656 [connector.VM.0.dispatcher.2] org.mule.DefaultMuleMessage: new copy of message for Thread[connector.VM.0.dispatcher.2,5,main]
DEBUG 2009-05-30 22:52:33,656 [connector.http.0.receiver.2] org.mule.routing.outbound.FilteringOutboundRouter: org.mule.transport.DefaultMessageAdapter/org.mule.transport.DefaultMessageAdapter@6a435f{id=cc8897d3-4d5b-11de-b17a-5f1f10cff1c9, payload=edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList, properties=Properties{invocation:{}, inbound:{}, outbound:{}, session:{}, }, correlationId=null, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, exceptionPayload=null, properties=Properties{invocation:{}, inbound:{}, outbound:{}, session:{}, }}
DEBUG 2009-05-30 22:52:33,671 [connector.VM.0.dispatcher.2] org.mule.util.DefaultStreamCloserService: Unable to find an StreamCloser for the stream type: class java.lang.String, the stream: <?xml version="1.0" encoding="UTF-8"?><metadata xmlns="
http://musicbrainz.org/ns/mmd-1.0#"><artist id="79491354-3d83-40e3-9d8e-7592d58d790a" type="Group"><name>Deep Purple</name><sort-name>Deep Purple</sort-name><life-span begin="1968"/><release-list><release id="13a23443-fff8-411a-9630-974a9090652f" type="Album Official" ><title>Fireball: Anniversary Edition</title><text-representation language="ENG" script="Latn"/></release><release id="70cf5a89-a93e-4682-8eff-9dba8794c241" type="Album Official" ><title>Come Taste the Band</title><text-representation language="ENG" script="Latn"/></release><release id="d17f5487-37dc-48b7-b45d-b7c3fb8d9079" type="Album Official" ><title>Ritchie's Blues</title><text-representation language="ENG" script="Latn"/></release><release id="45ac68bc-6e4c-46a7-836d-246dcb0fd431" type="Album Official" ><title>Fireball</title><text-representation language="ENG" script="Latn"/></release><release id="9ba408af-e363-427d-9e1a-86e785bafd24" type="Album Official" ><title>Fireball</title><text-representation language="ENG" script="Latn"/></release><release id="e5d7a5e2-95a7-4cb4-b31c-e77bd1d65929" type="Album Official" ><title>Stormbringer</title><text-representation language="ENG" script="Latn"/></release><release id="3f578293-4528-4504-bcad-e04f67817a66" type="Album Official" ><title>Burn</title><text-representation language="ENG" script="Latn"/></release><release id="653a898a-2988-4ffa-a492-555faed1e9ba" type="Album Official" ><title>Shades of Deep Purple</title><text-representation language="ENG" script="Latn"/><asin>B00004KD11</asin></release><release id="52d74fc8-5a05-406f-b4d7-0e54babc68b5" type="Album Official" ><title>The Book of Taliesyn</title><text-representation language="ENG" script="Latn"/><asin>B000005RTE</asin></release><release id="6e2ef703-2056-4811-aa79-ebbabf8b1fbb" type="Album Official" ><title>Deep Purple</title><text-representation language="ENG" script="Latn"/></release><release id="5156ea9f-eb54-4258-bbf0-e3af9219de1f" type="Album Official" ><title>Deep Purple in Rock</title><text-representation language="ENG" script="Latn"/><asin>B000002KBA</asin></release><release id="93dcc4f5-575a-4036-99c3-4beee4bb124f" type="Album Official" ><title>Fireball</title><text-representation language="ENG" script="Latn"/><asin>B000002KDQ</asin></release><release id="3cc31640-0c66-43f0-8caf-5098bdd1d2cd" type="Album Official" ><title>Fireball</title><text-representation language="ENG" script="Latn"/><asin>B000026ANN</asin></release><release id="499004a8-2cea-4b13-9d90-6d41884a9779" type="Album Official" ><title>Machine Head</title><text-representation language="ENG" script="Latn"/><asin>B000002KHB</asin></release><release id="f5f66f03-4a3d-49c6-89a4-6ff5fe78fb41" type="Album Official" ><title>Who Do We Think We Are</title><text-representation language="ENG" script="Latn"/><asin>B000002KEI</asin></release><release id="5f5244a6-9881-4e21-90ef-76c1718cab60" type="Album Official" ><title>Burn</title><text-representation language="ENG" script="Latn"/><asin>B000025VGI</asin></release><release id="19fb1861-977b-48d3-9f63-514c60cecbde" type="Album Official" ><title>Stormbringer</title><text-representation language="ENG" script="Latn"/><asin>B000005RTA</asin></release><release id="a9744317-6a65-4a83-b9fa-41d530964c1f" type="Album Official" ><title>Come Taste the Band</title><text-representation language="ENG" script="Latn"/><asin>B000005RTG</asin></release><release id="bf3badb6-53e4-4658-b760-f2f5a3d86adc" type="Album Official" ><title>Perfect Strangers</title><text-representation language="ENG" script="Latn"/><asin>B00000JBFW</asin></release><release id="3c4467b2-ad58-4d2c-9c53-ddf7008e956a" type="Album Official" ><title>The House of Blue Light</title><text-representation language="ENG" script="Latn"/><asin>B00000JBFX</asin></release><release id="6aae714d-febd-409b-b716-dc4d36ba49f4" type="Album Official" ><title>Slaves and Masters</title><text-representation language="ENG" script="Latn"/><asin>B0002IQP54</asin></release><release id="53973719-620a-4f96-99f0-73f6a0201796" type="Album Official" ><title>Deep Purple</title><text-representation language="ENG" script="Latn"/></release><release id="6b311a1c-221f-4f1b-b4ab-ffe76a0fdc8e" type="Album Official" ><title>Hush</title><text-representation language="ENG" script="Latn"/></release><release id="e131d96a-68f2-483b-ba2b-6d77da25b8bc" type="Album Official" ><title>The Battle Rages On...</title><text-representation language="ENG" script="Latn"/><asin>B000002L1L</asin></release><release id="54c13153-10c6-4a52-b4ba-7699f627fd81" type="Album Official" ><title>Deep Purple in Rock: Anniversary Edition</title><text-representation language="ENG" script="Latn"/><asin>B000005RQT</asin></release><release id="6d405b7c-cf52-42fa-bb8e-b458f97bd049" type="Album Official" ><title>Purpendicular</title><text-representation language="ENG" script="Latn"/></release><release id="2a56a504-e084-49e4-8fc3-6300fce3a70d" type="Album Official" ><title>Purpendicular</title><text-representation language="ENG" script="Latn"/><asin>B000024KRO</asin></release><release id="5b7defa2-ef34-4402-a55e-5d868ed663b3" type="Album Official" ><title>Purple Harbour 1996-03-21 (disc 1)</title><text-representation language="ENG" script="Latn"/></release><release id="5f466fa2-6fcf-4002-9ab3-cff7f83b1d7e" type="Album Official" ><title>Machine Head: 25th Anniversary Edition (disc 2: Remastered)</title><text-representation language="ENG" script="Latn"/><asin>B000006UD8</asin></release><release id="42ef7085-28d8-4de1-9f06-00c8e1dc1680" type="Album Official" ><title>Abandon</title><text-representation language="ENG" script="Latn"/><asin>B000007N8O</asin></release><release id="3d17e25f-35aa-4aa0-b7cb-5679703b6b9b" type="Album Official" ><title>Fireball: Deluxe Edition</title><text-representation language="ENG" script="Latn"/><asin>B00004TIOI</asin></release><release id="78ecb1e8-8c70-4ff6-bb78-2deb0584480b" type="Album Official" ><title>Machine Head: 25th Anniversary Edition (disc 1: The Remasters)</title><text-representation language="ENG" script="Latn"/><asin>B00000DGRX</asin></release><release id="630a84d1-e09c-4e6b-b03e-caacc786c06f" type="Album Official" ><title>Perfect Strangers</title><text-representation language="ENG" script="Latn"/><asin>B00000JBFW</asin></release><release id="f9928f1f-5a01-493e-9fd9-562bd4555d44" type="Album Official" ><title>The House of Blue Light</title><text-representation language="ENG" script="Latn"/><asin>B00000I7AS</asin></release><release id="518338e2-2828-47b5-8166-bdd3411e2464" type="Album Official" ><title>The Book of Taliesyn</title><text-representation language="ENG" script="Latn"/><asin>B00004KD0Z</asin></release><release id="f6946edb-dd25-411c-9242-d9e1012a430f" type="Album Official" ><title>Shades of Deep Purple</title><text-representation language="ENG" script="Latn"/><asin>B00004KD11</asin></release><release id="79759677-914a-4211-981d-ddb935f039fe" type="Album Official" ><title>Deep Purple</title><text-representation language="ENG" script="Latn"/><asin>B00004KD13</asin></release><release id="6dd50c71-6c90-4637-87a1-70cb932530a8" type="Album Official" ><title>Who Do We Think We Are</title><text-representation language="ENG" script="Latn"/><asin>B00006BTAN</asin></release><release id="f8785558-cc6c-40b1-8aaf-4fbfc9b375c6" type="Album Official" ><title>Bananas</title><text-representation language="ENG" script="Latn"/><asin>B0000A5BU2</asin></release><release id="17fbf28f-8661-42df-90a8-9d99f3f8a969" type="Album Official" ><title>Bananas</title><text-representation language="ENG" script="Latn"/></release><release id="0d1a8a01-8c5e-4590-a4d4-646ddb1638d1" type="Album Official" ><title>Burn: 30th Anniversary Edition</title><text-representation language="ENG" script="Latn"/><asin>B0002PZKH6</asin></release><release id="4f49a4bf-6232-474d-8696-9415fb770346" type="Album Official" ><title>Rapture of the Deep</title><text-representation language="ENG" script="Latn"/><asin>B000B9UDFM</asin></release><release id="4fae0934-51c2-412a-9bbe-3400a52b5f61" type="Album Official" ><title>Rapture of the Deep</title><text-representation language="ENG" script="Latn"/><asin>B000B5Y03C</asin></release></release-list></artist></metadata> will not be closed.
DEBUG 2009-05-30 22:52:33,671 [connector.http.0.receiver.2] org.mule.model.seda.SedaService: Waiting for response router message
DEBUG 2009-05-30 22:52:33,671 [connector.http.0.receiver.2] org.mule.routing.response.DefaultResponseRouterCollection: There are no routers configured on the response router. Returning the current message
Jarek