OSB XSLT Transform in Service Orchestration

I am trying to use the function op:subtract-dayTimeDuration-from-dateTime within a stylesheet within a stage in the OSB. Is it possible to use this function in a stylesheet? I get an error after using the test console to test the XSLT resource:
Error executing the XSLT transformation: java.lang.NoSuchMethodException: For extension function, could not find method java.lang.String.dateTime([ExpressionContext,] ).
Here is the relevant part of the stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:op="http://www.w3.org/TR/xpath-functions"
xmlns:xdt="http://www.w3.org/TR/xpath-datatypes"
xmlns:xf="http://www.w3.org/TR/xquery-operators"
xmlns:xs="http://www.w3.org/2001/XMLSchema" >
               <timeframe>
                    <begin>
<xsl:variable name="now" select="op:subtract-dayTimeDuration-from-dateTime(xs:dateTime('2003-01-02T01:01:00'), xf:dayTimeDuration('P1DT1M'))" />
<xsl:value-of select="$now" />
                    </begin>
               </timeframe>
</xsl:stylesheet>

Hi,
Is this question posted to wrong Forum? I have not received any response yet. Request your help.
Regards....
Edited by: LearningSOA on Aug 15, 2011 3:19 PM
Edited by: LearningSOA on Aug 16, 2011 11:48 AM

Similar Messages

  • XSLT transformation in OSB Proxy Service

    Hello, I am trying to modify the answer from a WebService using an XSLT transformation in an OSB Proxy Service, but I am unable to do so. Here it is the content of the answer's body it receives:
    <ns0:getRecountUnitMovementsResponse xmlns:ns0="http://www.grifols.com/gds/interfaces/types/">
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>4</ns4:GrpId>
    <ns4:MovementType>960</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>11-0001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>10</ns4:Quantity>
    </ns1:result>
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>1</ns4:GrpId>
    <ns4:MovementType>913</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>11-0001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>15</ns4:Quantity>
    </ns1:result>
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>2</ns4:GrpId>
    <ns4:MovementType>913</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>21-00001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>25</ns4:Quantity>
    </ns1:result>
    <ns1:result xsi:type="ns4:VO_PR_UnitsMovementsSDO" xmlns:ns1="http://www.grifols.com/gds/interfaces/types/" xmlns:ns4="/com/grifols/gds/webapp/inventoryCount/units/queries/common/" xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:typ="http://www.grifols.com/gds/interfaces/types/">
    <ns4:GrpId>3</ns4:GrpId>
    <ns4:MovementType>959</ns4:MovementType>
    <ns4:DcCode>165</ns4:DcCode>
    <ns4:RecDcCode>165</ns4:RecDcCode>
    <ns4:UnitItemNumber>11-0001</ns4:UnitItemNumber>
    <ns4:RecUnitItemNumber xsi:nil="true"/>
    <ns4:Bol xsi:nil="true"/>
    <ns4:CustomerId xsi:nil="true"/>
    <ns4:DocumentDate>2011-01-01T09:00:00.0+01:00</ns4:DocumentDate>
    <ns4:PostingDate>2011-01-01T09:00:00.0+01:00</ns4:PostingDate>
    <ns4:MovStatusCode>SE</ns4:MovStatusCode>
    <ns4:Quantity>50</ns4:Quantity>
    </ns1:result>
    </ns0:getRecountUnitMovementsResponse>
    And what I am trying to do is replace all the "/com/grifols/gds/webapp/inventoryCount/units/queries/common/" for "http://www.something.else". I have succeeded replacing it if the attribute name is "xmlns" instead of "xmlns:ns4". However, that ":ns4" changes everything and I can't get it to work. Does anyone know how to do so?
    Thank you in advance. Don't hesitate to ask me for more information you may need.
    Jordi

    By the way, this is the XSLT transformation that works fine if we remove that ":ns4" from the attribute name:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:source="/com/grifols/gds/webapp/inventoryCount/units/queries/common/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    version="2.0">
    <xsl:output method="xml" encoding="iso-8859-1" indent="yes"/>
    <xsl:template match="source:*">
    <xsl:element name="{local-name()}" namespace="http://www.something.else">
    <xsl:apply-templates select="@*|node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>
    </xsl:stylesheet>

  • How to apply an XSLT transformation in OSB

    Hello all ,
    I tried to made a simple example - that apply a simple XSLT transformation in OSB .
    I followed the http://blog.jayway.com/2010/05/07/xslt-transformations-in-oracle-service-bus/ example but still is not working in my project .
    If I apply the imported xslt over the xml in testing window is working fine .
    But the action to replace the content of the xml with the new one is not working.
    Here is the xslt
    <xsl:template match="/">
    <ns0:donateToFund>
    <arg0>
    <xsl:value-of select="/Report/CustomerName"/>
    </arg0>
    <arg1>
    <xsl:value-of select="/Report/CustomerNumber"/>
    </arg1>
    <arg2>
    <xsl:value-of select="/Report/ReportName"/>
    </arg2>
    </ns0:donateToFund>
    </xsl:template>
    and here is a xml sample
    - <Report>
    <ReportName>Customer Report</ReportName>
    <CustomerName>XXX</CustomerName>
    <CustomerNumber>3423</CustomerNumber>
    <GeneratedDate>2010-11-25 08:15:24.695</GeneratedDate>
    - <Rowset>
    - <Row>
    <Quantity>100154</Quantity>
    <CustomerPartNo>ee</CustomerPartNo>
    <eSiliconPartNo>ee</eSiliconPartNo>
    <Sector>ee</Sector>
    <Location>eee</Location>
    </Row>
    - <Row>
    In my action I put /Report as XPath ; body as variable and XSL fro transformation .
    Can anyone help to fix this ?
    Many thanks in advance,
    Stefan

    Following works for me:
    XSLT
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:template match="/" xmlns:ns0="http://tempuri.org">
    <ns0:donateToFund>
    <arg0>
    <xsl:value-of select="/Report/CustomerName"/>
    </arg0>
    <arg1>
    <xsl:value-of select="/Report/CustomerNumber"/>
    </arg1>
    <arg2>
    <xsl:value-of select="/Report/ReportName"/>
    </arg2>
    </ns0:donateToFund>
    </xsl:template>
    </xsl:stylesheet>Input to Proxy
         <Report>
         <ReportName>Customer Report</ReportName>
         <CustomerName>XXX</CustomerName>
         <CustomerNumber>3423</CustomerNumber>
         <GeneratedDate>2010-11-25 08:15:24.695</GeneratedDate>
         <Rowset>
         <Row>
         <Quantity>100154</Quantity>
         <CustomerPartNo>ee</CustomerPartNo>
         <eSiliconPartNo>ee</eSiliconPartNo>
         <Sector>ee</Sector>
         <Location>eee</Location>
         </Row>
         <Row>
         <Quantity>100154</Quantity>
         <CustomerPartNo>aa</CustomerPartNo>
         <eSiliconPartNo>aa</eSiliconPartNo>
         <Sector>aa</Sector>
         <Location>aaa</Location>
         </Row>
         </Rowset>
         </Report>Output of Proxy:
         <ns0:donateToFund       xmlns:ns0="http://tempuri.org">
         <arg0>XXX</arg0>
         <arg1>3423</arg1>
         <arg2>Customer Report</arg2>
         </ns0:donateToFund>I am using a single Replace action in the request pipeline.
    It works for both configs below:
    Replace [ entire node ] of [ ./* ] in [ body ] with [Xslt Resource: default/OTN/temp
    Input Document: $body/Report
    Variable Names And Bindings ]
    Or
    Replace [ Node Contents ] of [ . ] in [ body ] with [Xslt Resource: default/OTN/temp
    Input Document: $body/Report
    Variable Names And Bindings ]
    You need to ensure that if you are doing replace entire node of . in body or / in body then you should replace it with an XML whose root node is soap:Body. To achieve that you will need to change the XSL and add soap:Body as root of the output. Easier solution is to use replace contents of . body or replace entire node of ./* in body.

  • XSLT Transformation service

    Does the livecycle ES workbench trial version have example process containing the XSLT Transformation service? I want to see the workflow with XSLT transformation involved.
    Thanks,
    Bing Wang

    Bill,
    If you download LiveCycle ES Trial and deploy the samples you will find what you are looking for under in workbench under Samples - Forms.

  • Configuring the XSLT transformation service

    I need to use XSL-T 2.0 in a service. The documentation for XSLT Transformation says that an alternate service provider can be used. It says I need to supply a string value that represents the fully qualified name of the Java class to use for performing the XSLT transformation, such as org.apache.xalan.xslt.XSLTProcessor. The Java class used must extend javax.xml.transform.TransformerFactory and must be available to the class loader of the LiveCycle ES server.
    The Saxon XSL-T engine supports the required interface, but I have not been able to install it successfully. In theory, it is a component that can be installed from the Components panel, but when I try that I receive the message "An error occurred. Please check the Eclipse error log for details". I have not been able to locate the error log.
    Any assistance greatly appreciated.
    --RKW

    Thanks for the assistance. That turns out to be the right advice. If you want to use the Saxon processor, you need to put the following jars in the server\all\lib folder:
    saxon8.jar
    saxon8-dom.jar
    --RKW

  • How to iterate through each node in REPLACE stage/XSLT transform/OSB

    I need to iterate through a xml document in a 'REPLACE' stage in a OSB message flow and have each <courseTemplate> transformed into a new xml document. The XSLT transform works correctly using the XSLT Resource Tester so I know the stylesheet works.
    ex: input data:
    <enterprise>
    <courseTemplate><sourcedId>100001-01</sourcedId><label><language>en-US</language><text>100001-01</text></label><title><language>en-US</language><text>Lower Division General Credit</text></title><catalogDescription><shortDescription>Lower Division General Credit</shortDescription><longDescription>Lower Division General Credit</longDescription></catalogDescription><courseNumber><language>en-US</language><text>XFCR 2999SA</text></courseNumber><status>Active</status><dataSource>CS</dataSource><extension><extensionField><fieldName>Mode</fieldName><fieldType>String</fieldType><fieldValue>C</fieldValue></extensionField></extension></courseTemplate>
    <courseTemplate><sourcedId>100001-02</sourcedId><label><language>en-US</language><text>100001-02</text></label><title><language>en-US</language><text>Lower Division General Credit</text></title><catalogDescription><shortDescription>Lower Division General Credit</shortDescription><longDescription>Lower Division General Credit</longDescription></catalogDescription><courseNumber><language>en-US</language><text>XFCR 2999TC</text></courseNumber><status>Active</status><dataSource>CS</dataSource><extension><extensionField><fieldName>Mode</fieldName><fieldType>String</fieldType><fieldValue>C</fieldValue></extensionField></extension></courseTemplate>
    </enterprise>
    1) the output data should look like:
    <enterprise      xsi:noNamespaceSchemaLocation="import_xml4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
         <group      recstatus="2">
         <sourcedid>
         <id>100001-02</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-02</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
    </enterprise>
    2) what is happening is the first node is being repeated:
    <enterprise      xsi:noNamespaceSchemaLocation="import_xml4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
         <group      recstatus="2">
         <sourcedid>
         <id>100001-01</id>
         </sourcedid>
         <grouptype>
         <typevalue      level="4">Course Template</typevalue>
         </grouptype>
         <description>
         <short>100001-01</short>
         <long>Lower Division General Credit</long>
         </description>
         <relationship      relation="1">
         <sourcedid>
         <id>Uh</id>
         </sourcedid>
         <label/>
         </relationship>
         <extension>
         <path/>
         </extension>
         </group>
    </enterprise>
    3) here is what I am using in the replace stage:
    XPath Expression Editor      : Request Pipeline - replace
    //enterprise/courseTemplate
    //enterprise/courseTemplate
    in variable: body with Xslt: SAIP_OSB_Requester/CourseTemplateSAIP_XSLT
    Input Document: $body
    Variable Names And Bindings: saipCourseTemplatesParam - $body
    4) can you see what I need to change?
    Edited by: user11960867 on Jul 5, 2011 10:58 AM

    Here is the stylesheet I am using. I wonder if it is wrong if I am working with each current node:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" indent="yes" />
    <xsl:variable name="saipCourseTemplates" />
    <xsl:param name="saipCourseTemplatesParam" />
         <xsl:template match="/enterprise">
              <enterprise xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="import_xml4.xsd">
                   <xsl:apply-templates select="courseTemplate" />
              </enterprise>
         </xsl:template>
         <xsl:template match="courseTemplate">
              <group recstatus="2">
                   <sourcedid>
                        <id>
                             <xsl:value-of select="sourcedId" />
                        </id>
                   </sourcedid>
                   <grouptype>
                        <typevalue level="4">Course Template</typevalue>
                   </grouptype>
                   <description>
                        <short>
                             <xsl:value-of select="sourcedId" />
                        </short>
                        <long>
                        <xsl:value-of select="catalogDescription/longDescription" disable-output-escaping="no" />
                        </long>
                   </description>
                   <relationship relation="1">
                   <sourcedid>
                   <id>Testing</id>
                   </sourcedid>
                   <label></label>
                   </relationship>
                   <extension>
                   <path></path>
                   </extension>
              </group>
         </xsl:template>
    </xsl:stylesheet>

  • OSB XSLT trasformations with XML input parameter

    Hello , In my proxy service i need to make assign step with XSLT transformation which have input parameter thats have to be XML.
    As "Input Document" I select the body - $body/db:OutputParameters.
    In Bind Variables I have v_accinfo where i want to put $accinfo/ai:OutputParameters.
    $accinfo is variable populated before this assign by Service Call out ( Response Document Variable ) .
    with this setup i get an error "No value could be bound to variable: v_accinfo".
    I tried some different expressions in place of $accinfo/ai:OutputParameters, but i get some other errors. I think it should be $accinfo/ai:OutputParameters.
    Can someone help with this?
    I lost too much time pulling hair, on this. :(

    I got the same error with $accinfo/*:OutputParameters --->> BEA-382107: No value could be bound to variable: accsinf
    *$accinfo goes like this:*
    <get:OutputParameters      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://xmlns.oracle.com/pcbpel/adapter/db/SMS/GET_ACCOUNT_INFO/">
         <get:RESULTRECORDSET>
         <get:RESULTRECORDSET_Row>
         <get:BRANCH>87400</get:BRANCH>
    the XSLT:
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/SMS/GET_ACCOUNT_INFO/"
    <!-- Where the variable is defined -->
    <xsl:param name="v_accinfo"/>
    <xsl:template match="/">
    <inp1:something>
    <accounts>
    <!-- Here's how I use the variable: -->
    <xsl:for-each select="$v_accinfo/ns1:OutputParameters/ns1:RESULTRECORDSET/ns1:RESULTRECORDSET_Row">
    <xsl:if test="(ns1:BRANCH = $br) and ((ns1:ACC_NUM = $ac) and (ns1:CURRENCY = $cr))">
    <acc_description1>
    <xsl:value-of select="ns1:TYPE"/>
    </acc_description1>
    </xsl:if>
    </xsl:for-each>
    I tested the XSLT in JDeveloper. I just used the content of the $accinfo and $body from "Invocation Trace" (OSB Console > Proxy Service >Test) and the transformation works Fine. But I have problems when I use it in the Proxy Service's flow in OSB.
    Edited by: 849874 on Apr 5, 2011 6:43 AM

  • XSLT Transformation

    Hi,
    I am trying to upload one xml file and filling an internal table with the content and a XSLT transformation. After uploading the file and make the first transformation i obtein one string with all the fields without tags and separated by #. so when i try to call transformation for filling the internal table i obtein the exception cx_xslt_exception with the message 'No valid source context supplied'.
    I would like to know if i am having poroblems with unicode characters. Is there any example made in sap that i can test or does anybody have had any similar problem?.
    My string
    <?xml version="1.0" encoding="utf-16"?>#######S####L####08##2######
    Thanks in advance
    regards

    Hi Verma,
    You're not transforming anything from your input to the output shown. You're actually constructing a new Output. I don't see anything being transformed from input to output.
    Anyway, if you need a XSLT to be used to get the above Output in map, following XSLT shall help you:
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0" xmlns:s0="http://xmlns.service/1" xmlns:ns1="http://xmlns.types/1.0" xmlns:ns0="http://xmlns.OutService/2">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="/">
    <xsl:apply-templates select="/s0:Request" />
    </xsl:template>
    <xsl:template match="/s0:Request">
    <Output xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://xmlns.OutService/2">
    <outContext xmlns:ns0="http://xmlns.OutService/2" xsi:type="ns0:ReferenceContext" xmlns="http://xmlns.types/1.0" />
    </Output>
    </xsl:template>
    </xsl:stylesheet>
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Where is XSLT Transformation located

    I am trying to do an XSLT Transformation, but I have no idea where to look for this - the only area with a note about where to find this tool is to select Foundation - XSLT Transformation, but I don't have that option - I found File, New, Process, Category = Foundation, but I never find any reference to XSLT Transformation.  Any suggestions would be helpful.

    XSLT Transformation is a service under the category of Foundation.  You can drag it from the Services panel onto your process OR drag on an Activity and type XSLT in the find field.   Choose the XSLT-Transformation from the Foundation category

  • [beginner] What is service orchestration ?

    Hi all !
    I'm doing my University thesis on BPM.
    I'm reading that modern BPM like jBoss's jBPM use BPEL for service orchestration.
    It's not clear to me how can I archieve -in practice- service orchestration.
    Should I "transform" all tasks of the Workflow in Web Services ?
    So that when I start the Workflow multiple web services are called ?
    Thanks a lot
    Francesco

    Theres a chip on the mac called the system management controller which controls battery management etc resetting it might help you
    http://support.apple.com/kb/HT3964

  • Tags not printed when outputting XML after XSLT transformation

    Hi!
    I want my to perform an XSLT transformation on requests to my web service.
    This is the style of a typical request:
    <app:aRequest xmlns:app="http://myNamespace">
      <app:firstTag>value1</app:firstTag>
      <app:secondTag>value2</app:secondTag>
      <app:thirdTag>value3</app:thirdTag>
    </app:aRequest>I want to transform it into something like this:
    <app:aRequest xmlns:app="http://myNamespace">
      <app:firstTag>A hard coded, completely different value!</app:firstTag>
      <app:secondTag>value2</app:secondTag>
      <app:thirdTag>value3</app:thirdTag>
    </app:aRequest>To do that, I use the following XSLT:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:app="http://myNamespace">
    <xsl:template match="/">
    <app:aRequest>
      <app:firstTag>A hard coded, completely different value!</app:firstTag>
      <app:secondTag><xsl:value-of select="app:aRequest/app:secondTag" /></app:secondTag>
      <app:thirdTag><xsl:value-of select="app:aRequest/app:thirdTag" /></app:thirdTag>
    </app:aRequest>
    </xsl:template>
    </xsl:stylesheet>And I use the following code to execute the transformation:
    public Object unmarshal(Source source) throws XmlMappingException, IOException {
      TransformerFactory factory = TransformerFactory.newInstance();
        // Does this factory support SAX features?
        if(factory.getFeature(SAXSource.FEATURE)) {
          SAXTransformerFactory saxTransformerFactory = (SAXTransformerFactory)factory;
        // Read xslt file.
        InputStream inputStream = getClass().getResourceAsStream("/META-INF/xsltTransformation.xsl");
        if(inputStream == null) {
          throw new RuntimeException("No XSLT transformation file present at " + location);
        Templates xsltOutputTemplate = saxTransformerFactory.newTemplates(new StreamSource(inputStream));
        Transformer transformer = xsltTemplate.newTransformer();
        // Perform transformation.
        StringWriter stringWriter = new StringWriter();
        StreamResult result = new StreamResult(stringWriter);
        transformer.transform(source, result);
        // Print result.
        String xmlString = stringWriter.toString();
        System.out.println(xmlString);
        // Proceed with unmarshalling.
        StringReader stringReader = new StringReader(xmlString);
        StreamSource transformedSource = new StreamSource(stringReader);
        return oxMapper.getUnmarshaller().unmarshal(transformedSource);
    }However, the System.out.println(xmlString); produces the following result:
    <?xml version="1.0" encoding="UTF-8"?>
      value1
      value2
      value3The tags are not printed and the hard coded value is not present.
    What am I doing wrong? Please help!

    Following up on what the good Dr said,
    Are you sure that you are using the stylesheet that you think you are?
    I tried your stylesheet and input and got more or less what you wanted and not what you actually got.
    Note that I did not use your code.

  • Change xslt transformer

    How can I change the xslt transformer that OC4J is using? I am trying to use the Maverick MVC framework in my web app and am receiving the following exception from oracle.xml.jaxp.JXTransformer.transform(). It looks like the oracle XSL library isn't capable of transforming from a DOMSource. I would like to configure OC4J to use Xalan for doing the transformations.
    For now I am using the standalone OC4J 9.0.3 for development but will deploy on a full 9iAS server.
    javax.xml.transform.TransformerException: XSL-1101: (Fatal Error) DOMSource node as this type not supported.
         at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:725)
         at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:196)
         at org.infohazard.maverick.transform.XSLTransform$Step.go(XSLTransform.java:250)
         at org.infohazard.maverick.opt.view.DomifyViewFactory$DomifyView.go(DomifyViewFactory.java:111)
         at org.infohazard.maverick.flow.ViewWithTransforms.go(ViewWithTransforms.java:39)
         at org.infohazard.maverick.flow.CommandBase.go(CommandBase.java:57)
         at org.infohazard.maverick.Dispatcher.service(Dispatcher.java:237)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

    I've just had a situation where we've added that line to the JVM for a container which houses an app that uses the Xalan processor. A developer undeployed the application and restarted the container, but the container wouldn't come back.
    Actually, the container was the home container, and the entire console didn't come back, but it happens on other containers as well.
    After some attempted restarts, I was getting the following error:
    08/06/24 10:50:09 Start process
    08/06/24 10:50:14 WARNING: Application.setConfig Application: default is in failed state as initialization failed.
    javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl could not be instantiated: java.lang.NullPointerException
    08/06/24 10:50:14 Error initializing server: Application: default is in failed state as initialization failed
    08/06/24 10:50:16 Fatal error: server exiting
    Now, as far as I can tell, if you add that line to the container's JVM, unless the container finds the library with Xalan on startup, it won't start. Which means you have to have the application deployed whenever you restart the container.
    I shouldn't need to remove that line every time I want to restart a container that doesn't contain the right application for it's dependencies.
    So, while this is a quick fix, perhaps a shared-lib solution would be better for all concerned?
    http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html

  • Specify filename in OSB File Trasport Business Service

    Hi All,
    Is it possible to specify the complete filename in OSB File Transport Business Service?
    the default behavior allows me to specify the prefix and suffix only, is it possible to override and specify the complete filename?
    Thanks,
    Tal

    Specifying the filename for outbound FTP transport in OSB the thread discusses with FTP BS and same would apply for File BS
    Manoj

  • Error in ABAP XSLT transformation

    Hi,
    Im trying to upload some data from XML to abap. But Im getting an error while transforming xml data to internal table.
    Here are the details.
    XML:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
      <!--  Edited by XMLSpy® -->
    <?xml-stylesheet type="text/xsl" href="ABAP1.xsl"?>
    <conceptRevDecisionXml>
    <projectInfo>
    <projectId>P000755</projectId>
    <stage>CON</stage>
    <country>Ethiopia</country>
    <region>AFRICA</region>
    <teamleader>Priya Agarwal</teamleader>
    <teamleaderfirstname>Priya</teamleaderfirstname>
    <teamleaderlastname>Agarwal</teamleaderlastname>
    <actionType>X</actionType>
    </projectInfo>
    </conceptRevDecisionXml>
    XSLT: Transformation
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sapxsl="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"></xsl:strip-space>
    <xsl:template match="/">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <PROJID>
              <xsl:apply-templates select="//conceptRevDecisionXml"></xsl:apply-templates>
            </PROJID>
          </asx:values>
        </asx:abap>
    </xsl:template>
    <xsl:template match="conceptRevDecisionXml">
          <xsl:for-each select="projectInfo">
           <xsl:value-of select="projectId"></xsl:value-of>
           <xsl:value-of select="stage"></xsl:value-of>
           <xsl:value-of select="country "></xsl:value-of>
           <xsl:value-of select="region"></xsl:value-of>
           <xsl:value-of select="teamleader"></xsl:value-of>
           <xsl:value-of select="teamleaderfirstname"></xsl:value-of>
           <xsl:value-of select="teamleaderlastname"></xsl:value-of>
            <xsl:value-of select="actionType"></xsl:value-of>
            </xsl:for-each>
        </xsl:template>
    </xsl:transform>
    Once I run the program...Im getting an error saying...ABAP XML Formatting error in XML node..
    Im new to ABAP-XML parsing..Pls help me where Im going wrong..
    Thanks in advance.
    Regards,
    Priya

    Hi Priya,
    you can try with the below,
    1) Create a local ITAB with the structure of the XML,
    TYPES: BEGIN OF t_data,
            projectid           TYPE char30,
            stage               TYPE char30,
            country             TYPE char30,
            region              TYPE char30,
            teamleader          TYPE char30,
            teamleaderfirstname TYPE char30,
            teamleaderlastname  TYPE char30,
            actiontype          TYPE char30,
           END OF t_data.
    2) Create an XSLT prog in "STRANS" with the below code,
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <L_DATA>
    <xsl:apply-templates select="//projectInfo"/>
    </L_DATA>
    </asx:values>
    </asx:abap>
    </xsl:template>
    <xsl:template match="projectInfo">
    <conceptRevDecisionXml>
    <PROJECTID>
    <xsl:value-of select="projectId"/>
    </PROJECTID>
    <STAGE>
    <xsl:value-of select="stage"/>
    </STAGE>
    <COUNTRY>
    <xsl:value-of select="country"/>
    </COUNTRY>
    <REGION>
    <xsl:value-of select="region"/>
    </REGION>
    <TEAMLEADER>
    <xsl:value-of select="teamleader"/>
    </TEAMLEADER>
    <TEAMLEADERFIRSTNAME>
    <xsl:value-of select="teamleaderfirstname"/>
    </TEAMLEADERFIRSTNAME>
    <TEAMLEADERLASTNAME>
    <xsl:value-of select="teamleaderlastname"/>
    </TEAMLEADERLASTNAME>
    <ACTIONTYPE>
    <xsl:value-of select="actionType"/>
    </ACTIONTYPE>
    </conceptRevDecisionXml>
    </xsl:template>
    </xsl:transform>
    3) Call the transformation as shown below,
    CALL TRANSFORMATION zxslt_project ---> "Name of the XSLT prog created above
    SOURCE XML l_xml_str                           ---> Source XML string
    RESULT l_data = l_data.                          ---> ITAB as in step 1 above
    Regards,
    Chen

  • How to configure proxy services in OSB for Rest based services?

    how to configure proxy services in OSB for Rest based services implemented using Jersey (Rest).
    The Client need to contact OSB proxy servies by posting application/xml using jersey client and OSB proxy service will call the OSB business service.
    i would like to know how to get this request in OSB proxy service and send it to the business service and get the response back.

    I would suggest you refer to the below links:
    https://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1
    https://blogs.oracle.com/jamesbayer/entry/using_rest_with_oracle_service
    Hope this helps.
    Thanks,
    Patrick

Maybe you are looking for

  • DMS Document not getting created thru Webdynpro ABAP Strange Problem

    Dear all, My requirement is that I have a Webdynpro ABAP application sitting on SAP Server1 and I am having a FileUploadUI Element in there for uploading files and we have SAP Server2 with the DMS configured. So, what we have done is we have an RFC i

  • Workflow stuck in starting state after applying SharePoint 2010 CU December 2012

    I have custom visual studio workflow which are associated with Custom content type. workflow gets triggered automatically when a file is uploaded to SharePoint. Everything was working fine till when i apply the following CU http://blogs.msdn.com/b/jo

  • Problems viewing dashboards in Word and PDF

    I use Xcelsius 2008, service pack 3 and when I export dashboards to Word and pdf others cannot open and view them.  I send them the files via email, some people can open and use, many cannot.  I have Windows XP sp3, and Office 2007.  This is a proble

  • Autofill feature in Itunes not working for my shuffle

    I just updated to the newest Itunes version and no I can click the autofill button all day long, but it won't bring any music into the playlist. Nothing. The button is dead. Anyone else have this problem or have a solution?

  • Custom s:ToggleButton Skin

    I started with a copy of the default skin class. The lines:     <!-- text -->     <s:Label id="labelDisplay"              textAlign="center"              verticalAlign="middle"                 maxDisplayedLines="1"              horizontalCenter="0" v