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-4919

Http transport does not maintain correlation id on sync outbound requests

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix or Usage Issue
  • Affects Version/s: 2.2.1
  • Fix Version/s: None
  • Component/s: Modules: CXF, Transport: HTTP(S) / Jetty
  • Labels:
    None
  • Environment:

    JDK 1.6.0_20

  • User impact:
    Medium
  • Similar Issues:
    None

Description

Mule appears not to maintain the MuleProperties.MULE_CORRELATION_ID_PROPERTY across synchronous outbound cxf/http calls.

Example config (first section is always used, the second section shows a working example using vm queues only and the third section shows a non working example with a cxf client call to a remote server).

<!-- main service -->	
		<service name="asyncservice">
			<inbound>
				<vm:inbound-endpoint path="inbound.queue" synchronous="true"/>
			</inbound>

			<outbound>
				<pass-through-router >
					<vm:outbound-endpoint path="external.service"/>
					<reply-to address="vm://external.service.response"/> 
				</pass-through-router>
			</outbound>
			
			<async-reply timeout="2000" failOnTimeout="true">
				<vm:inbound-endpoint path="external.service.response"/>
				<single-async-reply-router/>
			</async-reply>
		</service>

This one works (only using vm transport)

<!-- mock service answering via VM  - this one maintains the correlation id -->
		<service name="mockservice">
			<inbound>
				<vm:inbound-endpoint path="external.service" synchronous="true"/>
			</inbound>
			<outbound>
				<pass-through-router>
					<vm:outbound-endpoint path="external.service.test" synchronous="true"/>
				</pass-through-router>
			</outbound>
		</service>
		<service name="mockhttpservice">
			<inbound>
				<vm:inbound-endpoint path="external.service.test" synchronous="true"/>
			</inbound>
			<component class="com.yourpackage.SimpleMockService" />
		</service>

This one does not work - it looses the correlation id during the http call, and hence the correlator fails

<!-- real service that makes an external cxf/http call  - this one drops the correlation id-->	

		<service name="realservice">
			<inbound>
				<vm:inbound-endpoint path="external.service" synchronous="true" />
			</inbound>
			<outbound>
				<pass-through-router>
					<cxf:outbound-endpoint address="$url}" clientClass="cxf.clientClass" synchronous="true"
						wsdlPort="wsdlPo9rt" wsdlLocation="classpath:schema/service.wsdl" operation="service" />
				</pass-through-router>
			</outbound>
		</service>

Adding this code to the org.mule.transport.http.HttpClientMessageDispatcher maintains the correlation id, and hence the service works.

Method: protected MuleMessage doSend(MuleEvent event) throws Exception

insert around line 275 after

Header[] headers = httpMethod.getResponseHeaders();
 HttpMessageAdapter adapter = new HttpMessageAdapter(new Object[] { body, headers });
// Set correlation properties if exists
if ((adapter.getProperty(MuleProperties.MULE_CORRELATION_ID_PROPERTY) == null) && (event.getMessage().getProperty(MuleProperties.MULE_CORRELATION_ID_PROPERTY) != null)) {
       adapter.setProperty(MuleProperties.MULE_CORRELATION_ID_PROPERTY, event.getMessage().getProperty(MuleProperties.MULE_CORRELATION_ID_PROPERTY));
}
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    M4919_2.2.1.patch
    28/Jun/10 02:04 AM
    3 kB
    Arne Seime

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Andrew Perepelytsya added a comment - 25/Jun/10 09:33 AM

Please submit a patch, line refs are vague, the code is different in current versions.

Show
Andrew Perepelytsya added a comment - 25/Jun/10 09:33 AM Please submit a patch, line refs are vague, the code is different in current versions.
Hide
Permalink
Arne Seime added a comment - 28/Jun/10 02:04 AM

Patch for 2.2.1 tag.

Show
Arne Seime added a comment - 28/Jun/10 02:04 AM Patch for 2.2.1 tag.
Hide
Permalink
Evangelina Martinez Ruiz Moreno added a comment - 26/Jun/12 04:47 PM

Please reopen if problem persists in Mule 3.

Show
Evangelina Martinez Ruiz Moreno added a comment - 26/Jun/12 04:47 PM Please reopen if problem persists in Mule 3.

People

  • Assignee:
    Evangelina Martinez Ruiz Moreno
    Reporter:
    Arne Seime
Vote (1)
Watch (1)

Dates

  • Created:
    25/Jun/10 09:05 AM
    Updated:
    26/Jun/12 04:47 PM
    Resolved:
    26/Jun/12 04:47 PM

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.