Hi Harm
I feel your issue is due to incorrect xpath given by the attribute
'expression" in the xslt mediator configuration.
If you doesn't set an xpath expression explicitly in order to explicitly
tell to select a node for transform,
xslt mediator take first child of the soap body by default. This may be
reason why only first child is transform
and not others- soap header, namespace, and other children.
BTW, if your xslt works with 'xsltproc' then it needs to work with ESB
too as we use Jaxp API for transformation
and saxon / Xalan as underlying jaxp implementation provider. To make
sure, you can try with saxon / Xalan alone without ESB.
Thanks
Indika
Harm Verhagen wrote:
Hi,
I'm trying to use the xslt mediator to modify a soap request from 1
interface to and ohter interface.
I have a single soap request, and transform it in a soap body with 3
requests. (login, a method, logout).
I debugged the xslt file with xsltproc, this seems to work fine.
I see now the following 3 problems:
1) whenver I put the xslt in wso2esb, I see that the resulting output
(using log mediator) is _not_ complete.
Only the first invocation is on. Only the login. How to tickle the
xslt mediator so it puts everything in ?
2) the namespace ser: is not removed from the message (the xslt file
_does_ have exclude-result-prefixes="fn ser loy">. xsltproc removes
it, wso2esb does not.
3). The SOAPAction header is not set correctly, how to do this ? Can
this be done from xslt ?
*output* (from log mediator)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ser="http://service.XXX.com/"><soapenv:Body>
<Login xmlns="http://www.XXXX.com/XXXX_3_1/">
<UserName>571701</UserName>
<Password>571701</Password>
</Login>
</soapenv:Body></soapenv:Envelope>
*expected output* (from xsltproc)
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<Login xmlns="http://www.XXX.com/XXX_3_1/">
<UserName>571701</UserName>
<Password>571701</Password>
</Login>
<redeem xmlns:loy="http://www.XXX.com/XX_3_2/" >
<TransactionHeader>
<SequenceNumber>0</SequenceNumber>
<TransactionTime/>
<OperatorId/>
<ClientReference/>
</TransactionHeader>
<CardId>123456</CardId>
<Points>5</Points>
<SchemeId>0</SchemeId>
<InputValue>0</InputValue>
</redeem>
<Logout xmlns:auth="http://www.XXX.com/XXX_3_1/" >
</soapenv:Body>
</soapenv:Envelope>
------------------------------------------------------------------------
_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.8.2/1738 - Release Date: 10/21/2008 2:10 PM
_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user