Please Help With : XVM-01003: [XPST0003]/LPX-00801: XQuery  Syntax error at

Hi gurus,
I need your help on using the XMLQuery function. We are FINALLY in the processing of migrating from 10g to 11gR2! Oracle says that we should replace extracValue with XMLQuery, so I am trying to do that but I am getting the errors below,
XVM-01003: [XPST0003] Syntax error at (if I use a PL/SQL variable).
LPX-00801: XQuery syntax error at (if I use the literals).
I have read through many of the posts related to XMLQuery and its default element namespace, but I have no luck on that. I have an example that has this kind prefix (a part of the xml is posted here):
<soap:Body>
<soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Code>
<soap:Value>soap:Sender</soap:Value>
<soap:Subcode>
<soap:Value>soap:InvalidMessage</soap:Value>
</soap:Subcode>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">UpdateCaseDetentionStatus does not apply to this case&apos;s type.</soap:Text>
</soap:Reason>
<soap:Node>CourtFileNumber</soap:Node>
I need to get the Text inside the Reason node. No matter what I do with the default namespace (and if I don't declare one I also get an error), I get the following error:
XMLQuery ('declare default element namespace s="http://www.w3.org/2003/05/soap-envelope" ; /s:Envelope/s:Body/s:Fault/s:Reason/s:Text'):
LPX-00801: XQuery syntax error at 's'
1 declare default element namespace s="http://www.w3.org/2003/05/soap-envelop
- ^
ORA-06512: at line 103
XMLQuery('declare default element namespace xmlns:soap="http://www.w3.org/2003/05/soap-envelope" ; /soap:Envelope/soap:Body/soap:Fault/soap:Reason/soap:Text'):
LPX-00801: XQuery syntax error at 'xmlns:soap'
1 declare default element namespace xmlns:soap="http://www.w3.org/2003/05/soa
- ^
ORA-06512: at line 103
Using the XMLTable function does not have any problems.
What do I do wrong here? I could just use the XMLTable to replace all the extractValue(s) that I have, but I really want to learn how to make the XMLQuery correct. Please help!
I just tried this and I got the same error:
XMLQuery('declare default namespace s="http://www.w3.org/2003/05/soap-envelope" ; (::) $p/s:Envelope/s:Body/s:Fault/s:Reason/s:Text' passing p_XMLDoc as "p"
Thank you.
Ben
Edited by: myora9i on Apr 22, 2011 1:42 PM

Hi Ben,
Can someone please explain to me when should I use the default key word and when I should not use it?If you declare a default namespace then all unqualified (= unprefixed) elements will be considered belonging to that namespace.
If you declare a namespace with a prefix, you'll have to qualify each element in the XQuery.
See below example based on your XML sample :
DECLARE
  soap_doc xmltype := xmltype(
  '<soap:Body xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Fault>
<soap:Code>
<soap:Value>soap:Sender</soap:Value>
<soap:Subcode>
<soap:Value>soap:InvalidMessage</soap:Value>
</soap:Subcode>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">UpdateCaseDetentionStatus does not apply to this case''s type.</soap:Text>
</soap:Reason>
<soap:Node>CourtFileNumber</soap:Node>
</soap:Fault>
</soap:Body>'
  v_text  varchar2(100);
BEGIN
  -- with a default namespace,
  -- no need to prefix each element :
  SELECT XMLCast(
    XMLQuery(
      'declare default element namespace "http://www.w3.org/2003/05/soap-envelope"; (::)
       /Body/Fault/Reason/Text'
      passing soap_doc
      returning content
    as varchar2(100)
  INTO v_text
  FROM dual;
  dbms_output.put_line(v_text);
  -- with a declared namespace prefix,
  -- each element must be qualified with the prefix :
  SELECT XMLCast(
    XMLQuery(
      'declare namespace s = "http://www.w3.org/2003/05/soap-envelope"; (::)
       /s:Body/s:Fault/s:Reason/s:Text'
      passing soap_doc
      returning content
    as varchar2(100)
  INTO v_text
  FROM dual;
  dbms_output.put_line(v_text);
END;
/

Similar Messages

  • I need help with what I believe to by a syntax error.

    The following snippet is from a class that extends AbstractTableModel.
    dataSource is an ArrayList, containing instances of a class for which getDescription() is a valid method.
    Line six is giving me an error. Maybe someone can tell me how to do this properly.
    Aside from that, I do have more code to insert. I just want to get this part right before adding the rest.
    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
    Object budgetDatum = null;
    switch(columnIndex){
    case 0:
    budgetDatum = dataSource.get(rowIndex).getDescription();
    return budgetDatum;
    }

    >
    By line six, I am referring to the following, which is the sixth line of my code:
    budgetDatum = dataSource.get(rowIndex).getDescription();
    The method, "getDescription()", is not recognized as a valid method, which leads me to believe I am accessing the member of dataSource incorrectly.
    >
    You still aren't providing all of the information needed.
    What type of object does 'dataSource.get' return?
    You probably need to cast the object to the proper type and call 'getDescription on that type.
    If it returns a BudgetDatum class object then cast it as that
    BudgetDatum budgetDatum;
    budgetDatum = ((BudgetDatum) dataSource.get(rowIndex)).getDescription();If you aren't using generics the 'get' method is probably just returning an Object.

  • HT5824 I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. Please help with turning my iMessage completely off..

    I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.

    If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it.  Also, try changing the password associated with the Apple ID that you were using for iMessage.

  • How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore. Please help with proper steps, if any.

    How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
    On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
    Please help with proper steps, if any.

    Also see... these 2 Links...
    Recovering your iTunes library from your iPod or iOS device
    https://discussions.apple.com/docs/DOC-3991
    Syncing to a New Computer...
    https://discussions.apple.com/docs/DOC-3141

  • Please help with "You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported." I have seen other responses on this but am not a techie and would not know how to start with that solution.

    Please help with the message I am receving on startup ""You can't open the application NovamediaDiskSupressor because PowerPC applications are no longer supported."
    I have read some of the replies in the Apple Support Communities, but as I am no techie, I would have no idea how I would implement that solution.
    Please help with what I need to type, how, where, etc.
    Many thanks
    AppleSueIn HunterCreek

    I am afraid there is no solution.
    PowerPC refers to the processing chip used by Apple before they transferred to Intel chips. They are very different, and applications written only for PPC Macs cannot work on a Mac running Lion.
    You could contact the developers to see if they have an updated version in the pipeline.

  • Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be ab

    Hi, please help with the installation of Lightroom 4, I bought a new Mac (Apple) and I want to install a software that I have on the album cd. My new computer does not have the drives. Can I download software from Adobe? Is my license number just to be able to download the srtony adobe.

    Adobe - Lightroom : For Macintosh
    Hal

  • [ETL]Could you please help with a problem accessing UML stereotype attributes ?

    Hi all,
    Could you please help with a problem accessing UML stereotype attributes and their values ?
    Here is the description :
    -I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
    -Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
    -Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
    s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
    -However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
    Please help
    Thank you

    Hi Dimitris,
    Thank you , a minimal example is provided now.
    Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
    Instructions for reproducing the problem :
    1-Run the uml2etl.etl transformation with the supplied launch configuration.
    2-Open lqn.model.
    There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
    The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
    Thank you
    Mana

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • Please help my printer talk to my computer. An error message always occurs when I try to print and Firefox self-help has not fixed the problem. Please help me directly with fixing the issue. Thank you.

    Please help my printer talk to my computer. An error message pops up whenever I try to print. I have tried the firefox self-help on this topic and it doesn't work. I need direct help with this problem.

    message is: "an unknown error occurred while printing" with the yellow icon and exclamation point. this is all it says every time.

  • Welcome. At the outset, I'm sorry for my English :) Please help with configuration Photoshop CS6 appearance. How to disable the background of the program so you can see the desktop. (same menus and tools) Chiałbym to be the same effect as CS5.

    Welcome.
    At the outset, I'm sorry for my English
    Please help with configuration Photoshop CS6 appearance.
    How to disable the background of the program so you can see the desktop. (same menus and tools)
    i wantto be the same effect as CS5.

    Please try turning off
    Window > Application Frame

  • HT201210 cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?

    cont contact apple server error please help with ipad touch 4. im just fed up with apple please help me because why is it only apple with these kind of problems?

    If you mean updae server
    Update Server
    Try:
    - Powering off and then back on your router.
    - iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - For one user uninstalling/reinstalling iTunes resolved the problem
    - Try on another computer/network
    - Wait if it is an Apple problem
    Otherwise what server are you talking about

  • HT3209 Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
    Regards.

  • Please help with slideshow problems!

    Am using Photoshop Elements 8 and trying to make a slideshow. Have tried 4 times now and keep ending up with same problem, cannot reopen project to continue edititing.  Won't show up in orginizer and when I find on harddrive and try to open get message " wmv file cannot be opened".  How can I save a
    slideshow inprogress and be able to reopen and continue to edit and make slideshow?  I want to thank anyone who can help me with this in advance as I
    have gotten so frustrated that I want to just scream.
    Thanks

    Thanks for the help, thought I had done so but maybe not.  Anyway will have another go at it, now may I ask another
    question?  I am trying to add audio to slideshow.  I have some music I purchased thru amazon as mp3 files but I get
    message no codec and when I try to add wmv I get same message.  What type of file do I need and how can I add
    multiple songs to one slideshow.   I have one little wmv file that will go in, but it just replicates itself multiple times until
    it fills slide show. 
    Thanks again, sorry to be a bother, but this thing is driving this old man crazy.
    Date: Sun, 26 Dec 2010 20:34:32 -0700
    From: [email protected]
    To: [email protected]
    Subject: Please help with slideshow problems!
    You need to save the slideshow project in order to be able to go back later and make changes or additions to an existing slideshow . The wmv file is a final output format.
    Now you are most probably using only the Output command: that is what makes the wmv file.
    You should also do the Save Project command. (and I make it a practice to do the Save Project command before I do the Output command).
    If you look at the Elements Organizer 8 Help, there is a topic on "Create a slide show".
    -- Very close to the beginning of that topic is a screen shot of the Sldie Show Editor screen,
    -- The bar below the usual menu bar is labeled with a "B" and called the Shortcuts bar.
    -- The 1st entry on that Shortcuts bar is "Save Project"
    It is the Save Project command that saves the information about which photos, audio, etc you placed in that specific slide show so that you can come back again to do subsequent editing.  Save each Project with a unique name.
    After completing the Save Project command, you shoud see an "icon" in the Organizer for that slide show.
    Note:  you must also keep the photo files and audio files which you have used in this slide show: you can't delete them because the project file does NOT contain a copy of the photos, it only has the identification and folder location of the photo and audio files.
    >

  • Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hi. I have an iPhone 4s. The music doesn't play when I connect it to my car stereo. It used to play previously but stopped playing all of a sudden. My phone is getting charged when I cut it to the USB port. Please help with this. The iOS is 6.1.3.

    Hello Priyanks,
    I found an article with steps you can take to troubleshoot issues with an iPhone not connecting to your car stereo:
    iOS: Troubleshooting car stereo connections
    http://support.apple.com/kb/TS3581
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    My "fn" button is stuck on only revealing mission control in Lion. With this problem none of my "f" keys will work nor can I hold "fn" and delete to delete text in opposite direction. Can someone please help with this?

    Following the fix here worked for me:
    https://discussions.apple.com/message/15680566#15680566
    except my plist file was in ~/Library instead of /Library.
    -Scott

Maybe you are looking for

  • Problem using javascript function?

    Hallo, i integrate a file for javascript functions with this code <afh:head title="#{res['pob.login']}"> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"/> <script type="text/javascript" src="../Javascript/Funktionen.js"></scr

  • Trouble creating forms from remote database

    Hi, We are having problems with connecting to remote databases with portal. We can create reports fine from the remote databases but when we try to create forms, it gives the error: 'This Table does not exist or you do not have the required privilege

  • Study centre for Oracle DBA

    Hi, I'm Rajakumar form Bangalore, now i'm working as a Linux admin and i like to study Oracle, kindly guide me to select good training centre in Bangalore and sagest me, orace DBA or Oracle apps DBA witch is best my co # 9449974804 mail id [email pro

  • Skype Randomly Dropping Calls and Terrible Microph...

    Hello guys. Recently, Skype has really been acting up for me. It's probably dropped a call 30 times in the last two days, and my microphone (Blue Snowball) quality is extremely muffled and bad quality. This stuff sounds normal if you have a bad conne

  • CJ 46 - OH Calculation issue

    Hello Gurus, I am not a PS guy but had to work on some WBS OH calculations. So here is my question. What is the business process for running CJ46 and CJ44? We have attached a costing sheet to a WBS ELement, We posted planned values to WBS using CJ40.