Embedded XQuery Expression in BPEL 2.0

The Oracle SOA Suite docs seem to indicate that embedded XQuery expressions can be used in a BPEL 2.0 component.
The docs here, that is: http://docs.oracle.com/cd/E21764_01/integration.1111/e10224/bp_manipdoc.htm#BABBHIEG
However, I can't seem to make this obscurely referenced piece of functionality work.
Has anybody used this before? If in-line XQuery is truly available, it would be very handy.
Edited by: user8641584 on May 24, 2012 8:02 PM
Added some tags

I read the blog post here
Embedding Java in BPEL process
Based on that I created this test class to help write code:
The bolded code is the snippet I actually want to implement when I can solve the problem above.
package com.f17.customfunction;
import com.collaxa.cube.engine.ext.bpel.v1.nodes.BPELXExecLet;
public class codeTyper extends BPELXExecLet {
    public codeTyper() {
        super();
    public void exec(){
     // below code gets pasted in here
String input = (String)getVariableData("testfile");
oracle.soa.common.util.Base64Decoder Decoder = new oracle.soa.common.util.Base64Decoder(); 
try { 
byte[] decodedByteArray = oracle.soa.common.util.Base64Decoder.decode(input.getBytes());
setVariableData("compANDstore_merge_InputVariable.AusCreditCollection/ns2:AusCredit/ns2:fileData,decodedByteArray",decodedByteArray);
} catch(Exception e) {
e.printStackTrace();

Similar Messages

  • How to optimize xquery expression ?

    hi,
    i got berkeley db xml database with containers: dicom.dbxml and instancemetadata.dbxml.
    dicom.dbxml contains documents as follow:
    <?xml version="1.0" encoding="UTF-8"?>
    <instance docid="dicom_1009">
         <dicom_item>
              <dicom_header>
                   <dicom_tag group="0002" element="0000" vr="UL">194</dicom_tag>
                   <dicom_tag group="0002" element="0001" vr="OB"/>
                   <dicom_tag group="0002" element="0002" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
                   <dicom_tag group="0002" element="0003" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
                   <dicom_tag group="0002" element="0010" vr="UI">1.2.840.10008.1.2.1</dicom_tag>
                   <dicom_tag group="0002" element="0012" vr="UI">2.16.840.1.113662.2.1.1</dicom_tag>
                   <dicom_tag group="0002" element="0016" vr="AE">PHOENIXSCP</dicom_tag>
              </dicom_header>
              <dicom_body>
                   <dicom_tag group="0008" element="0000" vr="UL">596</dicom_tag>
                   <dicom_tag group="0008" element="0005" vr="CS">ISO_IR 100</dicom_tag>
                   <dicom_tag group="0008" element="0008" vr="CS">ORIGINAL\PRIMARY\AXIAL</dicom_tag>
                   <dicom_tag group="0008" element="0012" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0013" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0016" vr="UI">1.2.840.10008.5.1.4.1.1.2</dicom_tag>
                   <dicom_tag group="0008" element="0018" vr="UI">2.16.840.1.113662.2.1.4519.41582.4105152.419990505.410523251</dicom_tag>
                   <dicom_tag group="0008" element="0020" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0021" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0022" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0023" vr="DA">1999.05.05</dicom_tag>
                   <dicom_tag group="0008" element="0030" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0031" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0032" vr="TM">10:52:34.530000</dicom_tag>
                   <dicom_tag group="0008" element="0033" vr="TM">10:52:32.510000</dicom_tag>
                   <dicom_tag group="0008" element="0060" vr="CS">CTTR</dicom_tag>
              </dicom_body>
         </dicom_item>
    </instance>
    instancemetadata.dbxml contains documents as follow:
    <?xml version="1.0" encoding="UTF-8"?>
    <instancemetadata xmlns="imuba.med" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="imuba.med Instancemetadata.xsd">
              <name/>
              <notes/>
              <id>instancemetadata_1</id>
              <instanceid>dicom_1</instanceid>
              <createusername>dd</createusername>
              <createdate>Tue May 02 21:08:06 CEST 2006</createdate>
              <lastmodusername>dd</lastmodusername>
              <lastmoddate>Tue May 02 21:08:06 CEST 2006</lastmoddate>
         </instancemetadata>
    and i got XQuery expression:
    declare namespace n = "imuba.med";
    declare variable $insCont external;
    for $ins in collection(concat(concat("dbxml:containers/", string($insCont)),".dbxml"))/instance,
         $met in collection("dbxml:containers/instancemetadata.dbxml")/n:instancemetadata
    where
    $ins/dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060'] = "CTTR" and
    $ins/@docid = $met/n:instanceid
    return
    <row>
    { $ins/@docid }
    { $met/n:name }
    { $met/n:notes }
    { $met/n:id }
    { $met/n:instanceid }
         { $met/n:createusername }
    { $met/n:createdate }
    { $met/n:lastmodusername }
    { $met/n:lastmoddate }
    </row>
    while i got 5000 documents in dicom container, the xquery execution time is close to 10 secs. i've tried to create indices using commands:
                        XmlIndexSpecification is = xcDicom.getIndexSpecification();
                        is.addIndex("", "docid", "unique-node-attribute-equality-string");
    and
                        XmlIndexSpecification iss = xcIns.getIndexSpecification();
                        iss.addIndex("imuba.med", "instanceid", "unique-node-element-equality-string");
    And then the execution time is nearly about 7-8 sec, but it's still big (the database contains only 5000 documents).
    Have you any idea how to optimize it ? I suppose the index on element i'm using in the WHERE clause would be helpful (dicom_item/dicom_body/dicom_tag[@group='0008' and @element='0060']). Well, i haven't found concept how to add index on element which can be shown using xpath expression.
    thanks for any help
    Darek

    Hi Darek,
    First off, why not try adding these indexes to see what happens:
    is.addIndex("", "dicom_tag", "node-element-equality-string");
    is.addIndex("", "group", "node-attribute-equality-string");
    is.addIndex("", "element", "node-attribute-equality-string");
    Secondly, what storage model are you using? I would expect you to get better query times using a NodeContainer, with the DBXML_INDEX_NODES flag enabled.
    Thirdly, your "instance" document is not very "XML" like, so you will struggle to get very good query times using that format. If you have control over the format of the document, I would suggest incorporating one or more of the "group", "element", and "vr" attributes into the name of the element - so that you will get multiple elements with different names, instead of one element name with multiple permutations of attributes. Selecting an element by name will always be faster than selecting it by some kind of value.
    Let me know how you get on with these suggestions,
    John

  • Eclipse XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.

    I created a wsdl based on a dbadapter in jdeveloper, imported into eclipse and created the biz and the proxy and uploaded to oracle service bus, it works fine,
    but happens now that i need to have a xsd and wsdl with business names and not table names, invented to create a xsd and wsdl file in jdeveloper
    and then went to eclipse and tried t xquery tranformation, but when i add the replace in the message flow in the filed in Variable : body and Expression i look for the xquery and in the binding trying to put
    $body/input parameter, get the following error [RouteNode1, Replace action] XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.
    what im doing wrong or its configuration
    thanks in advance sonia

    thanks
    ok have created a table with only in column varchar2(1)
    then the type object and the procedure to insert it works the proxy in the osb if i test it inserts
    now in jdeveloper i created an xml file with
    <?xml version="1.0" encoding="windows-1252" ?>
    <vessel>
    <barco>a</barco>
    </vessel>
    then i created a xsd based on this xml, and a wsdl based on the xsd
    in eclipse created a xquery transformation and selected source as the xsd created in adf and target the xsd input parameter, dont know why in the purple ball of the input parameter it puts a ?, an a f.
    then in the proxy xpath not writing anything in variable body and in the expression select the xquery and in binding select the parameter

  • Query regarding cron expression in BPEL

    Hi,
    I am using the quartz scheduler in BPEL and using the cron expression in bpel.xml
    but the problem I am facing is it is running for only one day it is not running for the next day
    the expression I am writting in bpel.xml is
    <activationAgents>
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="FileScBpel4" heartBeatInterval="10">
    <property name="schedulerCallout">DefaultSchedulerCalloutImpl</property>
    <property name="endpointScheduleOn">0 30 19 * * ?</property>
    <property name="endpointScheduleOff">0 31 19 * * ?</property>
    </activationAgent>
    </activationAgents>
    so if I deploy it in BPEL PM it will run for today at 19:30
    but when I am changing the system date to the next day and changing the time to 19:30 it is not running again
    can anybody plz help me out how can I schedule it for everyday 19:30

    Hi Sailo,
    If you use quartz as a servlet, you'll have to add the entry to you're web.xml, in addition to other servlets you create :
    <servlet>
    <servlet-name>QuartzInitializer</servlet-name>
    <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    <init-param>
    <param-name>config-file</param-name>
    <param-value>quartz.properties</param-value>
    </init-param>
    <init-param>
    <param-name>shutdown-on-unload</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>start-scheduler-on-load</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    Cheers
    Pucha Anirudh

  • Property Correlation XQuery Expression

    Would like to know about Property Correlation XQuery - Expression to create order Item dependency
    It is for introducing a third, site-based decomposition stage - SyncCustomer.SiteA,SyncCustomer.SiteB,SyncCustomer.SiteC,Provisioning.SiteA,Provisioning.SiteB,and so on.

    Well, interesting try. Oracle has suggested to keep a mapping (in a XML or in database) between logical and physical values of destinations, you are trying to route, in OSB itself and to query it at runtime to get the actual value of destination. Please refer -
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1081507
    What error do you get when you directly use the X-Path in Dynamic Routing expression?
    Regards,
    Anuj

  • XSLT and XQuery recommendation for BPEL and OSB

    Hi,
    1. Why is XQuery recommeded for OSB and XSLT for BPEL. Are there any specific performance optimization reason behind this.
    2. Apart from OSB and BPEL, both XSLT and XQuery has xml transformation options and creating HTML. What is the difference between these two.
    Thanks in advance!

    you can create the graphical view of Xquery in Eclipse but not for XSLT
    Xquery is much faster than XSLT in OSB.
    Through XSLT however you can achieve more complex transformation.
    OSB has its historic origins in BEA Aqalogic stable and so Xquery was widely used used even though XSLT is supported. It is a matter of choice(your standards in your organization,your developer skillsets,your re-usable libraries etc )
    In Jdeveloper you can develop xslt in graphical mode though and attain complex transformation

  • How to evaluate dynamic XPath expression in BPEL?

    I have an xml file where I keep many settings for my BPEL process. At runtime, I read the file and I want to select values from it based on values in the process payload.
    For example, imagine that the process payload is an order:
    <order>
    <header>
    <id/>
    <customer_id/>
    <team_id/>
    </header>
    <items>
    <item>
    <id/>
    <sku/>
    <price/>
    <quantity/>
    </item>
    </items>
    </order>
    Now, in my xml settings file, I have a section where I keep a mapping of "team_id" and "assignment_group", so that for each team id, I can select the appropriate group to whom a task should be assigned. The relevant section of the settings file will look something like this:
    <assignment_groups>
    <group team_id='0923230'>invoice_approvers</group>
    <group team_id='3094303'>order_approvers</group>
    <group team_id='3434355'>shipping_approvers</group>
    </assignment_groups>
    So, imagine I get an order input to my process where the team_id is '3094303'. Now I have to lookup the correct assignment group in my settings file.
    So, I construct the dynamic XPath expression
    /settings/assignment_groups/group[@team_id=3094303]
    I know that this would evaluate to "order_approvers". However, even though I have the XPath expression in a BPEL variable, and I have my settings file as a BPEL variable also, I don't know how to execute the XPath expression against the settings BPEL variable to retrieve the correct value.
    Any ideas appreciated.
    Thanks,
    Jack

    James:
    Thank you for the response. Incidentally, this is the very same document and section that I have been looking at for guidance. Specifically, the section titled "Dynamically indexing by Constructing an XPath at Run Time" on page 12-13.
    I tried to do something similar to the example at the top of page 13:
    <variable name="iterator" type="xsd:integer"/>
    <assign>
    <copy>
    <from expression="concat('/invoice/line-item[',bpws:getVariableData('iterator'), ']/line-total')"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="bpws:getVariableData('input', 'payload',bpws:getVariableData('xpath')) + ..."/>
    </copy>
    </assign>
    I am able to achieve the first copy operation to get my dynamic XPath into a BPEL variable and that's fairly straightforward. But I am unable to get the second copy to work. Specifically, I am not sure what to put in the second argument of the bpws:getVariableData function. I have tried many different combinations, but when I try to compile my program, I get the following compilation error:
    Error:
    [Error ORABPEL-10902]: compilation failed
    [Description]: in "C:\code\TrainingWS\SampleGetSettings\bpel\SampleGetSettings.bpel", XML parsing failed because "org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr".
    [Potential fix]: n/a.
    Thanks,
    Jack

  • Unable to call Java class method within Embedding Java Activity in BPEL

    Hi ,
    I have written Java Class named 'Class3' .
    When I am creating and trying to call these classes whithin Embedding Java Activity , compile time error is coming. Compiler is not finding class . Error message is like this one.
    uildfile: C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml
    scac:
    [scac] Validating composite : 'C:\JDeveloper\mywork\Application7\Embedded15\composite.xml'
    [scac] C:\JDeveloper\mywork\Application7\Embedded15\SCA-INF\bpel\BPELEmbedded15\src\orabpel\bpelembedded15\ExecLetBxExe0.java:73: cannot find symbol
    [scac] symbol : class Class3
    [scac] location: class orabpel.bpelembedded15.ExecLetBxExe0
    [scac] C:\JDeveloper\mywork\Application7\Embedded15\SCA-INF\bpel\BPELEmbedded15\src\orabpel\bpelembedded15\ExecLetBxExe0.java:73: cannot find symbol
    [scac] symbol : class Class3
    [scac] location: class orabpel.bpelembedded15.ExecLetBxExe0
    [scac] Note: C:\JDeveloper\mywork\Application7\Embedded15\SCA-INF\bpel\BPELEmbedded15\src\orabpel\bpelembedded15\BPEL_BIN.java uses unchecked or unsafe operations.
    [scac] Note: Recompile with -Xlint:unchecked for details.
    [scac] FATAL_ERROR: location {ns:composite/ns:component[@name='BPELEmbedded15']}(20,36): Failed to compile bpel generated classes.
    [scac] failure to compile the generated BPEL classes for BPEL process "BPELEmbedded15" of composite "default/Embedded15!1.0"
    [scac] The class path setting is incorrect.
    [scac] Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    [scac]
    BUILD FAILED
    C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml:264: Java returned: 1 Check log file : C:\JDeveloper\mywork\Application7\Embedded15\SCA-INF\classes\scac.log for errors
    Total time: 8 seconds
    I am creating Class3 directly in Application Resources folder indide Project Folder in Jdeveloper without creating any package. Code of the class is .......
    public class Class3 {
    public Class3() {
    super();
    public String getValue(){
    return "BBBBBBB";
    Can any one help?
    Regards
    Yogendra Rishishwar
    9867927087

    Hi ,
    In your java project frm jdev..right click and choose general and then choose deployment profiles and then choose Jar ..and then give some appropriate name(abc) and then click ok.
    Then under resources file u get a abc.deploy file right click and say deploy to jar ..u will find the jar in that director.Now include this jar in your prjct libraries.
    have a look at the link http://niallcblogs.blogspot.com/search/label/embedded%20Java

  • Writing XQuery Expressions in XPath editor of OSB

    Hi All,
    I have conditional branch node in my OSB proxy.
    My requirement is
    My input element contains one of {A,B,C}
    if my input element contains one of {A,B} then one branch should executed
    if my input element contains C then other branch should executed.
    I could not achieve my 1st case because I could not specify OR condition in branch.
    Is there any other alternative. I wanted to use branch only.
    My approach is:
    I am trying to use XQuery in XPath editor of branchNode.
    This XQuery implements OR logic and returns string value which selects my A,B branch, but not sure if I can use XQuery in XPath editor
    Thanks,
    Praveen

    Hello,
    Try to put a stage with an assign before the branch, with:
    if (A or B)
    variableCondition = BRANCH-AB
    And in the branch put as condition the variable: variableCondition
    Hope this help you.
    Edited by: user13302387 on 07-mar-2012 4:49

  • Error in embedding java code in Bpel process

    I am calling one of the java snippet in my process which in turn uses the files from some jars.
    But I am getting error :
    <2006-11-07 12:08:51,227> <ERROR> <default.collaxa.cube.engine.bpel> BPELExecution
    java.lang.ExceptionInInitializerError
         at bpel.p0.ExecLetBxExe0.execute(ExecLetBxExe0.java:35)
         at com.collaxa.cube.engine.ext.wmp.BPELXExecWMP.__executeStatements(BPELXExecWMP.java:52)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassCastException
         at com.misys.eqplus.framework.management.instrumentation.ManagementEvent.<clinit>(ManagementEvent.java:36)
         ... 22 more
    I am putting the jar files in my
    BPEL_INF flder
    and entering it in this in C:\OraBPELPM_1integration\orabpel\domains\default\config\domain
    properties file in C:\OraBPELPM_1\integration\orabpel\domains\default\config
    ear file in C:\OraBPELPM_1\integration\orabpel\system\appserver\oc4j\j2ee\home\applications
    Please help me

    Hello Santosh,
    Are you importing the used java classes using <bpelx:exec import="classname"/>
    Regards,
    Melvin

  • Xquery expression in Dynamic Routing

    Hi All,
    I need a help.My requirement is as follows.
    1) I Have 2 nos of Proxy and Multiple Business Service.
    2) First Proxy calling 2nd Proxy and passing the BusinessService Name in user-define Header(only One Header) using Transport Header.
    3)2nd Proxy calls the required Business Service using Dynamic routing.
    The problem i am getting is when i am using the xpath expression of the header value($inbound/ctx:transport/ctx:request/tp:headers/tp:user-header/@value) in the Dynamic Routing expression
    (<ctx:route>
    <ctx:service isProxy="false">
    {$inbound/ctx:transport/ctx:request/tp:headers/tp:user-header/@value}
    </ctx:service>
    </ctx:route>) , I am getting some exception.
    But if i use Assign node before Dynamic Routing and mention the same xpath of header value to a variable and the variable in the Dynamic Routing expression,I am able to invoke business Service sucessfully.
    But my requirement is not to use any Assign Node.
    Does any one has any idea what would be the correct syntax of the expression in Dynamic Routing.
    Thanks in Advance ..
    Thanks
    Deba

    Well, interesting try. Oracle has suggested to keep a mapping (in a XML or in database) between logical and physical values of destinations, you are trying to route, in OSB itself and to query it at runtime to get the actual value of destination. Please refer -
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1081507
    What error do you get when you directly use the X-Path in Dynamic Routing expression?
    Regards,
    Anuj

  • Assistance with Xpath expression in BPEL

    Hi,
    Recently trained on BPEL but new to XPATH. I would like to ask your advice on how best to search an XML response like the one given below.
    As part of a BPEL flow I would like to obtain the EntityId of the CustomerService where AddonID=26 and CustomerServiceStatus=Active. There can be 0 (zero) or 1 such entries.
    I realise I could count the number of CustomerServices and then loop through each and test for the above criteria, but is there is better/more efficient way? - Thanks.
    <GetSubscriptionByMSISDN_OutputVariable>
    <part name="parameters">
    <GetSubscriptionByMSISDNResponse>
    <gsresp:GetSubscriptionByMSISDNResult>
    <resp:Result>
    <ErrorCode>0000</ErrorCode>
    <Success>true</Success>
    <ErrorMessage>Operación finalizada con éxito.</ErrorMessage>
    <ErrorMessageExtend/>
    </resp:Result>
    <gsresp:Subscription>
    <entity:EntityId>14372</entity:EntityId>
    <subs:Balance>0</subs:Balance>
    <subs:CreditLimitByDay>0</subs:CreditLimitByDay>
    <subs:CreditLimitByMonth>0</subs:CreditLimitByMonth>
    <subs:ConsumptionLimitLock>0</subs:ConsumptionLimitLock>
    <subs:ConsumptionLimitAlert>0</subs:ConsumptionLimitAlert>
    <subs:PricesPlan>1</subs:PricesPlan>
    <subs:PricesDescription>Pospago 1</subs:PricesDescription>
    <subs:StartDate/>
    <subs:SubscriptionStatus>InUse</subs:SubscriptionStatus>
    <subs:MSISDN>66666666666</subs:MSISDN>
    <subs:HasCreditOnTime>false</subs:HasCreditOnTime>
    <subs:Consumption/>
    <subs:CustomerServices>
    <entity:EntityId>61584</entity:EntityId>
    <addo:Description>Activation</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-08T04:40:22</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>28</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>61585</entity:EntityId>
    <addo:Description>Activation</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-08T04:40:32</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>30</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>61602</entity:EntityId>
    <addo:Description>Activation</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-08T04:39:48</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>1</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>61603</entity:EntityId>
    <addo:Description>Activation</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-08T04:40:11</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>26</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>61600</entity:EntityId>
    <addo:Description>Activation</addo:Description>
    <addo:ContractedTo>2008-09-08T03:40:11</addo:ContractedTo>
    <addo:ContractedFrom>2008-08-08T00:00:00</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Inactive</addo:CustomerServiceStatus>
    <addo:AddonId>26</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>74665</entity:EntityId>
    <addo:Description>Descp: Add Services</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-26T17:45:58</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>45</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>77493</entity:EntityId>
    <addo:Description>Descp: Add Services</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-30T11:14:28</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>108</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>77684</entity:EntityId>
    <addo:Description>Descp: Add Services</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-09-30T13:57:12</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>31</addo:AddonId>
    </subs:CustomerServices>
    <subs:CustomerServices>
    <entity:EntityId>91228</entity:EntityId>
    <addo:Description>Descp: Add Services</addo:Description>
    <addo:ContractedTo/>
    <addo:ContractedFrom>2008-11-06T13:43:01</addo:ContractedFrom>
    <addo:CustomerServiceStatus>Active</addo:CustomerServiceStatus>
    <addo:AddonId>36</addo:AddonId>
    </subs:CustomerServices>
    <subs:NobilllId>0</subs:NobilllId>
    </gsresp:Subscription>
    </gsresp:GetSubscriptionByMSISDNResult>
    </GetSubscriptionByMSISDNResponse>
    </part>
    </GetSubscriptionByMSISDN_OutputVariable>

    Hi Dietrich,
    Thanks for all the help, and your patience. I think you're getting me closer to figuring out what I should be doing. I can see now in the transformation mapper how I should have constructed the 'if' test, but I am still having an issue when I run the process. The problem being the wrong element in the array is being selected.
    Given the following input data to the transformation:
    <inputVariable>
         <part name="payload">
              <ns1:AnitBPELProcess1ProcessRequest>
                   <ns1:msisdn>640005076</ns1:msisdn>
                   <ns1:CustomerServiceCollection>
                        <ns1:EntityID>1966</ns1:EntityID>
                        <ns1:AddonId>26</ns1:AddonId>
                        <ns1:Status>Inactive</ns1:Status>
                   </ns1:CustomerServiceCollection>
                   <ns1:CustomerServiceCollection>
                        <ns1:EntityID>1991</ns1:EntityID>
                        <ns1:AddonId>26</ns1:AddonId>
                        <ns1:Status>Active</ns1:Status>
                   </ns1:CustomerServiceCollection>
              </ns1:AnitBPELProcess1ProcessRequest>
         </part>
    </inputVariable>
    ...and the following transformation (ony relevant part shown):
    <xsl:template match="/">
    <ns0:VoiceMailProductDetails>
    <xsl:if test='(/ns0:AnitBPELProcess1ProcessRequest/ns0:CustomerServiceCollection/ns0:AddonId = "26") and (/ns0:AnitBPELProcess1ProcessRequest/ns0:CustomerServiceCollection/ns0:Status = "Active")'>
    <ns0:VoiceMailKPNEntityId>
    <xsl:value-of select='/ns0:AnitBPELProcess1ProcessRequest/ns0:CustomerServiceCollection/ns0:EntityID'/>
    </ns0:VoiceMailKPNEntityId>
    </xsl:if>
    </ns0:VoiceMailProductDetails>
    </xsl:template>
    ...why does the transformation set the target field "VoiceMailKPNEntityId" to 1996, when the correct array element is the 2nd with an EntityID of 1991?
    I was expecting the 'value-of select' to have used the element that matched the criteria as it is within the 'if'.
    Thanks - Anit
    PS: I did also play round with using xpath query within an Assign to retrieve the EntityID, but this faulted with a "selectionFailure" error when my test data did not contain a row that met the search criteria.

  • How-To "IN" a list of items to an XQuery Expression.

    Greetings All, I have a query that is working as expected:
    SELECT count(*)
    FROM XML_TEST
    WHERE XMLExists('/ArrayOfCustomField/CustomField/NumberValue\[. >= 12.48 and . <= 321.56\]' PASSING CustomFields);
    This provides me with essentially the "BETWEEN" operator.
    However, I need to mimic the "IN" operator, e.g.)
    SELECT count(*)
    FROM XML_TEST
    WHERE XMLExists('/ArrayOfCustomField/CustomField/NumberValue\[ IN 12.48, 321.56, 4993.2\]' PASSING CustomFields);
    **The query directly above obviously does not work.
    With that said how do I reformat the offending query to do what I need it to do?
    I am not restricted to using XMLExists and I am open to any type of xml query that will allow me to pass in a string of items to query on.
    Any and all help would be greatly appreciated.
    Oracle Version: 11.1.0.7 SP 12
    Table DDL:
    CREATE TABLE "XML_TEST"
    AccountID RAW(16) NOT NULL ENABLE,
    RAW(16) NOT NULL ENABLE,
    CustomFields "SYS"."XMLTYPE"
    Table DML:
    clobVal := '<?xml version="1.0" encoding="utf-8"?>
    <ArrayOfCustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CustomField ReferencedID="3A887DE7B2FA4A19B9F66FCC19E02062">
    <StringValue>Picture</StringValue>
    </CustomField>
    <CustomField ReferencedID="014F2EFA42CF40829A9A5FB761759071">
    <StringValue>Picture</StringValue>
    </CustomField>
    <CustomField ReferencedID="59690AD42A5B4C83B4917D024908F905">
    <NumberValue>12.48</NumberValue>
    </CustomField>
    <CustomField ReferencedID="06675CD4B0FD4C769C3266260159EAC4">
    <DateValue>1242394042</DateValue>
    </CustomField>
    </ArrayOfCustomField>';
    INSERT INTO XML_TEST (AccountID, TenantID, CustomFields)
    VALUES ('ADDA071176A94654A2BE2129A1ABFBF9', 'F068F6D54ED2DB11ABE500188B001DE0', xmltype(clobVal));
    -- INSERT #2
    clobVal := '<?xml version="1.0" encoding="utf-8"?>
    <ArrayOfCustomField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <CustomField ReferencedID="60A33C7BEB3245FB9D49F57E58A0856A">
    <StringValue>Picture</StringValue>
    </CustomField>
    <CustomField ReferencedID="8DDF1D2A565D4515883BB90308439124">
    <StringValue>Picture Book</StringValue>
    </CustomField>
    <CustomField ReferencedID="88FF49FAF75942EBABB13C84C647737F">
    <NumberValue>321.56</NumberValue>
    </CustomField>
    <CustomField ReferencedID="F78F8772988F44A1873F3E79D1722BD1">
    <DateValue>1242494042</DateValue>
    </CustomField>
    </ArrayOfCustomField>';
    INSERT INTO XML_TEST (AccountID, TenantID, CustomFields)
    VALUES ('1C9825F2EEC6419B9D77AB5A4CB87543', 'F068F6D54ED2DB11ABE500188B001DE0', xmltype(clobVal));
    Regards, L

    The point was only to demonstrate how you'd mimic the IN operator.
    I used
      ENAME/text()= ("SCOTT","JAMES")
    ...which in your case would be sth like
      '/ArrayOfCustomField/CustomField/NumberValue = (12.48, 321.56, 4993.2)'

  • Oracle 11g - how to disable the Static Type-Checking of XQuery Expressions

    Hi,
    I loaded XML files using pl/sql in Oracle 10 suggesfully and now after upgrading to 11g the thing doesn't work anymore.
    I believe the problem has to do with the DTD, the xml files structure is not as specified in the DTD. I did get away in Oracle 10 issuing the alter session set events ='31156 trace name context forever, level 2' in the code. Now this doesn't seem to have any effect. When loading the xml file I get the following error message
    "ORA-19276 XPST0005 - Xpath step specifies an invalid element/attribute name"
    How can I skip the checking as I can't change the DTD's.
    TIA,
    Kari

    DTD Support in Oracle XML DB
    A DTD is a set of rules that define the allowable structure of an XML document. DTDs are text files that derive their format from SGML and
    can be associated with an XML document either by using the <code>DOCTYPE</code> element or by using an external file through a DOCTYPE
    reference. In addition to supporting XML Schema, which provides a structured mapping to object-relational storage or binary XML storage,
    Oracle XML DB also supports DTD specifications in XML instance documents. Though DTDs are not used to derive the mapping, XML
    processors can still access and interpret the DTDs.
    Inline DTD Definitions
    When an XML instance document has an inline DTD definition, it isused during document parsing. Any DTD validations and entity
    declaration handling is done at this point. However, once parsed, theentity references are replaced with actual values and the original
    entity reference is lost.
    External DTD Definitions
    Oracle XML DB also supports external DTD definitions if they are stored in Oracle XML DB Repository. Applications needing to process an
    XML document containing an external DTD definition such as /public/flights.dtd, must first ensure that the DTD document is stored in Oracle XML DB at path /public/flights.xsd.
    .... thats all I could find...
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb05sto.htm#sthref540
    Edited by: Marco Gralike on Feb 26, 2009 11:19 AM

  • Xquery Problem for for takes really long time

    I am having problems with an issue using doing an xml xQuery from Oxygen to a dbxml database.
    I can't list the code because it is quite detailed and on a secure computer, but the concept is simple.
    I have an xquery that looks like this:
    Bunch of let statements
    <results>
    Let $y := "one"
    For $thing in $list_of_things
    More let statements
    Where ....
    Return
    Html and more embedded xquery expressions including for, where etc.
    </results>
    I run a query with $y := "one" as above and it takes 1.5 seconds.
    If I modify the query slightly by replacing the "let $y := "one" with an additional "for" it takes 250 seconds, though the results are the same as before.
    Why did it take so long?
    All I did was add the for which only has one item in it so it should do the same thing?!
    Modified Query
    Bunch of let statements
    <results>
    For $y in ("one")
    For $thing in $list_of_things
    More let statements
    Where ....
    Return
    Html and more embedded xquery expressions including for, where etc.
    </results>
    Thanks for any help anyone can offer, Curt

    Curt, perhaps you'd need to provide a bit more relevant detail and in simpler form in order to get a helpful answer. On the face of it, changing let to for in that position might have an impact simply because you are changing a simple variable assignment followed by a for clause to a nested for...for clause. Is your "one" value a dummy for demonstration purposes or the actual value in your code? On the face of it, it looks like for each loop of the first for, you'd be repeating the execution of all the subsequent code. Without more context it's difficult to judge what would happen exactly.
    I suspect that if it's XQuery you're needing help with you'll get more responses on a dedicated forum. For help with DBXML performance issues you're probably going to need to tell people about your indices and be more explicit about their relationship to your query, in order for them to understand the problem.
    If that's not helpful just review your code again and continue experimenting.
    Tim

Maybe you are looking for

  • Cannot install flash player

    windows 7 starter firefox 34.0.5 I downloaded install_flashplayer16x32_mssd_aaa_aih.exe, but when I run it, it just crashes. I get: Adobe Installation Helper has stopped working Problem signature:   Problem Event Name:    APPCRASH   Application Name:

  • Inner Join question

    I have assignment for sql query by asking list all products where designer of product lives in the same region as supplier of the product. However, I have no clue to solve it. Please assist. Below are 4 tables I created: CREATE Table REGION RegCode  

  • File URLs -  do not accept spaces in folder/direcotry name?

    Version of US used is: 1.0.3 I tried to create a file data source with the following file URL from the Administration Application under the Sources/File tab: file://localhost/c:/myDir/New Folder/ But I got the following error: Oracle Ultra Search Err

  • Where can I find the product key for Windows 7?

    Hi - I recently purchased a laptop from Dixons. Where can I find the product key to start using microsoft 7? I can not find it anywhere. Please help!

  • Getting the:   Error Number: 0x80040707 Description: DLL function call....

    solution that worked for me (copied from another site): I found this solution on another website, but I wanted to share it with all of you here. The problem seems to be with the automatic updating of iTunes. Apparently it can whack-out if you have an