XPath function similar to Decode in database

Hello All,
I was wondering if there is an XPATH Function equivalent to DECODE Keyword in Database.
I will give an example of what i want. I have a package which accepts a set of inputs, in the DB adapter call while assigning inputs, if the client input is Null i want to assign 'xyz' to one of the parameters and if its not null i want to concat input with '123' and assign it to a parameter. (This is not an original requirement, the intent is instead of using a set of switch statements can we do it in one assign)
Thanks
Krishna

You can use something like this :
concat(
substring($s1, 1, number($condition) * string-length($s1)),
substring($s2, 1, number(not($condition)) * string-length($s2))
So, you will get output as "s1" or "s2" depending upon the condition.
Hope it helps.

Similar Messages

  • Can we implement the functionality similar to ROW_NUMBER() in generic/common way for all databases using SQL ?

    In my project,i am allowing user to select database of his choice from given options & i need to write queries considering
    all these optional databases. So as per my one of requirement,is there any way to achieve generic functionality similar to ROW_NUMBER() in MSSQL ?

    First run this and check the db version
    SELECT @@VERSION
    EXEC sp_dbcmptlevel 'db name'
    If version is above 2012 and compatibility level is above 80 ROW_NUMBER will work.
    Otherwise you need to use this
    http://sqlserverplanet.com/sql-2000/simulate-row_number-in-sql-2000
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • XPath function orcl:query-database usage

    According to the limited documentation I can find for this XPath function, I should be able to return a nodeset enclosed in xml elements -
    "Returns a node-set by executing the sql-query against the specified database. The second parameter rowset indicates if the rows should be enclosed in a element. The third parameter row indicates if each row should be enclosed in a element."
    However, whatever second and third parameters I pass in to this function, it always returns a single string consisting of the selected fields and rows concatenated together.
    Does anyone know how (or if) I can use this function to return a resultset as an XML nodeset? (All the examples I've been able to find for this function set the second & third parameters = false())

    Try this example (it uses internal orabpel table):
    orcl:get-content-as-string(orcl:query-database('select id, process_instance from bpel_variable_sensor_values where id < 30',true(),true(),'jdbc/BPELServerDataSourceWorkflow'))
    it generates something like this (string):
    <ROWSET> <ROW num="1"> <ID>23.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> <ROW num="2"> <ID>25.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> <ROW num="3"> <ID>27.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> <ROW num="4"> <ID>29.0</ID> <PROCESS_INSTANCE>21.0</PROCESS_INSTANCE> </ROW> </ROWSET>
    or define this element type in your wsdl file (or your xsd):
    <element name="ROWSET">
    <complexType>
    <sequence>
    <element name="ROW">
    <complexType>
    <sequence>
    <element name="ID" type="string"/>
    <element name="PROCESS_INSTANCE" type="string"/>
    </sequence>
    <attribute name="num"/>
    </complexType>
    </element>
    </sequence>
    </complexType>
    </element>
    and try to assign the output to variable of that type(without orcl:get-content-as-string). It should work.

  • OSB: class not found in custom xpath function

    Hi,
    This week I was struggling with custom xpath functions in OSB. First I created a jar file that contained the class and the complete functionality including logging. It contains a class that does a DVM Lookup from the database. As a standalone function, called from JUnit test cases it functions perfectly. I use Apache commons logging with the libraries from the Weblogic installation.
    But when I put this OSB Util Services jar in the osb-home/config/xpath-function, it turns out that somehow the Weblogic Console gets a conflict with the commons-logging libraries. So I deployed it just as an application library in weblogic console, to solve this breakage.
    Then I created a simple separate class that only calls the method in the deployed library. I packaged that as a custom-osb-functions.jar for the osb-home/config/xpath-function. I managed to get if visible in OEPE. But when I test the xquery transformation resource on the server, I get:
    Error executing the XQuery transformation: {http://www.bea.com/wli/common/xquery}XQueryException: Error invoking custom xquery java function: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.stages.functions.XQueryExternalFunction.execute(XQueryExternalFunction.java:111)
    at com.bea.wli.sb.stages.functions.XQueryExternalFunction.init(XQueryExternalFunction.java:61)
    at weblogic.xml.query.iterators.FirstOrderIterator.open(FirstOrderIterator.java:169)
    at weblogic.xml.query.runtime.typing.SeqTypeMatching.open(SeqTypeMatching.java:129)
    at weblogic.xml.query.iterators.FirstOrderIterator.open(FirstOrderIterator.java:167)
    at weblogic.xml.query.runtime.core.ExecutionWrapper.open(ExecutionWrapper.java:58)
    at com.bea.wli.common.xquery.iterators.XQueryVariableMapper.getObjects(XQueryVariableMapper.java:459)
    at com.bea.wli.common.xquery.iterators.XQueryVariableMapper.getObjects(XQueryVariableMapper.java:447)
    at com.bea.wli.sb.test.transform.XQueryProcessor.invoke(XQueryProcessor.java:165)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:40)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(Unknown Source)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:667)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:522)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:518)
    at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:252)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: java.lang.NoClassDefFoundError: nl/darwin-it/osb/dvm/DomainValueMap
    at nl.darwin-it.osb.xpath.DomainValueMapLookup.lookupDVM(DomainValueMapLookup.java:35)
    ... 28 more
    Caused by: java.lang.ClassNotFoundException: nl.darwin-it.osb.dvm.DomainValueMap
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
    ... 29 more
    Can any one explain to me how I can get the OSB Util Services jar library in the same classpath as the custom-xpath-functions jar, without having it put along the custom-xpath-functions jar in the osb-home/config/xpath-functions folder (since that somehow breaks the weblogic console)?
    How does the OSB classpath/classloading mechanisms work in this?
    Thanks in advance,
    Regards,
    Martien

    I am running the plugin registration utility but it generates the error mentioned below. I have verified the structure of my zip file and the structure of zip file is:
    -> SelfRegisterUserCustomValidator.zip
    ->Plugin.xml
    ->/lib/SelfRegisterUserCustomValidator.jar
    ->/resources/
    Following our contents of plugin.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins>
    <plugins pluginpoint="oracle.iam.request.plugins.RequestDataValidator">
    <plugin pluginclass= "com.infotech.tra.CustomValidator.SelfRegisterUserCustomValidator" version="1.0.0" name="SelfRegisterUserCustomValidator">
    </plugin>
    </plugins>
    </oimplugins>
    Following is the error being generated:
    Enter name (complete file name with path) of the plugin file:
    /u01/oracle/Middleware/Oracle_IDM1/server/plugin_utility/SelfRegisterUserCustomValidator.zip
    [java] Java Result: 1
    [echo] Exception in thread "main" java.lang.NoClassDefFoundError: oracle/iam/platformservice/utils/PluginUtility
    [echo] Caused by: java.lang.ClassNotFoundException: oracle.iam.platformservice.utils.PluginUtility
    [echo] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    [echo] at java.security.AccessController.doPrivileged(Native Method)
    [echo] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    [echo] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [echo] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [echo] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    [echo] Could not find the main class: oracle.iam.platformservice.utils.PluginUtility. Program will exit.

  • Use of X Queries in custom Xpath functions ?

    Hi all,
    I have used java classes in custom x path functions, similarly can we use x query in custom Xpath functions instead of java ? I mean can we use XQuery in domain level rather than project level ?
    Thank You

    Yes. In 10.1.2 BPEL install, $ORACLE_HOME\integration\orabpel\samples\demos\XSLMapper\ExtensionFunctions describes how to write extension functions for the XSL processor.

  • Is it possible to throw a BPELFault from a custom xpath function?

    I'm probably revealing my lack of java chops here, but I'd like to know if there's a way to throw a BPELFault from the "call" method within a custom xpath function.
    The interface for IXPathFunction seems to dictate that "call" throws only an XPathFunctionException and the bpel server doesn't handle this exception properly. It records the exception in the logs but then the process just dies.
    Right now I have this (simplified code):
    public Object call(IXPathContext context,
    List args) throws XPathFunctionException
    if (args.size() == 1)
    // do some stuff and return a value
    throw new XPathFunctionException( "hexToInt() requires one string argument." );
    What I want to have is something like this:
    public Object call(IXPathContext context,
    List args) throws BPELFault
    if (args.size() == 1)
    // do some stuff and return a value
    BPELFault fault = new BPELFault(
    new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/business-process/",
    "selectionFailure"));
    fault.setPart("code", "intToHex");
    fault.setPart("summary", "hexToInt() requires one string argument.");
    throw fault;
    If I do this, the compiler rejects it saying that "call" must throw XPathFunctionException. Is there a way to extend the IXPathFunction interface to allow it to throw a useful fault?
    Thanks!
    Sean

    Yeah, I'm using that patch (otherwise the process just crashes and you don't have a chance to catch the fault, even in a catchAll). Within the catchAll you can get the details from the error with something like this:
    <copy>
    <from expression="concat(ora:getFaultName(),'')"/>
    <to variable="processFault" part="payload" query="/ns4:summary"/>
    </copy>
    <copy>
    <from expression="concat(ora:getFaultAsString(),'')"/>
    <to variable="processFault" part="payload" query="/ns4:detail"/>
    </copy>

  • How can I call a stateful webservice from a user-defined XPath function?

    I'm calling a stateful webservice from a BPEL process using a PartnerLink which implements Custom Header Handler classes to handle the session state, storing the cookie as a property of the PartnerLink.
    I'd also like to call this same stateful webservice, in the same session, from a user-defined XPath function enabling me to call this from an XSL Transformation.
    Is this in any way possible? Can I access the cookie and attach it to the webservice call made by the user-defined XPath function?

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

  • Bpel Server Does Not Catch Exceptions Thrown By Custom Xpath Functions

    Hi.
    I am using some custom xpath functions in a bpel process and whenever they fail I get an XPathExecutionError with summary:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "<my function>", the reason is FOTY0001: type error.
    Please verify the xpath query.
    I am forcing my function to fail by giving a wrong input, which should result in an XPathFunctionException("Input does not respect format").
    There is a note on Metalink with ID 458434.1 on this subject which says that patch 5926809 should fix my problem.
    Patch 5926809 fixes Bug 5926809 - ORA:PARSEESCAPEDXML XPATH EXPRESSION FAILED TO EXECUTE FOTY0001: TYPE ERROR.
    I am using it, but it does not work :(
    I am using version 10.1.3.3.0 of App Server with various patch sets, including fix for bug 5926809.
    Has anyone suggestions on how to overcome this problem?
    Thanks

    Hello,
    I am trying to add a custom xpath function to the BPEL server, and I see that you made it work. I am using Oracle SOA Suite 10.1.3.3 and jDeveloper 10.1.3.4. I am using this function inside an xsl mapping file, although I am able to compile and deploy the Bpel Process to the server, it stops mapping where I placed the function and I have not seen any meaningful message from the domain/log/ files.
    Can you tell me how you did it?
    I think you will tell me faster than Oracle support, I already placed an SR but they just give me superficial advice.
    I appretiate your time and advice,
    Guillermo

  • Can I use Replace function in a decode??

    Hello,
    I am trying to use replace function inside a Decode Function,
    Here is how I am doing it:
    select
    SUBSTR (
    DECODE (
    IH.DRVD_ALT_MAIL_ADDR_PRIM_FLAG,
    'N',
    REPLACE (
    ih.subs_addr_1
    || ' '
    || ih.subs_addr_2
    || ' '
    || ih.subs_city
    || ','
    || ih.subs_state_code
    || ' '
    || ih.subs_zip_code,
    'Y',
    REPLACE (
    IH.PRINT_ALT_MAIL_ADDR_LINE_1
    || ' '
    || IH.PRINT_ALT_MAIL_ADDR_LINE_2
    || ' '
    || IH.PRINT_ALT_MAIL_ADDR_LINE_3
    || ' '
    || IH.PRINT_ALT_MAIL_ADDR_LINE_4
    || ' '
    || IH.PRINT_ALT_MAIL_ADDR_LINE_5
    || ' '
    || IH.PRINT_ALT_MAIL_ADDR_LINE_6,
    ) 1,
    50
    address from x
    Can anyone please tell me what am I doing wrong here, It always gives me an error about missing a right parenthesis.
    Thanks in advance.

    Hi Jimmy,
    Looks like you are missing the first comma in the SUBSTR function
    SELECT SUBSTR (
             DECODE (
               ih.drvd_alt_mail_addr_prim_flag,
               'N', REPLACE (
                         ih.subs_addr_1
                      || ' '
                      || ih.subs_addr_2
                      || ' '
                      || ih.subs_city
                      || ','
                      || ih.subs_state_code
                      || ' '
                      || ih.subs_zip_code,
               'Y', REPLACE (
                         ih.print_alt_mail_addr_line_1
                      || ' '
                      || ih.print_alt_mail_addr_line_2
                      || ' '
                      || ih.print_alt_mail_addr_line_3
                      || ' '
                      || ih.print_alt_mail_addr_line_4
                      || ' '
                      || ih.print_alt_mail_addr_line_5
                      || ' '
                      || ih.print_alt_mail_addr_line_6,
             ), -- HERE
             1,
             50
             address
    FROM   xRegards
    Peter

  • Issue with AIA XPath Functions while compiling in JDeveloper 11.1.1.2.0

    Hi,
    BPEL flow contains Assign activity as below :
    <assign name="Assign_1"><copy><from expression='aia.getServiceProperty("{http://xmlns.oracle.com/ABCSImpl/SAP/Core/UpdateItemListSAPReqABCSImpl/V1}UpdateItemListSAPReqABCSImpl","Default.SystemID",true())'/>
    <to variable="temp"/></copy> </assign>
    When I try to compile this flow, it gives me below errors :
    SOALog:
    Buildfile: D:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml
    scac:
    [scac] Validating composite : 'D:\test\TestAIAFunc\composite.xml'
    [scac] FATAL_ERROR: in TestAIABPELProcess.bpel(81): unresolved xpath function
    [scac] could not resolve xpath function "aia.getServiceProperty", because function "aia.getServiceProperty" not registered.
    [scac] Make sure this function is either in the system xpath function configuration file or in the custom xpath function configuration file. Refer to the user guide regarding how to register xpath functions in your compiler environment.
    BUILD FAILED
    D:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:264: Java returned: 1 Check log file : D:\test\TestAIAFunc\SCA-INF\classes\scac.log for errors
    Total time: 9 seconds
    CompilerLog:
    Project: D:\test\TestAIAFunc\TestAIAFunc.jpr
    D:\test\TestAIAFunc\TestAIABPELProcess.bpel
    Error(81): unresolved xpath function
    could not resolve xpath function "aia.getServiceProperty", because function "aia.getServiceProperty" not registered.
    Make sure this function is either in the system xpath function configuration file or in the custom xpath function configuration file. Refer to the user guide regarding how to register xpath functions in your compiler environment.
    I got latest aia.jar from server(SOA11.1.1.2, weblogic 10.3.2, AIA11gR1) and added aia.jar @ JDeveloper 11.1.1.2--> Tools--> Preferences--> SOA
    I also added it in jdeveloper/lib, jdeveloper/jdev/lib
    aia namespace is there in .bpel as : xmlns:aia="http://www.oracle.com/XSL/Transform/java/oracle.apps.aia.core.xpath.AIAFunctions"
    Thanks,
    Hema

    You have to include the aia.jar file. I had same issue .. I had aia.jar included in the project but the file was not ther ein the path . so i updated the correct path .. it worked

  • How to use Ago function in BIEE with mysql database

    Hi experts,
    Ago function works well in Oracle database,but when I tried a mysql database,it didn't show results as expected. Anyone knows how to use Ago with mysql as data source?

    Hi Gurus, need help

  • XPath function failed in XSLT (OSB 10.3.1)

    Platform : OSB 10.3.1 in Windows XP
    Error : Test following XSLT scripts in OSB Console by getting error
    Error executing the XSLT transformation: java.lang.NoSuchMethodException: For extension function, could not find method weblogic.apache.xpath.axes.WalkingIteratorSorted.upper-case([ExpressionContext,] ).
    XSLT :
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:fn="http://www.w3.org/2004/07/xpath-functions"
         xmlns:imp1="http://www.example.org/FaultMessage">
    <xsl:template match="/">
              <imp1:FaultMessage>
                   <imp1:code>
                        <xsl:text disable-output-escaping="no">Hard-Coding-Error-Code</xsl:text>
                   </imp1:code>
                   <imp1:summary>
                        <xsl:value-of select="/imp1:FaultMessage/imp1:summary" />
                   </imp1:summary>
                   <imp1:detail>
                   <xsl:value-of select="fn:upper-case(/imp1:FaultMessage/imp1:detail)" />
    </imp1:detail>
         </imp1:FaultMessage>
    </xsl:template>
    </xsl:stylesheet>
    Any ideas?
    Thank you
    -Simon
    Edited by: user10981433 on Jun 11, 2009 9:05 PM

    exporting and importing your osb projects to the new environment won't migrate the webservice you were calling from within the Oracle Service Bus.
    if these were created in Eclipse too you can just regenerate an ear-file from them or use the build-scripts to deploy them to you new Weblogic Server.
    don't mix up 2 things
    the osb is only intermediar in here, so you can export/impot the resources from your osb workspace for these.
    but if your process call any external webservice, the webservice itself will also need to get redeployed to the new enviroment, and this is something which has nothing to do with your osb projects.
    it could be these webservice are also build in Eclipse, but they won't be part of the export/import of OSB.
    so check if you have some build.xml script in these webservice projects so you can regenerate the ear archive, or try importing the project in your workspace (if not already done) and rightmouseclick on it > export > ear file
    and use this ear file to deploy the webservice again in the Weblogic Console ( see : http://docs.oracle.com/cd/E13218_01/wlp/docs81/prodOps/deployment.html )

  • Why don't standard XPath functions work in XSLT?

    I'm having a lot of trouble trying to do some simple string processing in XSLT. What I would like to do is make selection using the standard xpath functions defined by the w3c. I'm using this as my cheat sheet:
    http://w3schools.com/xpath/xpath_functions.asp
    I've tried the default XSLT parser that comes with Java, the latest distro of Xalan and the latest distro of Saxon. Nothing seems to recognize the fn namespace:
    xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
    In particular, I'm trying to use the tokenize(string, regex) function. Only Xalan seems to support this at all, only recognizes {http://xml.apache.org/xalan}tokenize, and it is treating the regex as a literal.
    This is very frustrating. Is it possible to get the standard Xpath functions to work for XSLT?

    How did you get it to work with Saxon? I have saxon9he.jar on my classpath. When I try to transform this:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:src="http://xml.kitfox.com/schema/game/tileWorld/textTable"
        xmlns:xalan="http://xml.apache.org/xalan"
        xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
        version="1.0">
        <xsl:output method="text"/>
    <xsl:template match="/">
        <xsl:for-each select="fn:tokenize('a b c', '\s+')">
            "<xsl:value-of select="."/>"
        </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>I get the error
    Error on line 100
      Cannot find a matching 2-argument function named
      {http://www.w3.org/2005/02/xpath-functions}tokenize()Is there some other jar you need to include to get http://www.w3.org/2005/02/xpath-functions to resolve?

  • Error in giving variable in ora:readFile() Xpath function

    Hi,
    I have a requirement like i need to give a variable name in ora:readFile() Xpath function. Below is the method in which i am trying. but i am getting error
    ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')
    Error iam getting while compiling is:
    Error(80):
    [Error ORABPEL-10039]: invalid xpath expression
    [Description]: in line 80 of "C:\Softwares\JDev10.1.3.4\jdevstudio10134\jdev\mywork\Test\bpel\Test.bpel", xpath expression "ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')" specified in <from> is not valid, because XPath query syntax error.
    Syntax error while parsing xpath expression "ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')", at position "71" the exception is Expected: ).
    Please verify the xpath query "ora:readFile('file:////home/casdevro/tbm/archive/bpws:getVariableData('inputFile')')" which is defined in BPEL process.
    [Potential fix]: Please make sure the expression is valid.
    Am i missing anything. Please guide me
    Thanks in advance.

    Try this. And I guess one forward slash after "file:" suffices.
    ora:readFile(concat('file:/home/casdevro/tbm/archive/', bpws:getVariableData('inputFile')'))

  • Ora:processXSLT xpath function and absolute paths

    It looks like ora:processXSLT xpath function does not honor absolute paths when specifying the location of the xslt to use in the first parameter. For example, if I call it like this:
    <copy>
    <from expression="ora:processXSLT('/u01/transforms/mytransform.xsl',bpws:getVariableData('xslInput','payload'))"/>
    <to variable="xslOutput"/>
    </copy>
    I get the following error in the bpel logs:
    Error while processing xpath expression, the expression is "ora:processXSLT('/u01/transforms/mytransform.xsl', bpws:getVariableData("xslInput", "payload"))", the reason is javax.xml.transform.TransformerException: java.io.FileNotFoundException: /u01/oracle/bpel/integration/orabpel/domains/test/tmp/.bpel_transformTest_1.0.jar/u01/transforms/mytransform.xsl (No such file or directory).
    Please verify the xpath query.
    It is assuming that the xsl will be relative to the bpel suitcase and just appending the supplied path to the relative path for the bpel process. Why would I want to do this? Well, I have hundreds of these maps and I want to be able to select one at runtime. I'm also adding new ones every day and I don't want to have to redeploy the process that uses them each time I add a new map. Is there any way to force this process to recognize the absolute path? I can work around it for now by using a bunch of ../../../../ stuff but that's a kludge and I'd like to find a better way to do it.
    I get the same error with xdk:processXSLT.
    Any suggestions?
    Thanks!
    Sean

    Hi Sean,
    Did you try to the file path with the file:// prefix and not just the path?
    ~ronen

Maybe you are looking for

  • Dreamweaver CS5 inserts unexpected Diamond character

    When I Alt-tab from a Dreamweaver CS5 webpage to switch to another application (in Windows 7), occasionally an unexpected character is inserted in the HTML page.  It has source code ♦ and appears as the diamond character.  I can't understand why this

  • New white paper: Character Set Migration Best Practices

    This paper can be found on the Globalization Home Page at: http://technet.oracle.com/tech/globalization/pdf/mwp.pdf This paper outlines the best practices for database character set migration that has been utilized on behalf of hundreds of customers

  • Would like to buy and share a unlimited world subs...

    I would like to get a unlimited world subscription to share with my husband when he deploys and to call my family back in the states. My question is could my husband use the same subscription or do we have to buy 2 unlimited world? If I call my famil

  • USB data recovery

    After my iMAC's software was updated, my USB flash drive is no longer working. What can I do? Disk Utility, Nope. So, what is the best data recovery software out there for USB drives?

  • How to open several regions at once??

    Surely there must be a way to edit the contents of one region while refering to the contents of another, but I can't find a way to open more than one region at a time. I talking about editing in the matrix window, BTW. Can anyone help?? Many thanks i