Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8348551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:43:30+00:00 2026-06-09T07:43:30+00:00

I have a proxy which needs to do XSL transformation of an output message

  • 0

I have a proxy which needs to do XSL transformation of an output message coming from the service. I have attached the sequence file and the XSL file (at synaptic-configs/local-entries).

Appreciate if you can give a hint on where I might have gone wrong.

Here’s the sequence file:

<?xml version="1.0" encoding="UTF-8"?>
<sequence xmlns="http://ws.apache.org/ns/synapse" name="EmpMergeOutSeq1" trace="enable" statistics="enable">
    <log level="full">
        <property name="sequence" value="Final Transform using XSLT - begin"/>
    </log>
    <xslt key="getEmployeeByIdResponseXlt"/>
    <send/>
</sequence>

Here’s the XSL file:

<?xml version="1.0" encoding="UTF-8"?>
<localEntry xmlns="http://ws.apache.org/ns/synapse" key="getEmployeeByIdResponseXlt">
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ax21="http://domain.hrapp.gunith/xsd" xmlns:ns="http://service.hrapp.gunith" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" version="2.0" exclude-result-prefixes="ns fn">
        <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
        <xsl:template match="/">
            <xsl:apply-templates select="//ns:getEmployeeByIdResponse"/>
        </xsl:template>
        <xsl:template xmlns:ns="http://samples.esb.wso2.org" match="ns:getEmployeeByIdResponse">
            <ns1:getEmployeeByIdResponse xmlns:ns1="http://service.proxy.gunith">
                <ns1:return xmlns:ax22="http://domain.proxy.gunith/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax22:Employee">
                    <ax22:dob>
                        <xsl:value-of select="ns:return/ax21:dob"/>
                    </ax22:dob>
                    <ax22:firstName>
                        <xsl:value-of select="ns:return/ax21:firstName"/>
                    </ax22:firstName>
                    <ax22:id>
                        <xsl:value-of select="ns:return/ax21:id"/>
                    </ax22:id>
                    <ax22:lastName>
                        <xsl:value-of select="ns:return/ax21:lastName"/>
                    </ax22:lastName>
                    <ax22:middleName>
                        <xsl:value-of select="ns:return/ax21:middleName"/>
                    </ax22:middleName>
                </ns1:return>
            </ns1:getEmployeeByIdResponse>
        </xsl:template>
    </xsl:stylesheet>
</localEntry>

Here are the log entries (which shows the Errors and the actual messages passed):

[2012-08-04 11:35:44,966]  INFO - LogMediator To: /services/MergedBasicEmployeesProxy.MergedBasicEmployeesProxyHttpSoap12Endpoint, WSAction: urn:getEmployeeById, SOAPAction: urn:getEmployeeById, MessageID: urn:uuid:c80fb5a4-41e4-4de4-924d-a18af37b5056, Direction: request, sequence = inSequence - request for EmpMergeProxy, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><p:getEmployeeById xmlns:p="http://service.proxy.gunith"><!--0 to 1 occurrence--><xs:args0 xmlns:xs="http://service.proxy.gunith">1</xs:args0></p:getEmployeeById></soapenv:Body></soapenv:Envelope>
[2012-08-04 11:35:44,970]  INFO - LogMediator To: /services/MergedBasicEmployeesProxy.MergedBasicEmployeesProxyHttpSoap12Endpoint, WSAction: urn:getEmployeeById, SOAPAction: urn:getEmployeeById, MessageID: urn:uuid:c80fb5a4-41e4-4de4-924d-a18af37b5056, Direction: request, sequence = inSequence - request for EmpMergeProxy, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><sam:getEmployeeById xmlns:sam="http://service.hrapp.gunith">
                <sam:args0>1</sam:args0>
            </sam:getEmployeeById></soapenv:Body></soapenv:Envelope>
[2012-08-04 11:35:45,504]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:ea979246-adbc-494d-bd55-e3ed25171984, Direction: response, sequence = Final Transform using XSLT - begin, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns:getEmployeeByIdResponse xmlns:ns="http://service.hrapp.gunith"><ns:return xmlns:ax21="http://domain.hrapp.gunith/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:Employee"><ax21:dob>1984-03-01</ax21:dob><ax21:firstName>Gunith</ax21:firstName><ax21:id>1</ax21:id><ax21:lastName>Dev</ax21:lastName><ax21:middleName>E</ax21:middleName></ns:return></ns:getEmployeeByIdResponse></soapenv:Body></soapenv:Envelope>
[2012-08-04 11:35:45,505]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:2eb104c0-53c9-4155-8fef-99e7600b7559, Direction: response, sequence = Final Transform using XSLT - begin, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns:getEmployeeByIdResponse xmlns:ns="http://service.hrapp.gunith"><ns:return xmlns:ax21="http://domain.hrapp.gunith/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:Employee"><ax21:dob>1984-03-01</ax21:dob><ax21:firstName>Gunith</ax21:firstName><ax21:id>1</ax21:id><ax21:lastName>Dev</ax21:lastName><ax21:middleName>E</ax21:middleName></ns:return></ns:getEmployeeByIdResponse></soapenv:Body></soapenv:Envelope>
[2012-08-04 11:35:45,528] ERROR - XSLTMediator Unable to perform XSLT transformation using : Value {name ='null', keyValue ='getEmployeeByIdResponseXlt'} against source XPath : s11:Body/child::*[position()=1] | s12:Body/child::*[position()=1]
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '1' (code 49) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
    at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109)
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570)
    at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566)
    at org.apache.synapse.util.jaxp.StreamResultBuilder.getNode(StreamResultBuilder.java:87)
    at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:298)
    at org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:191)
    at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60)
    at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:229)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:370)
    at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:160)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:275)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)

THANK YOU!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:43:31+00:00Added an answer on June 9, 2026 at 7:43 am

    Issue is at your xslt script..What you can do is try in eclipse/any other xslt processor feed the soap message as input xml for this xslt script and run..If the script is right, you will get output else not…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a proxy in our office which close all the trafic from certain
I have a service proxy generated by svcutil which generated an interface(IStudentContract) and a
I have a public Apache server which needs to proxy to an internal Apache
I have multiple SharePoint web parts that needs to access Reporting service 2008 which
I have a local HTTP proxy which I use to inject scripts into the
I have a method on a WCF proxy which returns void. If the return
I have a bean definition in Spring and it's proxy counterpart which is meant
We have a public Sonatype Nexus Maven Repository which is a proxy for several
I have a WCF service that needs to know the Principal of the calling
I have a ServiceA which has a dependency on ServiceB. The serviceB comes from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.