Bug 1061125

Summary: Reference invoker does not work on composit reference
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Tomas Rohovsky <trohovsk>
Component: SwitchYardAssignee: Keith Babo <kbabo>
Status: CLOSED NOTABUG QA Contact: Tomas Rohovsky <trohovsk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: oskutka, soa-p-jira
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 13:56:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reporducer none

Description Tomas Rohovsky 2014-02-04 12:16:15 UTC
If you send a message by RefernceInvoker through a composite reference, then the message content is not present on the invoked endpoint. Another thing is that the property name is lower cased. ReferenceInvoker works well if it is used to invoke a component reference. So, these problems were maybe introduced by no-adjustment of message composers/context mappers after introduction of https://issues.jboss.org/browse/SWITCHYARD-1465.

Steps to reproduce:
1. run AS
2. unpack reproducer
3. execute: mvn clean package jboss-as:deploy exec:java jboss-as:undeploy

Actual result:
Greetings to John Doe from ServiceA [propertyA=nulltouchedByServiceB]
Greetings to from ServiceB [propertyB=valueB]

You can also see in the server log stdout that propetyA (correct name) is not set and propertya (wrong name) is set.

Expected result:
Greetings to John Doe from ServiceA [propertyA=valueAtouchedByServiceB]
Greetings to John Doe from ServiceB [propertyB=valueB]

Comment 1 Tomas Rohovsky 2014-02-04 12:20:42 UTC
Created attachment 859104 [details]
reporducer

Comment 2 Keith Babo 2014-02-04 13:56:04 UTC
The issue here is with the reproducer application.  The HTTP method on reference bindings defaults to GET, which explains why your message content is not received in ServiceB.  Try setting the method to POST and you will find that the content is received (I verified this locally with your app).

<http:method>POST</http:method>

HTTP header names are case-insensitive, so you can't count on the case being preserved over an HTTP request.  We aren't doing anything explicit here in SwitchYard - Tomcat is likely the cause of the case change.

Comment 3 JBoss JIRA Server 2014-02-04 14:00:32 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1957 to Closed

Comment 4 Tomas Rohovsky 2014-02-04 14:03:32 UTC
You are right Keith, my fault. But the propertyA is still null in ServiceBBean, i.e. it is not named correctly (propertya insead of propertyA).

Comment 5 Tomas Rohovsky 2014-02-04 14:06:00 UTC
Ok - case-insensitive, I didn't read it to the end.