Bug 1045499

Summary: XSLT transformation ignores xml tags
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jochen Cordes <jcordes>
Component: SwitchYardAssignee: Keith Babo <kbabo>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Pechanec <jpechane>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, btison, ldimaggi, soa-p-jira
Target Milestone: CR1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Example application none

Description Jochen Cordes 2013-12-20 15:24:51 UTC
Created attachment 839624 [details]
Example application

Description of problem:

It seems that the camel xslt processor ignores the transformation and is just outputting the input, minus the xml tags..

The camel route and transformation works fine when deployed on SY 0.7.0. I also tested on vanilla camel and also here the transformation works as expected.

See hereunder for the route definition, xsl stylesheet, input xml and expected and obtained result. Attached also a sy project that can be deployed on FSW. It also contains a soapui project file to test this.

Is this a known issue? Any workaround? 

Version-Release number of selected component (if applicable):

JBoss Fuse 6 Beta (ER 6)

How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

The proposed workaround is the following:

from(sourceUri)
            .convertBodyTo(String.class)
            .log("Received message for 'ActivationPortType' : ${body}")
            .to("xslt:xslt/M2MAttivazione_CRM2IntCRM.xsl")
            .log("After transformation : ${body}");

The convertBodyTo above will take the DOM issue out of the equation and allows the XSLT component to both parse and translate using XML libraries available to it.

Comment 2 Keith Babo 2013-12-20 18:17:59 UTC
Thanks for filing the BZ. This issue appears to be limited to Camel routing services which are coupled with a SOAP binding.  There is a workaround for the issue: simply convert the payload on entry to the Camel route to something that will have to be re-parsed within the route, e.g.

from("switchyard://SomeService)
           .convertBodyTo(String.class)
           .log("Before transformation : ${body}")
           .to("xslt:xslt/transform.xsl")
           .log("After transformation : ${body}");

Comment 3 Keith Babo 2013-12-20 23:28:53 UTC
I confirmed that this issue is still present in the ER8 build and is also present in the community 1.1.0.Final build, so it's not something introduced as a part of productization.

Comment 4 Jiri Pechanec 2014-01-15 09:57:12 UTC
Verified in CR1

Comment 5 JBoss JIRA Server 2014-06-16 23:53:27 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1920 to Closed