JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-6201

Session properties lost when making a rest-service-component call

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical 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

{ id=ca483001-9074-11e1-870e-8739ec09306c payload=java.lang.String 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 Content-Type=application/x-www-form-urlencoded MULE_CORRELATION_GROUP_SIZE=-1 MULE_CORRELATION_SEQUENCE=-1 MULE_ENCODING=UTF-8 MULE_ENDPOINT=http://localhost:8080/direct/session MULE_ROOT_MESSAGE_ID=ca483001-9074-11e1-870e-8739ec09306c MULE_SESSION=rO0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAEWgAFdmFsaWRMAAJpZHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wACnByb3BlcnRpZXN0AA9MamF2YS91dGlsL01hcDtMAA9zZWN1cml0eUNvbnRleHR0ACdMb3JnL211bGUvYXBpL3NlY3VyaXR5L1NlY3VyaXR5Q29udGV4dDt4cAF0ACRjYWZiNTM3My05MDc0LTExZTEtODcwZS04NzM5ZWMwOTMwNmNzcgARamF2YS51dGlsLkhhc2hNYXAFB9rBwxZg0QMAAkYACmxvYWRGYWN0b3JJAAl0aHJlc2hvbGR4cD9AAAAAAAAMdwgAAAAQAAAAAHhwdAAKTXVsZUNsaWVudHg= http.method=POST SESSION scoped properties: }

Notice SESSION properties are empty.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds

People

  • Assignee:
    Unassigned
    Reporter:
    Earle Nietzel
Vote (2)
Watch (1)

Dates

  • Created:
    27/Apr/12 11:54 AM
    Updated:
    13/Dec/12 10:30 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.