Problems using the XSLT Mediator

indi999_us.yahoo.com's picture
I need to transform an incoming XML file into a different XML standard. I currently know that my stylesheet is correct and it works fine when used outside the ESB 2.1.2 . Current Setup: Client ---> Proxy Endpoint---> In-Sequence [Log --> XSLT] ---> Target Endpoint The in-sequence fails with the following error: Unable to perform XSLT transformation using : esb-resources/xslt/TransformStyle.xsl 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 '&' (code 38) in prolog; expected '<' at [row,col {unknown-source}]: [1,1] I have not specified any 'source' parameter in the XSLT config and instead provide the XPATH directives in the XSL PROBLEM SOURCE: I looked at the Mediator Trace and saw that the Log Mediator logged the incoming request with '& lt;' instead of < within the payload section of the SOAP request. Your help is most appreciated. Thanks Rahul
indi999_us.yahoo.com's picture

Made Progress but Still facing some issues

Although the prolog errors have been resolved, I am finding that the XPATH is not resolving to give the value I was looking for. I need help with figuring out what the XPATH expression should be. Please provide some help with how the problem can be solved by either approaches 1) Specifying the Source paramter 2) Modifying the XSL. I am attaching the file that has the Input to XSLT / XSL Stylesheet / the Output of XSLT THE tag is always empty - it should be 'Seattle' based on the incoming request values. Thanks Rahul
indi999_us.yahoo.com's picture

Issues Resolved

When I used the SOAP UI tool to send a SOAP Request - The XSLT mediator worked. The SOAP Tracer showed no "& lt;" characters in the SOAP request. When I used either the WSO2 'Try it' or an Axis 1.4 client, I always see the "& lt;" character instead of "<" and XSLT mediator fails to execute the XPATH. First Question - Why does this happen ? I was finally able to get the XSLT mediator to work by putting a custom Class Mediator in front of the XSLT mediator to cleanup the "& lt;" characters. I wish I did not have to do this since this quickly starts looking like patch code. Thanks Rahul
sherry.william85.gmail.com's picture

XSLT is a declarative,

XSLT is a declarative, XML-based language used for the transformation of XML documents into other XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized output by the processor in standard XML syntax or in another format, such as HTML or plain text. XSLT is often used to convert XML data into HTML or XHTML documents for display as a web page: the transformation may happen dynamically either on the client or on the server, or it may be done as part of the publishing process. It is also used to create output for printing or direct video display, typically by transforming the original XML into XSL Formatting Objects to create formatted output which can then be converted to a variety of formats, a few of which are PDF, PostScript, AWT and PNG. XSLT is also used to translate XML messages between different XML schemas, or to make changes to documents within the scope of a single schema, for example by removing the parts of a message that are not needed. I am a student of ccna and i am so much specialties in the network solution's.
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)