Strange behaviour using XPath functions

Hi guis,
I have next simple code:
DECLARE
v_xmltype XMLTYPE;
l_xml LONG := '<?xml version="1.0" encoding="UTF-8"?>
<document xmlns="http://www.sepbulgaria.com/services/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sepbulgaria.com/services/ myschema.xsd ">
<person>
<name>Joe</name>
</person>
<person>
<name>Smith</name>
</person>
<person>
<name>Peter</name>
</person>
</document>';
BEGIN
v_xmltype := xmltype(l_xml);
FOR rec IN (SELECT t.COLUMN_VALUE.extract('/person/name/text()').getStringVal() name
FROM TABLE(xmlsequence(v_xmltype.extract('document/person'))) t) LOOP
dbms_output.put_line('name = ' || rec.name);
END LOOP;
END;
The purpose is to iterate over person elements and to read the value of name element for each. But this does not iterate in this variant. When I remove the attribute xmlns="http://www.sepbulgaria.com/services/" from the document element, it works.
I wonder what I'm doing wrong!
Thank you in advance!
G.Cholakov

Don't forget namespaces.
SQL> DECLARE
  2  v_xmltype XMLTYPE;
  3  l_xml LONG := '<?xml version="1.0" encoding="UTF-8"?>
  4  <document xmlns="http://www.sepbulgaria.com/services/"
  5  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  6  xsi:schemaLocation="http://www.sepbulgaria.com/services/ myschema.xsd ">
  7  <person>
  8  <name>Joe</name>
  9  </person>
10  <person>
11  <name>Smith</name>
12  </person>
13  <person>
14  <name>Peter</name>
15  </person>
16  </document>';
17  BEGIN
18  v_xmltype := xmltype(l_xml);
19
20  FOR rec IN (SELECT t.COLUMN_VALUE.extract('/person/name/text()','xmlns="http://www.sepbulgaria.com/services/"').getStringVal() name
21  FROM TABLE(xmlsequence(v_xmltype.extract('document/person','xmlns="http://www.sepbulgaria.com/services/"'))) t) LOOP
22  dbms_output.put_line('name = ' || rec.name);
23  END LOOP;
24
25  END;
26  /
name = Joe
name = Smith
name = PeterBTW, why are you doing in plsql what can easily be accomplished in sql?
Best regards
Maxim

Similar Messages

  • Can we achieve new line character(\n) using xpath function??

    All,
    I want to use new line character for some text formating. Does xpath function supports new line character? If so, which function to use? If not, what is the alternative I can use to achive this?
    Rgds
    sen

    Hi Shine SS,
    Had same requirement and your solution worked.
    Thanks.

  • How to use xpath function to select some particular  nodes

    Dear experts:
    does abap supports  xpath  to sellect particular  nodes  according some node value or condition, i know other  programe language  supports the function selectNode(xpath expression)  , does abap or have the api to support it?
    and i know there is a class support  the xpath but it's not work., the class this:cl_xslt_processor
    to clarify my point. i take a ex.
    the xml doc is follow:
    <?xml version="1.0" encoding="utf-8" ?>
    - <n0:MT_CRM_Req xmlns:n0="http://gome.com/CRM/CRM/Outbound" xmlns:prx="urn:sap.com:proxy:DC0:/1SAI/TAS05C79364B9D0DC5F6738:701:2010/02/19">
    <company name="hp">
    <dep name="gds">
    <empolyeeid>123</empolyeeid>
    </dep>
    <dep name="its">
    <empolyeeid>148</empolyeeid>
    </dep>
    </company>
    <company name="foxconn">
    <dep name="fih">
    <empolyeeid>569</empolyeeid>
    </dep>
    </company>
      </n0:MT_CRM_Req>
    i  want to  select the employee 's company name who empolyee id is 123
    i use the method  ,and the code is :
    l_xslt->set_expression(
    expression = '/n0:MT_CRM_Req/n0:company[n0:dep/n0:empolyeeid=123]'
    nsdeclarations = 'n0 http://gome.com/CRM/CRM/Outbound'
    l_xslt->run('').
    nodes = l_xslt->get_nodes( ).
    LEN = nodes->GET_LENGTH( ) .
    WRITE LEN.
    but no nodes return.
    is anybody knows what's wrong with it? or there is some other api to manipulate the xml dom.
    best regrds!

    Hello Kevin ,
    i think you can get those details , have a look at program BCCIIXMLT1, i think this program will give you some idea to handle * manage xml docs.
    along with that program ...you need to put filter
    *---creating filers.
      filter   = document->create_filter_name( name = 'Company' ).
      iterator = document->create_iterator_filtered( filter ).
      main_node =  document.
    *---processing document.
      perform print_node using main_node p_flag.
    let me know if you need anymore help.
    regards
    Prabhu

  • Anyone else experiencing strange behaviour using the App Store/iTunes

    I'm having a strange problem with both iTunes and the App Store apps.  Searching for items is hit or miss, sometimes no results are returned or tiles are missing their pics etc.  Clicking on a item of interest like a TV show, for example, brings up the details page but sometimes the individual episodes descriptions/pics won't load. 
    The first time I used the new App Store it was showing me GBP currency instead of CDN.  I checked my settings and my location was set as Canada, so it definitely wasn't a settings issue on my end.  Killing the app and going back in seemed to fix the problem. 
    I was just browsing some new games when I ran into another problem, prompting me to post here.  I clicked on a game's icon/tile to access the details page, but nothing happened.  Clicked it again thinking it was me and this time the tile showed as depressed but nothing happened.  Clicked another tile and it depressed as well (and the first tile stayed in that state too) but the details page didn't load. 
    I definitely think there are a few bugs in the new App Store/iTunes apps.  Very annoying as there are a few purchases that I'd like to make but can't.  Argh.
    This all started after upgrading to iOS 6, which has otherwise been fine so far.
    Anyone else having similar problems?

    YES! I am having a lot of AppStore problems since iOS 6. My 2 main issues are:
    1. AppStore crashes constantly or will just sit &amp; spin then does nothing at all.
    2. If I search for a specific App, making sure my spelling is correct, AppStore will NOT bring the app up. Instead, it will bring up unrelated apps.
    Podcasts app does the same thing, as well as jumbling up dates. Very impossible to find the correct episode.
    APPLE, please tell me you are reading this and that a fix is quickly under way!!

  • Strange behaviour using the "Save Region(s) As..."

    I'm encountering some apparently repeatable oddities when using the "Save Region(s) As..." command.
    I take one long track, snip it up into smaller regions (say, 20) and then in the Audio Window menu, select all the regions and use "Save Region(s) As..." from the Audio File menu.
    What happens is that the FIRST time I try this Logic only saves EVERY FOURTH REGION as a new audio file, ie if I had 20 regions selected I'll only get 5 new audio files!
    If I select all the regions and try it again, Logic now saves all the regions correctly and in order.
    (File conversion settings all are set to "Preserve Original" "No Change".)
    Anyone else?
    12 PB 1.33Mhz, 1.25GB RAM   Mac OS X (10.4.7)  

    correction:
    this only happens when i delete the first region, then save the remainder. to clarify:
    load audio file. there's one region showing, which consists of the entire audio file. go make 16 new regions, so you've got 17 total. delete the first one, which is the full length of the file. now you've got 16. select all 16 by click-dragging down the side of the audio window so all 16 are selected. "save regions as..." saves only regions 2-16.
    when i don't do that initial delete of the full-length region, all regions are saved properly.

  • Strange behaviour using queue

    I wrote a program (LV 7.0) using a queued state machine. To identify the states i use a strict type def. The dequeue timeout is set to -1, queue-size unlimited.
    In a separate while-loop a boolean input is checked. If the input is set true, an event is generated. This event is caught by the event-structure (placed in another while-loop) that enqueues the specific element. Afterwards the element is dequeued and the specified case in the main while-loop executes.
    The program was built to an application which runs under winXP.
    This application now worked for about 3 months without any problem. Since a few days, a delay (about 30sec.) occurs without any reason. The program works eg. for 2 hours and suddenly it delays. First i thought
    it was a problem in communication (rs232), but it wasn't. Using some logging entries i saw that the event mentioned is caught correctly and the necessary element must be enqueued, but it takes some seconds to dequeue the element.
    How could that be and what can i do to make the program work correctly again?
    Using LV8.0
    Don't be afraid to rate a good answer...

    Hi
    I developed the program on a P4, 2.8GHz, 1GB Ram and the executable is now running on a P4, 2.5GHz, 512MB Ram, both running with WinXP.
    I include you some pictures out of my source. CatchEvent and MainLoop are in the same vi. In CatchEvent you can see, that a enqueue a constant ("Steindaten lesen") which is enqueued in MainLoop (also you can see that I enqueue two more elements in "Steindaten lesen" case).
    The third picture shows you how the event is generated. This is a separate vi, running parallel to the main loop. I poll for a digital input (on a FieldPoint-bank) - if it is set I fire the event "Evt_StartPrüfung" (the other cases in this pictures diagram are empty).
    As you can see in CatchEvent.jpg and MainLoop.jpg I added Log-Statements in my sourcecode. The time mentioned in my previous post can be taken out of the logfile, according to the entries with INFO-Level from CatchEvent and MainLoop (which also means enqueuing frame and dequeuing frame).
    You can also see that my main loop has a time delay of 50ms, which should be quiet enough. If I would fill the queue excessive or use to much memory, the timedelay between enqueue and dequeue should occur more often than it actually does and I also think it should occure more regularly (on 14th it occured 25x, on 15th 8 time and on 17th >50 times). The queue is flushed every hour - so I think there are not to many elements in it.
    By the way - the program controls a tool-performance test on a assembly-line, where approximatly every minute another tool is tested.
    Thanks in advance for any help.
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...
    Attachments:
    Pictures.zip ‏149 KB

  • Strange behaviour in SOAP connection mode

    Hello,
    I created a custom worklist app using SOAP connetion mode and I experiencing strange behaviour using it.
    Sometimes it works and sometimes not. The only difference beetwen the two working config is nearly nothing. Just server restart are performed to make it work or not. No config files or applications deployement are done between two restart.
    So It's lotery to get it work.
    When it doesn't work, I have the following error messaging (see below)
    Does anyone have a clue to get it work each time ?
    Regards.
    ORABPEL-30509
    Error in invoking task query service.
    A client side error occured in invoking the task query service.
    Please check the exception error stack to identify the error. Contact oracle support if error is not fixable.
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:183)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.authenticate(TaskQueryServiceSOAPClient.java:200)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:93)
         at eu.eca.itt.eworkflow2.controller.action.TaskListAction.process(Unknown Source)
         at eu.eca.itt.eworkflow2.controller.action.TaskListAction.execute(Unknown Source)
         at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
         at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter$1.run(JAZNFilter.java:396)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:410)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.xml.soap.SOAPException: Unable to create SOAP connection factory: Provider com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory not found
         at javax.xml.soap.SOAPConnectionFactory.newInstance(SOAPConnectionFactory.java:32)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:131)
         ... 29 more

    I also tried to change connection setting with
    System.setProperty("javax.xml.soap.SOAPFactory", "com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl");
    System.setProperty("javax.xml.soap.SOAPConnectionFactory", "com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory");
    I get it work for ....... a day (or a restart I suppose) reverting back to initial settings to make it work again.
    Does It mean SOAPConnectionFactories gets corrupted upon restart once I used them ?
    Is a Service Request a good idea ?
    Regards.

  • Queue with callback function - strange behaviour when using max_retries

    Hi,
    I hope someone can tell me what is wrong or can explain the following strange behaviour to me.
    I am using one queue with a registered callback function. To test the behavoiur in case of an error I tested different settings, with or without explicit exception queue and with or without parameter max_retries.
    Database Version is 11.2.0.2.   Enterprise Edition
    I enqueue 10 messages in a loop.
    I define no exception queue and do not set max_retries
    ==> all messages stay in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 5
    I define no exception queue and set max_retries = 4
    ==> 1 message stays in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 4
           9 messages stay in the queuetable with q_name = nomal queue name and retry_count = 0
    I define an exception queue and set max_retries = 4
    ==> 1 message is transfered to the Exception Queuetable with retry_count = 4
           9 messages stay in the normal Queuetable and retry_count = 0
    I define an exception queue and do not set max_retries
    ==> all 10 messages are transferred to the Exception Queuetable with retry_count = 5
    I have no explanation for the behaviour in case 2 and case 3.
    To create the queue and the callback I use this code (reduced to minimum):
    begin
       DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE'
                              , queue_table => 'TESTUSER.TEST_TABELLE'
    --                          , max_retries => 4                     uncomment this line to set max_retries
    -- uncomment the following Block to use an explicit Exception Queue
    /*   DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE_EXC'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE_EXC'
                              , queue_table => 'TESTUSER.TEST_TABELLE_EXC'
                              , queue_type  => dbms_aqadm.EXCEPTION_QUEUE);
       DBMS_AQADM.START_QUEUE('TESTUSER.TEST_QUEUE');
    end;
    create or replace procedure test_procedure
      (context  RAW
      ,reginfo  sys.AQ$_reg_info
      ,descr    sys.AQ$_descriptor
      ,payload  VARCHAR2
      ,payloadl NUMBER
      ) authid definer
      IS
      -- für Queue
      dequeue_options   DBMS_AQ.dequeue_options_t;
      message_prop      DBMS_AQ.message_properties_t;
      message_hdl       raw(16);
      message           sys.aq$_jms_text_message;
      l_daten           VARCHAR2(32767);
      ex_hugo          EXCEPTION;
      BEGIN
        dequeue_options.msgid         := descr.msg_id;
        dequeue_options.consumer_name := descr.consumer_name;
        dbms_aq.dequeue(descr.queue_name, dequeue_options, message_prop, message, message_hdl);
        -- to provoke an error
        RAISE ex_hugo;
        -- regurlar coding
        commit;
    exception
      when others then
           rollback;
           RAISE;
    end;
    DECLARE
       reginfo1    sys.aq$_reg_info;
       reginfolist sys.aq$_reg_info_list;
    BEGIN
       reginfo1 := sys.aq$_reg_info('TESTUSER.TEST_QUEUE', DBMS_AQ.NAMESPACE_AQ, 'plsql://TESTUSER.TEST_PROCEDURE?PR=0',HEXTORAW('FF'));
       reginfolist := sys.aq$_reg_info_list(reginfo1);
       sys.dbms_aq.register(reginfolist, 1);
       commit;
    END;
    to enqueue my messages i use:
    DECLARE
      message            sys.aq$_jms_text_message;
      enqueue_options    dbms_aq.enqueue_options_t;
      message_properties dbms_aq.message_properties_t;
      msgid              raw(16);
      v_daten            clob;
    BEGIN
       message := sys.aq$_jms_text_message.construct;
       for i in 1..10
       loop
          v_daten := '{ dummy_text }';
          message.set_text(v_daten);
    -- uncomment the following line to use an explicit Exception Queue     
    --      message_properties.exception_queue := 'TESTUSER.TEST_QUEUE_EXC'; 
          dbms_aq.enqueue(queue_name         => 'TESTUSER.TEST_QUEUE',
                          enqueue_options    => enqueue_options,
                          message_properties => message_properties,
                          payload            => message,
                          msgid              => msgid);
          message.clear_properties();
       end loop;
       commit;
    END;

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

  • Strange behaviour when using connection pooling with proxy authentication

    All
    I have developed an ASP.NET 1.1 Web application that uses ODP.NET 9.2.0.4 accessing Oracle Database 8i (which is to be upgraded to 10g in the coming months). I have enabled connection pooling and implemented proxy authentication.
    I am observing a strange behaviour in the live environment. If two users (User 1 and User 2) are executing SQL statements at the same time (concurrent threads in IIS), the following is occurring:
    * User 1 opens a new connection, executes a SELECT statement, and closes this connection. The audit log, which uses the USER function, shows User 1 executed this statement.
    * User 2 opens the same connection (before it is released to the connection pool?), excutes an INSERT statement, and closes this connection. The audit log shows User 1, not User 2, executed this statement.
    Is this a known issue when using connection pooling with proxy authentication? I appreciate your help.
    Regards,
    Chris

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

  • OSB11g - using Concatenation function in report key - Xpath

    Hi,
    I am trying to use Concatenation function on Report key Xpath. For that i am using Following Xpath Expressions But this expressions not valid when trying to validate. But same expressions are valid under different scenarios in OSB.
    1.fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
    error msg(when validate):_
    error: XPath expression invalid, not a selection: declare namespace jca = 'http://www.bea.
    com/wli/sb/transports/jca'; declare namespace wsp = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
    declare namespace jms = 'http://www.bea.com/wli/sb/transports/jms'; declare namespace tp = 'http:
    //www.bea.com/wli/sb/transports'; declare namespace wsa05 = 'http://www.w3.
    org/2005/08/addressing'; declare namespace jejb = 'http://www.bea.com/wli/sb/transports/jejb';
    declare namespace xs = 'http://www.w3.org/2001/XMLSchema'; declare namespace sftp = 'http://www.
    bea.com/wli/sb/transports/sftp'; declare namespace flow = 'http://www.bea.com/alsb/flow/transport';
    declare namespace soap-env = 'http://schemas.xmlsoap.org/soap/envelope/'; declare namespace wsu
    = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'; declare
    namespace dsp = 'http://www.bea.com/dsp/transport/sb'; declare namespace ejb = 'http://www.bea.
    com/wli/sb/transports/ejb'; declare namespace bpel = 'http://xmlns.oracle.
    com/Bpel_Actvities/Assign_Activity/BPELProcess'; declare namespace wsa = 'http://schemas.xmlsoap.
    org/ws/2004/08/addressing'; declare namespace bpel-10g = 'http://www.bea.
    com/wli/sb/transports/bpel10g'; declare namespace tuxedo = 'http://www.bea.
    com/wli/sb/transports/tuxedo'; declare namespace file = 'http://www.bea.com/wli/sb/transports/file';
    declare namespace ctx = 'http://www.bea.com/wli/sb/context'; declare namespace fn = 'http://www.w3.
    org/2004/07/xpath-functions'; declare namespace soap12-enc = 'http://www.w3.org/2003/05/soap-
    encoding'; declare namespace soap12-env = 'http://www.w3.org/2003/05/soap-envelope'; declare
    namespace fn-bea = 'http://www.bea.com/xquery/xquery-functions'; declare namespace mq = 'http:
    //www.bea.com/wli/sb/transports/mq'; declare namespace ws = 'http://www.bea.
    com/wli/sb/transports/ws'; declare namespace http = 'http://www.bea.com/wli/sb/transports/http';
    declare namespace soa-direct = 'http://www.bea.com/wli/sb/transports/soa'; declare namespace email
    = 'http://www.bea.com/wli/sb/transports/email'; declare namespace sb = 'http://www.bea.
    com/wli/sb/transports/sb'; declare namespace ftp = 'http://www.bea.com/wli/sb/transports/ftp';
    declare namespace xsd = 'http://www.w3.org/2001/XMLSchema'; declare namespace soap-enc = 'http:
    //schemas.xmlsoap.org/soap/encoding/'; declare namespace xsi = 'http://www.w3.
    org/2001/XMLSchema-instance'; fn:concat(./bpel:process/bpel:input, ./bpel:process/bpel:input)
    2. op:concatenate(./bpel:process/bpel:input, ./bpel:process/bpel:input)
    While using this Xpath expression validation is sucessfull but concatenation operation is not working when checked in the message reports under operations tab.
    Can any one help me on this.
    Thanks in advance.

    can you try assign concatenated value to some xml element first, like
    assign : <value>{fn:concat(a,b)}</value> to e.g. value
    and then report key ./text() in variable $value
    Edited by: AigarsP on Jun 12, 2012 4:12 AM

  • 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

  • NVL function's strange behaviour

    Hi,
    I have a sql statement (listed below) that uses NVL function which returns either the business name of branch name depending on whether the business name is null or not. It also uses the branch_name pl/sql function that returns the name of the branch.
    What I found strange was that it executes the branch_name function even when the business_name is not null. It was my understanding that nvl returns expr1 if it's not null, and expr2 if expr1 is null. I don't want it to execute the branch_name function if business_name exists. Is it possible using NVL, or do I need to use DECODE to achieve that? p_record_id is a parameter that I pass to the function containing the sql statement e.g., p_record_id=10.
    SELECT nvl( business_name, branch_name( p_record_id) ) "Name"
    FROM entity
    WHERE record_id = p_record_id;
    Thanks
    Vic

    Marc,
    Thanks for looking into it.
    I just ran the code using DECODE and it seems that it executes the function only when the condition is true, which is exactly what I want. It won't execute the function if the condition is false, e.g., in the code below if the business_name is null then it executes the branch_name function, other wise it returns the business_name.
    SELECT DECODE ( business_name,
    null, branch_name( p_record_id ),
    business_name ) "Name"
    FROM entity
    WHERE record_id = p_record_id;
    Vic

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

  • Strange Behaviour: Inserting Rows with OrdVideoDomain using JDeveloper

    Dear Sirs...
    i created two tables each containing OrdVideoDomainField.
    i use the same function to fill the rows with values. the code is like this:
    ViewObject V=GetViewObject(V);
    Row R=V.CreateRow();
    byte b[]=new byte[10];
    OrdVideoDomain O=new OrdVideoDomain(b);
    R.setAttribute("f",O);
    R.setAttribute("name",AnyName);
    V.insertRow(R);
    R=null;
    GetTransaction.postChanges(); // gets the appmodule and then gets the transaction object within and finally posting the change
    GetTransaction.commit();
    When i use the function of the viewobject A, all the data is stored correctly when dealing with table A. But when dealing with table B, all the data are stored correctly but the OrdVideoDomain field is filled with null. i get no error at all.
    i checked the names of the fields in the tables, and they are correct.
    i tried to upload files into both tables and these are working perfectly fine.
    i tried to get the data from both tables and they are working perfectly fine.
    the problem is only when i store data programatically into the table b.
    does any one have a similar problem?
    how to solve it?
    i am using ADF UIX in jdeveloper 10g 10.1.2 with oracle database 10g release 2 and both are under windows.
    thanks for any help in advance
    best regards

    Sorry, i have found the problem, it is a programming error
    best regards

  • Strange behaviour of function

    Hai ,
    initially i'm creating multithread. then i'm deleting all the threads using one function named deleteAllThreads().
    after few seconds again i'm creating multi-thread ,
    these threads are deleted by that deleteAllThreads() function without calling anywhere in my application.
    i declared the function definition as
    public function deleteAllThreads(){
      for(cnt in [0..threads ){
       var thread:MyThread = threads[cnt];
       if( thread.isAlive ){
        thread.stop();
        delete thread from threads;
    }so anyone help me in this issue.
    Thanks ,
    Mani

    Calling threads from JavaFX is not advised. JavaFX is a single threaded language. I suggest you create a Java utility class which will do the threading and callbacks for you.

Maybe you are looking for