MuleESB - Change Global Elements values at runtime for outbound connector - mule

I tried to use the Webservice consumer connector as outbound Endpoint to consume the soap services and tried to set username and passwords dynamically. but I can't set values in this way. It is not parsing the MEL expression. How can I do ? Thank you

How are you setting the outboundProperties upstream in the flow? Are you sure you are not trying to use inboundProperties passed in from the Workday connector? This example works for me:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:cluster="http://www.mulesoft.org/schema/mule/ee/cluster"
xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
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" 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/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd">
<ws:consumer-config name="Web_Service_Consumer" service="TicketServiceService" port="TicketServicePort" serviceAddress="http://training-u.cloudhub.io/essentials/delta" wsdlLocation="http://mu.mulesoft-training.com/essentials/delta?wsdl" doc:name="Web Service Consumer"/>
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<flow name="Copy_of_mydomain1-app-oneFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="/soap" doc:name="Copy_of_HTTP"/>
<set-property propertyName="workday_userid" value="WORKDAY_ID" doc:name="Copy_of_Property"/>
<set-property propertyName="workday_password" value="WORKDAY-PASSWORD" doc:name="Copy_of_Property"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="listAllFlights" doc:name="Copy_of_Web Service Consumer"/>
<logger level="INFO" doc:name="Copy_of_Logger"/>
</flow>
</mule>

Add Dataweave before to webservice consumer and put below code in dataweave. It's working.
%dw 1.0
%output application/xml
%namespace wsse http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
%namespace wsu http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
---
wsse#Security: {
wsse#UsernameToken #(Id: 'UsernameToken-18BC1F80151A19D55F14976049846641'): {
wsse#Username: 'john',
wsse#Password #(Type: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'): 'doe',
wsse#Nonce #(EncodingType: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'): 'EQDDem3KeXpbud4mJKpLVw==',
wsu#Created: '2017-06-16T09:23:04.662Z'
}
}
}
You can then add the the add property transformer before the webservice consumer (i had added the above as payload, so mapping from payload):
<set-property propertyName="soap.Security" value="#[message.payload]" doc:name="Property"/>
Also, remove the security settings from global web service consumer settings.

Related

How to read file in middle of the flow

I am trying to read two simultaneously file in middle of the flow and combine them into one payload. To reading the files in middle of the flow I am using mule requester component. While triggering the flow (localhost:8081/requester/requester)I am getting error :
"Exception(s) were found for route(s):
0: The endpoint "src\main\resources\input1\employees.xml" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead. (org.mule.api.endpoint.MalformedEndpointException).
1: The endpoint "src\main\resources\input2\employees2.xml" is malformed and cannot be parsed. If this is the name of a global endpoint, check the name is correct, that the endpoint exists, and that you are using the correct configuration (eg the "ref" attribute). Note that names on inbound and outbound endpoints cannot be used to send or receive messages; use a named global endpoint instead. (org.mule.api.endpoint.MalformedEndpointException)."
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:mulerequester="http://www.mulesoft.org/schema/mule/mulerequester" xmlns:file="http://www.mulesoft.org/schema/mule/file" 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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/mulerequester http://www.mulesoft.org/schema/mule/mulerequester/current/mule-mulerequester.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 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/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd">
<file:connector name="file-connector-config" autoDelete="false" streaming="true" validateConnections="true" doc:name="File" />
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" basePath="/requester" doc:name="HTTP Listener Configuration" />
<flow name="muleRequester">
<http:listener config-ref="HTTP_Listener_Configuration" path="/requester" doc:name="HTTP" />
<logger message="Invoking Mule Requester" level="INFO" doc:name="Logger" />
<scatter-gather doc:name="Scatter-Gather">
<mulerequester:request resource="src\main\resources\input1\employees.xml" returnClass="java.lang.String" doc:name="Retrieve File1"/>
<mulerequester:request resource="src\main\resources\input2\employees2.xml" returnClass="java.lang.String" doc:name="Retrieve File2"/>
</scatter-gather><dw:transform-message doc:name="Transform Message">
<dw:set-payload>< [CDATA[%dw 1.0 %output application/json
---
{
payload1: payload[0],
payload2: payload[1]
}]]></dw:set-payload>
</dw:transform-message>
<file:outbound-endpoint path="src/main/resources/output" responseTimeout="10000" doc:name="File"/>
<logger message="Payload after file requester #[payload]" level="INFO" doc:name="Logger" />
</flow>
I am not using maven. Do I need to download any other jar or where I can do the correction?
resource needs to be an Mule endpoint url. Mule requester module can work with many transports such as jms, file, ftp. So the path to the file is not enough. Here is an example of an endpoint url for reading a file:
<mulerequester:request resource="file://src/main/resources/in/ReadME.txt?connector=file-connector-config" doc:name="Retrieve File" returnClass="java.lang.String" />
You can also point to a global endpoint like you have defined like so:
<mulerequester:request config-ref="muleRequesterConfig" resource="myFileEndpoint" doc:name="Mule Requester" />

Malformed ERR segments in ACK generated by HL7 EDI connector

I am working on a simple app that receives HL7 messages and returns an HL7 ACK. I started the implementation using the example found here: Acknowledgement example in HL7 DataWeave Examples section
When testing the example code, the ACKs are fine if there are no errors in the HL7, but when there are any errors in parsing the HL7 the ERR segments contain no fields:
MSH|^~\'|LABADT|MCM|ADT1|MCM|198808181126|SECURITY|ACK^A01^ACK|MSG00001-|P|2.6
MSA|AE|MSG00001-
ERR
Also the following warnings are found in the log:
WARN 2018-03-28 10:01:13,110 [[hl7ack].HTTP_Listener_Configuration.worker.01]
com.mulesoft.flatfile.1.3.0.lib.schema.hl7.HL7SchemaWriter: missing required value for component ERR-03: 'HL7 Error Code' for segment ERR at index 2
WARN 2018-03-28 10:01:13,110 [[hl7ack].HTTP_Listener_Configuration.worker.01]
com.mulesoft.flatfile.1.3.0.lib.schema.hl7.HL7SchemaWriter: missing required value for component ERR-04: 'Severity' for segment ERR at index 2
It seems like the schema of the ERR segment generated by the HL7 EDI transformer component does not match the default HL7 schema. Is there something that I am doing wrong? I tried including the ACK schema in the HL7 config, but had the same problem.
Below is Mule app code (same as example):
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp"
xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:hl7-edi="http://www.mulesoft.org/schema/mule/hl7-edi"
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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
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/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd http://www.mulesoft.org/schema/mule/tcp
http://www.mulesoft.org/schema/mule/tcp/current/mule-tcp.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/hl7-edi
http://www.mulesoft.org/schema/mule/hl7-edi/current/mule-hl7-edi.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/dw
http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/ee/tracking
http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8080" doc:name="HTTP Listener Configuration"/>
<hl7-edi:config name="HL7_EDI__Configuration" identKeys="true" doc:name="HL7 EDI: Configuration">
<hl7-edi:schemas>
<hl7-edi:schema>hl7/v2_6/ADT_A01.esl</hl7-edi:schema>
</hl7-edi:schemas>
</hl7-edi:config>
<flow name="Acknowledgment">
<http:listener config-ref="HTTP_Listener_Configuration" path="/ack" allowedMethods="POST" doc:name="HTTP"/>
<hl7-edi:read config-ref="HL7_EDI__Configuration" doc:name="HL7 EDI"/>
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/java
---
{
Name: "ACK",
MSH: payload.ACK.MSH,
Id: "ACK",
Data: {
ACK: payload.ACK
}
}]]></dw:set-payload>
</dw:transform-message>
<hl7-edi:write config-ref="HL7_EDI__Configuration" messageStructure="InMessage" doc:name="HL7 EDI"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
The ACK generated by the HL7 EDI component does not match the HL7 schema. Specifically the ERR structure does not contain the ERR-01 list. I used the following transform (in place of the simple transform above) to generate the correct acknowledgement.
%dw 1.0
%output application/java
---
{
Id: "ACK",
Name: "ACK",
MSH: payload.ACK.MSH,
Data: {
ACK: {
MSH: payload.ACK.MSH,
MSA: payload.ACK.MSA,
ERR: [{
ERR-01: (payload.ACK.ERR map ((eRR , indexOfERR) -> {
ERR-01-01: eRR.ERR-01-01,
ERR-01-02: eRR.ERR-01-02,
ERR-01-03: eRR.ERR-01-03,
ERR-01-04-01: eRR.ERR-01-04-01,
ERR-01-04-02: eRR.ERR-01-04-02,
ERR-01-04-03: eRR.ERR-01-04-03
}))
}]
}
}
}

How do you validate outbound properties using MUnit XML?

I am setting some outbound properties in the message prior to sending the payload to a JMS queue, and I wanted to test that those properties are properly set in the message prior to sending it out to the JMS queue.
I thought about using an MUnit Spy before the JMS Outbound Endpoint, but the spy is only capable of validating the session properties, invocation properties, and the payload. Is there another way that I can achieve this using MUnit XML?
I created a mini mule project to illustrate the issue further. The code is provided below. Essentially it is just a flow that calls a sub-flow that sets outbound properties in a mule message, and the MUnit has a spy that asserts that the outbound properties are set in the mule message after the sub-flow is called. However, the MUnit Spy doesn't seem to have access to the mule outbound properties. I would like to know if there is another way around this at this time. I know that the docs specify that the spy is only capable of validating session and invocation properties, and the payload at this time. Any suggestion is welcome.
Sandbox.xml - Main Mule File
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 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"
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/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
<flow name="outbound-props-flow">
<flow-ref name="outbound-props-sub-flow" doc:name="Call outbound-props-sub-flow"/>
<logger message="#[message]" level="INFO" doc:name="Log Message"/>
</flow>
<sub-flow name="outbound-props-sub-flow">
<set-property propertyName="outbound-prop-1" value="test1" doc:name="set-outbound-prop-1"/>
<set-property propertyName="outbount-prop-2" value="test2" doc:name="set-outbound-prop-2"/>
</sub-flow>
</mule>
MUnit File - Testing the Main Flow
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:mock="http://www.mulesoft.org/schema/mule/mock" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:munit="http://www.mulesoft.org/schema/mule/munit" 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" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.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/mock http://www.mulesoft.org/schema/mule/mock/current/mule-mock.xsd">
<munit:config name="munit" doc:name="MUnit configuration"/>
<spring:beans>
<spring:import resource="classpath:sandbox.xml"/>
</spring:beans>
<munit:test name="outbound-props-flow-outbound-props-flowTest" description="Test">
<mock:spy messageProcessor="mule:sub-flow" doc:name="Spy">
<mock:with-attributes>
<mock:with-attribute name="name" whereValue="#[matchContains('outbound-props-sub-flow')]"/>
</mock:with-attributes>
<mock:assertions-after-call>
<logger message="Message in SPY Module: #[message]" level="INFO" doc:name="Log Message in Spy"/>
<munit:assert-on-equals message="outbound-props-1 is not set properly" expectedValue="test1" actualValue="#[message.outboundProperties['outbound-prop-1']]" doc:name="Assert outbound-props-1 is set properly"/>
<munit:assert-on-equals message="outbound-props-2 is not set properly" expectedValue="test1" actualValue="#[message.outboundProperties['outbound-prop-2']]" doc:name="Assert outbound-props-2 is set properly"/>
</mock:assertions-after-call>
</mock:spy>
<flow-ref name="outbound-props-flow" doc:name="Flow-ref to outbound-props-flow"/>
</munit:test>
</mule>
Thanks,
Juan
Don't use 'Spy' for this, it has some limitations. Take a look to the documentation:
https://docs.mulesoft.com/mule-user-guide/v/3.7/the-spy-message-processor#defining-spy-actions
You could simply add the asserts after the flow ref.
<munit:test name="outbound-props-flow-outbound-props-flowTest" description="Test">
<flow-ref name="outbound-props-flow" doc:name="Flow-ref to outbound-props-flow"/>
<munit:assert-on-equals message="outbound-props-1 is not set properly" expectedValue="test1" actualValue="#[message.outboundProperties['outbound-prop-1']]" doc:name="Assert outbound-props-1 is set properly"/>
<munit:assert-on-equals message="outbound-props-2 is not set properly" expectedValue="test2" actualValue="#[message.outboundProperties['outbound-prop-2']]" doc:name="Assert outbound-props-2 is set properly"/>
</munit:test>

MULE Esb xml to Object transformer

I am trying to utilize the xml to object transformer in mule while transfroming an xml payload to a Java Bean (Customer). Here is my simple flow. The exception I am seeing is below
Exception stack is:
1. CUSTOMER (com.thoughtworks.xstream.mapper.CannotResolveClassException)
com.thoughtworks.xstream.mapper.DefaultMapper:56 (null)
2. CUSTOMER (com.thoughtworks.xstream.mapper.CannotResolveClassException) (org.mule.api.transformer.TransformerException)
org.mule.module.xml.transformer.XmlToObject:76 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
com.thoughtworks.xstream.mapper.CannotResolveClassException: CUSTOMER
at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:56)
at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:30)
at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
FLOW
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" 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.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/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd">
<flow name="alternateFlow1" doc:name="alternateFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8999" doc:name="HTTP"/>
<http:outbound-endpoint exchange-pattern="request-response" host="www.thomas-bayer.com" port="80" path="sqlrest/CUSTOMER/3/" method="GET" doc:name="HTTP"/>
<mulexml:xml-to-object-transformer returnClass="com.abc.dto.CUSTOMER" doc:name="XML to Object"/>
<logger level="INFO" doc:name="Logger"/>
</flow>
</mule>
XML:
<CUSTOMER xmlns:xlink="w3.org/1999/xlink">
;
<ID>4</ID>
<FIRSTNAME>Sylvia</FIRSTNAME>
<LASTNAME>Ringer</LASTNAME>
<STREET>365 College Av.</STREET>
<CITY>Dallas</CITY>
</CUSTOMER>
You need to add an alias in the mulexml:xml-to-object-transformer:
<mulexml:alias name="CUSTOMER" class="com.abc.dto.CUSTOMER" />
Also there's no reason to go all caps with the class name so rename your class and alias it:
<mulexml:alias name="CUSTOMER" class="com.abc.dto.Customer" />

Error when testing Connection of Global Element in MuleStudio

I'm using MuleStudio 3.4 and have a simple Flow with a Drupal Connector. The Configuration for this Drupal Connector comes from a Global ElemCent Configuration.
But when i want to test the connection from the Global Elements Properties Window, i get the the message:
Test Connection failed: Invalid Global Element. Cannot access the Global Element to test.
java.long.Throwable
Here is the Configuration XML:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:drupal="http://www.mulesoft.org/schema/mule/drupal" 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.4.0" 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/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/drupal http://www.mulesoft.org/schema/mule/drupal/1.0/mule-drupal.xsd">
<drupal:config name="Drupal" username="dba" password="***" apiUrl="/service/rest/" server="localhost" port="8888" commentEndpoint="comment" fileEndpoint="file" nodeEndpoint="node" userEndpoint="user" doc:name="Drupal" taxonomyTermEndpoint="taxonomy-term" taxonomyVocabularyEndpoint="taxonomy-vocabulary">
<drupal:connection-pooling-profile initialisationPolicy="INITIALISE_ONE" exhaustedAction="WHEN_EXHAUSTED_GROW"/>
</drupal:config>
<flow name="drupal-esbFlow1" doc:name="drupal-esbFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="drupal/node/create" doc:name="HTTP"/>
<drupal:create-node config-ref="Drupal" username="dba" password="***" doc:name="Drupal">
<drupal:node type="article" title="[message.payload['title']]">
<drupal:body>
<drupal:und ref="#[payload]"/>
</drupal:body>
</drupal:node>
</drupal:create-node>
<json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
just make sure that you are persisting this information in mule-app.properties. Otherwise you can create another property place holder and after referencing that you can go ahead and use.