Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 3.2.1
-
Fix Version/s: None
-
Component/s: Transport: HTTP(S) / Jetty
-
Labels:None
-
User impact:Medium
-
Similar Issues:None
Description
Using the this config:
<message-properties-transformer scope="session">
<add-message-property key="myDataMap" value="#[message:payload]"/>
</message-properties-transformer>
<message-properties-transformer scope="outbound">
<add-message-property key="Accept" value="application/json"/>
</message-properties-transformer>
<http:rest-service-component httpMethod="POST" serviceUrl="http://localhost:8080/direct/session">
<http:error-filter>
<message-property-filter pattern="http.status==201"></message-property-filter>
</http:error-filter>
<http:requiredParameter key="_username" value="#[map-payload:_username]"/>
<http:requiredParameter key="_password" value="#[map-payload:_password]"/>
</http:rest-service-component>
Here was the DEBUG output from the unit test.
The mule message after setting the last property and before making the rest call:
10:25:09,204 DEBUG [org.mule.transformer.simple.MessagePropertiesTransformer] Object after transform:
org.mule.DefaultMuleMessage
{
id=ca483001-9074-11e1-870e-8739ec09306c
payload=java.util.HashMap
correlationId=
correlationGroup=-1
correlationSeq=-1
encoding=UTF-8
exceptionPayload=
Message properties:
INVOCATION scoped properties:
INBOUND scoped properties:
MULE_ENCODING=UTF-8
MULE_ENDPOINT=vm://in
MULE_ORIGINATING_ENDPOINT=endpoint.vm.in
MULE_SESSION=rO0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAEWgAFdmFsaWRMAAJpZHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wACnByb3BlcnRpZXN0AA9MamF2YS91dGlsL01hcDtMAA9zZWN1cml0eUNvbnRleHR0ACdMb3JnL211bGUvYXBpL3NlY3VyaXR5L1NlY3VyaXR5Q29udGV4dDt4cAF0ACRjYTQ5MWE2Mi05MDc0LTExZTEtODcwZS04NzM5ZWMwOTMwNmNzcgARamF2YS51dGlsLkhhc2hNYXAFB9rBwxZg0QMAAkYACmxvYWRGYWN0b3JJAAl0aHJlc2hvbGR4cD9AAAAAAAAMdwgAAAAQAAAAAHhwdAAKTXVsZUNsaWVudHg=
OUTBOUND scoped properties:
Accept=application/json
MULE_CORRELATION_GROUP_SIZE=-1
MULE_CORRELATION_SEQUENCE=-1
MULE_ENCODING=UTF-8
SESSION scoped properties:
myDataMap={siteId=6e48cab6-7f3c-4a57-afbb-8fd3e6b85ab9, _password=admin, _username=admin, placementId=f0853548-9351-42ea-827b-56020a1f0378}
}
Then here is the message during the rest call:
10:25:09,439 DEBUG [org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest] Object before transform:
org.mule.DefaultMuleMessage
Notice SESSION properties are empty.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Priority | To be reviewed [ 6 ] | Critical [ 2 ] |