I have a Mule Application where I send a Request to Multiple WebServices and aggregate the List of responses i get , the idea is to get the first response of the List by returning it from the CustomJavaClass where the list is handled :
return responses.get(0);
I am able to reach the WSDL if I try to reach it over a Browser , the returned WSDL looks like its supposed to look . But i I try to send a message via SoapUi i get the following exception :
Exception stack is:
1. Cannot copy message with a stream payload. Payload type is "org.apache.commons.httpclient.ContentLengthInputStream". Message payload is of type: ContentLengthInputStream (org.mule.api.MessagingException)
org.mule.routing.outbound.AbstractSequenceRouter:73 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.api.MessagingException: Cannot copy message with a stream payload. Payload type is "org.apache.commons.httpclient.ContentLengthInputStream". Message payload is of type: ContentLengthInputStream
at org.mule.routing.outbound.AbstractSequenceRouter.route(AbstractSequenceRouter.java:73)
at org.mule.routing.outbound.AbstractOutboundRouter$1.doInTransaction(AbstractOutboundRouter.java:102)
at org.mule.routing.outbound.AbstractOutboundRouter$1.doInTransaction(AbstractOutboundRouter.java:99)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
SOAPUi Exception :
Failed to route event via endpoint: org.mule.api.processor.MessageProcessors$LifecyleAwareMessageProcessorWrapper#ceb6dd. Message payload is of type: ContentLengthInputStream
my current configurations :
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:http="http://www.mulesoft.org/schema/mule/http" 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:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="CE-3.2.1" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/tcp http://www.mulesoft.org/schema/mule/tcp/current/mule-tcp.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd ">
<flow name="flows1Flow1" doc:name="flows1Flow1">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:4433/miniwebservice" encoding="UTF-8" mimeType="text/xml" doc:name="HTTP"/>
<logger level="INFO" category="ddo" doc:name="Logger"/>
<all doc:name="All">
<processor-chain>
<message-properties-transformer encoding="UTF-8" mimeType="text/xml" doc:name="Message Properties">
<add-message-property key="http.method" value="#[header:INBOUND:http.method]"/>
</message-properties-transformer>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:4435/miniwebservice#[header:INBOUND:http.request]" encoding="UTF-8" mimeType="text/xml" doc:name="HTTP"/>
<mulexml:xslt-transformer mimeType="text/xml" maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\Users\kiesa\Desktop\XSLReplace.xsl" doc:name="XSLT"/>
</processor-chain>
<processor-chain>
<message-properties-transformer encoding="UTF-8" mimeType="text/xml" doc:name="Message Properties">
<add-message-property key="http.method" value="#[header:INBOUND:http.method]"/>
</message-properties-transformer>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:4434/miniwebservice#[header:INBOUND:http.request]" encoding="UTF-8" mimeType="text/xml" doc:name="HTTP"/>
<mulexml:xslt-transformer mimeType="text/xml" maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\Users\kiesa\Desktop\XSLReplace2.xsl" doc:name="XSLT"/>
</processor-chain>
</all>
<mulexml:xml-to-object-transformer doc:name="XML to Object"/>
<component class="CustomJavaClass" doc:name="Java"/>
<byte-array-to-string-transformer ignoreBadInput="true" encoding="UTF-8" mimeType="text/xml" doc:name="Byte Array to String"/>
</flow>
</mule>
Getting the WSDL works because the GET request carries no payload. But when you try to invoke a SOAP method, the POST payload is an InputStream, which of course can't be dispatched several times.
Thus: serialize the HTTP input stream with a:
<object-to-byte-array-transformer />
right after the http:inbound-endpoint.
Related
I would like to save the flow coming from this json file: https://gist.githubusercontent.com/Rajeun/3dbbe8ca240d479dbabe/raw/aba5d0ec9345b886426ab767376b7c9cb60c251f/person.json in a database using anypoint studio.
For this i'm using a http connector where i mentioned the link of the json file. and then i used a json-to-object transformer and a database connector.
In my db i have a table with id, token, tel "int" and email is a varchar
-(I tested the connection and its working well).
when i run my code:
ERROR 2015-03-20 13:14:05,522 [main] org.mule.module.launcher.application.DefaultMuleApplication: null
java.lang.NullPointerException
at org.mule.module.db.internal.config.domain.query.QueryTemplateBeanDefinitionParser.parseParameterizedQuery(QueryTemplateBeanDefinitionParser.java:136) ~[mule-module-db-3.6.1.jar:3.6.1]
at org.mule.module.db.internal.config.domain.query.QueryTemplateBeanDefinitionParser.doParse(QueryTemplateBeanDefinitionParser.java:62) ~[mule-module-db-3.6.1.jar:3.6.1]
at org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser.parseInternal(AbstractMuleBeanDefinitionParser.java:295) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
at org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) ~[spring-beans-3.2.10.RELEASE.jar:3.2.10.RELEASE]
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:98) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.parseCustomElement(MuleHierarchicalBeanDefinitionParserDelegate.java:140) ~[mule-module-spring-config-3.6.1.jar:3.6.1]
******************************************************************************
Config:
<mule xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="www.gist.githubusercontent.com" port="80" doc:name="HTTP Listener Configuration"/>
<db:mysql-config name="MySQL_Configuration" host="localhost" port="3306" user="root" database="mulesoft" doc:name="MySQL Configuration"/>
<db:template-query name="Template_Query" doc:name="Template Query">
<db:parameterized-query/>
</db:template-query>
<flow name="testFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="Rajeun/3dbbe8ca240d479dbabe/raw/aba5d0ec9345b886426ab767376b7c9cb60c251f/person.json" doc:name="HTTP"/>
<json:json-to-object-transformer returnClass="myclass" doc:name="JSON to Object"/>
<response>
<logger message="c bon" level="INFO" doc:name="Logger"/>
</response>
<response>
<db:insert config-ref="MySQL_Configuration" doc:name="Database">
<db:parameterized-query><![CDATA[INSERT INTO push(id, token, tel, email) VALUES (2,2,3,#[payload['userImage']])]]></db:parameterized-query>
</db:insert>
</response>
</flow>
</mule>
Remove the empty template query:
<db:template-query name="Template_Query" doc:name="Template Query">
<db:parameterized-query />
</db:template-query>
Also, does 'myclass' exist? if not try just using a map:
<json:json-to-object-transformer returnClass="java.util.HashMap" doc:name="JSON to Object"/>
Also It looks like you want to retrieve that JSON file from the specified URL. For that you want the http:request not http:listener. http:listener is used as a message source waiting for requests to your app.
You should use the http:request to request the file and trigger it using a polling message source:
<http:request-config name="HTTP_Request_Configuration" host="www.gist.githubusercontent.com" port="80" doc:name="HTTP Request Configuration"/>
<flow name="testFlow">
<poll>
<http:request config-ref="HTTP_Request_Configuration" path="Rajeun/3dbbe8ca240d479dbabe/raw/aba5d0ec9345b886426ab767376b7c9cb60c251f/person.json" method="GET" doc:name="HTTP"/>
</poll>
</flow>
See: http://www.mulesoft.org/documentation/display/current/HTTP+Request+Connector
And: http://www.mulesoft.org/documentation/display/current/Poll+Reference
I am sending a request to the Mulesoft tshirt service to track the order.
I am sending a JSON request via Postman (Chrome) and I am getting a error returned in Postman: Malformed JSON.
But there is nothing in the Mulesoft Studio console.
Mulesoft Flow
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" version="EE-3.5.0" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
<ws:consumer-config doc:name="Web Service Consumer" name="Web_Service_Consumer" port="TshirtServicePort" service="TshirtService" serviceAddress="http://tshirt-service.cloudhub.io" wsdlLocation="tshirt.wsdl"/>
<data-mapper:config doc:name="xml_listinventoryresponse__to_json" name="xml_listinventoryresponse__to_json" transformationGraphPath="xml_listinventoryresponse__to_json.grf"/>
<data-mapper:config doc:name="xml_ordertshirtresponse__to_json" name="xml_ordertshirtresponse__to_json" transformationGraphPath="xml_ordertshirtresponse__to_json.grf"/>
<data-mapper:config doc:name="string_to_xml_authenticationheader_" name="string_to_xml_authenticationheader_" transformationGraphPath="string_to_xml_authenticationheader_.grf"/>
<data-mapper:config name="JSON_To_Xml_OrderTshirt_" transformationGraphPath="json_to_xml_ordertshirt_.grf" doc:name="JSON_To_Xml_OrderTshirt_"/>
<data-mapper:config name="JSON_To_Xml_TrackOrder_" transformationGraphPath="json_to_xml_trackorder_.grf" doc:name="JSON_To_Xml_TrackOrder_"/>
<data-mapper:config name="XML_To_JSON" transformationGraphPath="xml_to_json.grf" doc:name="XML_To_JSON"/>
<flow name="OrderTracking" doc:name="OrderTracking">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8001" path="orderTracking" doc:name="HTTP"/>
<data-mapper:transform config-ref="JSON_To_Xml_TrackOrder_" doc:name="JSON To Xml<TrackOrder>"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="TrackOrder" doc:name="TrackOrder"/>
<data-mapper:transform config-ref="XML_To_JSON" doc:name="XML To JSON"/>
<http:response-builder status="200" contentType="application/json" doc:name="HTTP Response Builder"/>
</flow>
</mule>
JSON request
{
"email":"info8001#mulesoft.com",
"orderId":"264"
}
It appears your JSON request it not proper.
The JSON you provided when converted to XML will be as follows
<?xml version="1.0" encoding="UTF-8" ?>
<email>info8001#mulesoft.com</email>
<orderId>264</orderId>
Which is not complete as there is no root element to enclose the data in the XML.
Try modifying your JSON and see if it works.
I am new for the mule esb but i know other ESB patterns
my issue is i have done a sample which will insert a data into DB.its working fine but its not giving any response to client so client is getting nothing from server
my sample code is
<mule xmlns:json="http://www.mulesoft.org/schema/mule/json"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
<jdbc-ee:postgresql-data-source name="PostgreSQL_Data_Source" user="youtilitydba" password="45782dfff1" url="jdbc:postgresql://localhost:5432/sample" transactionIsolation="UNSPECIFIED" doc:name="PostgreSQL Data Source"/>
<jdbc-ee:connector name="Database" dataSource-ref="PostgreSQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/>
<flow name="insertintoDBFlow1" doc:name="insertintoDBFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP" path="httpPost"/>
<logger message="log about input message: #[payload]" level="INFO" doc:name="Logger"/>
<json:json-to-object-transformer doc:name="JSON to Object" returnClass="java.util.Map"></json:json-to-object-transformer>
<jdbc-ee:outbound-endpoint exchange-pattern="one-way" queryKey="INSERT_TOKEN" queryTimeout="-1" connector-ref="Database" doc:name="Database">
<jdbc-ee:query key="INSERT_TOKEN" value="insert into users(FirstName,lastname) values(#[message.payload.name],#[message.payload.id]);"/>
</jdbc-ee:outbound-endpoint>
</flow>
</mule>
and i am calling to this using sample JSON client like this
curl -H "Content-Type: application/json" -d '{"name":"kk","id":"anil"}' http://localhost:8081/httpPost
when i am running this json its giving nothing response but i wish to give response like this {"ResponseJSON":{"Body":{"Datalist":{"Data":"Successfully Rows inserted"}},"Status":"200"}}
how would i format this above format i used http response builder but there is nothing to do like this..
you need to add an Echo component, set the payload to the value you are looking for and add a HTTP Response Builder with status="200" and contentType="application/json".
Add the following lines after </jdbc-ee:outbound-endpoint> and before </flow>
<response>
<http:response-builder status="200" contentType="application/json" doc:name="HTTP Response Builder"/>
</response>
<response>
<set-payload value="{"Body":{"Datalist":{"Data":"Successfully Rows inserted"}},"Status":"200"}}" doc:name="Set Payload"/>
</response>
<echo-component doc:name="Echo"/>
Cheers,
-Marco.
So, using Mule ESB, I'm searching Bing for certain PDF files. Then I'm parsing the JSON response to capture the URL of the file location. Now I need to retrieve the file and save locally. Below is what I have so far, but I have a feeling I'm going about this all wrong. How can I complete the use case?
I'm having two problems:
1) Can't figure out how to strip "http" from #[message.payload.Url] (since the HTTP Endpoint adds http to the url I'm passing in.
2) Can't figure out how to retrieve the file. I don't even know if HTTP Endpoint is the right option. HTTP? File?
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="CE-3.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
<flow name="BingFlow1" doc:name="BingFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<https:outbound-endpoint exchange-pattern="request-response" host="api.datamarket.azure.com" port="443" path="Data.ashx/Bing/Search/v1/Web?Query=%27contract%20california%27&WebFileType=%27PDF%27&$top=50&$format=Json" user="********" password="*****" doc:name="Bing"/>
<json:json-to-object-transformer returnClass="java.util.Map" doc:name="JSON to Object"/>
<expression-transformer expression="#[message.payload.d.results]" doc:name="Expression"/>
<collection-splitter doc:name="Collection Splitter"/>
<http:outbound-endpoint exchange-pattern="request-response" host="#[message.payload.Url]" port="80" method="GET" doc:name="HTTP"/>
<file:outbound-endpoint path="/home/user/Documents/output" outputPattern="#[message.payload.ID].pdf" responseTimeout="10000" doc:name="File"/>
<echo-component doc:name="Echo"/>
</flow>
</mule>
I couldn't test the flow because some credentials are needed but the following should help you:
Use an expression-transformer to strip the HTTP out,
Your approach with an http:outbound-endpoint followed by a file:outbound-endpoint will work fine,
Change the http:inbound-endpoint to one-way: there is no way to return anything sensible since the execution flow gets split.
For example, assuming message.payload.Url resolves to a java.lang.String, you can use:
<expression-transformer expression="#[org.mule.util.StringUtils.substringAfter(message.payload.Url, 'http://')]" doc:name="Expression"/>
I have an All Routing Message Processor where I send a request from a Client to multiple External services , I can send the request and I get the response but the response looks a bit weird:
<java.util.concurrent.CopyOnWriteArrayList serialization="custom">
<java.util.concurrent.CopyOnWriteArrayList>
<default/>
<int>2</int>
<byte-array>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IS0tIFB1Ymxpc2hlZCBieSBK
QVgtV1MgUkkgYXQgaHR0cDovL2pheC13cy5kZXYuamF2YS5uZXQuIFJJJ3MgdmVyc2lvbiBpcyBK
QVgtV1MgUkkgMi4xLjYuIC0tPjwhLS0gR2VuZXJhdGVkIGJ5IEpBWC1XUyBSSSBhdCBodHRwOi8v
amF4LXdzLmRldi5qYXZhLm5ldC4gUkkncyB2ZXJzaW9uIGlzIEpBWC1XUyBSSSAyLjEuNi4gLS0+
PGRlZmluaXRpb25zIHhtbG5zOnNvYXA9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzZGwv
c29hcC8iIHhtbG5zOnRucz0iaHR0cDovL21pbml3ZWJzZXJ2aWNlLyIgeG1sbnM6eHNkPSJodHRw
Oi8vd3d3LnczLm9yZy8yMDAxL1hNTFNjaGVtYSIgeG1sbnM9Imh0dHA6Ly9zY2hlbWFzLnhtbHNv
YXAub3JnL3dzZGwvIiB0YXJnZXROYW1lc3BhY2U9Imh0dHA6Ly9taW5pd2Vic2VydmljZS8iIG5h
bWU9IkhhbGxvV2VsdEltcGxTZXJ2aWNlIj4KPHR5cGVzPgo8eHNkOnNjaGVtYT4KPHhzZDppbXBv
cnQgbmFtZXNwYWNlPSJodHRwOi8vbWluaXdlYnNlcnZpY2UvIiBzY2hlbWFMb2NhdGlvbj0iaHR0
cDovL2xvY2FsaG9zdDo0NDM1L21pbml3ZWJzZXJ2aWNlL21pbml3ZWJzZXJ2aWNlP3hzZD0xIi8+
CjwveHNkOnNjaGVtYT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PSJodHRw
Oi8vbG9jYWxob3N0OjQ0MzMvbWluaXdlYnNlcnZpY2UvbWluaXdlYnNlcnZpY2UiLz4KPC9wb3J0
GlvbnM+</byte-array> Pgo8L3NlcnZpY2U+CjwvZGVmaW5pdGlvbnM+</byte-array>
</java.util.concurrent.CopyOnWriteArrayList>
</java.util.concurrent.CopyOnWriteArrayList>
Any suggestion how to solve this?
Update :
Here is my current configuration :
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:http="http://www.mulesoft.org/schema/mule/http" 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:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="CE-3.2.1" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/tcp http://www.mulesoft.org/schema/mule/tcp/current/mule-tcp.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd ">
<flow name="flows1Flow1" doc:name="flows1Flow1">
<http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:4433/miniwebservice" mimeType="text/xml" doc:name="HTTP"/>
<logger level="INFO" category="ddo" doc:name="Logger"/>
<all doc:name="All">
<processor-chain>
<message-properties-transformer mimeType="text/xml" doc:name="Message Properties">
<add-message-property key="http.method" value="#[header:INBOUND:http.method]"/>
</message-properties-transformer>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:4435/miniwebservice#[header:INBOUND:http.request]" mimeType="text/xml" doc:name="HTTP"/>
<mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\Users\kiesa\Desktop\XSLReplace.xsl" doc:name="XSLT"/>
</processor-chain>
<processor-chain>
<message-properties-transformer mimeType="text/xml" doc:name="Message Properties">
<add-message-property key="http.method" value="#[header:INBOUND:http.method]"/>
</message-properties-transformer>
<http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:4434/miniwebservice#[header:INBOUND:http.request]" mimeType="text/xml" doc:name="HTTP"/>
<mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\Users\kiesa\Desktop\XSLReplace2.xsl" doc:name="XSLT"/>
</processor-chain>
</all>
<custom-aggregator failOnTimeout="true" class="customJavaClass" doc:name="Custom Aggregator"/>
<mulexml:object-to-xml-transformer doc:name="Object to XML"/>
</flow>
</mule>
There is nothing to solve here: the result of an All Routing Message Processor is a java.util.List of payloads received from each call to each message processor inside the All one.
You must have an object-to-xml transformation configured somewhere: this is why the List payload is turned into XML by using an XStream-powered serialization.
You need to deal with this list, for example with a custom component that can process a java.util.List payload.