Help on xp20:matches xpath function

I have this xpath expression:
xp20:matches(bpws:getVariableData('inputVariable','payload','/ns2:SmsInboxCollection/ns2:SmsInbox/ns2:message'),'\d+ \d+')"
I always get this error (in BPEL's domain.log file):
the reason is FOTY0001: type error. Please verify the xpath query.
I am quite sure that "bpws:getVariableData('inputVariable','payload','/ns2:SmsInboxCollection/ns2:SmsInbox/ns2:message')" is a string based on the XSD.
but a simple use of xp20:matches such as xp20:matches('123 123', '\d+ \d+') works fine!
Can anyone let me know what I am missing?
Mark

Hi Mark,
I have had the same problem with another xp20 function. My workaround was to store bpws expresion into an intermediate string variable and apply xp20 on it.
Regars,
amo

Similar Messages

  • Usage of the xp20:matches() - String  function -reg

    Hi,
    Our current requirement is that if we receive the message that matches the pattern (Ie input starting with A to L) both inclusive(for eg : A123 , B567,... ,L890),we need to perform some routing in the mediator depending upon the message. I have tried to make use of the xp20:matches() function for checking the input, as per the dev guide.
    Sample code used in filter expression in mediator:
    <condition language="xpath">
    <expression>xpath20:matches($in.request/cb1:singleString/cb1:input,'^[A-L]*$')</expression>
    </condition>
    Is there anything wrong in the usage of the matches function, as there seems to be some issues in the filter expression.
    All the other logical functions and Startswith function seems to work well.
    Any pointers would help.
    Thanks
    Swathy

    Hi there,
    If you want to match any word which starts with A-L character then use ^[A-L]
    If you want to have exactly three numbers after first character (and nothing more) use ^[A-L][0-9]{3}$
    Regards,
    Milan
    Edited by: 849823 on Apr 5, 2011 12:59 AM

  • Match hex 00 or NULL with Match pattern function

    Hi, I am using Match pattern funciton to match NULL character and 0000 character in a string (hex display).
    Someone told mu use the following regular expression:
    ^[\00]*, and [\00]*$ , and he said:
                    \00 is Hex 00
                    \0 un-defined
    But I read some stuffs about regular  expression that \0x00 is Hex 00, \00 is Octal 000.I want to know what meaning the \00 is.
    Please refer to the attached trim00.vi.
    Solved!
    Go to Solution.
    Attachments:
    trim00.vi ‏7 KB
    trim00.vi ‏7 KB

    Match Pattern and Match Regular Expression are two different functions. With Match Pattern the string ^[\00]* matches any number of null characters starting at the beginning of the string, while the string [\00]*$ matches any number of null characters starting at the end of the string. Check the help for the Match Pattern function for more info.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How do I use the Match Pattern Function to exclude only 0.000?

    Hi,
    I'm trying to use the mattch pattern function to find the first string in a table thats is >0. My table looks like:
    1,0.000000,0.000 %2007/01/13 00:16:19 196281
    1,0.000000,0.000 %2007/01/13 00:16:22 196282
    1,0.831262,0.000 %2007/01/13 00:17:20 196375
    2,0.811154,0.000 %2007/01/13 00:17:20 196375
    If I us the paremeter "1,[~0]" It doesn't find the line 1,0.831262,0.000... which is the one that I want. I also tried :1,[0-9].+[~0] and that didn't work either. the problem is that the first digit after to 1, isn't allways going to go from 0 to 0.0 sometimes it might go from 0 to 2.??.
    Thanks for the help
    Matt

    "Matt361" <[email protected]> wrote in message news:[email protected]..
    Hi,
    &nbsp;
    I'm trying to use the mattch pattern function to find the first string in a table thats is &gt;0. My table looks like:
    1,0.000000,0.000 %2007/01/13 00:16:19 196281
    1,0.000000,0.000 %2007/01/13 00:16:22 196282
    1,0.831262,0.000 %2007/01/13 00:17:20 196375
    2,0.811154,0.000 %2007/01/13 00:17:20 196375
    If I us the paremeter "1,[~0]" It doesn't find the line 1,0.831262,0.000... which is the one that I want. I also tried :1,[0-9].+[~0] and that didn't work either. the problem is that the first digit after to 1, isn't allways going to go from 0 to 0.0 sometimes it might go from 0 to 2.??.
    &nbsp;
    Thanks for the help
    Matt
    &nbsp;
    Hi,
    1,[~0] matches a "1" a "," and then any character that is not "0".
    1,[0-9].+[~0] matches a "1" a "," and then any character that is "0-9", any number of anything!! (1 or more) and then anything that is not "0". Note that you have to escape a . to match a ".". Like this "\.".
    There is no way to check if there is anything other then a "0" in the match, from within the match pattern function. So I think you won't be able to find a pattern that does the trick.
    Why not use a whileloop to find the first item? Or use the Spreadsheet String To Array, and then compare the desired row or column with the string "0.000000"? (Or replace all ,0.000000, by a string like ",NULL,", then match the pattern?)
    In LabVIEW 8 there is a new Match Regular Expression function. Haven't tried it, but it should be much more powerfull then the Match Pattern function. But also much more complex.
    Regards,
    Wiebe.

  • 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?

  • Xref:populateXRefRow xpath function.

    Hi All,
    I am facing an issue with xref:populateXRefRow xpath function.
    Requirement:
    To populate the value obtained from Siebel & an autogenerated common value into cross reference table.
    Steps Performed:
    1.Cross reference table (addressed_sbl_ucm) created in xreftool shell.
    2.Run a SQL script on SQLPLUS to create XREF_DATA table in SQL.
    3.In ASSIGN activity, written the below code and assigned it to a string variable.
    xref:populateXRefRow(
    'ADDRESSID_SBL_UCM',
    'SBL_ADDID',
    string(bpws:getVariableData('inputVariable','payload','/ns1:UCMContactExtrnIO/ns1:Contact_INSPersonalAddress/ns1:INSPersonalAddressId')),
    'COMMON_ADDRESSID',
    ora:generateGUID(),
    'ADD')
    4.Deployed the process on server.
    5.Instantiated the process on the BPEL console.
    While instantiating the process on the console we are getting the error shown below:
    Your test request was processed synchronously. It took 63.0milliseconds to finish and generated the following output:
    Value:     
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-09500 XPath expression failed to execute. Error while processing xpath expression, the expression is "xref:populateXRefRow('ADDRESSID_SBL_UCM','SBL_ADDID',
    string(bpws:getVariableData('inputVariable','payload','/ns1:UCMContactExtrnIO/ns1:Contact_INSPersonalAddress/ns1:INSPersonalAddressId')),
    'COMMON_ADDRESSID',ora:generateGUID(),
    'ADD')",
    the reason is FOTY0001: type error.
    Please verify the xpath query.
    </faultstring>
    </Fault>
    Any pointers to this will be of great help.
    Thanks & Regards,
    Shanty
    P.S. : If possible please provide me link to the documentation & tutorials on cross reference table.

    According to the docs:
    http://download.oracle.com/docs/cd/E11036_01/doc.1013/e10295/esb_xref.htm
    This function is available in Oracle ESB? Are you using that or are you using BPEL? If you are using Oracle AIA, this function is available in BPEL.
    Regards,
    Marc
    http://orasoa.blogspot.com

  • Custom XPath Function not working - ORABPEL-09503 error

    I wrote a simple date conversion custom xpath function.
    1. Implemented IXPathFunction as mentioned in Clemens and Antony Reynolds blog.
    2. Also changed the xpath-functions.xml kept at C:\product\10.1.3.1\OracleAS_1\bpel\system\config\xpath-functions.xml and also at C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\config\xpath-functions.xml (Not sure why this xml is in two places)
    3. Placed my class file at C:\product\10.1.3.1\OracleAS_1\bpel\system\classes and also made a jar and placed in C:\product\10.1.3.1\OracleAS_1\j2ee\home\applib.
    But when I run the process which uses this custom function, it is throwing the following error
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-09503 Invalid xpath expression. Error while parsing xpath expression "o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');", the reason is Error in expression: 'o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');'.. Please verify the xpath query "o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');" which is defined in BPEL process. </faultstring>
    </Fault>
    Can somebody help me to resolve this.

    My bad. I had a semi-colon after the expression. Now I am getting a different error
    <Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>env:Server</faultcode>
    <faultstring>ORABPEL-09500 XPath expression failed to execute. Error while processing xpath expression, the expression is "o2c:formatDateString('10/30/2007', 'MM/DD/YYYY', 'YYYY-MM-DD')", the reason is FOTY0001: type error. Please verify the xpath query. </faultstring>
    </Fault>

  • Error using custom xpath function with XSL transformations in BPM

    Hi,
    We have created a custom xpath function for use with SOA Suite and BPM. This has been built as per specified within the http://docs.oracle.com/cd/E29597_01/dev.1111/e10224/bp_appx_functs.htm#SOASE11100. We have also reviewed the Oracle Sample for mapper-107-ExtensionFunctions (sample demonstrates the use of user-defined extension functions). This has been registered with jDeveloper and SOA within the oracle.soa.ext_11.1.1 (run ant to include in oracle.soa.ext.jar)
    We ideally want to use this is BPM within an xsl. However when consuming this function is either BPEL or BPM using an xsl, the xsl fails with an error such as:
    XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("xsl/Transformation_1.xsl", $inputVariable.payload). The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/default/gwCustomXpathUtil_rev1.0/xsl/Transformation_1.xsl<Line 9, Column 113>: XML-22043: (Error) Extension function error: Method not found 'getWeekDayDate'. Check the detailed root cause described in the exception message text and verify that the XPath query is correct.
    In an Assign it operates fine and returns the expected result. We have included a combination of both of the Config files (ext-mapper-xpath-functions-config.xml and ext-soa-xpath-functions-config.xml) in the META-INF folder, however neither allow the use of this function in the XSL.
    I believe there may be an issue getting the custom xpath functions within XSL files. Hence I have also raised an SR. Has anyone experiences of this?
    Our SOA / BPM suite environment is using 11.1.1.6.4 and has the following patches applied:
    13801175
    14406487 (11.1.1.6.4 SOA Bundle)
    13896993
    13088538
    Regards Dave
    Edited by: DavidGaskell on Mar 14, 2013 10:08 PM

    Hi All,
    I am also facing the same issue...Experts can you please help us.
    hi DavidGaskell, did you find any resolution, if so can you share it with me.....
    Thanks,
    RR

  • Search xpath function in BPEL

    Hi Guys!
    Does anyone has any working examples of BPEL process using Search xpath function?
    Please share
    Any help appreciated!

    Can't find any samples myself either, so the only pointer we/i have is the userguide...and i assume you already tried the example call they use in there (XPath Extension Functions - 11g Release 1 (11.1.1.6.3))
    have to test it myself too to find out how it works...

  • XPAth function for divide

    Hi ,
    Can any one explain xpath funtion for divide.
    I am using this but it is showing error message unresolved xpath function.
    divide(bpws:getVariableData('Invoke_1_ReadFromFTable_OutputVariable','ReadFromFTableOutputCollection','/ns13:ReadFromFTableOutputCollection/ns13:ReadFromFTableOutput/ns13:sduprc'),100)
    this is the one i am using
    Please help me
    Regards
    jj
    Edited by: user10374148 on Oct 15, 2008 7:28 AM

    The correct way to use the divide function is :-
    bpws:getVariableData('Invoke_1_ReadFromFTable_OutputVariable','ReadFromFTableOutputCollection','/ns13:ReadFromFTableOutputCollection/ns13:ReadFromFTableOutput/ns13:sduprc') div 100
    --Sandeep                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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.

  • Xp20:current-dateTime() function returning time 1 hour ahead

    Do anyone know if the xp20:current-dateTime() function is incorrect? It is returning time 1 hour ahead, for example: when executed and put into a database, the column shows 2007-08-28 13:46:54.0, but the ESB flow was executed at about 12:46pm.
    Any help would be greatly appreciated.

    Check the timezone setting on your DB and the App server OS. They must be on different zones.
    --Shiv                                                                                                                                                                                                               

  • Help with Applescript: very basic functions

    Hi guys, my first post. I'd very much like to switch from Excel to Numbers but not until I find an Applescript replacement for my stuff.
    I wrote basic Excel Applescript just fine but I'm tearing my hair out just to perform simple scripts in Numbers!!!
    Basically I need to do:
    PART 1: Import External Data
    - I think I got this covered, using a GUI copy script via the "System Events" application
    - but since you guys are the experts: how do I make this process 'invisible'? i.e. each time the script runs, a Safari window appears. I don't want that to happen.
    tell application "Safari"
    activate
    open location "http://www.whatever.htm"
    end tell
    tell application "System Events"
    tell process "Safari"
    keystroke "a" using command down
    keystroke "c" using command down
    end tell
    end tell
    PART 2: Paste It Into Numbers
    - How hard can it be, right? Apparently I have the mental IQ of Gump I need Numbers to:
    - clear data from an existing pre-defined/named table
    - paste the data (from clipboard) onto this table (paste starting on cell A1), using the "Paste and Match Style" function
    - hide certain columns <-- I realize if Numbers paste onto a table with hidden columns, it treats them as non-existent i.e. won't paste the same. Therefore I suppose before the paste script I'd need an unhide script
    ... and that's it!!
    Help please I really hate Excel but can't move on till I figure this out... it's crucial to my livelihood.
    Thank you all in advance!

    There is no paste function in the Numbers AppleScript's dictionary.
    We may mimic it as I did during one year and a half with Numbers '08.
    Go to my iDisk:
    <http://idisk.me.com/koenigyvan-Public?view=web>
    open the folder "For_iWork:iWork '08:for_Numbers:"
    and download one of the items whose name starts with "paste".
    This use of GUI scripting is interesting because it creates automatically rows/columns when required.
    One draw back is the resulting font.
    Yvan KOENIG (from FRANCE samedi 17 janvier 2009 21:12:52)

  • 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>

Maybe you are looking for

  • WMI filter working for some Windows 7 machines but not for others

    I'm trying to use this WMI filter for our Windows 7 64bit machines: select * from Win32_OperatingSystem where (Caption like "Microsoft Windows 7%") or (Version like "6.1%" and ProductType = "1" and OSArchitecture = "64 ビット") or (OSArchitecture like "

  • Web Page composer : Localizing Web Sites

    Hi,            I have done a PoC on Localizing Web Sites in web page composer. As you may be aware localization comes with 2 variants. One is the language and the other is the "Region" variant.            I have created region variants in KM admin an

  • Issue with SOAP Header

    Hi All, I am beginner in SOA . Please excuse me if my phrasing is not quite right . Please do let me know if you require additional information to answer this question Jdev : 11.1.1.3.0 UseCase : Trying to learn SOA . In this regard, I created a SOA

  • Modbus%2C Despatch oven and Protocol 3

    I have a Despatch oven that is using Protocol 3 which communicates using Modbus over RS485.  I am using the Modbus library that I found though the forum and am still having troubles communicating with the controller.  I am using a USB RS485 converter

  • Address book in piserverdb tree

    Hello if my knowledge is correct, the address book is stored in the o=piservdb tree in the Directory server. but how is that data stored? because when I export an ldif of o=piservdb tree and i look for a certain user which i know has nearly 2000 cont