Xpath query return problem

Hi;
I want to load xml file into the database oracle 9.0.2 using Oracle XML DB Utilities Package on "http://otn.oracle.com/sample_code/tech/xml/xmldb/xdbutilities/XMLDB_Utilities_Overview.htm"
I have a schema like:
<xs:element name="catalog">
<xs:element name="catalog">
<xs:complexType xdb:SQLType="OBJ_CATALOG">
<xs:sequence>
<xs:element name="category">
<xs:complexType xdb:SQLType="OBJ_CATEGORY">
<xs:sequence>
<xs:element name="product">
<xs:complexType xdb:SQLType="OBJ_PRODUCT">
<xs:sequence>
<xs:element name="name" type="xs:string"/>           
and my file include:
[i]<catalog>
<category name="books">
<product id="1" keywords="yasanti, Latin Amerika" >
<name>Gunes Topraklari</name>
</product>
</category>
<category name="CDs" >
<product id="5" keywords="music, easy listening" >
</product>
</category>
I can use xpath query like
select extract(value(x), '/catalog/category[@name="books"]').getstringval() from product_table x
and get result but I can not take any data about product elements with queries such that
select extract(value(x), '/catalog/category[@name="books"]//name/text()').getstringval() from product_table x
Does anyone has an idea about this problem?
Thanks a lot.
Alper.

Please post this message at:
Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

Similar Messages

  • SQL dynamic query returning (problem with list of value)

    Hi, I'm having trouble with my query. I want to make where statement based on my selectlist, but the problem is that I couldnt write the correct string in my where condition.
    :P61_STATUS has this following display, return value
    Bewerber     Bewerber     
    PRA_Kandidat     PRA_Kandidat          
    abgelehnt     abgelehnt          
    angenommen     angenommen          
    Thema     Thema     
    angemeldet     angemeldet          
    abgegeben     abgegeben          
    abgeschlossen     abgeschlossen          
    bestätigt     bestätigt
    DECLARE
      q varchar2(4000);
      list_betreuer htmldb_application_global.vc_arr2;
      list_semester htmldb_application_global.vc_arr2;
      list_status htmldb_application_global.vc_arr2;
    BEGIN
    -- variable to store the list
    list_betreuer := HTMLDB_UTIL.STRING_TO_TABLE(:P61_BETREUER);
    list_semester := HTMLDB_UTIL.STRING_TO_TABLE(:P61_SEMESTER);
    list_status := HTMLDB_UTIL.STRING_TO_TABLE(:P61_STATUS);
    -- Query begins
    q:= 'select p1.name, p1.vorname , a1.tel, a2.tel, ';
    q:= q||'ab.thema, ab.status, ab.typ, s.bezeichnung, p2.name ';
    q:= q||'from person p1, person p2, adresse a1, adresse a2, ';
    q:= q||'zuordnungp_a zpa1,zuordnungp_a zpa2, ';
    q:= q||'abschlussarbeit ab, semester s ';
    q:= q||'WHERE ab.SEMESTER = s.OBJECTID (+) ';
    q:= q||'AND ab.STUDENT = p1.OBJECTID (+) ';
    q:= q||'AND ab.BETREUER = p2.OBJECTID (+) ';
    q:= q||'and p1.objectid = zpa1.person (+) ';
    q:= q||'and zpa1.adresse  = a1.objectid (+) ';
    q:= q||'and zpa1.art (+)= ''Privat'' ';
    q:= q||'and p1.objectid = zpa2.person (+) ';
    q:= q||'and zpa2.adresse  = a2.objectid (+) ';
    q:= q||'and zpa2.art (+)= ''Geschäft'' ';
    -- Loop for betreuer list
    FOR i in 1..list_betreuer.count
    LOOP
        IF i = 1 THEN
        q:= q||'AND (ab.betreuer = '||list_betreuer(i);
        ELSE
        q:= q||' OR ab.betreuer  = '||list_betreuer(i);
        END IF;
    END LOOP; if (list_betreuer.count>0)THEN q:= q||')'; END IF;
      -- Loop for semester list
    FOR i in 1..list_semester.count
    LOOP
        IF i = 1 THEN
        q:= q||'AND (ab.semester = '||list_semester(i);
        ELSE
        q:= q||'OR ab.semester = '||list_semester(i);
        END IF;
    END LOOP; if (list_semester.count>0)THEN q:= q||')'; END IF;
    -- Loop for status list
    FOR i in 1..list_status.count
    LOOP
        IF i = 1 THEN
        q:= q||'AND (ab.status = '||list_status(i)||'';
        ELSE
        q:= q||'OR ab.status = '||list_status(i)||'';
        END IF;
    END LOOP; if (list_status.count>0)THEN q:= q||')'; END IF;
      htp.p(q);
    return q;
    END;result
    select p1.name, p1.vorname , a1.tel, a2.tel, ab.thema, ab.status, ab.typ, s.bezeichnung, p2.name from person p1, person p2, adresse a1, adresse a2, zuordnungp_a zpa1,zuordnungp_a zpa2, abschlussarbeit ab, semester s WHERE ab.SEMESTER = s.OBJECTID (+) AND ab.STUDENT = p1.OBJECTID (+) AND ab.BETREUER = p2.OBJECTID (+) and p1.objectid = zpa1.person (+) and zpa1.adresse = a1.objectid (+) and zpa1.art (+)= 'Privat' and p1.objectid = zpa2.person (+) and zpa2.adresse = a2.objectid (+) and zpa2.art (+)= 'Geschäft' AND (ab.status = abgegeben) the problem is in this statement
    q:= q||'AND (ab.status = '||list_status(i)||'';that statement produce this following statement
    ab.status = abgegebenbut what I need is this statement
    ab.status = 'abgegeben';how can I achieve this statement?
    thank you very much

    raitodn wrote:
    ah ok , I was confused with this q:= q||'AND (ab.status = '''||list_status(i)||'''';I think I get it now
    basically stop the string and write double quotes before the variable
    'AND (ab.status = ' + ''||list_status(i)||'' + ''No, more like "wherever I want a single quote within a string, I put two single quotes instead and that tells oracle it's a quote and not the end of the string".
    q:= q||'AND (ab.status = '''||list_status(i)||'''';
           ^                 ^^^                  ^^^^
           |                 |/|                  ||/|
           |                 | |                  || \-- single quote indicates end of string
           |                 | |                  ||
           |                 | |                  |\-- two quotes indicate a single quote required
           |                 | |                  |
           |                 | |                  \-- single quote to open a new string
           |                 | |
           |                 | \-- single quote indicates end of string
           |                 |
           |                 \-- two quotes indicate single quote required
           \-- Open String

  • Human Workflow Task XPath query string returns multiple nodes.

    I am looking for trouble shooting help for this error. I am no sure if it is a server or jdev issue.
    I am running JDev version 10.1.3.3 and console version 10.1.3.1.0 locally.
    General information on the BPEL process:
    I have a temporary table in Oracle lite that I created items to be review by the user. I created a synchronous BPEL process. The first step in developing this process, I created the straight forward invoke the table to get the records, transform the records with a change the approve flag = "Y", and invoke the table to update the records. Works like a charm. I followed the online tutorial by dropping a human task after the transform, configured the parameters, setup the assignments, and moved the invoke to update table under the approved condition. If the table has only one record, the process runs great but if there are two records I get the following error message.
    <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"><part name="summary"><summary>XPath query string returns multiple nodes.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity part and query /ns3:TempItemCollection/ns3:TempItem/ns3:ItemNbr should not return multipe nodes.
    Please check the BPEL source at line number "178" and verify the part and xpath query /ns3:TempItemCollection/ns3:TempItem/ns3:ItemNbr.
    </summary>
    </part></selectionFailure>
    =================
    The error occurs in the first assign of the Human task after the assign copies the fields for the title. I underlined line number 178.
    <correlationSets>
    <correlationSet name="WorkflowTaskIdCor"
    properties="taskservice:taskId"/>
    </correlationSets>
    <sequence>
    <assign name="HumanTask1_1_AssignTaskAttributes">
    <copy>
    <from expression="concat(ora:getProcessURL(), string('/HumanTask1/HumanTask1.task'))"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:taskDefinitionURI"/>
    </copy>
    <copy>
    <from expression="number(3)"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:priority"/>
    </copy>
    <copy>
    <from>
    <payload xmlns="http://xmlns.oracle.com/bpel/workflow/task">
    <Case xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <CourtDate xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ErrorMessage xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ItemName xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <Payment xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <Zip xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ProcessFlag xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <LastUpdated xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <AddedDate xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <CityAttnyAmount xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ApprovalFlag xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ProlawKey xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    <ProcessKey xmlns="http://xmlns.oracle.com/bpel/workflow/task"/>
    </payload>
    </from>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:payload"/>
    </copy>
    <copy>
    <from expression="concat(string('Item Fee Approval '), bpws:getVariableData('Invoke_1_Select_RecordsSelect_OutputVariable','TempItemCollection','/ns3:TempItemCollection/ns3:TempItem/ns3:ItemName'))"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:title"/>
    </copy>
    <copy>
    <from variable="Invoke_1_Select_RecordsSelect_OutputVariable"
    part="TempItemCollection"
    query="/ns3:TempItemCollection/ns3:TempItem/ns3:ItemNbr"/>
    <to variable="initiateTaskInput" part="payload"
    query="/taskservice:initiateTask/task:task/task:payload/task:Item"/>
    </copy>
    <copy>
    Thank you for any help you can give me.

    Here is how I solved this problem: I was told by the metalink folks that I should use the same verion of SOA console as jdev. So I went back to jdev 10.1.3.1. Rather than reading from the Oracle lite table, I dumped the table into a flat file. I read flat file and populated the workflow. Remember to set the 'messages in batch' flag in the file adapter to 1 and the number of records to skip to zero in the format builder for the flat file. The process now reads each record and creates an instance for that each record. In other words, if I have 8 records in my flat file, I will have 8 instances of the process running on the console. Thanks Jeremy for your help figuring this out.
    Edited by: user7725126 on Nov 19, 2009 3:56 PM

  • Error: XPath query string returns multiple nodes

    Hi all,
    I am facing issue with the assign activity.
    Error message:
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure} parts: {{ summary=&lt;summary>*XPath query string returns multiple nodes. The assign activity part and query are returning multiple nodes. The assign activity part and query named in the error message returned multiple nodes. It should return single node. According to BPEL4WS specification 1.1 section 14.3, the assign activity part and query named in the error message should not return multiple nodes. Verify the part and xpath query named in the error message at line number 2005 in the BPEL source*.
    BPEL code:
    <copy>
    <from variable="Invoice_Tax_loopCounter"/>
    <to variable="Var_Invoice_Tax_Contacts" part="payload" query="/ns30:Invoice_Tax_Contacts/ns30:Invoice/ns29:Get_InvoiceOutput[bpws:getVariableData'Invoice_Tax_loopCounter')]/ns29:ADDR_ATTRIBUTE2"/>
    </copy>
    We are using SOA 11.1.1.3 version.
    Any pointers on this?
    Thanks in advance

    Hi-
    This is because you are have multiple nodes either in source or target XML.
    My guess is some nodes of your XML might be repeating (means a single element/node has multiple values). Can you please check that or please post your XML here.
    Edited by: 145678 on Mar 7, 2011 6:28 PM

  • XPath query string returns zero node error

    I have created car loan bpel application. One is Citi Loan and another is Star Loan.
    I have created just like similar to sample loan demo.
    I have entered the SSN, email, carModel, carYear, loanAmount and creditRating value and submitted. It will initiated the following tasks successfully.
    StarLoan Instance
    CitiLoan Instance
    TaskManager Instance
    CreditRating Instance
    Root appln. instance
    I have created one user approval page for Approve/Reject (jsp). Through this page, I have approved the CitiLoan offer. I have faced the following errors.
    <output>
    <part name="payload" >
    <loanOffer>7.4</loanOffer>
    </part>
    </output>
    <loanOffer>7.4</loanOffer>
    <selectionFailure>
    <part name="summary" >
    <summary>XPath query string returns zero node. According to BPEL4WS spec 1.1 section 14.3, The assign activity <to> part query should not return zero node. Please check the BPEL source at line number "90" and verify the <to> part xpath query. </summary>
    </part>
    </selectionFailure>
    Please help me.
    Thanks in advance.
    Regards,
    Sara

    Let us know if you have customized SOA composite for user creation approval?
    -Vamsi.

  • XPath Namespace resolver problem

    I've trying to run a simple XPath query
    //z:rowin Java against against the following XML.
    <?xml version="1.0" encoding="utf-8"?>
    <test xmlns:rs="urn:schemas-microsoft-com:rowset"
         xmlns:z="#RowsetSchema">
    <rs:data>
      <z:row>XX</z:row>
    </rs:data>
    </test>I've written my own namespace prefix resolver, and also used the NamespaceContext object at the end of this example [http://www.ibm.com/developerworks/xml/library/x-nmspccontext/index.html?ca=drs-|http://www.ibm.com/developerworks/xml/library/x-nmspccontext/index.html?ca=drs-]
    The problem is that I also get the following error:
    javax.xml.transform.TransformerException:A location step was expected following the '/' or '//' token.
    The problem is the *#* sign in the xmlns:z="#RowsetSchema". If I rename the namespace to be just xmlns:z="RowsetSchema" then it works fine.
    Help, this is driving me mad.
    TIA
    Ian

    Hi,
    Sorry for the delay in responding to the request for a sample. I've put one together now, running a failing test and a working test...
    import com.sun.org.apache.xerces.internal.parsers.DOMParser;
    import java.io.StringReader;
    import java.util.Iterator;
    import javax.xml.XMLConstants;
    import javax.xml.namespace.NamespaceContext;
    import javax.xml.transform.TransformerException;
    import javax.xml.xpath.XPath;
    import javax.xml.xpath.XPathConstants;
    import javax.xml.xpath.XPathExpressionException;
    import javax.xml.xpath.XPathFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class TestXPath {
        public static void main(String[] args) {
            try {
                System.out.println("Running Test 1");
                String test1 = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                        "<test xmlns:rs=\"urn:schemas-microsoft-com:rowset\" xmlns:z=\"#RowsetSchema\">" +
                            "<rs:data>" +
                                "<z:row>XX</z:row>" +
                            "</rs:data>" +
                        "</test>";
                DOMParser parser = new DOMParser();
                parser.parse(new InputSource(new StringReader(test1)));
                runXpathQueryTest( parser.getDocument(), "//z:row");
            } catch (Exception e) {
                e.printStackTrace(System.out);
            try {
                System.out.println("Running Test 2 - Only difference is we have changed '#RowsetSchema' to 'RowsetSchema'");
                String test1 = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                        "<test xmlns:rs=\"urn:schemas-microsoft-com:rowset\" xmlns:z=\"RowsetSchema\">" +
                            "<rs:data>" +
                                "<z:row>XX</z:row>" +
                            "</rs:data>" +
                        "</test>";
                DOMParser parser = new DOMParser();
                parser.parse(new InputSource(new StringReader(test1)));
                runXpathQueryTest( parser.getDocument(), "//z:row");
            } catch (Exception e) {
                e.printStackTrace(System.out);
        private static void runXpathQueryTest(Document document, String xPathExpression)
                throws XPathExpressionException, TransformerException {
            XPath xPath = XPathFactory.newInstance().newXPath();
            xPath.setNamespaceContext(new UniversalNamespaceResolver(document));
            NodeList result1 = (NodeList) xPath.evaluate( xPathExpression, document, XPathConstants.NODESET);
            System.out.println(xPathExpression + " returned " + result1.getLength() + " matching node(s)");
        static class UniversalNamespaceResolver implements NamespaceContext {
            private Document sourceDocument;
            public UniversalNamespaceResolver(Document document) {
                sourceDocument = document;
            public String getNamespaceURI(String prefix) {
                if (prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)) {
                    return sourceDocument.lookupNamespaceURI(null);
                } else {
                    return sourceDocument.lookupNamespaceURI(prefix);
            public String getPrefix(String namespaceURI) {
                return sourceDocument.lookupPrefix(namespaceURI);
            public Iterator getPrefixes(String namespaceURI) {
                // not implemented yet
                return null;
    }Full output when it is run is:
    Running Test 1
    javax.xml.transform.TransformerException: A location step was expected following the '/' or '//' token.
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:608)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.Step(XPathParser.java:1737)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelativeLocationPath(XPathParser.java:1624)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.LocationPath(XPathParser.java:1595)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.PathExpr(XPathParser.java:1315)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnionExpr(XPathParser.java:1234)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.UnaryExpr(XPathParser.java:1140)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.MultiplicativeExpr(XPathParser.java:1061)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.AdditiveExpr(XPathParser.java:1003)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.RelationalExpr(XPathParser.java:928)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.EqualityExpr(XPathParser.java:868)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.AndExpr(XPathParser.java:832)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.OrExpr(XPathParser.java:805)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.Expr(XPathParser.java:788)
            at com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:127)
            at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:176)
            at com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:264)
            at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.eval(XPathImpl.java:193)
            at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:275)
            at com.categoric.pindar.TestXPath.runXpathQueryTest(TestXPath.java:59)
            at com.categoric.pindar.TestXPath.main(TestXPath.java:30)
    --------------- linked to ------------------
    javax.xml.xpath.XPathExpressionException
            at com.sun.org.apache.xpath.internal.jaxp.XPathImpl.evaluate(XPathImpl.java:289)
            at com.categoric.pindar.TestXPath.runXpathQueryTest(TestXPath.java:59)
            at com.categoric.pindar.TestXPath.main(TestXPath.java:30)
    ...cut...
    Running Test 2 - Only difference is we have changed '#RowsetSchema' to 'RowsetSchema'
    //z:row returned 1 matching node(s)

  • Copying Variables in BPEL using XPath Query

    Hi,
    I am new to BPEL and i want to know if it is possible to copy data from one variable to another using XPath Query in the <from> <to> tags, when the two variables are of different message types.
    I am trying to create a sample BPEL that would receive a String through the receive tag tied to one partner link (WSDl) and then invoke a different webservice using the <invoke> tag tied to another partner link (WSDL) by passing the received variable.
    I have pasted the BPEL File and the two WSDl files involved.
    My Issue is that when I send a soap request to the BPEL, it is passed as null to the webservice invoked.
    Probably because the copy tags don't work.
    Please help.
    BPEL File
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <process name="HelloWorld2"
    targetNamespace="http://ode/bpel/unit-test"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:tns="http://ode/bpel/unit-test"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:test="http://ode/bpel/unit-test.wsdl"
    xmlns:ns0="http://poc.com"
    queryLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0"
    expressionLanguage="urn:oasis:names:tc:wsbpel:2.0:sublang:xpath2.0">
    <import location="HelloWorld2.wsdl"
    namespace="http://ode/bpel/unit-test.wsdl"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <import location="sayHello.wsdl"
    namespace="http://poc.com"
    importType="http://schemas.xmlsoap.org/wsdl/" />
    <partnerLinks>
    <partnerLink name="helloPartnerLink"
    partnerLinkType="test:HelloPartnerLinkType"
    myRole="me" />
    <partnerLink name="sayHelloBPELPL"
    partnerLinkType="ns0:sayHelloPLT"
    partnerRole="you" initializePartnerRole="yes" />
    </partnerLinks>
    <variables>
    <variable name="myVar" messageType="test:HelloMessage"/>
    <variable name="tmpVar" messageType="test:HelloMessage"/>
    <variable name="inVar" messageType="ns0:sayHelloRequest"/>
    <variable name="outVar" messageType="ns0:sayHelloResponse"/>
    </variables>
    <sequence>
    <receive
    name="start"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="myVar"
    createInstance="yes"/>
    <assign name="ass1">
    <copy>
    <from variable = "myVar" part = "TestPart"/>
    <to variable = "inVar"
    part = "parameters"
    query= "/sayHello/ns0:param0" />
    </copy>
    </assign>
    <invoke partnerLink = "sayHelloBPELPL"
    portType = "ns0:sayHelloPortType"
    inputVariable = "inVar"
    operation = "sayHello"
    outputVariable = "outVar">
    </invoke>
    <assign name="ass2">
    <copy>
    <from variable = "outVar"
    part = "parameters"
    query= "/sayHelloResponse/ns0:return" />
    <to variable = "tmpVar" part="TestPart"/>
    </copy>
    </assign>
    <reply name="end"
    partnerLink="helloPartnerLink"
    portType="test:HelloPortType"
    operation="hello"
    variable="tmpVar"/>
    </sequence>
    </process>
    WSDL File1
    <?xml version="1.0" encoding="utf-8" ?>
    <!--
    ~ Licensed to the Apache Software Foundation (ASF) under one
    ~ or more contributor license agreements. See the NOTICE file
    ~ distributed with this work for additional information
    ~ regarding copyright ownership. The ASF licenses this file
    ~ to you under the Apache License, Version 2.0 (the
    ~ "License"); you may not use this file except in compliance
    ~ with the License. You may obtain a copy of the License at
    ~
    ~ http://www.apache.org/licenses/LICENSE-2.0
    ~
    ~ Unless required by applicable law or agreed to in writing,
    ~ software distributed under the License is distributed on an
    ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    ~ KIND, either express or implied. See the License for the
    ~ specific language governing permissions and limitations
    ~ under the License.
    -->
    <wsdl:definitions
    targetNamespace="http://ode/bpel/unit-test.wsdl"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://ode/bpel/unit-test.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns:ns0="http://poc.com">
    <wsdl:message name="HelloMessage">
    <wsdl:part name="TestPart" type="xsd:string"/>
    </wsdl:message>
    <wsdl:portType name="HelloPortType">
    <wsdl:operation name="hello">
    <wsdl:input message="tns:HelloMessage" name="TestIn"/>
    <wsdl:output message="tns:HelloMessage" name="TestOut"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HelloSoapBinding" type="tns:HelloPortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="hello">
    <soap:operation soapAction="" style="rpc"/>
    <wsdl:input>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body
    namespace="http://ode/bpel/unit-test.wsdl"
    use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HelloService">
    <wsdl:port name="HelloPort" binding="tns:HelloSoapBinding">
    <soap:address location="http://localhost:8082/ode/processes/helloWorld"/>
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="HelloPartnerLinkType">
    <plnk:role name="me" portType="tns:HelloPortType"/>
    <plnk:role name="you" portType="tns:HelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>
    WSDL File 2
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:ns0="http://poc.com"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:ns1="http://org.apache.axis2/xsd"
    xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    targetNamespace="http://poc.com">
    <wsdl:types>
    <xs:schema xmlns:ns="http://poc.com" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://poc.com">
    <xs:element name="sayHello">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="param0" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="sayHelloResponse">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    </wsdl:types>
    <wsdl:message name="sayHelloRequest">
    <wsdl:part name="parameters" element="ns0:sayHello" />
    </wsdl:message>
    <wsdl:message name="sayHelloResponse">
    <wsdl:part name="parameters" element="ns0:sayHelloResponse" />
    </wsdl:message>
    <wsdl:portType name="sayHelloPortType">
    <wsdl:operation name="sayHello">
    <wsdl:input message="ns0:sayHelloRequest" wsaw:Action="urn:sayHello" />
    <wsdl:output message="ns0:sayHelloResponse" wsaw:Action="urn:sayHelloResponse" />
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="sayHelloSOAP11Binding" type="ns0:sayHelloPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="sayHello">
    <soap:operation soapAction="urn:sayHello" style="document"/>
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="sayHello">
    <wsdl:port name="sayHelloPort" binding="ns0:sayHelloSOAP11Binding">
    <soap:address location="http://localhost:8082/ode/processes/sayHello" />
    </wsdl:port>
    </wsdl:service>
    <plnk:partnerLinkType name="sayHelloPLT">
    <plnk:role name="me" portType="ns0:sayHelloPortType"/>
    <plnk:role name="you" portType="ns0:sayHelloPortType"/>
    </plnk:partnerLinkType>
    </wsdl:definitions>

    Hi,
    Yes, it very much is possible.
    Xpath query provides a lot many data type conversion functions(string to int, string to date etc), which can be used in copying variables.
    thanks
    Saurabh

  • XML attributes makes my query return no rows

    Hello everyone,
    I've an odd problem.
    I'm querying some XML, but the attributes in one of the tags make my query return no rows; if I remove the attributes, then the query works as expected.
    The XML is below; it's the attributes in the Report tag that cause the issues:
    <result errorCode="0">
         <return>
              <Report
                   xsi:schemaLocation="Items_x0020_status_x0020_information http://******-****/ReportServer?%2FReports%2FContent%20Producer%20Reports%2FItems%20status%20information&amp;rs%3AFormat=xml&amp;rc%3ASchema=True"
                   Name="Items status information" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="Items_x0020_status_x0020_information">
                   <Tablix1>
                        <Details_Collection>
                             <Details ItemId="914P7" Username="test" user_role="IT"
                                  first_name="Barry" last_name="Donovan" organisation=""
                                  content_format="On_Screen" modified_date="26/05/2011 13:16:49"
                                  item_status="Draft" status_date="" component_name="" demand="" />
                        </Details_Collection>
                   </Tablix1>
              </Report>
         </return>
    </result>My query is:
         select
                a.item_id
               ,a.username
               ,a.user_role
               ,a.first_name
               ,a.last_name
               ,a.supplier_id
               ,a.format
               ,a.modified_date
               ,a.item_status
               ,a.completion_date
               ,a.component_code
             from   dual
                   ,xmltable
                    ('/result/return/Report/Tablix1/Details_Collection/Details'
                       passing p_xml
                       columns
                          item_id         varchar2(1000) path '@ItemId'
                         ,username        varchar2(1000) path '@Username'
                         ,user_role       varchar2(1000) path '@user_role'
                         ,first_name      varchar2(1000) path '@first_name'
                         ,last_name       varchar2(1000) path '@last_name'
                         ,supplier_id     varchar2(1000) path '@organisation'
                         ,format          varchar2(1000) path '@content_format'
                         ,modified_date   varchar2(1000) path '@modified_date'
                         ,item_status     varchar2(1000) path '@item_status'
                         ,completion_date varchar2(1000) path '@status_date'
                         ,component_code  varchar2(1000) path '@demand'
                    ) a;I've tried stripping out the attributes in the tag, which does work, but some of the XML I'm expecting back may be quite large (many records), so that caused issues in itself. I'd rather deal with it and not mess with the XML itself if possible.
    Any help would be hugely appreciated!
    Thank you very much in advance.
    Robin
    Edited by: User_resU on Apr 12, 2012 2:50 PM

    Example:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select xmltype('<result errorCode="0">
      2     <return>
      3             <Report
      4                     xsi:schemaLocation="Items_x0020_status_x0020_information http://******-****/ReportServer?%2FReports%2FContent%20Producer%20Reports%2FItems%20status%20information&amp;rs%3AFormat=xml&amp;rc%3ASchema=True"
      5                     Name="Items status information" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      6                     xmlns="Items_x0020_status_x0020_information">
      7                     <Tablix1>
      8                             <Details_Collection>
      9                                     <Details ItemId="914P7" Username="test" user_role="IT"
    10                                             first_name="Barry" last_name="Donovan" organisation=""
    11                                             content_format="On_Screen" modified_date="26/05/2011 13:16:49"
    12                                             item_status="Draft" status_date="" component_name="" demand="" />
    13                             </Details_Collection>
    14                     </Tablix1>
    15             </Report>
    16     </return>
    17  </result>') as xml from dual)
    18  --
    19  -- end of test data
    20  --
    21       select
    22              a.item_id
    23             ,a.username
    24             ,a.user_role
    25             ,a.first_name
    26             ,a.last_name
    27             ,a.supplier_id
    28             ,a.format
    29             ,a.modified_date
    30             ,a.item_status
    31             ,a.completion_date
    32             ,a.component_code
    33           from   t
    34                 ,xmltable
    35                  (xmlnamespaces('Items_x0020_status_x0020_information' as "x0"),
    36                   '//x0:Report/x0:Tablix1/x0:Details_Collection/x0:Details'
    37                     passing xml
    38                     columns
    39                        item_id         varchar2(1000) path '@ItemId'
    40                       ,username        varchar2(1000) path '@Username'
    41                       ,user_role       varchar2(1000) path '@user_role'
    42                       ,first_name      varchar2(1000) path '@first_name'
    43                       ,last_name       varchar2(1000) path '@last_name'
    44                       ,supplier_id     varchar2(1000) path '@organisation'
    45                       ,format          varchar2(1000) path '@content_format'
    46                       ,modified_date   varchar2(1000) path '@modified_date'
    47                       ,item_status     varchar2(1000) path '@item_status'
    48                       ,completion_date varchar2(1000) path '@status_date'
    49                       ,component_code  varchar2(1000) path '@demand'
    50*                 ) a
    SQL> /
    ITEM_ID
    USERNAME
    USER_ROLE
    FIRST_NAME
    LAST_NAME
    SUPPLIER_ID
    FORMAT
    MODIFIED_DATE
    ITEM_STATUS
    COMPLETION_DATE
    COMPONENT_CODE
    914P7
    test
    IT
    Barry
    Donovan
    On_Screen
    26/05/2011 13:16:49
    Draft

  • Creating a directory via a jsp page sql query return

    Is it possible to create a directory based on the results of a sql query?
    i.e.
    My sql query returns application number 1234 for a building application (BC for short).
    Is it possible to create a directory /BC/1234
    It is then proposed to use an iframe to look into the directory so users can place and access scanned documents which are captured during the approval process.
    If so how?
    An example would be great.
    Jason

    Sorry hope your still around I've been away for a while. We've created a samber share to the file server where the documents are stored and mounted it within the web file directory. It works ok if there is an existing directory but if there isn't we want it to be created when the page looks for the folder. I've done this with an asp page it basically did a directory exist test first then create folder if it didn't. The problem is can't find an example of how to do the directory exist test then directory create syntax so an example of both would be great

  • Variable Picker generates invalid XPath query

    This one seems to be a bug:
    When declaring a variable of type "element" (not "messageType") and accessing the variable with the Variable Picker from within the assign assistant, i.e. the following line ist generated:
    bpws:getVariableData("testVar","","/tns:TaskMgrTestCaseRequest/tns:input")
    The BPEL process can be validated and deployed without an error.
    At runtime the following exception is generated:
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "bpws:getVariableData("testVar", "", "/tns:TaskMgrTestCaseRequest/tns:input")", the reason is XPath expression failed to execute.
    Error while processing xpath expression, the expression is "", the reason is Unexpected ''.
    Please verify the xpath query.
    Please verify the xpath query.
    When working with variables of type messageType, there is no problem. (So I declared a messageType to each element type ...)
    Wolfgang

    Thanks for the heads up. We will try to kill this bug in the 0.97 release. -Edwin

  • Query parameter problem

    I'm using the value selected in a dropdown list (20 separate values) as the where clause in a query to populate a table:
    dataElementsTableModel.setObject(1, xactionDropdown.getValue());
    dataElementsTableModel.execute();
    This works OK for most of the values in the dropdown list, but not all of them. If I cut and paste the table query from Creator to SQL*Plus and run it with any of the list values, the query returns the correct number of rows. Has anyone else run into this problem, and maybe has a solution?

    I noticed that when the data table is empty after selecting one of the values from the dropdown list, the table WILL BE populated if I refresh the page with F5. The behaviour is consistent, i.e., it's always the same dropdown values which cause or don't cause the data table to be populated.

  • Applying sort to a query returned by a stored procedure

    I am looking for some advice on the best approach for applying a dynamic sort to a query returned by a stored procedure.
    We have a stored procedure that has 3 inputs fields which are used to specify sort columns and it has an additional 3 fields to indicate if the corresponding input column is to be sorted in ascending or descending order. We presently accomplish this by using dynamic SQL in the procedure but this approach has some drawbacks. Ideally we would like these queries to compile just like any other cursor. We have tried using decodes but this does not seem practical or easy to maintain.
    This procedure is used by a web application that allows the user to click on a column header to specify their sort preference. The previous sort selection becomes the second sort field and the one before that the third.
    Your advice is much appreciated!

    I see, so you want to be able to sort by "name desc, age asc, salary asc", for example.
    there is no built in option. it's either dynamic sql, or decodes.
    the decodes could still work, with only 6 lines, but the problem is handling mixed data types. I'll stick with sort col of 1=name (char), 2=number_col, 3=date_col
    order by
      decode(sort_order1, 'A', decode (sort_col1, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X'),
      decode(sort_order1, 'D', decode (sort_col1, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X') DESC,
      decode(sort_order2, 'A', decode (sort_col2, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X'),
      decode(sort_order2, 'D', decode (sort_col2, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X') DESC,
      decode(sort_order3, 'A', decode (sort_col3, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X'),
      decode(sort_order3, 'D', decode (sort_col3, 1,name_col, 2,to_char(number_col,'9999999999.00000'), 3,to_char(date_col,'yyyymmddhh24miss'), 'X'),'X') DESC,Message was edited by:
    shoblock
    forgot to make 3 asc/desc variables

  • Coldfusion Query Delay Problem

    Folks we are having some intermittent problems with our
    application web servers.
    We are using coldfusion to serve data from Oracle databases.
    SELECT statements only, no updating of the database is done. The
    coldfusion application server and the oracle database server are
    seperate servers,
    The problem we are having is as follows.
    When the user opens the app for the 1st time a query is run
    to work out what access level they have. 95% of the time the query
    is instant. We have been logging this using getticktick()
    often the time taken is 0ms we also see 16ms and 31ms. The query
    returns
    1 row with 1 field in it to size of data returned is not an
    issue.
    Occasionally we get this query reportedly taking between 5
    and 120 seconds using gettickcount() either side of it.
    We turned on some logging at the Oracle end and this reported
    that EVERY time a query of this type it is taking absolutely no
    time all.
    Our next port of call was the network. We have sniffed
    packets between the coldfusion server and the oracle server.
    We managed to trap one of the requests where the response
    time is slow and the scenario was as follows :
    1. Coldfusion -> Oracle. Hello i've got some work for you
    to do. Completed in millisenconds
    2. Oracle -> Coldfusion. Acknowledged, Yes what is it?
    Completed in millseconds.
    3. Coldfusion -> Oracle Acknowledged......... delay of 17
    seconds (delay times vary)..... it's this query
    4. Oracle -> Coldfusion. Here are your results. completed
    in milliseconds
    5. Coldufsion -> Oracle. Acknlowledged. completed in
    millseconds.
    So it appears that internally within coldfusion a delay is
    occuring as the database and the network have been eliminated.
    The delay time is never the same and can range from a couple
    of seconds to over a minute. The times of day that these delays
    occur at is not uniform.
    The server is busiest between 0800 and 1700. But this server
    is NOT under heavy load at all, it is however query intensive. It
    is up 24 hours a day and there is a constant user base.
    We have tuned all our queries and cached them as best we can.
    However i'm not sure how much this helps as we get delays on
    queries we know are performant.
    We are currently upgrading one of our servers to CF8 using
    oracle thin jdbc drivers rather than the odbc to see if this makes
    a difference.
    If anyone has previous experience of this or knows of
    anything settings we need to tweak at a java level that would be
    great.
    Spec of what we are running is as below :
    Windows 2003 Server
    Coldfusion MX 7.0.2 Standard
    Oracle 10g ODBC Drivers
    Any help gratefully received as the users are starting to get
    fed up of having these delays for no apparent reason.

    > 3. Coldfusion -> Oracle Acknowledged......... delay
    > of 17 seconds (delay times vary)..... it's this query
    Do you mind elaborating here?
    It kind of appears as if there are two requests.
    Meaning, is it just as correct to state it this way:
    2. Oracle -> Coldfusion. Acknowledged, Yes what is it?
    Completed in millseconds.
    3. Coldfusion -> Oracle Acknowledged. it's this query.
    delay of 17 seconds (delay times vary)
    4. Oracle -> Coldfusion. Here are your results. completed
    in milliseconds
    If this is how it happened, then I would guess that
    it's a database issue.
    Or perhaps this is the more correct way to state it:
    2. Oracle -> Coldfusion. Acknowledged, Yes what is it?
    Completed in milliseconds.
    3. Coldfusion -> Oracle Acknowledged. Completed in ???
    4. Coldfusion -> Oracle it's this query. Completed in ???
    5. Oracle -> Coldfusion. Here are your results. completed
    in milliseconds
    If this is how it happened, then I would think you
    need to determine which step took 17 seconds.

  • Finder query return type..?

    I'm using a session bean ProcessBean and an entity bean AlarmBean....
    where one of functions processor() of ProcessDataBean is like......
    processor()
    println(.a..);
    println(..b.);
    correlate();
    println(.c..);
    And correlator() is like:-
    correlator()
    println(..d.);
    AlarmBeanLocal l = finder query();
    println(.e..);
    if(l != null)
    println(.m..)
    else
    println(.n..)
    Finder query returns the reference to the entity bean's local interface.......and depending on whether find is successful or not....I've to print m or n....
    Now the problem is whenever find is successful.......e, then m and then c gets printed......
    but when finder query is not successful, e and n doesn't get printed....and directly c gets printed...it means finder query is directly returning control to the previous function(processor where c is getting printed) .......
    I'm not getting whr. is the problem....
    in the condition l != null......?
    Plz. help me out...
    All the declarations in local and home interfaces and ejb-jar is correct.......and my jar file is deployed successfully.....but the output is not correct.....

    Hi Swati,
    Assuming ur finder returns a Single-object
    Single-object finder method may return a null value . If result set of query consists of a single null value, container must return null value as result of method. If resultset of a query for a single-object finder method contains more than one value (whether non-null, null, or a combination), container must throw FinderException from finder method. If result set of query contains no values, container must throw ObjectNotFoundException.
    HTH,
    Seetesh

  • CAML Query returning all items with date condition

    HI,
    I have a problem doing a query with CAML over the elements of a calendar in SharePoint 2013
    I just want to retrieve all items, which have been modified on a particular date. But below query returns all items from the Calendar.
    Any suggestion how to get specific items from the calendar. The same issue exists for start date  and end date.
      var oWebsite = clientContext.get_web();
        this.collList = oWebsite.get_lists();
        var camlQuery1 = new SP.CamlQuery();
       camlQuery1.set_viewXml(
       '<query><Where>'+
          '<Eq>'+
             '<FieldRef Name=\'Modified\'  IncludeTimeValue=\'TRUE\'/>' +
             '<Value Type=\'DateTime\'>2014-02-24T12:00:00Z</Value>'+
          '</Eq>'+
       '</Where></query>');
        this.collListItem1 = oList.getItems(camlQuery1);
        clientContext.load(collListItem1);

    Firstly try to make this change in your query and see if that helps
    camlQuery1.set_viewXml(
    '<View><Query><Where>'+
    '<Eq>'+
    '<FieldRef Name=\'Modified\' IncludeTimeValue=\'TRUE\'/>' +
    '<Value Type=\'DateTime\'>2014-02-24T12:00:00Z</Value>'+
    '</Eq>'+
    '</Where></Query></View>');
    Geetanjali Arora | My blogs |

Maybe you are looking for

  • Itunes 10 Installs but won't open - Please Help

    I had Itunes 10 installed working on my computer. I installed a program which also installed an older version of Quicktime which I think was version 6.5. The next time I tried to open Itunes it said I needed verion 7.5 of Quicktime to open Itunes ple

  • Porblems with built application, using wordsub.llb

    I am trying to compile a Vi that uses the New Report.vi to create a test datasheet. When I run the Vi in development mode, it works ok. When I run it after using the "build application" fucntion, the vi gives an error (Code 7). The description for th

  • Mouse clicks send app to crazy land

    I have a multi-threaded app with two main windows. One is the data display / main user interface event handler. The other is a seperate window with nothing but the menu bar--basically categorized commands that may be executed independent of what the

  • '$' in output device

    Hi! What does in mean when the output device starts with '$'? Thanks!

  • Combine Datapackage

    Hello Experts, I'm loading data from an infocube to some infoobject attributes. In the update rule of the start routine, I need to delete datapackage for several criteria:   delete DATA_PACKAGE where STOR_LOC NE 'SL01'.   delete DATA_PACKAGE where MO