XMLType to query SOAP response

Hi guys,.

in fact, I have a problem to query soap response using xmltyp. I'm sure it's just a matter of the use of xpath and correct the namespaces.

I try to do

declare
  XMLResp  XMLType;
  NS       Varchar2(32000);
  vCount  integer :=1;
begin
  XMLResp := xmltype(
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:NS2="urn:IntegraWebServiceIntf">
      <NS1:GetArtikelVkPreisResponse xmlns:NS1="urn:IntegraWebServiceIntf-IIntegraWebService">
         <return xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="NS2:TVkPreis[3]">
            <item href="#1"/>
            <item href="#2"/>
            <item href="#3"/>
         </return>
      </NS1:GetArtikelVkPreisResponse>
      <NS2:TVkPreis id="1" xsi:type="NS2:TVkPreis">
         <ArtikelNummer xsi:type="xsd:string">650000016</ArtikelNummer>
         <AbgabeMenge xsi:type="xsd:double">0</AbgabeMenge>
         <EinzelPreis xsi:type="xsd:double">86</EinzelPreis>
         <PreisNr xsi:type="xsd:int">19</PreisNr>
         <StaffelPreisNr xsi:type="xsd:int">47</StaffelPreisNr>
      </NS2:TVkPreis>
      <NS2:TVkPreis id="2" xsi:type="NS2:TVkPreis">
         <ArtikelNummer xsi:type="xsd:string">650000019</ArtikelNummer>
         <AbgabeMenge xsi:type="xsd:double">0</AbgabeMenge>
         <EinzelPreis xsi:type="xsd:double">43</EinzelPreis>
         <PreisNr xsi:type="xsd:int">22</PreisNr>
         <StaffelPreisNr xsi:type="xsd:int">56</StaffelPreisNr>
      </NS2:TVkPreis>
      <NS2:TVkPreis id="3" xsi:type="NS2:TVkPreis">
         <ArtikelNummer xsi:type="xsd:string">650000015</ArtikelNummer>
         <AbgabeMenge xsi:type="xsd:double">0</AbgabeMenge>
         <EinzelPreis xsi:type="xsd:double">35</EinzelPreis>
         <PreisNr xsi:type="xsd:int">18</PreisNr>
         <StaffelPreisNr xsi:type="xsd:int">44</StaffelPreisNr>
      </NS2:TVkPreis>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>');
  ns := 'xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"';
  dbms_output.put_line('davor');
  WHILE XMLResp.existsNode('/NS2[' || vCount || ']',ns) = 1 LOOP
    dbms_output.put_line('drin');
    dbms_output.put_line(XMLResp.extract('/NS2[' || vCount || ']',ns).getStringVal());
    vCount := vCount + 1;
  END LOOP;
  dbms_output.put_line(XMLResp.extract('//SOAP-ENV:Body',ns).getStringVal());
  dbms_output.put_line('danach');
end;

I want to ask all instances of the tag "NS2:TVkPreis".

If I run what I get no results printed output of DBMS

When I change the XPATH expression for "//NS2:TVkPreis", I get an XML parsing error

ORA-31011: analysis of XML nicht been

ORA-19202: Fehler bei XML-Verarbeitung

LPX-00601: token not valid in: ' / / NS2:TVkPreis [1]' aufgetreten

ORA-06512: in 'SYS. XMLTYPE", line 124

ORA-06512: In line 41

31011 00000 - "XML parsing failed"

* Cause: XML parser returned an error trying to parse the document.

* Action: Check whether the document to parse is valid.

can someone pleas help out me?

concerning

Peter

I'm sure it's just a matter of the use of xpath and correct the namespaces.

Exactly.

You said all the namespaces, except the one that you really need (NS2):

"NS: = ' xmlns:SOAP - ENV ="http://schemas.xmlsoap.org/soap/envelope/"xmlns:NS2 =" urn: IntegraWebServiceIntf "';"

dbms_output.put_line ('strong');

IN all, XMLResp.existsNode ('/ / NS2:TVkPreis [' | vCount |]) (', ns) = 1 LOOP

dbms_output.put_line ('drin');

dbms_output.put_line (XMLResp.extract ('/ / NS2:TVkPreis [' | vCount |])) ']', ns) .getStringVal ());

vCount: = vCount + 1;

END LOOP;

And I do not recommend using this approach more.

Try with XMLTABLE.

Tags: Database

Similar Questions

  • Retrieve the element of the SOAP response

    Hello world

    DB version 11.2.0.4

    Tool: pl/sql developer

    How can I retrieve the element of NfeLinkDanfe by using the xmlQuery? It is a SOAP response...

    With this query, I can retrieve the node "SOAP - ENV:Body", but I Don t know how to get an attribute of the child:

    Select (xmlcast)
    XMLQUERY)
    ' declare namespace SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"; (:
    declare namespace xx = "GXX_KB001_v2.1.0.0"; (:
    / SOAP-ENV:Envelope/SOAP-ENV:Body/WSRecepcaoNFe.ExecuteResponse'
    from t.a.
    contents of return
    )
    as varchar2 (100)
    )
    of tmp_xml t

    It's the soap response:

    " < SOAP - ENV:Envelope xmlns:SOAP - ENV =" http://schemas.xmlsoap.org/SOAP/envelope/ "
    " container = ' http://www.w3.org/2001/XMLSchema "
    " xmlns:SOAP - ENC =" http://schemas.xmlsoap.org/SOAP/encoding/ "
    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance ">
    < SOAP - ENV:Body >
    < WSRNF. ExecuteResponse xmlns = "GXX_YYY_v1" >
    < Retornows >
    < Message >
    < Code > 500 < / code >
    < message > xxxxxxxx! < / Mensagem >
    < / Mensagem >
    < NotasFiscais >
    < NFe >
    < NfeNumero > 123458 < / NfeNumero >
    < NfeSerie > 123 < / NfeSerie >
    < NfeChaAcesso > 43130806354976000149551230001234581000009575 < / NfeChaAcesso >
    < NfeLinkDanfe > https://hml.com/hnfe055.aspx?RomMsABbcWZNFMWmvpu8Cky0j6BoT8JvrPTqRtREFzYC10ULxD4eFTdP< / NfeLinkDanfe >
    < NfeLinkXML > https://192.168.1.20 HML.com hnfe055.aspx
    ? RomMsABbcWZNFMWmvpu8Cky0j6BoT8JvrPTqRtREFzYaqLRr % 2fXw74KgR< / NfeLinkXML >
    < NfeMensagem / >
    < SitGNFe >
    < SitStatus > 3 < / SitStatus >
    < SitProcessamento > P < / SitProcessamento >
    < / SitGNFe >
    < SitSEFAZ >
    < SitCodigo > 100 < / SitCodigo >
    < SitDescricao > smoking o uso da NF-e < / SitDescricao >
    < / SitSEFAZ >
    < / CHILD >
    < / NotasFiscais >
    < / Retornows >
    < / WSRNF. ExecuteResponse >
    < / SOAP - ENV:Body >
    < / SOAP - ENV:Envelope >

    Thanks in advance!

    Henderson

    Just specify the full path to the item of interest and be careful with the namespaces:

    Select (xmlcast)

    XMLQUERY)

    ' declare SOAP namespace = "http://schemas.xmlsoap.org/soap/envelope/"; (::)

    declare default element names 'GXX_YYY_v1 '; (::)

    /SOAP:envelope / soap: Body / WSRNF. ExecuteResponse/Retornows/NotasFiscais/ENF/NfeLinkDanfe '

    in passing t.object_value

    contents of return

    )

    as varchar2 (100)

    )

    of tmp_xml t.

  • parsing a SOAP response

    Hi all

    I need to analyze this below the answer... but have no idea

    http://schemas.xmlsoap.org/soap/envelope/">
      
         http://tempuri.org">
            http://schemas.microsoft.com/dynamics/2008/01/documents/EmpltableWS">
               Original
               ceu
               
                  <_DocumentHash>30a13deb4619490c0fd70a5e56e70ad1
                  00:00:00
                  00:00:00
                  Admin
                  Contoso Enterprise
                  
                     060
                     0201
                     Site1
                     1000
                     1000
                  
                  [email protected]
                  No
                  Male
                  1000
                  Charlie Carson
                  Active
                  04
                  No
                  No
                  No
                  false
                  2013-01-01
                  0559999999
                  No
                  No
                  590
                  Bank
                  04999999
                  MGT. President BDM
                  5637144576
                  1955879158
                  Julia Funderburk
                  No
                  Employed
                  No
                  President-BDM
                  Yes
                  Yes
               
            
         
      
    
    

    On the response from the service I'm cela suite

    WebService Sub:{nServiceResponse()}

    "qDebug() < "responce="" data="" main=""> "< response.returnvalue().tostring();=""  ="" this="" value="" is="">

    parseEmployeProfile (response.returnValue ());

    }

    voidPMOwebservice:arseEmployeProfile (constQtSoapType & data) {}

    "qDebug() < "responce="" udatat="" after="" sending="" to="" parse=""> "< data["docpurpose"].tostring();="" this="" value="" i="" am="">

    QString Montana = data.toString ();

    JDA JsonDataAccess;

    QVariant jda.loadFromBuffer (mData) = qtData;

    const mapRoot =() qtData.value QVariantMap;

    const QVariantMap map = mapRoot.value("EmplTable",_"").toMap();

    QString DocPurpose = map.value("DocPurpose",_"").toString();   This value is also empty

    }

    Do not have idea how to analyze this complex response...

    waiting for your excellent response...

    Thanks in advnace.

    Hello

    Thanks for the reply...

    could you please show me an example on how to use this

    QtSoapStruct &soapStruct = (QtSoapStruct &) resp.method();int version = soapStruct["Version"].toInt();QtSoapArray &attributes = (QtSoapArray &) soapStruct["Attributes"];for (int i = 0; i < attributes.count(); ++i) {    QtSoapStruct item = (QtSoapStruct&) attributes[i];    QString attributeName = item["Attributename"].toString().toLower();    QString objectName = item["Objectname"].toString();    QString objectValue = item["Value"].toString();
    

    I'm new to the blackberry development...

    Example of ways... Use the attributes and the name of the object of the soap response that I posted previously...

    Thanks in advance...

  • How to manage the SOAP response

    Hello (beginner vCO),

    I use the SOAP Plugin and trying to figure out how to manage the here, a host of SOAP response is the log I get the SOAP response

    [12:53:43.124 2014-05-09] [I] the settings...

    [12:53:43.135 2014-05-09] [I] the available settings:

    [12:53:43.136 2014-05-09] [I] + parameter name: "GetRequestStatusResult", value: "< response >

    < item >

    < ServiceRequestID > SR138917 < / ServiceRequestID >

    OS DEPLOYMENT < ServiceRequestStatus > < / ServiceRequestStatus >

    < ServiceRequestCreated > 09/05/2014-15:20:25 < / ServiceRequestCreated >

    < ServiceRequestCompleted > < / ServiceRequestCompleted >

    MA138921 < CurrentActivity > < / CurrentActivity >

    OS DEPLOYMENT < CurrentActivityTitle > < / CurrentActivityTitle >

    < ActivityStartUTC > 09/05/2014-15:32 < / ActivityStartUTC >

    < ActivityEndUTC > < / ActivityEndUTC >

    < DurationTotalSeconds > < / DurationTotalSeconds >

    < AverageDurationSeconds > < / AverageDurationSeconds >

    < SecondsOffAverage > < / SecondsOffAverage >

    < EstimatedCompletionUTC > < / EstimatedCompletionUTC >

    < / OutputParameters >

    < warning > < / warnings >

    < exceptions > < / Exceptions >

    < / response > '

    It will be better to try and parse text or try and use another method with vCO

    If you haven't done so already, take a look at the action of com.vmware.libarary.soap.processOutParameters.  It is the action that generated the log you have placed in us.  It generates an object Properties (key, value pairs) with the value for each setting that results.

    In your case, assuming that 'outProps' is the result of the above, you can use:

    var getRequestStatusResult = outProps.get ("GetRequestStatusResult");

    And to analyze the code XML with E4X as Ilian said.

  • Why? A SOAP response cannot be decoded. Answer: null

    I'm developing a Flex 4 Application that comes in contact with webservices.

    If I launch my application with firefox or Chrome when it should catch an exception of Web service, it is not showing my exception message and show that the error: SOAP response cannot be decoded. Answer: null

    If I run my application with ie8 or flash player (outside the browser), it catch my exception and show my exception message... And that's OK.
    Ideas for my problem?
    Best regards
    Miguel

    == SOLVED ==

    Flash relies on the network of the browser stack for the results. etc...

    Some browsers will stop and not send flash content of the body if it receives a 500 status code. The best way to correct the mistake would be to code .net do not send a status 500 when you send a soapfault.

    protected void Application_EndRequest (object sender, EventArgs e)

    {
    If (Context.Response.StatusCode == 500 |) Context.Response.StatusCode is 300)
    {
    Context.Response.StatusCode = 200;
    }

    }

  • Modification of SOAP response

    Hello

    I have a requirement in which I need to change the soap response before sending it to the client. Here is the code snippet.

    @Resource
    WebServiceContext context;

    @WebMethod
    public QueryByExampleOutput QueryByExample (QueryByExampleInput input) {}

    QueryByExampleOutput output = new QueryByExampleOutput ();
    VR;
    {
    output = adptInst.mQueryByExample (input); -> This is another method of WebService (Siebel)

    /***********/
    That's where I need to intercept the SOAP response before sending it to the client

    }
    {} catch (exception is)
    }

    return output;
    }

    How to achieve this? I tried to use XMLStreamWriter but in vain.

    I am using WebLogic server 10.3 and stack of JAX - WS.

    Thank you
    Sudha.

    Published by: user519950 on June 26, 2009 03:05

    I have not used JDev before and don't know how it gathers the files together, however your .war generated should have the XML message and the handler class included.

    If you put a statement in the method init() of the Manager - as 'SOAPHandler built' - you should find this in your journal as a confirmation.

  • SQL to parse the SOAP response in columns

    Someone would be able to help me to use SQL to parse this response in a table? Oracle 11g.

    " < s: Envelope = xmlns:s ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    < Body >

    < GetWaitTimesResponse xmlns = "urn: Epic - com:Specialty.2010.Services.EmergencyDepartment" >

    " < = Xmlns:i GetWaitTimesResult ' http://www.w3.org/2001/XMLSchema-instance ">

    < event >

    < event >

    < description > arrived at first Contact provider < / Description >

    < EndID > 3100050 < / EndID >

    < EndName > ED PHYSICIAN ASSESSMENT BEGINNING < / EndName >

    < StartID > 50 < / StartID >

    < StartName > HAPPEN ED < / StartName >

    < WaitTimes >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 1 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 2 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 3 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < / WaitTimes >

    < / event >

    < event >

    < description > arrived at parts < / Description >

    < EndID > 55 < / EndID >

    < EndName > ED DOULE < / EndName >

    < StartID > 50 < / StartID >

    < StartName > HAPPEN ED < / StartName >

    < WaitTimes >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 1 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 2 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 3 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < / WaitTimes >

    < / event >

    < event >

    < description > to complete full registration < / Description >

    < EndID > 3000202 < / EndID >

    < EndName > ED FULL RECORD FULL < / EndName >

    < StartID > 50 < / StartID >

    < StartName > HAPPEN ED < / StartName >

    < WaitTimes >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 1 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 2 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 3 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < / WaitTimes >

    < / event >

    < event >

    < description > parts to present < / Description >

    < EndID > 3000150 < / EndID >

    < EndName > ED PRIME SUPPLIER CONTACT < / EndName >

    < StartID > 55 < / StartID >

    < StartName > PARTS ED < / StartName >

    < WaitTimes >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 1 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 2 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < WaitTime >

    < PatientCount > 0 < / PatientCount >

    < TimeFrameInHours > 3 < / TimeFrameInHours >

    < WaitTimeInMinutes > 0 < / WaitTimeInMinutes >

    < / WaitTime >

    < / WaitTimes >

    < / event >

    < / events >

    < LastUpdatedAt > 23/05/2014 13:35 < / LastUpdatedAt >

    < / GetWaitTimesResult >

    < / GetWaitTimesResponse >

    < / Body >

    < / s: Envelope >

    I've been Googling autour and here is where I am sitting today - get "PL/SQL: digital error or value.

    Select r.*

    of xml_table_test t

    xmltable)

    XmlNamespaces)

             ' http://schemas.xmlsoap.org/SOAP/envelope/ ' as 'env'

    , ' urn: Epic - com:Specialty.2010.Services.EmergencyDepartment "as"ns1"»

    )

    , ' / env:Envelope / env:Body / ns1:GetWaitTimesResponse'

    in passing t.xml_column_1

    path of xmltype columns xmlbody "GetWaitTimesResult / text ().

    ) x

    xmltable)

    "/ Events/events.

    passage of xmltype (dbms_xmlgen.convert (x.xmlbody.getclobval (), 1))

    path Description varchar2 columns (250) "Description".

    ) r

    ;

    Thanks for any help someone can provide

    For example:

    create table event_table)

    whole event_id

    , varchar2 (256) description

    number of end_id

    , end_name varchar2 (30)

    number of start_id

    , start_name varchar2 (30)

    );

    create table event_wt_table)

    whole event_wt_id

    whole event_id

    number of patient_count

    number of time_frame_hrs

    number of wait_time_min

    );

    Insert all

    When EventWtID = 1 then

    in event_table (event_id, description, end_id, end_name, start_id, start_name)

    values (EventID, Description, EndID, EndName, StartID, StartName)

    When 1 = 1 then

    in event_wt_table (event_wt_id event_id, patient_count, time_frame_hrs, wait_time_min)

    values (EventWtID, EventID, PatientCount, TimeFrameInHours, WaitTimeInMinutes)

    Select x 1. Event ID

    x 1. Description

    x 1. EndID

    x 1. EndName

    x 1. StartID

    x 1. StartName

    x 2. EventWtID

    x 2. PatientCount

    x 2. TimeFrameInHours

    x 2. WaitTimeInMinutes

    of xml_table_test t

    xmltable)

    XmlNamespaces)

    "http://schemas.xmlsoap.org/soap/envelope/" as "env".

    by default "urn: Epic - com:Specialty.2010.Services.EmergencyDepartment'.

    )

    ", ' / env:Envelope / env:Body / GetWaitTimesResponse/GetWaitTimesResult/events/events"

    in passing t.xml_column_1

    EventID columns for ordinalite

    , Description varchar2 (256) path "Description."

    , Path number EndID "EndID.

    , Path of varchar2 (30) EndName 'EndName '.

    , Path number StartID 'StartID '.

    , StartName varchar2 (30) path "StartName.

    , Path of xmltype WaitTimes "WaitTimes.

    ) x 1

    xmltable)

    XmlNamespaces)

    by default "urn: Epic - com:Specialty.2010.Services.EmergencyDepartment'.

    )

    , ' / WaitTimes/WaitTime.

    by the way x 1. WaitTimes

    columns EventWtID for ordinalite

    , Path of varchar2 (250) PatientCount 'PatientCount '.

    , TimeFrameInHours path number 'TimeFrameInHours '.

    , Path of varchar2 (250) WaitTimeInMinutes 'WaitTimeInMinutes '.

    ) x 2

    ;

  • A query EQL response XML parsing

    Hello, I am new to short, and I upgraded from 2.4 to 3.0 short short.
    When I run a query of the Integrator, I get a response like this:

    ------
    < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    < soapenv:Header / >
    < soapenv:Body >
    < xmlns:cs cs: results = "http://www.endeca.com/MDEX/conversation/2/0."
    xmlns:MDEX = "http://www.endeca.com/MDEX/XQuery/2009/09" >
    < cs: ContentElement xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance".
    xsi: type = "cs: NQL Different" Id = "LQLConfig" >
    < cs: ResultRecords NumRecords = "390" Name = 'Messages' >
    < cs: DimensionHierarchy / >
    < name cs: AttributeMetadata = "FactPost_PostId."
    Type = "mdex:string" / >
    < name cs: AttributeMetadata = "FactPost_TimeId."
    Type = "mdex:string" / >
    < name cs: AttributeMetadata = "FactPost_Type."
    Type = "mdex:string" / >
    < cs: record >
    < name cs: attribute = "FactPost_PostId" type = "mdex:string" > 100002635219620_411535012277669
    < / cs: attribute >
    < name cs: attribute = "FactPost_TimeId" type = "mdex:string" > 2013 - 05-01 T 01: 49:35 - 0000
    < / cs: attribute >
    < name cs: attribute = "FactPost_Type" type = "mdex:string" > FB_POST_SEARCH_1
    < / cs: attribute >
    < / cs: record >
    < cs: record >
    < name cs: attribute = "FactPost_PostId" type = "mdex:string" > 420550781295893_592578997426403
    < / cs: attribute >
    < name cs: attribute = "FactPost_TimeId" type = "mdex:string" > 2013 - 05-01 T 03: 17:52 - 0000
    < / cs: attribute >
    < name cs: attribute = "FactPost_Type" type = "mdex:string" > FB_POST_SEARCH_1
    < / cs: attribute >
    < / cs: record >
    < / cs: ResultRecords >
    < / cs: ContentElement >
    < / cs: results >
    < / soapenv:Body >
    < / soapenv:Envelope >
    -----

    How do I analyze it? I tried with the XMLReader component, with this mapping:
    -----
    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >
    < context xpath = "" / soapenv:Envelope "outPort = '0' namespacePaths =" soapenv = "http://schemas.xmlsoap.org/soap/envelope/"; CS = 'http://www.endeca.com/MDEX/conversation/2/0' ">"
    "< xpath="./soapenv:Body/cs:Results/cs:ContentElement/cs:ResultRecords context ">
    "[" < mapping cloverField = "FactPost_PostId' xpath="./cs:Record/cs:attribute[@name='FactPost_PostId "]" / >
    "[" < mapping cloverField = "FactPost_TimeId' xpath="./cs:Record/cs:attribute[@name='FactPost_TimeId "]" / >
    "[" < mapping cloverField = "FactPost_Type' xpath="./cs:Record/cs:attribute[@name='FactPost_Type "]" / >
    < / context >
    < / context >
    -----

    but I get an error:
    Node XML_READER0 completed with status: ERROR caused by: xpath result, fill in the field "FactPost_PostId" contains two values or more!

    What's not in my map? How can I analyze what kind of xml?

    Try to collapse these context-s down to one, for example:


    <>
    XPath = "" / soapenv:Envelope / soapenv:Body / cs: results / cs: ContentElement / cs: ResultRecords / cs: record ""
    outPort = '0 '.
    namespacePaths = "soapenv ="http://schemas.xmlsoap.org/soap/envelope/"; CS = 'http://www.endeca.com/MDEX/conversation/2/0' ">"
         
         
         

  • Unable to parse the soap response if the response contains several objects

    Hello

    I am able to analyze the SAOP response.
    but I do not know how to parse for multiple objects in the entry. could you please check with below, which must analyze. I provided 3 objects of entry in the SOAP, but it should work for many also. and if we can analyze the length 32767 morethen clob?
    Please help it our of here.


    response_env: =' < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    < soapenv:Body >
    < UserInfoObjResponse xmlns:axis2ns1 = "http://www.test.com/services" >
    < axis2ns1:FirstName > first name out < / axis2ns1:FirstName >
    < axis2ns1:LastName > last exit name < / axis2ns1:LastName >
    < axis2ns1:ErrorDescription / >
    < / UserInfoObjResponse >
    < UserInfoObjResponse xmlns:axis2ns1 = "http://www.test.com/services" >
    < axis2ns1:FirstName > first name out < / axis2ns1:FirstName >
    < axis2ns1:LastName > last exit name < / axis2ns1:LastName >
    < axis2ns1:ErrorDescription / >
    < / UserInfoObjResponse >
    < UserInfoObjResponse xmlns:axis2ns1 = "http://www.test.com/services" >
    < axis2ns1:FirstName > first name out < / axis2ns1:FirstName >
    < axis2ns1:LastName > last exit name < / axis2ns1:LastName >
    < axis2ns1:ErrorDescription / >
    < / UserInfoObjResponse >
    < / soapenv:Body >
    < / soapenv:Envelope > ';
    -----------------------------------------
    declare
    CLOB response_env;
    v_xml XMLTYPE.
    l_user_first_name varchar2 (1000);
    l_user_last_name varchar2 (100);
    l_error_value varchar2 (100);
    NS varchar2 (200): = 'xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/' xmlns:axis2ns1 = "http://www.test.com/services" ';
    Start
    response_env: =' < soapenv:Envelope = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenv >
    < soapenv:Body >
    < UserInfoObjResponse xmlns:axis2ns1 = "http://www.test.com/services" >
    < axis2ns1:FirstName > first name out < / axis2ns1:FirstName >
    < axis2ns1:LastName > last exit name < / axis2ns1:LastName >
    < axis2ns1:ErrorDescription / >
    < / UserInfoObjResponse >
    < / soapenv:Body >
    < / soapenv:Envelope > ';

    dbms_output.put_line (' length to ask:' | length (response_env));
    -dbms_output.put_line (' ask: ' | response_env);

    v_xml: = XMLTYPE (response_env);

    Select EXTRACTVALUE(v_xml,'/soapenv:Envelope/soapenv:Body/UserInfoObjResponse/axis2ns1:FirstName',ns),
    EXTRACTVALUE(v_xml,'/soapenv:Envelope/soapenv:Body/UserInfoObjResponse/axis2ns1:LastName',NS),
    EXTRACTVALUE(v_xml,'/soapenv:Envelope/soapenv:Body/UserInfoObjResponse/axis2ns1:ErrorDescription',NS)
    in l_user_first_name, l_user_last_name, l_error_value
    Double;

    dbms_output.put_line ('l_user_first_name: ' | l_user_first_name);
    dbms_output.put_line ('l_user_last_name: ' | l_user_last_name);
    dbms_output.put_line ('l_error_value: ' | l_error_value);
    end;
    --------------------------------------------
    SQL> declare
       response_env   clob
          := '
    
    
    1. First Name Output
    Last Name Output
    
    
    
    2. First Name Output
    Last Name Output
    
    
    
    3. First Name Output
    3. Last Name Output
    
    
    
    ';
    begin
       for c in (select x.*
                   from xmltable (
                           xmlnamespaces (
                              'http://schemas.xmlsoap.org/soap/envelope' as "x",
                              'http://www.test.com/services' as "axis2ns1"),
                           '*'
                           passing xmltype (response_env).
                                   extract (
                                      '//UserInfoObjResponse',
                                      'xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:axis2ns1="http://www.test.com/services"')
                           columns firstname varchar2 (25) path 'axis2ns1:FirstName',
                                   lastname varchar2 (25) path 'axis2ns1:LastName',
                                   errordescription varchar2 (25) path 'axis2ns1:ErrorDescription') x)
       loop
          dbms_output.put (rpad(c.firstname,30));
          dbms_output.put (rpad(c.lastname,30));
          dbms_output.put_line (rpad(c.errordescription,30));
       end loop;
    end;
    /
    1. First Name Output          Last Name Output
    2. First Name Output          Last Name Output
    3. First Name Output          3. Last Name Output
    PL/SQL procedure successfully completed.
    
  • How to analyze the object in the soap response in Blackberry

    I am new to blackberry develipment.i developed using Momentics IDE. Now, I'm working on the integration of Soap Web service. Now my webservice function call works. I answer also. My webservice response, it's like

    http://shidhints.com/">booleanstringstringint    string    string
    

    While parese the answer, now I can analyze and get the token, NumberofReferral but I can't analyze the ListEmails object. How do I analyze this ListEmails, me, pleasehelp

    const QtSoapMessage& response = m_soap.getResponse();const QtSoapType& responseValue = response.returnValue();
    
    m_Token = responseValue["Token"].value().toString();
    m_NumberofReferral = responseValue["NumberofReferral"].value().toString();
    

    use QtSoapArray for that.

    I think this could work:
    QtSoapArray & email = (QtSoapArray &) responseValue ["ListEmails"];
    work with count() and iterate over the table to retrieve the values.

  • Process the SOAP response and use these values as variables

    Hello

    I have a SOAP request that I try to get out as variables, but whenever I run the workflow it is successful, but I'm not able to assign variables to output as parameters (but if I assign the parameter and do a system.log that it works but it does not work if I want to use the result in one variable to another part of the workflow)

    Here is the result:

    [14:31:30.437 2015-04-30] [I] processing response...

    [14:31:30.437 2015-04-30] [I] headers...

    [14:31:30.468 2015-04-30] [I] the settings...

    [14:31:30.475 2015-04-30] [I] the available settings:

    [14:31:30.476 2015-04-30] [I] + parameter name: "GetRequestStatusResult", value: "< response >

    < item >

    < ServiceRequestID > SR145208 < / ServiceRequestID >

    OS DEPLOYMENT < ServiceRequestStatus > < / ServiceRequestStatus >

    < ServiceRequestCreated > 20/04/2015-17:57:59 < / ServiceRequestCreated >

    < ServiceRequestCompleted > < / ServiceRequestCompleted >

    MA145212 < CurrentActivity > < / CurrentActivity >

    OS DEPLOYMENT < CurrentActivityTitle > < / CurrentActivityTitle >

    < ActivityStartUTC > < / ActivityStartUTC >

    < ActivityEndUTC > < / ActivityEndUTC >

    < DurationTotalSeconds > < / DurationTotalSeconds >

    < AverageDurationSeconds > < / AverageDurationSeconds >

    < SecondsOffAverage > < / SecondsOffAverage >

    < EstimatedCompletionUTC > < / EstimatedCompletionUTC >

    < / OutputParameters >

    < warning > < / warnings >

    < exceptions > < / Exceptions >

    < / response > '

    [14:31:30.478 2015-04-30] [I] + attribute of parameter name: '. (xmlns)', value: "http://SystemCenter.JPMChase.net/' "

    Here is my scriptable task:

    var getRequestStatusResult = outParameters.get ("GetRequestStatusResult");

    var content = getRequestStatusResult; the value of the GetRequestStatusResult parameter above XML text ("< response >... < / response > '")

    var doc = new XML (content); analyze the entire response

    serviceRequestNumber = doc. OutputParameters.ServiceRequestID;

    Service_RequestStatus = doc. OutputParameters.ServiceRequestStatus;

    serviceRequestCreated = doc. OutputParameters.ServiceRequestCreated;

    serviceRequestCompleted = doc. OutputParameters.ServiceRequestCompleted;

    currentActivity = doc. OutputParameters.CurrentActivity;

    currentActivityTitle = doc. OutputParameters.CurrentActivityTitle;

    activityStartUTC = doc. OutputParameters.ActivityStartUTC;

    activityEndUTC = doc. OutputParameters.ActivityEndUTC;

    durationTotalSeconds = doc. OutputParameters.DurationTotalSeconds;

    averageDurationSeconds = doc. OutputParameters.AverageDurationSeconds;

    secondsOffAverage = doc. OutputParameters.SecondsOffAverage;

    estimatedCompletionUTC = doc. OutputParameters.EstimatedCompletionUTC;

    not quite sure about this, but I think if you check out parts of an XML object, the result is also an XML object (and not a string).

    If you want to bind the values of the attributes of string in your workflow, you must explicitly convert the strings, using the method. toString().

    So (out of mind, not yet tested!), this should do the job:

    serviceRequestNumber = doc. OutputParameters.ServiceRequestID;

    serviceRequestNumber = serviceRequestNumber.toString ();

    Service_RequestStatus = doc. OutputParameters.ServiceRequestStatus;

    Service_RequestStatus = Service_RequestStatus.toString ();

    Using System.log automatically performs the conversion, but only internally to create the log message. So you see the output, even if the assignment to the workflow attribute does not work.

    Kind regards

    Joerg

  • XMLType extract query

    Hello:

    How to change the following query to get only the element with a given person_id? Actually, I have a CLOB containing an XML document. I thought that step 1 is to create a view, or something that casts of this column to an XMLType object, so I do that in the data of test here as well. If I do not need to do, it makes it very well.
    with base as ( -- Base XML
        select '<?xml version="1.0" encoding="UTF-8"?>
        <person_record_set>
        <person>
        <lname>Doe</lname>
        <fname>John</fname>
        <person_id>12345</person_id>
        </person>
        <person>
        <lname>Smith</lname>
        <fname>John</fname>
        <person_id>54321</person_id>
        </person>
        <person>
        <lname>Jones</lname>
        <fname>Mary</fname>
        <person_id>33333</person_id>
        </person>
        </person_record_set>' bdata
    from dual
    ),
    Q1 as ( -- We want it as an XMLType
    select xmltype(bdata) xtdata 
    from base)
    -- End of test data setup
    select '<rows>' || extract(xtdata,'//person') || '</rows>' from Q1
    Thank you

    You can use conditions on the xpath:

    with q1 as (select xmltype('
        
        
        Doe
        John
        12345
        
        
        Smith
        John
        54321
        
        
        Jones
        Mary
        33333
        
        ') xtdata from dual)
    -- End of test data setup
    select '' || extract(xtdata,'//person[person_id=12345]') || '' from Q1
    

    I don't like particularly the addition of '', though; that's what you do with this data? There are probably better ways to do this.

    Published by: Boneist on May 16, 2012 14:55

  • Is it possible to send the response to the client with the SOAP header containing the user information in JAX - WS?

    Hello

    I use JDev 11.1.1.7.0 and Weblogic 10.3.

    I have a JAX - WS based web service on which authentication and authorization was in place and operational.

    The SOAP request carries information of SOAP header with the token of user name and password for authentication. Similarly the SOAP response can also transport header to the client information? So that the customer who receives the answer happens to knowledge of who he actually received the answer.

    Thanks in advance.

    Hi Harsha,

    Is quite easy to define soap headers in a response message soap envelope. No need to use handlers either. Please find the link that would be useful below.

    You must use the WebParam property and set the modes for messages (IN, OUT, INOUT) and you can pass multiple values JAX WS service using "javax.xml.ws.Holder".

    http://tomee.Apache.org/examples-trunk/WebService-holder/Readme.html

    Please find the sample and put interfaces implement the Web service for the same.

    Interface:

    @WebMethod (operationName = "GetItemDetails", action = "http://xmlns.org/ItemService/GetItemDetails/V1")

    Public Sub getItemDetails)

    @WebParam (name = "ItemCandListServiceMessage", targetNamespace = "http://xmlns.org/ItemCandList", partName is "ItemRequest" mode = Mode.IN) ItemCandListServiceMessageCmplxType itemRequest,.

    @WebParam (name = "ItemServiceMessage", targetNamespace = "http://xmlns.org/Item", partName is "ItemResponse" mode = Mode.OUT) owner itemResponse,.

    @WebParam (name = "ItemSOAPHeader", targetNamespace = "http://xmlns.org/ItemSOAPHeader", "ItemSOAPHeader" = partName, header = true, mode = Mode.INOUT) holder itemSOAPHeader)

    throws ItemFaultMessage

    ;

    Implementation:

    public void getItemDetails (ItemCandListServiceMessageCmplxType itemRequest, door itemResponse, door itemSOAPHeader) throw {ItemFaultMessage}

    itemResponse.value = objectFactory.createItemServiceMessageCmplxType ();

    itemSOAPHeader.value.setRequestId ("response");

    itemResponse.value = itemServiceBean.getItemDetails (itemRequest, itemSOAPHeader.value, itemResponse.value);

    }

  • Debugger of different behavior / response SOAP

    Hi all

    I have a question about a difference between the behavior of the debugger and the SOAP response, using the same entry/call data. I'll explain below:

    It's my data entry
    < feature id = "global" complete = "false" >
    < instance id = "global 1" >
    < feature id = full "depersoon" = "true" >
    < instance id = "depersoon 1" >
    < attribute id = "persoon_rol" type = "text" deducted = "false" >
    Type < text-val > < / text-val >
    < / attribute >
    < attribute id = "persoon_geboortedatum" type = "date".
    inferred = "false" >
    < date-val > 1998-03-04 < / date-val >
    < / attribute >
    < / body >
    < instance id = "depersoon 2" >
    < attribute id = "persoon_rol" type = "text" deducted = "false" >
    aanvrager < text-val > AKW < / text-val >
    < / attribute >
    < / body >
    < / entity >
    < / body >
    < / entity >


    It's my SOAP request
    < soapenv:Envelope xmlns:soapenv = 'http://schemas.xmlsoap.org/soap/envelope/' xmlns:typ = "http://oracle.com/determinations/server/10.3/rulebase/assess/types" >
    < soapenv:Body >
    < type: evaluate request >
    < typ:outcome >
    < typ:entity id 'global' = >
    < typ:attribute - id of result = result "doel_datacollectie" style = "decision-report" / >
    < / typ:entity >
    < / typ:outcome >
    < / typ:config >
    < type: global instance >
    < feature id = full "depersoon" = "true" >
    < instance id = "depersoon 1" >
    < attribute id = "persoon_rol" type = "text" deducted = "false" >
    Type < text-val > < / text-val >
    < / attribute >
    < attribute id = "persoon_geboortedatum" type = "date" deducted = "false" >
    < date-val > 1998-03-04 < / date-val >
    < / attribute >
    < / body >
    < instance id = "depersoon 2" >
    < attribute id = "persoon_rol" type = "text" deducted = "false" >
    aanvrager < text-val > AKW < / text-val >
    < / attribute >
    < / body >
    < / entity >
    < / typ: global instance >
    < / typ: evaluate request >
    < / soapenv:Body >
    < / soapenv:Envelope >
    The OPM debugger

    Now, I did some rules of procedure in order to deduce the data necessary for a deduction. The main rule is to state that all of the data is completed, if some secondary data sets are known. Now, if the child (het kind) is less than 16 years, I want to ask a different subset that wehen the child is 16 or more. I did it by using the following rule: (read 'and' to 'fr' and 'or' to 'from'):

    verplichte dataset voor het bepalen van recht op kinderbijslag is handig als
    DataSet voor request is handig
    en
    DataSet voor aanvrager is handig
    en
    een van
    Alle
    DataSet voor kind onder 16 is handig
    en
    ForAll (het kind, of York van het kind < 16)
    of
    Alle
    DataSet voor kind boven 16 is handig
    en
    ForAll (het kind, of York van het kind > = 16)

    In the debugger, when I put the age of the child 13 and choose "study," the decision tree for the data set for the children over 16 years of age is not displayed. However, in the SOAP response, this information is indicated (see curisive below). I would like to know if and how it would be possible to organize the report of decision not to show these attributes.


    SOAP response
    < SOAP - ENV:Envelope xmlns:SOAP - ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:i18n = "http://www.w3.org/2005/09/ws-i18n" xmlns:typ = "http://oracle.com/determinations/server/10.3/rulebase/assess/types" >
    < SOAP - ENV:Header >
    < i18n:international >
    nl_NL < i18n: local > < / i18n: local >
    < i18n:tz > GMT + 0100 < / i18n:tz >
    < / i18n:international >
    < / SOAP - ENV:Header >
    < SOAP - ENV:Body >
    < type: assessment / response >
    < type: global instance >
    < typ:attribute id = "doel_datacollectie" type = "boolean" deducted = "false" >
    < typ:unknown - val / >
    < typ:decision - report-style = 'decision-report' report >
    < typ:attribute - node id = id of the entity-"dn:0". "= the instance id 'global' = 'global' hypothetical instance ="false"attribute id ="doel_datacollectie"type ="boolean"text ="dataset het bepalen van recht op kinderbijslag handig voor verplichte is?"deducted ="false">
    < typ:unknown - val / >
    < typ:relationship - node id = "dn:16" id-entity-source = 'global' source-instance-id = 'global' hypothetical instance = "false" target-entity-id = "depersoon" - relationship id = "hetkind" status "known" = deducted = "true" >
    < instance id = typ:target "depersoon 1" / >
    < typ:relationship - node id = "dn:8" id-entity-source = 'global' source-instance-id = 'global' hypothetical instance = "false" target-entity-id = "depersoon" - relationship id = "depersonen" State = "known" deducted = "false" >
    < instance id = typ:target "depersoon 1" / >
    < instance id = typ:target "depersoon 2" / >
    < / typ:relationship - node >
    < / typ:relationship - node >
    < typ:attribute - id = the id of the entity node-"dn:1" = id of the 'global' instance 'global' = hypothetical instance = "false" attribute id = "b2@Rules_Datacollectieregels_doc" type = "boolean" text = "Is to request handig voor dataset?" deducted = "false" >
    < typ:unknown - val / >
    < typ:attribute - node id = id of the entity-'dn:2' = 'global' instance id = 'global' hypothetical instance = "false" attribute id = "aanvraag_handtekening" type = "boolean" text = "Bevat een special request?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-'dn:3' = 'global' instance id = 'global' hypothetical instance = "false" attribute id = "aanvraag_bewijsdoc_aanwezig" type = "boolean" text = "Bewijsdocumenten request was van Zijn?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-'dn:4' = 'global' instance id = 'global' hypothetical instance = "false" attribute id = "aanvraag_formulier_volledig" type = "boolean" text = 'Is form request capture ingevuld van het?' deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-'dn:5' = 'global' instance id = 'global' hypothetical instance = "false" attribute id = "aanvraag_type" type = "text" text = "Het type request is onbekend" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < / typ:attribute - node >
    < typ:attribute - id = the id of the entity node-"dn:6" = id of the 'global' instance 'global' = hypothetical instance = "false" attribute id = "b3@Rules_Datacollectieregels_doc" type = "boolean" text = "Dataset aanvrager handig voor is?" deducted = "false" >
    < typ:unknown - val / >
    < typ:relationship - node id = "dn:7" id-entity-source = 'global' source-instance-id = 'global' hypothetical instance = "false" target-entity-id = "depersoon" - relationship id = "deaanvragerakw" status "known" = deducted = "true" >
    < instance id = typ:target "depersoon 2" / >
    < type: already proven node id = "dn:8" / >
    < / typ:relationship - node >
    < typ:attribute - node id = id of the entity-"dn:9" = id of the instance-'depersoon' = ' depersoon 1 ' hypothetical instance = "false" attribute id = "persoon_kring_verzekerden" type = "boolean" text = "Behoort persoon tot for kring der verzekerd?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:10" = id of the instance-'depersoon' = ' depersoon 2 ' hypothetical instance = "false" attribute id = "persoon_kring_verzekerden" type = "boolean" text = "Behoort persoon tot for kring der verzekerd?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:11" = "depersoon" - instance id = "depersoon 1" hypothetical instance = "false" attribute id = "persoon_woonland" type = "text" text = "Het woonland van persoon is onbekend" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:12" = id of the instance-'depersoon' = ' depersoon 2 ' hypothetical instance = "false" attribute id = "persoon_woonland" type = "text" = "Het woonland van persoon is onbekend" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:13" = id of the instance-'depersoon' = ' depersoon 1 ' hypothetical instance = "false" attribute id = "persoon_export_mogelijk" type = "boolean" text = "persoon aan om het recht op kinderbijslag conditions good you i.e.?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:14" = id of the instance-'depersoon' = ' depersoon 2 ' hypothetical instance = "false" attribute id = "persoon_export_mogelijk" type = "boolean" text = "persoon aan om het recht op kinderbijslag conditions good you i.e.?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < / typ:attribute - node >
    < typ:attribute - id = the id of the entity node-'dn:15' = 'global' = 'global' instance id hypothetical instance = "false" attribute id = "b4@Rules_Datacollectieregels_doc" type = "boolean" text = "Is kind onder 16 handig voor DataSet?" deducted = "false" >
    < typ:unknown - val / >
    < type: already proven node id = "dn:16" / >
    < type: already proven node id = "dn:11" / >
    < type: already proven node id = "dn:12" / >
    < typ:attribute - node id = entity 'dn:17' id = 'depersoon' - instance id = hypothetical instance "depersoon 1" = "false" attribute id = "persoon_geboortedatum" type = "date" text = "geboortedatum van persoon is 03/04/98. ' deducted ="false">"
    < typ:date - val > 1998 - 03 - 04 < / typ:date - val >
    < / typ:attribute - node >
    < typ:attribute - node id = entity 'dn:18' id = 'depersoon' - instance id = hypothetical instance "depersoon 2" = "false" attribute id = "persoon_geboortedatum" type = "date" text = "Geboortedatum van persoon is onbekend" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-'dn:19' = instance id 'global' = 'global' hypothetical instance = "false" attribute id = "kind_hh_aanvrager" type = "boolean" text = "Woont het kind in het huishouden van aanvrager?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:20" = "depersoon" - instance id = hypothetical instance "depersoon 1" = "false" attribute id = "persoon_kind_AKW" type = "boolean" text = "" kind een persoon is in Zin van AKW? "deducted ="false">"
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = id of the entity-"dn:21" = "depersoon" - instance id = hypothetical instance "depersoon 2" = "false" attribute id = "persoon_kind_AKW" type = "boolean" text = "" kind een persoon is in Zin van AKW? "deducted ="false">"
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = "dn:22" entity-id = "depersoon" - instance id = hypothetical instance "depersoon 1" = "false" attribute id = "persoon_recht_stufi" type = "boolean" text = "Persoon recht op studiefinanciering has?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < typ:attribute - node id = "dn:23" entity-id = "depersoon" - instance id = hypothetical instance "depersoon 2" = "false" attribute id = "persoon_recht_stufi" type = "boolean" text = "Persoon recht op studiefinanciering has?" deducted = "false" >
    < typ:unknown - val / >
    < / typ:attribute - node >
    < / typ:attribute - node >
    < typ:attribute - id = the id of the entity node-'dn:24' = 'global' = 'global' instance id deducted hypothetical instance = "false" attribute id = "kind_leeftijd" type = "number" text = "Travel van het kind is 13." = "true" >
    < typ:number - val > 13.0 < / typ:number - val >
    < type: already proven node id = "dn:16" / >
    < type: already proven node id = "dn:17" / >
    < type: already proven node id = "dn:18" / >
    < / typ:attribute - node >
    + < typ:attribute - id = the id of the entity node-'dn:25' = 'global' = 'global' instance id hypothetical instance = "false" attribute id = "b5@Rules_Datacollectieregels_doc" type = "boolean" text = 'Is friendly boven 16 handig voor DataSet?' deducted 'false' = > +.
    + < typ:unknown - val / > +.
    + < type: already proven node id = "dn:16" / >.
    + < type: already proven node id = "dn:15" / >.
    + < typ:attribute - node id = id of the entity-'dn:26' = instance id 'global' = 'global' hypothetical instance = "false" attribute id = "kind_boven_inkomensgrens" type = "boolean" text = "Verdient het kind meer inkomensgrens voor kinderen dan?" deducted = "false" > +.
    + < typ:unknown - val / > +.
    + < / typ:attribute - node > +.
    + < typ:attribute - node id = id of the entity-"dn:27" = "depersoon" - instance id = hypothetical instance "depersoon 1" = "false" attribute id = "persoon_tijdsbesteding" type = "text" text = "Tijdsbesteding van persoon is onbekend" deducted = "false" > +.
    + < typ:unknown - val / > +.
    + < / typ:attribute - node > +.
    + < typ:attribute - node id = id of the entity-"dn:28" = "depersoon" - instance id = hypothetical instance "depersoon 2" = "false" attribute id = "persoon_tijdsbesteding" type = "text" text = "Tijdsbesteding van persoon is onbekend" deducted = "false" > +.
    + < typ:unknown - val / > +.
    + < / typ:attribute - node > +.
    + < typ:attribute - node id = id of the entity-'dn:29' = 'global' instance id = 'global' hypothetical instance = "false" attribute id = "aanvrager_onderh_bijdrage" type = "boolean" text = "Aanvrager aan of onderhoudsbijdrage voor het kind good?" deducted = "false" > +.
    < typ:unknown - val / >
    < / typ:attribute - node >
    < / typ:attribute - node >
    < / typ:attribute - node >
    < / typ:decision - report >
    < / typ:attribute >
    < typ:entity id = "depersoon" >
    < typ:instance id = '1 depersoon' >
    < typ:attribute id = "persoon_rol" type = "text" >
    < typ:text - val > type < / typ:text - val >
    < / typ:attribute >
    < typ:attribute id = "persoon_geboortedatum" type = "date" >
    < typ:date - val > 1998 - 03 - 04 < / typ:date - val >
    < / typ:attribute >
    < / typ:instance >
    < typ:instance id = "depersoon 2" >
    < typ:attribute id = "persoon_rol" type = "text" >
    < typ:text - val > aanvrager AKW < / typ:text - val >
    < / typ:attribute >
    < / typ:instance >
    < / typ:entity >
    < / typ: global instance >
    < / typ: assess / answer >
    < / SOAP - ENV:Body >
    < / SOAP - ENV:Envelope >

    Any help?

    Cheers, Els

    Why this happens is to do with a quirk in the analysis of the server request determinations in that once a goal of attribute is unknown, what is returned only the most relevant way. This has to do with the former definition of the relevance engine, which means that the server of determinations had to ask all the unknown paths for an unknown purpose, otherwise you couldn't retrieve enough information to complete the investigation and this somewhat strange behavior was maintained for backwards compatibility reasons since.

    Given that the current definition of the beneficiaries of relevance that will answer you always enough information to fill an unknown goal, we decided to change the service behavior assess in the next version so now the server of determinations and the time debugger will display the same in this situation.

  • The xmltype column search and listing content in relational format

    Hi all

    I have a database of GR 11, 1 subject table containing the xmltype column. I'm writing a query that displays conetents xml in a relational format.
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jan 17 11:45:06 2013
    
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Release 11.1.0.7.0 - 64bit Production
    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11 g Release 11.1.0.7.0 - 64 bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE Production 11.1.0.7.0
    AMT for 64-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production

    SQL > BULKMESSAGES Desc;
    Name of Type Null
    --------------- ---- -------------
    TRANSFER_ID VARCHAR2 (100)
    TRANSFER_LOGS XMLTYPE()
    TRANSFER_RESULT VARCHAR2 (10)

    SQL > select * from BULKMESSAGES
    where TRANSFER_RESULT = "REFUSED."
    /
    TRANSFER_ID TRANSFER_LOGS TRANSFER_RESULT
    ---------------- ---------------------------------------------------------------- ---------------
    T3217 < env:Envelope xmlns:env = 'http://www.w3.org/2003/05/soap-envelope' > REJECTED



    Column of xmltype TRNASFER_LOGS stores the SOAP responses. Response SOAP sample (dummied) of the TRANSFER_LOGS xml column is below:
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
         <env:Header xmlns:env="http://www.w3.org/2003/05/soap-envelope"/>
         <env:Body xmlns:env="http://www.w3.org/2003/05/soap-envelope">
              <env:Fault xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                   <env:Code xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                        <env:Value xmlns:env="http://www.w3.org/2003/05/soap-envelope">env:Receiver</env:Value>
                        <env:Subcode xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                             <env:Value xmlns:fault="http://www.es.com/soapfaults" xmlns:env="http://www.w3.org/2003/05/soap-envelope">fault:MessageBlocked</env:Value>
                        </env:Subcode>
                   </env:Code>
                   <env:Reason xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                        <env:Text lang="en" xmlns:env="http://www.w3.org/2003/05/soap-envelope">connection rejected</env:Text>
                   </env:Reason>
                   <env:Detail xmlns:fault="http://www.es.com/soapfaults" fault:type="faultDetails" fault:messageId="0000013a6" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
                        <fault:path policy="Request Message">
                             <fault:filter status="Fail" name="Call 'Process request '">
                                  <fault:path policy="Process xml ">
                                       <fault:filter status="Fail" name="Call 'Call 3rdparty service'">
                                            <fault:path policy="Call external service">
                                                 <fault:filter status="Pass" name="Extract message"/>
                                            </fault:path>
                                       </fault:filter>
                                  </fault:path>
                             </fault:filter>
                        </fault:path>
                        <fault:attributes>
                             <fault:attribute name="monitoring.enabled" value="true"/>
                             <fault:attribute name="requestor" value="none"/>
                             <fault:attribute name="circuit.failure.reason" value="connection rejected"/>
                             <fault:attribute name="message_protocol" value="SOAP"/>
                             <fault:attribute name="user_id" value="31274556"/>
                             <fault:attribute name="ws_name" value="PUSHDOC"/>
                             <fault:attribute name="user.enabled" value="N"/>
                             <fault:attribute name="http.request.clientaddr" value="/10.254.123.44:43840"/>
                             <fault:attribute name="soap_action" value="pushDocument"/>
                             <fault:attribute name="message.reception_time" value="1349769769742"/>
                             <fault:attribute name="user.api_logging_flag" value="Y"/>
                             <fault:attribute name="circuit.exception" value="com.es.circuit.CircuitAbortException: connection rejected"/>
                             <fault:attribute name="end_point" value="https://es.live.com/pdfs"/>
                             <fault:attribute name="message.protocol.type" value="http"/>
                             <fault:attribute name="user.incoming_date" value="09-11-2013 09:02:49"/>
                             <fault:attribute name="http.destination.host" value="es.live.com"/>
                             <fault:attribute name="message.local.address" value="/100.25.40.82:8085"/>
                             <fault:attribute value="N"/>
                        </fault:attributes>
                   </env:Detail>
              </env:Fault>
         </env:Body>
    </env:Envelope>
    My goal is to search for documents TRANSFER_LOGS for lines that contain flaws: attribute name = "circuit.exception". Then report "fault: name attribute" and their values in relational format. For example:
    TRANSFER_ID    TRANSFER_RESULT FAULT_FAIL_REASON    FAULT_CIRCUIT_EXCEPTION                               FAULT_WS_NAME   FAULT_DESTINATION_HOST
    ----------     --------------- ----------------     -------------------------------------------------------- -------------   ---------------------
    T3217          REJECTED       CONNECTION REJECTED  com.es.circuit.CircuitAbortException: connection rejected  PUSHDOC       es.live.com
    I am new to oracle XML sql querying. Documents in the column of xmltype TRANSFER_LOGS have many namespaces and the query I've tried does not work. So, any help or pointers to search and extract TRANSFER_LOGS in above format is greatly appreciated.

    Thanks in advance.

    VC

    Hello

    You can use something like this:

    SQL> select t.transfer_id, t.transfer_result, x.*
      2  from bulkmessages t
      3     , xmltable(
      4         xmlnamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "e"
      6         , 'http://www.es.com/soapfaults' as "f"
      7         )
      8       , '/e:Envelope/e:Body/e:Fault/e:Detail/f:attributes'
      9         passing t.transfer_logs
     10         columns
     11           FAULT_FAIL_REASON       varchar2(200) path 'f:attribute[@name="circuit.failure.reason"]/@value'
     12         , FAULT_CIRCUIT_EXCEPTION     varchar2(200) path 'f:attribute[@name="circuit.exception"]/@value'
     13         , FAULT_WS_NAME           varchar2(200) path 'f:attribute[@name="ws_name"]/@value'
     14         , FAULT_DESTINATION_HOST  varchar2(200) path 'f:attribute[@name="http.destination.host"]/@value'
     15         ) x
     16  where xmlexists(
     17         'declare namespace e = "http://www.w3.org/2003/05/soap-envelope"; (: :)
     18          declare namespace f = "http://www.es.com/soapfaults"; (: :)
     19          /e:Envelope/e:Body/e:Fault/e:Detail/f:attributes/f:attribute[@name="circuit.exception"]'
     20          passing t.transfer_logs
     21        ) ;
    
    TRANSFER_ID     TRANSFER_RESULT FAULT_FAIL_REASON        FAULT_CIRCUIT_EXCEPTION                                       FAULT_WS_NAME    FAULT_DESTINATION_HOST
    --------------- --------------- ------------------------ ------------------------------------------------------------- ---------------- -------------------------
    T3217           REJECTED        connection rejected      com.es.circuit.CircuitAbortException: connection rejected     PUSHDOC          es.live.com
     
    

    Or, more simply:

    SQL> select t.transfer_id, t.transfer_result, x.*
      2  from bulkmessages t
      3     , xmltable(
      4         xmlnamespaces(
      5           'http://www.w3.org/2003/05/soap-envelope' as "e"
      6         , 'http://www.es.com/soapfaults' as "f"
      7         )
      8       , '/e:Envelope/e:Body/e:Fault/e:Detail/f:attributes'
      9         passing t.transfer_logs
     10         columns
     11           FAULT_FAIL_REASON       varchar2(200) path 'f:attribute[@name="circuit.failure.reason"]/@value'
     12         , FAULT_CIRCUIT_EXCEPTION     varchar2(200) path 'f:attribute[@name="circuit.exception"]/@value'
     13         , FAULT_WS_NAME           varchar2(200) path 'f:attribute[@name="ws_name"]/@value'
     14         , FAULT_DESTINATION_HOST  varchar2(200) path 'f:attribute[@name="http.destination.host"]/@value'
     15         ) x
     16  where x.FAULT_CIRCUIT_EXCEPTION is not null ;
    
    TRANSFER_ID    TRANSFER_RESULT FAULT_FAIL_REASON      FAULT_CIRCUIT_EXCEPTION                                      FAULT_WS_NAME      FAULT_DESTINATION_HOST
    -------------- --------------- ---------------------- ------------------------------------------------------------ ------------------ --------------------------
    T3217          REJECTED        connection rejected    com.es.circuit.CircuitAbortException: connection rejected    PUSHDOC            es.live.com
      
    

Maybe you are looking for