How do i prevent getting a xml declaration in the xml response

Hi,
I am using a soap call to access a webservice via plsql.
The xml response from the webservice starts as follows
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">..............
I want to find ways to
1. either prevent the xml tag <?xml version='1.0' encoding='UTF-8'?> from being returned in the response.
2. or somehow convert the entire response to a string and remove it by substr (not sure about this)
The issue i am facing is that when i run a xmltype.extract on the xml to get a particular node i am getting the
ORA-31013: Invalid XPATH expression
when i remove the tag from the response (using hardcoded values) i get the right values back.
Any suggestions are welcome.
Regards
kpillai

Hi,
The code extract with hardcoded values looks like this. Please note that i added quotes in the xml statement
'<?xml version=''1.0'' encoding=''UTF-8''?>which is not the case when oracle returns the xml and i guess thats the whole issue.
The code below runs perfectly. But when the entire procedure runs where the xml response is returned I get the error.
DECLARE
v_result XMLType;
v_xml XMLType;
v_request_id varchar2(100);
v_start varchar2(10);
v_end number(10);
p_namespace varchar2(2000):='xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:service="http://mercury.com/ppm/dm/service/1.0" xmlns:common="http://mercury.com/ppm/common/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mercury.com/ppm/dm/1.0"';
BEGIN
     v_xml := XMLType('<?xml version=''1.0'' encoding=''UTF-8''?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header /><soapenv:Body><service:createRequestResponse xmlns="http://mercury.com/ppm/dm/1.0" xmlns:service="http://mercury.com/ppm/dm/service/1.0" xmlns:common="http://mercury.com/ppm/common/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><service:return xmlns:service="http://mercury.com/ppm/dm/service/1.0" xmlns:common="http://mercury.com/ppm/common/1.0" xmlns="http://mercury.com/ppm/dm/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<addedBy>srvnewscale</addedBy>
<creationDate>2010-10-22T10:33:44Z</creationDate>
<description>testing1</description>
<name>20013876</name>
<displayURL>http://itg.abc.com:19001/itg/web/knta/crt/RequestDetail.jsp?REQUEST_ID=12345678</displayURL>
<identifier><id>20013876</id>
<serverURL>http://itg.abc.com:19001/itg/ppmservices/DemandService</serverURL>
</identifier><status>Enter - Amend Service Offering</status>
</service:return>
</service:createRequestResponse>
</soapenv:Body></soapenv:Envelope>');
     v_result := xmltype.extract(v_xml,'/soapenv:Envelope/soapenv:Body/service:createRequestResponse/service:return/name', p_namespace);
insert into result2 values(v_result);
     if (v_result is NULL)
     then
     dbms_output.put_line('no result');
     end if;
     end;
Regards
Edited by: 804401 on Oct 24, 2010 9:21 PM

Similar Messages

  • HT4236 (PC) When I sync a folder of photos, they sync to the generic photo library on my iPhone, but it creates another folder with duplicates of the pictures. How do I prevent/get rid of this second folder?

    (PC) When I sync a folder of photos, they sync to the generic photo library on my iPhone, but it creates another folder with duplicates of the pictures. How do I prevent/get rid of this second folder?

    Um... that does not contain "duplicates".
    It's just a view that shows you everything that's in your other albums and events in one place...

  • How do you query the Hotmail Calendar with a freebusy URL to get an XML response ?

    Hello,
    I've posted this on the Exchange Server Legacy thread, but they point me back here....
    Assuming that Outlook's (Hotmail's) Calendar service still supports XML FreeBusy requests, what am I doing wrong here ?
    I'm sending this GET request to obtain an XML return that I can then further process:
    GET / HTTP/1.1
    owa/public/?cmd=freebusy&start=2014-12-04T14: 00:00+01:00&end=2014-12-08T16:00:00+01:00&interval=30&u=SMTP:*** Email address is removed for privacy ***
    Translate: t User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)
    Content-Type: text/xml
    Host:
    www.calendar.live.com
    (Translate: t comes from http://www.infinitec.de/post/2004/12/31/Retrieving-a-users-availability-(freebusy-data).aspx)
    (User-Agent seems needed in order to get an XML response)
    It keeps giving me "400 - BAD REQUEST".
    What is the correct syntax for this  ?

    Hi,
    From your description, I would like to clarify the following things:
    1. If you use an Exchange account, you can use an OWA command to retrieve Free/busy information for a particular user.
    2. In your case, you use an Hotmail account. Actually, we have a dedicated support team regarding the Microsoft Outlook.com . I recommend you ask your question on our Microsoft Outlook.com forum which is staffed by more experts specializing in this kind
    of problems. Your understanding will be appreciated.
    For your convenience:
    http://answers.microsoft.com/en-us/outlook_com/forum/ocalendar?tab=Threads
    Hope this can be helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • How do I only get certain questions appear in the quiz results?

    I have created a course through Captivate 6, throughout the course there are questions to guage the learners attention. There is also a quiz at the end. However, captivate includes on the questions throughout the course on the quiz results which I do not want to happen.
    Can anyone advise how I can only get certain questions appear on the quiz results please?

    Branch aware turns off the playbar in 6 (not in 7 any more, at least not for me).
    Could you explain more in detail what you want, because I don't understand it. You want the user to answer all questions, but the score should only show what? If you don't want some questions to have a score added to the Quiz total, you can indicate that in the Properties of that Question slide.
    And please, tell the exact number (3 versions of 6), and also if you have to report to a LMS?
    Lilybiri

  • I have an iPhone5 16 gb and a 120 gb iPod. All my songs won't fit on the iPhone of course. How can I just get some of them on the iPhone? I want to keep all my music on the iPod. I am VERY new to all this so be gentle and thanks.

    I have an iPhone5, 16 gb and a 120 gb iPod. All my songs won't fit on the iPhone of course. How can I just get some of them on the iPhone? I want to keep all my music on the iPod, but just want SOME of my music on the iphone. I am VERY new to all this so be gentle and thanks.

    You Sync the Music you want on the Phone via iTunes on your computer.
    See here  >  http://support.apple.com/kb/HT1386
    From Here  >  http://www.apple.com/support/iphone/syncing/

  • How do I prevent Lightroom from creating duplicates if the edit in photoshop is not saved?

    Hello!
    How do I prevent Lightroom from creating duplicates if the edit in photoshop is not saved?
    So... Quite often I choose to 'Edit in photoshop' from Lightroom but then end up not saving the result. (for example, because I just wanted to experiment with the photo, or I'm not satisfied with the results)
    However, Lightroom always creates a copy of the original photo, which stays in the catalog even if the photoshop changes aren't saved.
    Is there a way to stop this, and only add a photo if it has been edited in PS?
    Using LR5 with PS CS6 on a Mac 10.9
    THANK YOU!

    Select 'Open the Image in PS as a Smart Object'. The image will be rendered by ACR in memory without being written to disc until you save it from within PS.

  • When I open a photo with Preview, it opens all the photos I have viewed previously.  How can I prevent that, other than manually clearing the list after each time?

    When I open a photo with Preview, it opens all the photos I have viewed previously.  How can I prevent that, other than manually clearing the list after each time?

    Close the pictures before you quit Preview. Cmd-opt-q will close all windows and quit. cmd-opt-w will close all windows and not quit.
    Or, Disable automatically opening files that were left open in General System Preferences

  • How come u dont get a cleaning cloth with the iphone any more

    how come u dont get a cleaning cloth with the iphone any more

    Apple doesn't read these forums.
    Submit your suggestion at http://www.apple.com/feedback

  • How do I prevent Firefox from switching me to the "working offline" mode in the midst of my online gaming?

    I'll be on-line, playing a game or surfing the web and the next thing I know I don't have an internet connection. I click on "repair internet connection" and get the feedback, "unable to repair. I click on file and see that there is a check mark by 'work off-line' which I never checked. How can I prevent Firefox browser from automatically switching me over to the off-line mode whenever it feels like it. Very frustrating! Happens more than a few times a week but not every time Firefox is open.

    Create a new Boolean pref with the name network.manage-offline-status and set the value to false.
    Right-click on the about:config page to open the right-click context menu and use "New > Boolean" to create a new Boolean pref.
    Name: <b>network.manage-offline-status</b>
    Value: <b>false</b>
    See also http://kb.mozillazine.org/about%3Aconfig

  • How do i prevent a slide that is after the quiz results page from showing?

    HI guys, I am trying to achieve the following in Captivate 6:
    1) Users answer questions. They have 2 attempts to pass with 70% or above.
    2) At the quiz results page, if the score is less than 70%, users get a button to retake the quiz. After the second attempt, If the percent is 70% or above, they can click a button to view a certificate or click a button to see a transcript. If the percent is less than 70%, they click a button to get a transcript but NOT a certificate.
    How can i accomplish this since i cannot add buttons to the quiz results page.

    Thanks for the feedback.
    I am trying to implement a simple hide/show routine and it does not work. This is what I want.
    I have two buttons (one to save a certifcate and one to save a course transcript).  I want to display those on the quiz results screen. The user has two chances to make a 70% or more on the quiz.
    If the user obtains less than 70% score on the first try, on the quiz results slide I want to hide the button to save the certificate but keep the one for the transcript. If the user passes with 70 or more, then both icons remain on screen.
    IF the user obtains less than 70% after the second try, the quiz results should only show the transcript button. If they pass with 70% or more, then both icons remain on screen.
    I tried advance interactions to hide or show the icons in the "on slide enter" on the quiz results screen but that did not work.
    This is an example of what i tried. if cpQuizInfoQuizPassPercent is less than 70% hide btncert. I also tried hiding the button and then assigning actions to show the button on passing the 70% but that did not work either.
    Suggestions?

  • How to debug WFXML 1.1 XML response?

    Hello,
    I am using the Extended Communication configuration of a Web Activity step in a custom workflow (R/3 version 4.7).  The step is setup to start an external non-SAP WF using WFXML 1.1 and store the response in a WF Proxy container element using routing class CL_SWH_WEB_XML_ROUTER.
    The external XML response has the same structure like a response I get when connecting the same WF to a SAP test workflow instead of the external workflow.
    The problem is that the workflow proxy container field does not get populated during runtime.
    Is there any way of finding out why a workflow has a problem creating the proxy object? I couldn't find any log entries, traces or ways to simulate the incoming XML response.
    Thanks for your help.
    Regards
       Martin

    Hi Paul..
       This is a common problem when you are working with webservices, i have worked with them and not always the response of the ws comes like de wsdl says, depends of your wsdl provider.
       I suggest you that checks your response of your webservice with the Enterprise Portal Web Services Checker View
      For see this view in NetWeaver go to Window > Show View > Other > Enterprise Portal Web Services Checker
      Put the wsdl url definition in wsdl url textbox
    and the click in the letter W, this procedure brings you all methods and everything for play with the WEB Services.. and you can check the response of you webservices call funtion, checks that all the tags comes like says in the wsdl
    Good luck
    Joshua

  • I receive a Software Update notice that fails. How do I find out who/what is trying to update? How do I stop its attempt to update? The only response allowed is "OK". When OK is selected the window goes away and nothing else happens.

    About once a month I receive the Software update notice that has failed. How do I find out who/what is trying to update? If I decided I want this update how do I allow it to continue? If I decided I do not want this update how do I stop it and its attempt to update? The only response allowed is "OK". When OK is selected the window goes away and nothing else happens.

    Hi sharkbiscuit79,
    Yes your cabinet 10 on the Crediton exchange has already been installed and linked with a FTTC DSLAM cabinet (making it able to provide FTTC fibre broadband) and has been Accepting FTTC orders since December 2013.  PCP10 (with it's DSLAM cabinet within 100meters of it) is locate on the junction of Commercial Road and the A3072.
    However by the looks of things your are just too far away to obtain a FTTC (VDSL2) connection, meaning FTTC fibre broadband is not available to you.
    Have a look at the Connecting Devon and Somerset Considerations (particularly the last paragraph) - http://www.connectingdevonandsomerset.co.uk/where-when-map-conditions/
    Your best bet is to talk to Connecting Devon and Somerset to see if there are any further plans to get a fibre based service to your area via https://www.connectingdevonandsomerset.co.uk/contact-us/ (as your area may not be inscope of any further deployment). Best give them your full address and landline number too as they can check if you are within a NGA area.
    jac_95 | BT.com Help Site | BT Service Status
    Someone Solved Your Question?
    Please let other members know by clicking on ’Mark as Accepted Solution’
    Try a Search
    See if someone in the community had the same problem and how they got it resolved.

  • I am using iMovies 11. How can I prevent getting duplicate photos

    I am using iMovies 11 in MacBook Pro. I dragged in photos from one particular event, now I am trying drag a couple more photos into this same Movie Project from a different event, but every time I drag and drop, it is duplicating the very last photo that was originally there from the first event and only showing that last photo from the first event instead of the new photos I dragged in.  How can I correct this?

    Post your topic in the iMove community here.
    That way you can get feedback directly from iMovie users.

  • How do I permanently get rid of Yahoo in the search bar?

    I "Manage Search Engines" and remove it, but every time I restart Firefox it's there again as the default. How do I get rid of Yahoo permanently? It is not my chosen search engine, and brings up very limited results.

    Nothing here works (1/22/2012). The only thing I could do was go to the Firefox tab in the left corner, go to Help, click Restart with Add-ons Disabled, wait for the little window to come up and check reset everything then click restart to make Yahoo go away. Of course my other tabs went away, but I had the URLs written down anyway. Now Google is my default engine again.

  • When I drag a link into a neighboring tab, how do I prevent Firefox from moving me into the new url?

    When I drag a link from tab #1 into tab #2, (Firefox 3.6.6) my browser window automatically shifts to tab #2. I've noticed that dragging into the lower portion of neighboring tabs is supposed to prevent this, but it's hit-or-miss. How do I kill this "feature" so that I can simply drag and drop while staying on the original page?
    == This happened ==
    Every time Firefox opened
    == Several versions ago.

    No, you can't avoid that.
    The purpose is that you can drag text or a link from one tab to a text area in another tab and to achieve that the tab must be opened and focused.

Maybe you are looking for

  • Open Directory Configuration Question

    I've got a Mac-Mini based server running Mountain Lion (10.8.3) and Server.app (2.2.1).  The server was migrated from Lion some weeks ago, the Server works OK, but seeing odd CPU usage and fairly frequent non-specific error reports which suggests tha

  • Fatal error while rendering UI component  since we are in BI 4.1 SP2 patch 4

    Hello, Since we are in BI 4.1 SP2 patch 4, we have one Analysis for Olap report  which have this message : Fatal error while rendering UI component. This report gets 7  folders  : 5 of them gets this error message and 2 of them works well It's the sa

  • CONTROLLING THE VIEWING EXPERIENCE IN ACROBAT

    CONTROLLING THE VIEWING EXPERIENCE IN ACROBAT This is a major bug (going back to at lease Acrobat 5) and just one of many related to the “Document Properties > Initial View” setting, which seem to be a “special project” for the Adobe Acrobat tech-tea

  • How do I get a refund on a bad app

    Bought an App today for my iPhone and it doesn't do what I bought it for. Seems the description implied a feature that doesn't actually exist. Anyone know how to get a refund from the App Store on a bad App?

  • If same file name but file types are different, we should get only particular file type in search results.

    Hi Team, If filename is same for .doc and .pdf, only .pdf file should come in search results. For example, Attendee.doc, Attendee.pdf are available, we should get only .pdf in the search results. Please help us on this how to achieve. Thanks, Manjeer