XML Transform - Replace Namespace - WS-Addressing

Hi All,
I'm trying to do a XML transformation to change the namespace of WS-Addressing of a XML message that arrives to Oracle Web Services Manager(OWSM), but no success.
This is the what arrives to OWSM:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<To xmlns="http://www.w3.org/2005/08/addressing">http://something.com</To>
<Action xmlns="http://www.w3.org/2005/08/addressing">initiate</Action>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
<Address>http://something.com</Address>
</ReplyTo>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:saude042</MessageID>
</soap:Header>
<soap:Body xmlns:ns1="http://something.com">
</soap:Body>
</soap:Envelope>
This is what I want to pass to the BPEL:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<MessageID xmlns="http://schemas.xmlsoap.org/ws/2003/03/addressing">uuid:saude042</MessageID>
</soap:Header>
<soap:Body xmlns:ns1="http://something.com">
</soap:Body>
</soap:Envelope>
I'm having some questions about how to do the XSLT...
Anyone have an example?
Thank you in advance.
Carla

http://www.oracle.com/technology/pub/articles/jones-owsm.html
Overhere they describe how to edit the soap header by using a custom step.

Similar Messages

  • Java transform problem - resulting XML has wrong namespace on imported Node

    I use Document.importNode(Node, String) to import a node from one document into another document. I want to preserve the namespace of the imported node. This works ok if the imported node specifies xmlns, even xmlns="". But if the imported node does not specify a namespace, I would expect the resulting serialized XML to have xmlns="". However, this is not the case. I use javax.xml.transform.Transformer when I serialize the XML. After the transform, the imported node has the namespace of the document it is imported into, which we do not want. So how do I get the imported node to serialize out with xmlns="", even if it's not specified in the source document? I am using javax.xml.transform.* and javax.xml.parsers.DocumentBuilder from Java 1.4.2.
    Example of XML that node is imported into (imported node replaces PayloadPlaceHolder):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope envelopeVersion="0.0.0" classificationLevel="Unclassified" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status reason="FAILED" lastTransactionID="9999999999" inReplyTo="ZZZ9999999999">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <PayloadPlaceHolder>
    </PayloadPlaceHolder>
    </Payload>]
    </Envelope>
    Example of XML with null namespace, test_segment is imported node:
    <?xml version="1.0" encoding="UTF-8"?>
    <test_segment>
    <name>test</name>
    </test_segment>
    Example of result XML with imported node (test_segment):
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope classificationLevel="Unclassified" envelopeVersion="0.0.0" xmlns="http://disa.gcss.mil/XMLGateway/Envelope">
    <Header>
    <UID>GM0000001</UID>
    <DateTime>2006-12-05T16:11:50Z</DateTime>
    </Header>
    <Status inReplyTo="ZZZ9999999999" lastTransactionID="9999999999" reason="FAILED">
    <LastMessageUID>ZZZ9999999999</LastMessageUID>
    </Status>
    <Payload>
    <test_segment>
    <name>test</name>
    </test_segment>
    </Payload>
    </Envelope>
    Here is the code to build the documents and transform the XML:
         Document document = null;
    Document dataBlockDoc = null;
    ByteArrayInputStream inStream = new ByteArrayInputStream
    (StringUtils.getBytes(xml.toString()));
    try {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware( true );
    DocumentBuilder parser = dbf.newDocumentBuilder();
    document =
    parser.parse(
    new InputSource(inStream ) );
    if (dataBlock != null) {
    inStream = new ByteArrayInputStream(StringUtils.getBytes(dataBlock));
    dataBlockDoc = parser.parse(
    new InputSource(inStream ) );
    Element root = document.getDocumentElement();
    Element payload = null;
    NodeList children = root.getChildNodes();
    //get Payload child from envelope document
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("Payload")) {
    payload = (Element)children.item(i);
    break;
    //get the PayloadPlaceHolder
    Element payloadPlaceHolderElement = null;
    children = payload.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
    if (children.item(i).getNodeName().equals("PayloadPlaceHolder")) {
    payloadPlaceHolderElement = (Element)children.item(i);
    break;
    Node newPayload = null;
    if (dataBlockDoc != null) {
    Element dataBlockElement = dataBlockDoc.getDocumentElement();
    //make new Payload element to replace old (empty) Payload
    newPayload = document.importNode((Node) dataBlockElement, true);
    payload.replaceChild(newPayload, payloadPlaceHolderElement);
    else
    payload.removeChild(payloadPlaceHolderElement);
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer nullTransform = tf.newTransformer();
    ByteArrayOutputStream oStream = new ByteArrayOutputStream();
    nullTransform.transform(                    new DOMSource( document ),
         new StreamResult( oStream ) );
    xml = new StringBuffer(oStream.toString());
    Thanks in advance.

    It appears that the problem is that the DOM serializer implementation in JDK 1.4 is not properly handling namespaces. Does anyone know of a workaround or alternate serializers we could use to serialize a DOM tree? I also need it to work with XSLT.
    Thanks.

  • Xsl transformation of xml with wrong namespace

    I have xml with wrong namespace:
    <PAMStartedNotification xmlns="some site">
    <tUser>PLVUSER</tUser>
    </PAMStartedNotification>I need to leave this namespace and transform it.
    As a result of transformation now I get
    <tUser></tUser>
    ...I.e. XPath is not calculated properly.
    If I leave out that namespace then everything is ok.
    But I want to leave that namespace as it is.
    I use the following code to transform xml:
    Templates stylesheet = transformerFactory.newTemplates(new StreamSource(new File(fileName)));
    Transformer processor = stylesheet.newTransformer();
    java.io.StringWriter resultWriter = new java.io.StringWriter();
    StreamResult streamResult = new StreamResult(resultWriter);
    processor.transform(new StreamSource(new StringReader(xmlData)), streamResult);
    transformedXML = resultWriter.getBuffer().toString();Any ideas how to do that(transform xml with wrong namespace)?
    Edited by: prng on Dec 15, 2008 6:43 AM
    Edited by: prng on Dec 15, 2008 6:45 AM

    prng wrote:
    Sorry.
    Here is XPath I use to select tUser:
    /PAMStartedNotification/tUser
    Right. To start out, that selects a PAMStartedNotification element which is in no namespace. But yours isn't. It's in the default namespace, which doesn't have a prefix. You could try this XPath expression:
    /*[local-name() = 'PAMStartedNotification']/*[local-name() = 'tUser'](Untested, might have mis-typings and so on.)

  • Javax.xml.transform.TransformerException durin XSL Transformation in Java

    Hi,
    Below is my piece of code where i access a web service that returns a xml as a string. I apply a xsl tranformation on it and try to store the result as a string. I get this error message
    javax.xml.transform.TransformerException: Result object passed to ''{0}'' is invalid.
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
         at NewService.main(NewService.java:52)My Code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    public class NewService {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String endPoint = "http://localhost:8080/SampleDynamicWebProj/services/SampleClient";
              Service service = new Service();
              Call callOne;
              try {
                   callOne = (Call) service.createCall();
                   callOne.setTargetEndpointAddress(new URL(endPoint));
                   callOne.setOperationName(new QName("http://DefaultNamespace",
                             "getXMLString"));
                   String concated = (String) callOne.invoke(new Object[] { "s" });
                   InputStream xsltFile = new FileInputStream("xslpackage/empTran.xsl");
                   Source xmlSource = new StreamSource(new StringReader(concated));
                 Source xsltSource = new StreamSource(xsltFile);
                 TransformerFactory transFact =
                    TransformerFactory.newInstance();
                 Transformer trans = transFact.newTransformer(xsltSource);
                 Result result = new StreamResult();
                 trans.transform(xmlSource, result);
                 System.out.println(result.toString());
              } catch (ServiceException e) {
                   e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (TransformerConfigurationException e) {
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
    }I get the transformed XML into a Result object, but when i do a toString() oon it, i get the above exception.
    any help wil be appreciated,
    Dilip

    Oh well, yes it was a typo in address tag...ok agreed that its a bad example, check this out then,
    i have a XML data that i convert to a html format using xsl transformation, now this converted html has to be shown in a html page(i use the out.write option).
    so my initial xml looks like this ::
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Results>
        <ColumnCount>6</ColumnCount>
        <Columns>
            <column>UID</column>
            <column>UserName</column>
            <column>Password</column>
            <column>LastName</column>
            <column>FirstName</column>
            <column>EmailAddress</column>
        </Columns>
        <Rows>
            <Row>
                <value>1</value>
                <value>userone</value>
                <value>password-1</value>
                <value>Anant</value>
                <value>Dilip</value>
                <value>[email protected]</value>
            </Row>
            <Row>
                <value>2</value>
                <value>usertwo</value>
                <value>password-2</value>
                <value>Palli</value>
                <value>Gilli</value>
                <value>[email protected]</value>
            </Row>
        </Rows>I apply XSL transformation on this to get a HTML which i will be writing into my output screen hoping that the user will see it in a tabular format!
    <[!CDATA["
    <?xml version="1.0" encoding="UTF-8"?>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">UID</th>
    <th align="left">UserName</th>
    <th align="left">Password</th>
    <th align="left">LastName</th>
    <th align="left">FirstName</th>
    <th align="left">EmailAddress</th>
    </tr>
    <tr>
    <td>1</td>
    <td>userone</td>
    <td>password-1</td>
    <td>Anant</td>
    <td>Dilip</td>
    <td>[email protected]</td>
    </tr>
    <tr>
    <td>2</td>
    <td>usertwo</td>
    <td>password-2</td>
    <td>Palli</td>
    <td>Gilli</td>
    <td>[email protected]</td>
    </tr>
    </table>
    "]]>The entire data is passed to a XML parser . I want the transformed xml data (which will be inside a <status></status> tag to be untouched by this parser. As you see i have put the transformed xml in a CDATA tag, but this aint helping me...
    need urgent help,
    Dilip

  • Javax.xml.transform.TransformerConfigurationException

    Hi,
    I am deploying a bpel process and a bpel test to a remote oc4j, then running the tests via an ant build script.
    The tests are run fine and the results are created in an xml file, however the bpeltest task then try's to convert the xml to a junit report xml format and throws an exception when it can't find bpeltest-junit.xsl.
    The exception is vague and I don't know if its because it can't find the xls file our one of its dependancies.
    exception,
    [bpeltest] ERROR: 'File "" not found.'
    [bpeltest] FATAL ERROR: 'Could not compile stylesheet'
    [bpeltest] javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    [bpeltest] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
    [bpeltest] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:619)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.doXForm(BpelTest.java:615)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.createJUnitReport(BpelTest.java:685)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.createReport(BpelTest.java:877)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.execute(BpelTest.java:1033)
    [bpeltest] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [bpeltest] at org.apache.tools.ant.Task.perform(Task.java:364)
    [bpeltest] at org.apache.tools.ant.Target.execute(Target.java:341)
    [bpeltest] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [bpeltest] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [bpeltest] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [bpeltest] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [bpeltest] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [bpeltest] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [bpeltest] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    My ant script invokes the test as follows,
    <bpeltest
         user="oc4jadmin"
                        password="babylon5"
         hostname="wells175732.int.rdel.co.uk"
                        httpport="80"
         domain="default"
                        process="AmazonFlow"
         rev="${rev}"
                        name="AmazonFlowTests"
         timeout="${bpeltest.timeout}"
         numWorkers="${bpeltest.numWorkers}"
         minCoverage="${bpeltest.minCoverage}"
         callHandler="${bpeltest.callHandler}"
         context="${bpel.context.properties}"
         resultsDir="${basedir}/bpel_test_results"
         resultsPropertyFile="${basedir}/bpel_test_results/AmazonFlow.properties"
                        failonerror="false"
         verbose="false"/>
    the top of my build script imports the following dependancies,
    <property file="${basedir}/conf/ant-oracle.properties"/>
    <property name="bpel.home" value="${oracle.home}/bpel"/>
    <import file="${bpel.home}/utilities/ant-orabpel.xml"/>
    <import file="${basedir}/conf/ant-oracle.xml"/>
    <property file="${bpel.home}/utilities/ant-orabpel.properties"/>
    <property file="${bpel.home}/utilities/bpel_build_template.properties"/>
    ant-oracle.xml conatins all necessary jar files including the orabpel-ant.jar where the bpeltest-junit.xsl resides under com\collaxa\cube\ant
    In the bpelTest ant task their is an attribute callHandler="${bpeltest.callHandler}"
    this property value is defined in the bpel_build_template.properties file but is empty,
    bpeltest.callHandler =
    I tried changing this to
    bpeltest.callHandler = com.collaxa.cube.ant.taskdefs.BpelTest
    and build script threw the following exception,
    [bpeltest] java.lang.ClassCastException: com.collaxa.cube.ant.taskdefs.BpelTest
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.loadHandler(BpelTest.java:425)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.runTestsOverRMI(BpelTest.java:544)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.runTests(BpelTest.java:603)
    [bpeltest] at com.collaxa.cube.ant.taskdefs.BpelTest.execute(BpelTest.java:1024)
    [bpeltest] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [bpeltest] at org.apache.tools.ant.Task.perform(Task.java:364)
    [bpeltest] at org.apache.tools.ant.Target.execute(Target.java:341)
    [bpeltest] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [bpeltest] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [bpeltest] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [bpeltest] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
    [bpeltest] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [bpeltest] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [bpeltest] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [bpeltest] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    the xsl file looks as follows,
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="UTResult.xsd"/>
    <rootElement name="testRunResults" namespace="http://xmlns.oracle.com/bpel/unittest"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="JUnit.xsd"/>
    <rootElement name="testsuites" namespace=""/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.2.0.0(build 050412) AT [SUN APR 17 02:06:34 PDT 2005]. -->
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://xmlns.oracle.com/bpel/bpeltest"
    xmlns:utd="http://xmlns.oracle.com/bpel/instancedriver"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:java="http://xml.apache.org/xslt/java"
    exclude-result-prefixes="xsl ns0 utd xsd ldap xp20 bpws ora orcl">
    <xsl:param name="minCodeCoverage">0</xsl:param>
    <xsl:param name="minPartnerCodeCoverage">0</xsl:param>
    <xsl:param name="packageFormat"/>
    <xsl:template match="/">
    <testsuites>
    <xsl:for-each select="/ns0:testRunResults/ns0:testSuite">
    <testsuite>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getQualifiedSuite($packageFormat, ../@domain, ../@processName, ../@processRevision, @name)" />
    </xsl:attribute>
    <xsl:attribute name="failures">
    <xsl:value-of select="@numFailures"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="@durationInSeconds"/>
    </xsl:attribute>
    <xsl:attribute name="tests">
    <xsl:value-of select="@numTests"/>
    </xsl:attribute>
    <xsl:attribute name="errors">
    <xsl:value-of select="0"/>
    </xsl:attribute>
    <properties>
    <xsl:for-each select="../ns0:properties/ns0:property">
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="@name"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@value"/>
    </xsl:attribute>
    </property>
    </xsl:for-each>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'run.start.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="../@startDate"/>
    </xsl:attribute>
    </property>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'run.end.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="../@endDate"/>
    </xsl:attribute>
    </property>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'suite.start.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@startDate"/>
    </xsl:attribute>
    </property>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'suite.end.date'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@endDate"/>
    </xsl:attribute>
    </property>
    </properties>
    <xsl:for-each select=".//ns0:testResult">
    <testcase>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.testToClass(@testName)"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="@durationInSeconds"/>
    </xsl:attribute>
    <xsl:attribute name="classname">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.testToQualifiedClass($packageFormat, @domain, @processName, @processRevision, @testName)"/>
    </xsl:attribute>
    <xsl:for-each select=".//ns0:executionError">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getExecutionErrorTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getExecutionErrorMessage(.)"/>
    </xsl:attribute>
    </failure>
    </xsl:for-each>
    <xsl:for-each select=".//ns0:xmlAssertion">
    <xsl:if test="(@passed = &quot;false&quot;) or (@wasExecuted = &quot;false&quot;)">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getFailureType(@wasExecuted, @fatal)"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getXMLFailureMessage(local-name(..), ../@instanceRefID, ../@testName, @wasExecuted, @fatal, utd:message, @activityName, @variableName, @partName, utd:actualPath, @iteration)"/>
    </xsl:attribute>
    </failure>
    <xsl:for-each select="ns0:xmlDiff">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getXMLDiffType()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getXMLDiffMessage(.)"/>
    </xsl:attribute>
    </failure>
    </xsl:for-each>
    </xsl:if>
    </xsl:for-each>
    <xsl:for-each select=".//ns0:valueAssertion">
    <xsl:if test="(@passed = &quot;false&quot;) or (@wasExecuted = &quot;false&quot;)">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getFailureType(@wasExecuted, @fatal)"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getFailureMessage(local-name(..), ../@instanceRefID, ../@testName, @wasExecuted, @fatal, utd:message, @activityName, @variableName, @partName, utd:actualPath, utd:expected,ns0:actualValue, @iteration)"/>
    </xsl:attribute>
    </failure>
    </xsl:if>
    </xsl:for-each>
    <xsl:for-each select=".//ns0:activityAssertion">
    <xsl:choose>
    <xsl:when test="@passed = &quot;false&quot;">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getActivityAssertionTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getActivityAssertionMessage(local-name(..), ../@instanceRefID, ../@testName, @activityName, ns0:expectedExecutionCount, ns0:actualExecutionCount)"/>
    </xsl:attribute>
    </failure>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    </testcase>
    </xsl:for-each>
    </testsuite>
    </xsl:for-each>
    <!-- *************************
    begin code coverage logic
    ************************* -->
    <xsl:if test="$minCodeCoverage &gt; 0">
    <testsuite>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageSuiteName($packageFormat, ns0:testRunResults/@domain, ns0:testRunResults/@processName, ns0:testRunResults/@processRevision)" />
    </xsl:attribute>
    <xsl:attribute name="failures">
    <!-- count( (if the main process coverage is too low) + (number of sub process's with insufficient coverage) ) -->
    <xsl:value-of select="count(/ns0:testRunResults/ns0:codeCoverage[@processName = /ns0:testRunResults/@processName and @processRevision = /ns0:testRunResults/@processRevision and $minCodeCoverage &gt; @coverage] | /ns0:testRunResults/ns0:codeCoverage[(@processName != /ns0:testRunResults/@processName or @processRevision != /ns0:testRunResults/@processRevision) and $minPartnerCodeCoverage &gt; @coverage])"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <xsl:attribute name="tests">
    <xsl:choose>
    <xsl:when test="$minPartnerCodeCoverage = 0">
    <xsl:value-of select="1"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="count(/ns0:testRunResults/ns0:codeCoverage)"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>
    <xsl:attribute name="errors">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <properties>
    <xsl:for-each select="/ns0:testRunResults/ns0:properties/ns0:property">
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="@name"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="@value"/>
    </xsl:attribute>
    </property>
    </xsl:for-each>
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'required.coverage'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="$minCodeCoverage"/>
    </xsl:attribute>
    </property>
    <xsl:if test="$minPartnerCodeCoverage &gt; 0">
    <property>
    <xsl:attribute name="name">
    <xsl:value-of select="'required.subprocess.coverage'"/>
    </xsl:attribute>
    <xsl:attribute name="value">
    <xsl:value-of select="$minPartnerCodeCoverage"/>
    </xsl:attribute>
    </property>
    </xsl:if>
    </properties>
    <xsl:for-each select="/ns0:testRunResults/ns0:codeCoverage">
    <xsl:choose>
    <xsl:when test="@processName = /ns0:testRunResults/@processName and @processRevision = /ns0:testRunResults/@processRevision">
    <testcase>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTestName($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <xsl:attribute name="classname">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.coverageTestToQualifiedClass($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:if test="@coverage &lt; $minCodeCoverage">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageMessage($minCodeCoverage, @coverage)"/>
    </xsl:attribute>
    </failure>
    </xsl:if>
    </testcase>
    </xsl:when>
    <xsl:when test="$minPartnerCodeCoverage &gt; 0">
    <testcase>
    <xsl:attribute name="name">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTestName($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:attribute name="time">
    <xsl:value-of select="'0'"/>
    </xsl:attribute>
    <xsl:attribute name="classname">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.coverageTestToQualifiedClass($packageFormat, @domain, @processName, @processRevision)"/>
    </xsl:attribute>
    <xsl:if test="@coverage &lt; $minPartnerCodeCoverage">
    <failure>
    <xsl:attribute name="type">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageTitle()"/>
    </xsl:attribute>
    <xsl:attribute name="message">
    <xsl:value-of select="java:com.collaxa.cube.ant.taskdefs.BpelTest.getCoverageMessage($minPartnerCodeCoverage, @coverage)"/>
    </xsl:attribute>
    </failure>
    </xsl:if>
    </testcase>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    </testsuite>
    </xsl:if>
    </testsuites>
    </xsl:template>
    </xsl:stylesheet>
    the classloader seems to want to make callbacks to the BpelTest methods in order to generate the xml file for junit.
    any help on this would be greatly appreciated,

    I'm having almost the same issue so I was hoping the xalan jars solution would resolve it, but even with the jars copied to the directory and renamed as instructed, the error still occurs when the ant bpeltest task tries to transform the test results into junit format. The error message I'm getting is slightly different but issue seems to be the same. The error message I'm getting is:
    [bpeltest] ERROR: 'null'
    [bpeltest] FATAL ERROR: 'Could not compile stylesheet'
    [bpeltest] javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    [bpeltest] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
    ...etc...
    BUILD FAILED
    C:\projects\jdev_user_home_10g\mywork\BPELTests\BPELTest1\build.xml:179: An error occurred while translating the test results to JUnit results.
    Could not compile stylesheet
    Please verify the XSL:
    bpeltest-junit.xsl
    The original XML results have been saved in... ...etc...
    Using filemon, I can see where the ant javaw.exe process is reading bpeltest-format.xsl but bpeltest-junit.xsl is never read from the file system (although it could be getting loaded via classloader from orabpel-ant.jar as previously mentioned.) Either way, it doesn't seem like bpeltest-junit.xsl is actually missing.
    The error message does not indicate what was null and the references passed to the TransformerFactory are controlled by the bpeltest ant task code so I don't know what's missing.
    Anyone have a clue what might be 'null'? Anyone know how to get it fixed? Anyone have a suggestion for a way to a dig up more context and figure out what's missing?
    -R

  • XSLT Transformer xmlns namespace problem

    Hi,
    I have the following xml document
    <PIPEDocument Version="2.0" DocumentReferenceNumber="2001" CreationDate="2002070401251212245"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://www.oeb.gov.on.ca/">
         <MarketParticipantDirectory>
    </MarketParticipantDirectory>
    </PIPEDocument>
    and the following xsl stylesheet
    <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
              xmlns ="http://www.oeb.gov.on.ca/"
              version = "1.0">
    <xsl:output method = "xml" indent = "yes" />
    <xsl:template match = "/" >
    <PIPEFunctionalAcknowledgement>
              <xsl:apply-templates select="//MarketParticipantDirectory"/>
    </PIPEFunctionalAcknowledgement>
    </xsl:template>
    <xsl:template match = "MarketParticipantDirectory" >
    </xsl:template>
    </xsl:stylesheet>           
    My problem is, using JAXP1.2.0-EA2 (from JWSDP1-0-ea2), javax.xml.transform.Transformer will not find a match on the element name within the template unless I put a prefix on the target namespace i.e.
    if my xml is changed to include a prefix (:xyz in example below)
    <PIPEDocument Version="2.0" DocumentReferenceNumber="2001" CreationDate="2002070401251212245"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xyz="http://www.oeb.gov.on.ca/">
         <MarketParticipantDirectory>
    </MarketParticipantDirectory>
    </PIPEDocument>
    and my stylesheet is changed also to include the prefix
    <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
              xmlns:xyz ="http://www.oeb.gov.on.ca/"
              version = "1.0">
    </xsl:stylesheet>
    then the transfomer works correctly and find a match on the element name "MarketParticipantDirectory" within the template (even though the element doesn't have the prefix xyz:MarketParticipantDirectory).
    Could anyone tell me why this is the case?
    I would have expected XSLT to match the elements from the namespace xmlns ="http://www.oeb.gov.on.ca/" without the prefix.
    Any comments would be much appreciated.
    Thanks
    Sinead Casey

    Matching an element on a Default Namespace requires Explicit Prefix.
    http://www.w3.org/TR/xslt20req

  • Building XPath with the XML having the Namespace using PL SQL

    While trying to build the path of each node, when the XML has no namespace in it , the below code works fine providing the result
    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat/
    7~/person/homecity/name/
    8~/person/homecity/long/
    But when the xml is changed to
    <person xmlns="urn:person" xmlns:lat="urn:lat">
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>"
    The result on executing the below code is resulting into only into below result
    1~/
    2~/person/
    In the XML provided above, XML name space is not constant and it may vary for every XML. My requirement is to parse the complete XML, where i can read the XML with namespace and get the result as mentioned below
    1~/
    2~/person/
    3~/person/age/
    4~/person/homecity/
    5~/person/name/
    6~/person/homecity/lat:lat/
    7~/person/homecity/name/
    8~/person/homecity/long/
    Can you please help me resolving the issue mentioned. Thanks in advance. --Code Snippet below :
    DECLARE
      l_File VARCHAR2(32000) := '<person>
    <name>Rob</name>
    <age>37</age>
    <homecity>
        <name>London</name>
        <lat>123.000</lat>
        <long>0.00</long>
    </homecity>
    </person>';
    l_Where_Clause VARCHAR2(100) := '/*';
    l_Append_Var   VARCHAR2(100) := '/';
    TYPE Ty_Paths IS TABLE OF VARCHAR2(1000) INDEX BY PLS_INTEGER;
    l_Ty_Paths      Ty_Paths;
    l_Ty_Paths_Temp Ty_Paths;
    TYPE Ty_Verifier IS TABLE OF VARCHAR2(1000) INDEX BY VARCHAR2(1000);
    l_Ty_Varifier Ty_Verifier;
    l_Prev_Query_Rec VARCHAR2(100);
    l_Index_Num      NUMBER := 0;
    l_Cur_Exec_Row   NUMBER := 0;
    BEGIN
    l_Ty_Paths(Nvl(l_Ty_Paths.COUNT, 0) + 1) := l_Append_Var;
    l_Cur_Exec_Row := 1;
    --Dbms_Output.put_line('Before entering the loop');
    LOOP
       l_Ty_Paths_Temp.DELETE;
      SELECT DISTINCT REPLACE(l_Append_Var || '/' || t.Xml || '/', '//', '/') BULK COLLECT
       INTO   l_Ty_Paths_Temp
      FROM   (SELECT Xmltype(Extract(VALUE(e), '/').Getstringval()) .Getrootelement() AS Xml
               FROM   TABLE(Xmlsequence(Extract(Xmltype(l_File), l_Where_Clause))) e) t;
      l_Ty_Varifier(Nvl(l_Ty_Varifier.COUNT, 0) + 1) := l_Append_Var;
      --Dbms_Output.put_line('L_TY_PATHS_TEMP.Count::'||L_TY_PATHS_TEMP.Count);
      IF l_Ty_Paths_Temp.COUNT > 0 THEN
         l_Index_Num := Nvl(l_Ty_Paths.COUNT, 0) + 1;
         FOR i IN l_Ty_Paths_Temp.FIRST .. l_Ty_Paths_Temp.LAST LOOP
            l_Ty_Paths(l_Index_Num) := l_Ty_Paths_Temp(i);
            --Dbms_Output.put_line('L_INDEX_NUM::'||L_INDEX_NUM);
            --Dbms_Output.put_line('L_TY_PATHS(L_INDEX_NUM)::'||L_TY_PATHS(L_INDEX_NUM));
            l_Index_Num := l_Index_Num + 1;
         END LOOP;
      END IF;
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_TY_PATHS.Count);
      --Dbms_Output.put_line('L_TY_PATHS.Count::'||L_CUR_EXEC_ROW);
      IF (NOT l_Ty_Paths.EXISTS(l_Cur_Exec_Row + 1)) OR (l_Cur_Exec_Row = l_Ty_Paths.COUNT) THEN
         --Dbms_Output.put_line('Exiting');
         EXIT;
      ELSE
         --Dbms_Output.put_line('Inside the Else part');
         l_Cur_Exec_Row := l_Cur_Exec_Row + 1;
         l_Append_Var   := l_Ty_Paths(l_Cur_Exec_Row);
         l_Where_Clause := l_Ty_Paths(l_Cur_Exec_Row) || '*';
      END IF;
      --To Display the record:
         --Dbms_Output.put_line(L_TY_PATHS.Count);
      END LOOP;
      IF l_Ty_Paths.COUNT > 0 THEN
        FOR i IN l_Ty_Paths.FIRST .. l_Ty_Paths.LAST LOOP
          Dbms_Output.Put_Line(i || ' record is ' || l_Ty_Paths(i));
       END LOOP;
    END IF;
    END;

    Hi,
    Thanks for the reply.
    Please find the details :
    1) What's your database version ?
    Database version  :
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    2) What's the practical use of extracting all the paths like this, what are you trying to achieve, besides a purely academic exercise ?
    The XML provided was for sample XML.
    The practical use being ,I wanted to parse the SEPA messages using the below code snippet dynamically.
    create table data_table (
         data xmltype
        xmltype column data store as securefile binary xml
    insert into data_table values (
        xmltype('<?xml version="1.0" encoding="UTF-8"?>
    <SCTScfBlkCredTrf xmlns="urn:S2SCTScf:xsd:$SCTScfBlkCredTrf">
      <SndgInst>CMCIFRPPXXX</SndgInst>
      <RcvgInst>RLBBAT2E083</RcvgInst>
      <FileRef>006FRID2516PH712</FileRef>
      <SrvcId>SCT</SrvcId>
      <TstCode>T</TstCode>
      <FType>SCF</FType>
      <FDtTm>2012-11-01T01:12:22</FDtTm>
      <NumCTBlk>1</NumCTBlk>
      <NumPCRBlk>0</NumPCRBlk>
      <NumRFRBlk>0</NumRFRBlk>
      <NumROIBlk>0</NumROIBlk>
    <FIToFICstmrCdtTrf xmlns="urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02">
      <GrpHdr>
        <MsgId>006MSID12511PH712</MsgId>
        <CreDtTm>2012-11-01T08:09:14</CreDtTm>
        <NbOfTxs>1</NbOfTxs>
        <TtlIntrBkSttlmAmt Ccy="EUR">20000</TtlIntrBkSttlmAmt>
        <IntrBkSttlmDt>2012-11-01</IntrBkSttlmDt>
        <SttlmInf>
          <SttlmMtd>INGA</SttlmMtd>
          <ClrSys>
            <Prtry></Prtry>
          </ClrSys>
        </SttlmInf>
        <InstgAgt>
          <FinInstnId>
            <BIC>RLBBAT2E083</BIC>
          </FinInstnId>
        </InstgAgt>
        <InstdAgt>
          <FinInstnId>
            <BIC>HELADEF1XXX</BIC>
          </FinInstnId>
        </InstdAgt>
      </GrpHdr>
      <CdtTrfTxInf>
        <PmtId>
          <EndToEndId>006SEOP23END1712</EndToEndId>
          <TxId>006SEOP231PH1712</TxId>
        </PmtId>
        <PmtTpInf>
          <SvcLvl>
            <Cd>SEPA</Cd>
          </SvcLvl>
        </PmtTpInf>
        <IntrBkSttlmAmt Ccy="EUR">20000</IntrBkSttlmAmt>
        <AccptncDtTm>2012-11-01T12:00:00</AccptncDtTm>
        <ChrgBr>SLEV</ChrgBr>
        <Dbtr>
          <Nm>Mrinmoy Sahu</Nm>
          <PstlAdr>
            <Ctry>FR</Ctry>     
            <AdrLine>6</AdrLine>
            <AdrLine>Bangalore</AdrLine>
          </PstlAdr>
          <Id>
            <PrvtId>
              <Othr>
                <Id>E20809</Id>
                <SchmeNm></SchmeNm>
                <Issr>ORACLE CORP</Issr>
              </Othr>
            </PrvtId>
          </Id>
        </Dbtr>
        <DbtrAcct>
          <Id>
            <IBAN>FR7030087330086000000000591</IBAN>
          </Id>
        </DbtrAcct>
        <DbtrAgt>
          <FinInstnId>
            <BIC>CMCIFRPPXXX</BIC>
          </FinInstnId>
        </DbtrAgt>
        <CdtrAgt>
          <FinInstnId>
            <BIC>RLBBAT2E083</BIC>
          </FinInstnId>
        </CdtrAgt>
        <Cdtr>
          <Nm>Mrinmoy Sahu</Nm>
          <PstlAdr>
            <Ctry>FR</Ctry>     
            <AdrLine>22 </AdrLine>
          </PstlAdr>
          <Id>
            <PrvtId>
              <Othr>
                <Id>F676869</Id>
                <SchmeNm></SchmeNm>
                <Issr>GOVT OF INDIA</Issr>
              </Othr>
            </PrvtId>
          </Id>
        </Cdtr>
        <CdtrAcct>
          <Id>
            <IBAN>FR7630087330086000000004266</IBAN>
          </Id>
        </CdtrAcct>
        <RmtInf>
            <Ustrd>abc</Ustrd>
          </RmtInf>
      </CdtTrfTxInf>   
      </FIToFICstmrCdtTrf>
    </SCTScfBlkCredTrf>
    alter session set nls_numeric_characters = ".,";
          SELECT Msgid, Msgid1, Sttlmmtd
       FROM   data_table t,Xmltable(Xmlnamespaces('urn:S2SCTScf:xsd:$SCTScfBlkCredTrf' AS "A", 'urn:iso:std:iso:20022:tech:xsd:sct:pacs.008.001.02' AS "B")
                        ,'/A:SCTScfBlkCredTrf/B:FIToFICstmrCdtTrf' Passing t.data Columns
                        Msgid Path 'A:SndgInst'
                        ,Msgid1 Path 'B:GrpHdr/B:MsgId'
                        ,Sttlmmtd Path 'B:GrpHdr/B:SttlmInf/B:SttlmMtd');
    MSGID             ;MSGID1           ;STTLMMTD         ;
                     ;006MSID12511PH712;INGA             ;
    The idea was to :
    1). Map the Column Names for the XPath built using the previous code.
    2). Build the Select statement shown above dynamically based on the Xpath built in the previous code using a PLSQL block, and to process the data by doing a bulk collect on the XML.
    The above XML may contain multiple <FIToFICstmrCdtTrf></FIToFICstmrCdtTrf> nodes.
    Since the name space in the XML varies for each version of the SEPA messages , i need to get the names spaces ALSO to be picked up dynamically and parse the XML data based on the select statement as shown above.
    Could you please guide me with
    1). Is the approach taken appropriate?
    2). Any alternative approach should be looked for ?
    3). How to extract the name spaces available in the XML?
    Thanks.

  • XML transform and upload without overwriting additional variables

    I have a set of working scripts where a user calls into one application to enter their contact number. People needing to reach that first user call the second application which reads the string value entered by the first user and dials out to them. This works via a simple xml transform and upload for the first script, and an xml get in the second.
    I've been requested to do this for 40 additional people.
    I made one template with a different %variable% for each user. Via a PIN, the correct variable is transformed and a singular doc is uploaded. The problem is that this uploaded doc erases the last person's transformation and reverts it back to %variable%.
    Essentially I'm trying to avoid creating 40 different transformed xml uploads. Anybody have a clever idea? If it involves XSL please give a specific exmample; I'm not versed in that.

    Hi
    Firstly, Sam raises a very good point. This sort of thing would be much better dealt with by using a proper DB so you can independenly edit records for each user.
    However if we assume this is a low-throughput system with infrequent changes and you are happy to take the chance of two concurrent changes occurring and one being lost...
    What I do with XML mostly is read it, parse it with the built-in steps. When it  comes to writing them, you can just read the whole doc, convert it to a string, and then use DO steps with Java code to edit the XML directly once read from the repo.
    Basicallly as you need to maintain the existing data, you need to either:
    1) read each bit of data into an array and then write that back into your template along with the new data
    2) read each bit of data into an array and then write them all back by building up the XML manually with java
    3) read the whole current XML from the repo, then do a quick find/replace in it using a regex and write it back
    Aaron

  • XmError: 7000 ODI XML Transformation That Can Be Executed Within a BPEL Pro

    Hi iam sudhakar
    iam using xml file as source and target and one csv file at the source through demo given in oracle site
    facing problem loading data in taget xml file
    source xml file contains
    client_id,
    address
    and othercolums
    csv file source contains
    client_id
    new_address
    row_id
    target xml(same as source) file is
    client_id
    address
    and othe rcolums
    iam just joining xml source and file as left outer join
    problem is unable recive the data from file to the target xml file and it not showing any errpors
    only xml data only storing in target xml file
    and
    set sql to sql
    sql to sql append
    filq to sql
    After that i have created variable the opened sql to sql append
    in detail tab
    ia have written create XMLFILE (NAME OF THE VARIABLE ) FROM SCHEMA geo
    Then I have created package
    i joined variable and interface then excuted
    In operator it showing errors
    Sunopsis.jdbx.xml....
    pls send the solution how to do
    ODI XML Transformation That Can Be Executed Within a BPEL Pro
    thanks
    user11366851

    I tried According to ur suggestion ,it is not working
    Actually Iam doing Second demos in oracle data integrator in oracle site
    http://www.oracle.com/technology/obe/fusion_middleware/odi/ODIxml_BPEL/ODIxml_BPEL.htm
    In this demo iam facing problem with coalesce function it is used in target data shore(address column)
    pls tell the steps from starting onwards.......
    thanks and regards
    user11366851

  • How to replace namespace tag with new value using -JAVA MAPPING

    Hi Guys,
    I need to replace namespace Tag in Target xml with a new value.
    For Eg: My namespace Tag is - <ns0:TestHeader xmlns:ns0="http://0020.TestHeader.SS.com">
    I want My target xml to have value- <ns0:TestHeader>
    How can i achieve it using JAVA mapping?
    Can you provide me the code to do so.

    Sarjana,
    Not well-formed XML is only possible by Java Mapping. Please use below replace logic in Java map.
    inputContent.replaceAll("<ns0:TestHeader xmlns:ns0=\"http://0020.TestHeader.SS.com\">", "<ns0:TestHeader>");
    Link1, Link2.

  • PLS HELP: XML Transformation using Saxon8

    I am using XSL version2.0 and the xalan parser is not recognizing the tokenize function in the XSLT.
    Now I am trying to transform the XML using Saxon8. But it is giving exception...
    java.lang.ClassNotFoundException ---> java.lang.AssertionError.
    at java.lang.Class.forName(Class.java:142)
    at net.sf.saxon.functions.ExtensionFunctionFactory.class$(ExtensionFunctionFactory.java:21)
    at net.sf.saxon.functions.ExtensionFunctionFactory.<init>(ExtensionFunctionFactory.java:21)
    at net.sf.saxon.Configuration.<init>(Configuration.java:87)
    at net.at net.sf.saxon.TransformerFactoryImpl.<init>(TransformerFactoryImpl.java:44)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:262)
    at javax.xml.transform.FactoryFinder.newInstance(Unknown Source)
    at javax.xml.transform.FactoryFinder.find(Unknown Source)
    at javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
    at SAXTest.main(SAXTest.java:
    the following is the code...
    Please help in solving the problem...
    import javax.xml.transform.*;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import java.io.*;
    import net.sf.saxon.*;
    public class SAXTest {
    public static void main(String[] args) {
    String strResult = new String();
    File xmlFile = new File("source.xml");
    File xslFile = new File("input.xsl");
    System.setProperty"javax.xml.transform.TransformerFactory","net.sf.saxon.TransformerFactoryImpl");
    StringWriter xmlString = new StringWriter();
    StreamSource xmlSource = new StreamSource(xmlFile);
    StreamSource xslSource = new StreamSource(xslFile);
    StreamResult result = new StreamResult(xmlString);
    TransformerFactory trans = TransformerFactory.newInstance();
    try
    Transformer transformer = trans.newTransforme(xslSource) transformer.transform(xmlSource,result);
    System.out.println("result = "+result.toString());
    }catch(Exception e){}
    Please help me....

    It depends on your jre version if you have jre 1.4 .
    You can get your TransformerFactory instance using javax.xml.transform.TranformerFactory.newInstance() directrly.
    If your jre version is higher than *1.4* than try to locate this class in your rt.jar in jre lib directory.
    When you found that class replace your code
    System.setProperty("javax.xml.transform.TransformerFactory","your desired TransformerFactoryClass") than run the code you wont find that error again.
    If you want some details copy and paste your error in google search you will found same problems posted by different programmers on forums however i have seen them before. Hope this help. Sorry if i have misunderstood your problem.

  • Data from two tables in the same row in XML transformation

    Hi,
        I am using XML transformation for generating excel file which is to besent as email attachment.
        Here  I want to display the data from two internal tables in the same row in the excel. .I am using   <tt:loop ref=".<table name>"> ...  </tt:loop> for looping through the table. Can I loop two table simultaneously ? In that case how will I specify the fields in each table . Some of the fields in two tables are of same name and type.
    Please help...
    Thanks,
    Jissa

    Hello Brian,
    Thank you for your answer. It is approach I will use, I think. However let me ask: Would it be possible to have a Version in this layout, too? I mean to see, which value comes from Version A and which comes from Version B? Something like this:
    Calendar Month Version Sales Amount
    2011.01  B  200
    2011.02  B  300
    2011.03  A  260
    2011.04  A  230
    2011.05  A  200
    A

  • XML Transformation Problem in JDeveloper 10.1.3

    I am trying to transform an XML using an XSL, by a Java program, which uses javax.xml.transform.Transformer.
    I have a Java project which has the above said program, where when i run the program, the xml transformation is done successfully.
    But I have a Web project created, where i have the java project's jar in the WEB-INF/lib. And, when i tried to access the same java program from inside the web project, I am getting the following error:
    XML-22000: (Fatal Error) Error while parsing XSL file (unknown protocol: c).
    Please help in resolving this error.

    This is from Metalink:
    Cause
    This is caused by a conflict between the Oracle XML parser installed by default in OC4J and the
    Xerces parser that the application was developed with. Under 10.1.3 OC4J it is possible to tell OC4J not to use the default XML parser for the application at deployment time.
    Solution
    1. Undeploy the existing application using AS Console.
    2. Start a new deployment of the application in AS Console. Click deploy
    3. On the Deploy: Select Archive screen, browse to your deployment war file. Click Next
    4. On the Deploy: Application Attributes give the application a name and click next
    5. On the Deploy: Deployment Settings screen, click the pencil "Go To Task" Icon for the Configure Class Loading option.
    6. Locate the shared library called "oracle.xml" (You may need to click "next 10" one or many times depending on the number of shared libraries you have) . For this row, UNCHECK the box for the column "IMPORT". Click OK
    7. Click deploy, then test you application.

  • What is default value of the javax.xml.transform.Transformer sys property?

    Hi all
    In my other thread "javax.xml.transform." last replied to on 17/04/05, I described that having & in my xml was causing TransformerExceptions when I attempted to apply a stylesheet to the xml.
    I've now deployed exactly the same xml, xsl and java on a completely different environment and have found that the error does NOT occur.
    This completely baffled me at first, but then I read the following in the API documentation for TransformerFactory: -
    "A TransformerFactory instance can be used to create Transformer and Templates objects.
    The system property that determines which Factory implementation to create is named "javax.xml.transform.TransformerFactory". This property names a concrete subclass of the TransformerFactory abstract class. If the property is not defined, a platform default is be used.
    I think that the key must lie in the system property "javax.xml.transform.TransformerFactory". The two environments must be using a different value for this - one representing a class that objects to & and one that doesn't. In neither case do I actually set this property, so my main question is what does it default to and how can I find out what each environment is using for this?
    I'm really baffled here guys, any help would be massively appreciated.
    Thank you
    Jon

    javax.xml.transform.TransformerFactory is a real class implemented by someone. It looks at the system property to figure out what actual implementation to use. It the property doesn't exist, it uses the class that came bundled with the javax.xml.transform.TransformerFactory class you are using.
    Here, for instance, is the javax.xml.transform.TransformerFactory that comes with jdk1.4.2
        public static TransformerFactory newInstance()
            throws TransformerFactoryConfigurationError
            try {
                return (TransformerFactory) FactoryFinder.find(
                    /* The default property name according to the JAXP spec */
                    "javax.xml.transform.TransformerFactory",
                    /* The fallback implementation class name */
                    "org.apache.xalan.processor.TransformerFactoryImpl");
            } catch (FactoryFinder.ConfigurationError e) {
                throw new TransformerFactoryConfigurationError(e.getException(),
                                                               e.getMessage());
        }

  • Fatal Error and NullPointerException in Oracle XML Transformer

    Hi,
    I'm building a dom tree in memory with oracle xml parser. Then I transform the dom document into a string to send xml to the client. But I get an fatal error on calling transform.
    I don't know what could be the problem, because apache and weblogic parser works, an when I create a dom document with org.w3c.dom elements and statements then the xml document can't be invalid,
    because the document implementation would throw an exception if wrong nodes or something like this should be inserted...
    I'm using oracle xml parser 9.2.0.4 for java, bea weblogic 7.0 and win2k.
    Thanks for help.
    XSL-1900: (Fatal Error) An internal error condition occurred.
    javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
    at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:681)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:309)
    java.lang.NullPointerException
    at oracle.xml.parser.v2.XSLSAXPrintDriver.printAttributes(XSLSAXPrintDriver.java:394)
    at oracle.xml.parser.v2.XSLSAXPrintDriver.startElement(XSLSAXPrintDriver.java:322)
    at oracle.xml.parser.v2.XMLElement.reportSAXEvents(XMLElement.java:993)
    at oracle.xml.parser.v2.XMLNode.reportChildSAXEvents(XMLNode.java:1014)
    at oracle.xml.parser.v2.XMLDocument.reportSAXEvents(XMLDocument.java:942)
    at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:294)

    Hi,
    I'm having that problem to:
    I'm getting the following exception
    javax.xml.transform.TransformerException: XSL-1900: (Fatal Error) An internal error condition occurred.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:723)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:340)
         at com.ac.mqif.control.Handler.handleLong(Handler.java:835)
         at com.ac.mqif.control.Handler.run(Handler.java:951)
    Caused by: java.lang.NullPointerException
         at oracle.xml.parser.v2.XPathStep.getSelectedNodes(XPathStep.java:380)
         at oracle.xml.parser.v2.PathExpr.getValue(XSLNodeSetExpr.java:483)
         at oracle.xml.parser.v2.XSLExprBase.getStringValue(XSLExprBase.java:363)
         at oracle.xml.parser.v2.XSLValueOf.processAction(XSLValueOf.java:99)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:367)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:199)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:214)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:207)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:207)
         at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:120)
         at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:367)
         at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:199)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:471)
         at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:448)
         at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:246)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:327)
         ... 2 more
    when using a stylesheet which has a template match condition of more than 1600 characters.
    The second thing is that the Oracle XML transformer is
    NOT threadsafe. I was using several threads using different templates to transform an incoming XML simultaneously but was ALWAYS getting internal XSL errors
    and Nullpointer Exceptions. I solved this by synchronizing the transformation, but I don't like it.
    I'm using the following versions on Windows XP:
    Oracle IDE: 9.0.3.10.35
    Business Components Version: 9.0.3.10.7
    SCM Support Version: 9.0.3.9.4
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
    Thanx,
    Ellcrys

Maybe you are looking for

  • Open in a new window.

    I created one jsp page with One input field and a submit button. once user enter some data into the input filed and click submit button, it will go to the database and will display the matching information on the same window. My peoblem is, once user

  • Error while importing SAP Router renew Certificate

    Hi Gurus, My sap router certificate got expired and got mail from SAP to renew, so I decided to renew it and followed link http://wiki.sdn.sap.com/wiki/display/Basis/HowtorenewtheSAPRouterlicense to renew saprouter certificate. All the steps were exe

  • Extarct Usres based on Poratl Group

    Hi all, Is there any table or RFC which contains the Users based on Portal Group in ECC.I need to writa a programme which extracts the users based on poratal group. Thanks and Regards, Venkat

  • Cant print PDFs to network drive

    Im running windows 7 with acrobat pro x. When i print pdf to the local drive it works perfectly but when i try print to a network drive it does nothing. When i go to control panel and printter and double click on adobe pdf it shows that it tried but

  • Illustrator CS2 crashes

    I moved Illustrator CS2 oveer to my new WIN 7 machine with 8 GB of RAM. It has been evidently successfully installed and activated. However it gives an eror message on stratup "The operation cannot complete because there isn't enough memory (RAM) ava