XPATH Query syntax question

Hi Folks.
Have had a read of the documentattion but maybe I'm missing something subtle.
Given the following XML (Extract)
  <?xml version="1.0" ?>
- <IndividualAnnex xmlns="https://infocentre.gsm.org/TADIG-RAEX-AA14" xmlns:tadig-gen="https://infocentre.gsm.org/TADIG-GEN" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://infocentre.gsm.org/TADIG-RAEX-AA14 tadig-raex-aa14-3.0.xsd">
  - <ContactInformationList>
    - <Contact contactInformationID="111">
      - <ContactPerson>
        <tadig-gen:GivenName>Joe</tadig-gen:GivenName>
        <tadig-gen:FamilyName>Bloggs</tadig-gen:FamilyName>
      - <tadig-gen:PhoneFixList>
          <tadig-gen:PhoneFix>888888888888</tadig-gen:PhoneFix>
        </tadig-gen:PhoneFixList>
      - <tadig-gen:FaxList>
          <tadig-gen:Fax>9999999999999</tadig-gen:Fax>
        </tadig-gen:FaxList>
      - <tadig-gen:EmailList>
          <tadig-gen:Email>[email protected]</tadig-gen:Email>
        </tadig-gen:EmailList>
        </ContactPerson>
      </Contact>I am issuing the following SQL but not getting any value returned.
SELECT extract(v2.individual_annex,'IndividualAnnex/ContactInformationList[Contact/@contactInformationID="111"]/ContactPerson/@GivenName')
FROM raex_annex_3_0_v2 v2
WHERE v2.agreement_id = 1What should the SQL be if, for instance I wanted to return the "GivenName" of Joe?
Any assistance greatly appreciated.
Many thanks
Kind regards
Simon Gadd

Hi,
the following works in 11.1.0.6
SQL> with t as (select xmltype('<?xml version="1.0" ?>
  2    <IndividualAnnex xmlns="https://infocentre.gsm.org/TADIG-RAEX-AA14" xmlns:tadig-gen="https://infocentre.gsm.org/TADIG-GEN" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://infocentre.gsm.org/TADIG-RAEX-AA14 tadig-raex-aa14-3.0.xsd">
  3      <ContactInformationList>
  4          <Contact contactInformationID="111">
  5                <ContactPerson>
  6               <tadig-gen:GivenName>Joe</tadig-gen:GivenName>
  7               <tadig-gen:FamilyName>Bloggs</tadig-gen:FamilyName>
  8              <tadig-gen:PhoneFixList>
  9               <tadig-gen:PhoneFix>888888888888</tadig-gen:PhoneFix>
10               </tadig-gen:PhoneFixList>
11              <tadig-gen:FaxList>
12               <tadig-gen:Fax>9999999999999</tadig-gen:Fax>
13               </tadig-gen:FaxList>
14              <tadig-gen:EmailList>
15               <tadig-gen:Email>[email protected]</tadig-gen:Email>
16               </tadig-gen:EmailList>
17               </ContactPerson>
18             </Contact></ContactInformationList></IndividualAnnex>') xcol from dual)
19  select extractValue(
20     t.xcol
21    ,'/IndividualAnnex/ContactInformationList[Contact/@contactInformationID="111"]/Contact/ContactPerson/t:GivenName'
22    ,'xmlns="https://infocentre.gsm.org/TADIG-RAEX-AA14" xmlns:t="https://infocentre.gsm.org/TADIG-GEN"')
23  from t;
EXTRACTVALUE(T.XCOL,'/INDIVIDUALANNEX/CONTACTINFORMATIONLIST[CONTACT/@CONTACTINF
JoeAnts

Similar Messages

  • Simple database query syntax question

    Hi experts,
    I am just stucked here...
    e.g.
    String Name = "John Doe";
    String query =
    "select * from table where NameCol = "+Name;
    ResultSet rs =stmt.executeQuery(query);
    while (rs.next()) {
    System.out.println(rs.getString(NameCol);
    The complier complains that "Syntax error !" at
    " NameCol = ....." ?!?!
    Why this is happening ? What is the correct syntax ?
    Thanks in advance !
    Philip

    finally figured it out. thanks...

  • 11g pivot query syntax question

    I searched the forums and I have seen questions similiar to the one I am asking, but its not the exact same issue.
    I need 3 fields in my 'for' clause. I get 'column ambiguously defined. I think I get this error for a different reason that other people asking the question.
    The others seem to be doing more than 1 function in the pivot clause and those need an alias. I give an alias with my 1 function and still get an error.
    ORA-00918: column ambiguously defined
    I used aliases like the recommendation in other posts and I still get the same error. I think I need 3 columns in the for clause.
    --note that this is just a test table. These are not real names going into production
    create table pivot_tab (
    pk1 number,
    pk2 number,
    myElement varchar2(30),
    myElementDate date);
    pk1,pk2 are the unique key.
    I need this to return as: the vlaues after pk2, can be any alias. This is just an example.
    pk1  pk2  MY1_DATE, MY2_DATE, MY3_DATE
    select *
         from pivot_tab
        PIVOT ( max(myElementDate) for myElement
                in (''MY1','MY2','MY3'))
    I saw a couple of references to this syntax, but I get syntax errors.
    ora--00906: missing parentheses. So I dont think this syntax works.
    select *
         from pivot_tab
        PIVOT ( max(myElementDate) for (pk1,pk2,myElement)
                in (''MY1','MY2','MY3'))Edited by: Guess2 on May 6, 2013 6:50 AM

    don't have any sample data or expected results to test this with maybe
    SELECT *
      FROM (SELECT pk1,
                   pk2,
                   myelement,
                   myelementdate
              FROM pivot_tab) PIVOT (MAX (myElementDate)
                              FOR myElement
                              IN ('MY1' AS MY1, 'MY2' AS MY2, 'MY3' AS MY3));or maybe you are trying to pivot by the first part of the pk?
    with pivot_tab as (select 1 pk1, 2 pk2, 'MY1' myelement, sysdate myelementdate from dual union all
                       select  1 pk1, 3 pk2, 'MY2' myelement, add_months(sysdate,2) myelementdate from dual union all
                       select  1 pk1, 4 pk2, 'MY3' myelement, add_months(sysdate,3) myelementdate from dual union all
                       select 2 pk1, 5 pk2, 'MY1' myelement, sysdate myelementdate from dual union all
                       select  2 pk1, 6 pk2, 'MY2' myelement, add_months(sysdate,6) myelementdate from dual union all
                       select  2 pk1, 7 pk2, 'MY3' myelement, add_months(sysdate,7) myelementdate from dual )
    SELECT *
      FROM (SELECT pk1,
                   myelement,
                   myelementdate
              FROM pivot_tab) PIVOT (MAX (myElementDate)
                              FOR myElement
                              IN ('MY1' AS MY1, 'MY2' AS MY2, 'MY3' AS MY3));
    PK1     MY1     MY2     MY3
    1     5/6/2013 10:07:40 AM     7/6/2013 10:07:40 AM     8/6/2013 10:07:40 AM
    2     5/6/2013 10:07:40 AM     11/6/2013 10:07:40 AM     12/6/2013 10:07:40 AMEdited by: pollywog on May 6, 2013 10:08 AM

  • Pl/sql function returning query - syntax question

    Hi,
    I'm trying to figure out the syntax for the following query:
    BEGIN
    RETURN 'select name from table1 where name like '%' || :p1_name';
    END;
    It doesn't work because of the single-quotes around the % sign, plus the quotes for the query itself. How can I handle the % sign quotes? Any suggestions would be appreciated!
    Thanks,
    Nora

    Nora,
    If you want to use quotes within a quoted string, you have to duplicate the quotes.
    BEGIN
    RETURN 'select name from table1 where name like ''%'' || :p1_name';
    END;
    Fred.

  • XPATH Database Query Syntax in an Assign

    Trying to get an XPATH Database query to work by assigning the Input variable value in a simple BPEL Process to my query condition. I keep getting invalid XPATH errors. I cannot seem to figure out how get write it out.
    Here is what I have:
    <from expression="orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')"/>
    Here is my error:
    Error(30): [Error ORABPEL-10039]: invalid xpath expression [Description]: in line 30 of "C:\OraBPELPM_1\integration\jdev\jdev\mywork\BPELws\ReadDB\ReadDB.bpel", xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" specified in <from> is not valid, because XPath query syntax error. Syntax error while parsing xpath expression "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')", at position "80" the exception is Expected: ). Please verify the xpath query "orcl:query-database( 'select ename from emp where ename = bpws:getVariableData('inputVariable','payload','/client:ReadDBProcessRequest/client:input')' ,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL')" which is defined in BPEL process. . [Potential fix]: Please make sure the expression is valid.
    Any help?
    Thanks!!!

    Ok. I have figured out how to place the condition (variable value) inside a concatentated string. So my final result is the actual XPATH Query-Database statement. But the problem is it is being returned as a String. How can I turn that final string into the XPATH expression I need? I suspect another <COPY> block could pull this off but I am not sure how to do it.
    Here is my code:
    <process name="QueryBuild" targetNamespace="http://xmlns.oracle.com/QueryBuild" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:client="http://xmlns.oracle.com/QueryBuild" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <partnerLinks>
    <partnerLink name="client" partnerLinkType="client:QueryBuild" myRole="QueryBuildProvider"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:QueryBuildRequestMessage"/>
    <variable name="outputVariable" messageType="client:QueryBuildResponseMessage"/>
    <variable name="QueryText" type="ns1:string"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="inputVariable" createInstance="yes"/><!-- Generate reply to synchronous request -->
    <assign name="Assign_1">
    <copy>
    <from expression="concat(&quot;orcl:query-database('select ename from emp where empno = &quot;, bpws:getVariableData('inputVariable','payload','/client:QueryBuildProcessRequest/client:input'), &quot;,false(),false(),'jdbc:oracle:thin:scott/tiger@localhost:1521:ORCL)'&quot;)"/>
    <to variable="QueryText"/>
    </copy>
    <copy>
    <from variable="QueryText"/>
    <to variable="outputVariable" part="payload" query="/client:QueryBuildProcessResponse/client:result"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client" portType="client:QueryBuild" operation="process" variable="outputVariable"/>
    </sequence>
    </process>

  • Question about WebLogic query syntax

    Hello,
    I am using WebLogic Server 6.0, which came as part of the WebGain
    Studio SE 4.5 development kit. My question regards the Web Logic query
    syntax, which I have not yet mastered.
    I am trying to create a finder method that takes a single argument
    of type "char" and finds all matching fields of the column "keyword" in
    which the argument is the first letter of keyword. That is, if I were
    only looking for fields beginning with the letter "M", I'd use:
    (like keyword 'M%')
    However, I'm looking for all fields beginning with the first letter
    defined by the first argument. Sadly, this syntax:
    (like keyword '$0%')
    doesn't seem to be working. Any suggestions on the correct syntax?
    If this is not the right forum for this question, could someone
    suggest an appropriate newsgroup?
    Thanks, Dave

    962466 wrote:
    Hi all,
    I have an issue I need help with. I have created a script for an automated partition create on a monthly basis. It creates a monthly partition containing all dates within the respective month. The script is essentially this:
    ALTER TABLE SCHEMA.TABLE
    ADD PARTITION &&1
    VALUES LESS THAN (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    TABLESPACE LARGE_DATA94 COMPRESS;
    I continually get this error message "ORA-14019: partition bound element must be one of: string, datetime or interval literal, number, or MAXVALUE"
    The variable &&2 is passing in character data for the first of the month (E.G. '01-SEP-12'). &&1 passes character data for the month in MONYY (AUG12) I can run this query:
    select
    (to_number(to_char(to_date('&&2', 'DD-MON-YY'), 'YYYYMMDD')))
    from dual;
    With the output of 20120801. I cannot understand why I am able to run this partition create statement by hardcoding 20120901 but passing it in as a variable I receive the error. Note that I am not having problems with the &&1 variable. If anyone has any ideas please let me know. Thanks!I don't understand why you are taking a string, converting it to a date, then converting the date BACK TO a string ... then trying to convert that string to a number.
    What is the data type of the partitioning key? It appears that it is a NUMBER, but actually represents a DATE. If so, that is a fundamentally flawed design.

  • Correct wat to determine if the XPath Query resulted in a match

    What is the correct way to determine of the XPath Query
    (using e4x syntax) returned matching nodes?
    The result is never a null reference even if there are no
    matches found, and I can't seem to find a way to determine if the
    XMLList returned has any nodes except for a convoluted way like so:
    var matchingRecords:XMLList =
    xmlData.dataTable[0].dataRow.(@someAttribute == someVariable);
    var record:XML = matchingRecords[0]; //This is the part I
    don't like to have to do.
    if (record == null)
    //This means no matches were found.
    else
    //This means atleast one match was found.

    "...they feel they've done it all too perfectly ..."
    I've been working with Flex since it was beta, and I must
    disagree with this. In my experience, the Adobe/MM folks are paying
    very close attention to what we say.
    You need to understand that you do not modify/release
    commercial software casually. It will take months to years. Be
    patient, or find a workaround, they exist.
    Be sure to log your wishes/bugs on the wishform. I know for a
    fact that they monitor that. I have been contacted for
    clarifications on my posts there.
    http://www.macromedia.com/support/email/wishform/
    Tracy

  • Ora-01704 string literal too long error  on long query syntax

    I have a query with more than 4000 characters. I can't seem to get ociparse to accept it. The bind variables are not an issue as I am not concatenating any strings to the query syntax. It is just that my query will all the columns and unions etc exceeds 4000 characters. Any way around this short of hiding it in a view ( which I have already done for other long queries ).
    System:
    PHP 4.3.10
    OCI driver
    Oracle 9i Release 2
    Thanks,
    Bryan

    Misread your post, sorry. Oracle limits literal strings to 4,000 chars. According to the documentation it's required that you use bind variables where possible to shorten literal strings below 4,000. You could also try a pl/sql block.
    The error you're getting is being returned by Oracle, not PHP. I've seen it pop up on bugtraq a couple of times for PHP, but the answer is always the same. I'm more of a programmer than a database expert, so forgive me for not having a better answer. You may want to try posting this to one of the more specific oracle forums where someone will probably have a better answer for you.
    http://www.stanford.edu/dept/itss/docs/oracle/9i/server.920/a96525/toc.htm

  • 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

  • Retrieve xml attribute value of nth xml node using xpath query

    I have an xml with following stucture...
    <xml>
    <header>
     <DocumentReference OrderId="order001">
     <DocumentReference OrderId="order002">
     <DocumentReference OrderId="order003">
    I have to loop through this xml and retrieve the orderId values inside Biztalk orchestration.
    In the expression shape, I get the count of 'DocumentReference' nodes using an xpath query and then
    Added a loopshape to make sure it loops thru all nodes
    Loop condition:   n<=nodeCount     (where n is an integer variable, n=0 to begin with, incremented by 1 thru each loop, nodeCount is # of DocumentReference nodes)
     I try retrieve to the orderId in the following expression shape using the below xpath query
      xpathQuery = System.String.Format("//*[local-name()='OrderReference'][{0}]/@orderID)",n);
      sOrderId = xpath(MsgSingleInvoice,xpathQuery);
    And I get the following exception:
    Inner exception: '//*[local-name()='OrderReference'][1]/@orderID)' has an invalid token.
    Exception type: XPathException
    Appreciate any help!   thanks!

    Thanks for the quick response. I got rid of it.
    And I see a different error:
    Inner exception: Specified cast is not valid. Exception type: InvalidCastException
    Source: Microsoft.XLANGs.Engine  
    Target Site: System.Object XPathLoad(Microsoft.XLANGs.Core.Part, System.String, System.Type)
    Since variable 'n' is of integer type, I suspected it and changed it to n.ToString() and tested again and still see the same error.

  • 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

  • XPath Query Language Reference

    Aside from the three little examples given in the 11g Guide and the B2B Tech Note #011, is there a reference available for the XPath Query Language used by B2B? Is is possible to use complex XPath queries in the B2B Doc Definitions?

    I'm mainly just looking for the full capabilities of the queries.
    Specifically, at the moment, I'm looking for a way to match the value of a node to a group of values (like a sql 'in') as well as check the existence and value of other nodes within the same query.
    Do the documents I find for 'Preference XPath' pertain here?

  • Xpath query on initiateTaskResponse variable fails

    I have a small BPEL process which has a human task , in that when I try to access taskid from initiateTaskResponse message, it throws xpath query is invalid error.
    Thanks

    Thanks for your Reply,
    I can able to browse the variable in JDeveloper at design time. When I try to deploy the process, the server throws error on that assign activity(Selection Failure). So I have changed the assign activity to JavaEmbeeding, but now it throws 'Selection Failure' error at runtime.
    I can able to use anyother variables in assign activity.
    Thanks in advance,
    Murugavel Mahadevan

  • XPath query on a CLOB?

    Does anyone know if there is an easy way to run an XPath query against a CLOB column? I know it's simple if the column is XMLType, but what if it's a CLOB?

    Does CLOB store XML? If so, simply use XMLTYPE(clob_column).
    SY.

  • 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

Maybe you are looking for

  • Safari always crashes when i am saving images...can someone help me?

    Hi, I have had this problem for almost a year and somedays it happens every 5 minutes and somedays not at all.  I try to save iamges off of safari(by right clicking) and then safari crashes. Can anyone help me fix it? thanks! Calley here is the crash

  • Documents will not open up in Preview

    I cannot print labels, statements, anything that previously worked fine to print from Preview. It would automatically open, I never had to select anything. The window flashes but never opens. When I go to applications it is there but still won't open

  • How do I update my Itunes to the new 11.1?

    I need to back up my iphone onto my computer but i need to update itunes to the new 11.1 but it is not working.

  • Error in mapping a position

    Hi, We are trying to map a position to an employee and getting an error as 'Entry O 00231975 does not exist in T52B(Check Entry). The position 00231975 is a vlaid position and active in the system. Also when we are trying to attach any position to th

  • User popup window on logon

    Hi All, I'm new here so I'd like to say "Hi" to All! I have a question concerning logon popup window for specific user. Can one of you please tell me where can this be set that a specific user ( e.g. test_user) gets system message with info "bla bla