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

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Earle Nietzel added a comment - 27/Apr/12 11:56 AM

Related to this thread in the forums:
http://forum.mulesoft.org/mulesoft/topics/accessing_data_no_longer_in_the_payload

Show
Earle Nietzel added a comment - 27/Apr/12 11:56 AM Related to this thread in the forums: http://forum.mulesoft.org/mulesoft/topics/accessing_data_no_longer_in_the_payload
Hide
Permalink
Pablo Kraan added a comment - 13/Jun/12 01:14 PM

Ww need to check if this was fixed on 3.3.0

Show
Pablo Kraan added a comment - 13/Jun/12 01:14 PM Ww need to check if this was fixed on 3.3.0
Hide
Permalink
Lou Parisi added a comment - 13/Dec/12 10:01 AM

I am getting this error for any HTTP request both SOAP and REST. I was storing a POJO in the outbound header and it was gone after the HTTP call. My workaround was to store it in the Spring context before the HTTP call and then in the java message processor component I get it from the Spring context and put it back in the mule outbound header.

This is a pretty critical error if you are depending on data to use across multiple calls in a flow.

Show
Lou Parisi added a comment - 13/Dec/12 10:01 AM I am getting this error for any HTTP request both SOAP and REST. I was storing a POJO in the outbound header and it was gone after the HTTP call. My workaround was to store it in the Spring context before the HTTP call and then in the java message processor component I get it from the Spring context and put it back in the mule outbound header. This is a pretty critical error if you are depending on data to use across multiple calls in a flow.
Hide
Permalink
Lou Parisi added a comment - 13/Dec/12 10:30 AM

By the way, I am using 3.3.1 so it is not fixed in 3.3

Show
Lou Parisi added a comment - 13/Dec/12 10:30 AM By the way, I am using 3.3.1 so it is not fixed in 3.3

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.