XMLQuery (XQuery) with namespace

I'm pretty new to XML/XQuery and have the following problem.
I've got a DB outside oracle which is the same as I got in Oracle (10.2.0.1.0). Using XMLSpy I can make a simple query with a default namespace that gives me an XML document.
xquery version "1.0";
declare default element namespace "POI";
for $x in fn:doc("H:\urs\025_XPOI\XDB\xdb\Simple\xml\001_03082006\xpoi\simple.xml")/Simple_XPOIS/Simple
where $x/ID = 1
return $x
When I try the same in Oracle, it fails. I have no idea how to use the XMLNamespaces......
SQL>
SQL> WITH XMLNamespaces (DEFAULT 'POI')
2 SELECT XMLQuery('
3 for $x in fn:doc("/home/Simple/xml/001_03082006/xpoi/simple.xml")/Simple_XPOIS/Simple
4 where $x/ID = 1
5 return $x
6 '
7 RETURNING CONTENT) AS RESULT FROM DUAL;
WITH XMLNamespaces (DEFAULT 'POI')
ERROR at line 1:
ORA-32033: unsupported column aliasing
####################

Does this help
SQL> var docPath varchar2(128)
SQL> var xmltext varchar2(4000)
SQL> --
SQL> begin
  2    :docPath := '/public/rdfSample.xml';
  3    :xmltext :=
  4  '<?xml version="1.0"?>
  5  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://mets.d2lab.net/onts/core.owl#" xmlns:core="http://mets.d
2lab.net/onts/core.owl#" xmlns:ct="http://mets.d2lab.net/onts/ct.owl#" xmlns:dc="http://protege.stanford.edu/plugins/owl/dc/dublincore.owl#"
xmlns:geo="http://reliant.teknowledge.com/DAML/Geography.owl#" xmlns:icmsp="http://mets.d2lab.net/onts/icmsp.owl#" xmlns:isocc="http://www.
daml.org/2001/09/countries/iso-3166-ont#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmln
s:xsd="http://www.w3.org/2001/XMLSchema#">
  6     <rdf:Description rdf:ID="AERO000001">
  7             <rdf:type rdf:resource="http://mets.d2lab.net/onts/core.owl#Municipality"/>
  8             <core:hasName>ST PETERSBURG</core:hasName>
  9             <core:hasRefs rdf:resource="#AERO000002"/>
10             <core:fromDocument rdf:resource="#id00001"/>
11             <core:hasName>SAINT  PETERSBURG</core:hasName>
12             <core:hasName>PETERSBURG</core:hasName>
13     </rdf:Description>
14  </rdf:RDF>';
15  end;
16  /
PL/SQL procedure successfully completed.
SQL> declare
  2    res boolean;
  3  begin
  4    if (dbms_xdb.existsResource(:docPath)) then
  5      dbms_xdb.deleteResource(:docPath);
  6    end if;
  7    res := dbms_xdb.createResource(:docPath,:xmltext);
  8    commit;
  9  end;
10  /
PL/SQL procedure successfully completed.
SQL> set long 10000 lines 1000 pages 0
SQL> --
SQL> select xdburitype(:docPath).getXML()
  2    from dual
  3  /
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://mets.d2lab.net/onts/core.owl#" xmlns:core="http://mets.d2lab.
net/onts/core.owl#" xmlns:ct="http://mets.d2lab.net/onts/ct.owl#" xmlns:dc="http://protege.stanford.edu/plugins/owl/dc/dublincore.owl#" xmln
s:geo="http://reliant.teknowledge.com/DAML/Geography.owl#" xmlns:icmsp="http://mets.d2lab.net/onts/icmsp.owl#" xmlns:isocc="http://www.daml.
org/2001/09/countries/iso-3166-ont#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd
="http://www.w3.org/2001/XMLSchema#">
  <rdf:Description rdf:ID="AERO000001">
    <rdf:type rdf:resource="http://mets.d2lab.net/onts/core.owl#Municipality"/>
    <core:hasName>ST PETERSBURG</core:hasName>
    <core:hasRefs rdf:resource="#AERO000002"/>
    <core:fromDocument rdf:resource="#id00001"/>
    <core:hasName>SAINT  PETERSBURG</core:hasName>
    <core:hasName>PETERSBURG</core:hasName>
  </rdf:Description>
</rdf:RDF>
SQL> select xmlquery( 'for $doc in doc($DOCPATH) return $doc' passing :DOCPATH as DOCPATH returning content)
  2    from dual
  3  /
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://mets.d2lab.net/onts/core.owl#" xmlns:core="http://mets.d2lab.
net/onts/core.owl#" xmlns:ct="http://mets.d2lab.net/onts/ct.owl#" xmlns:dc="http://protege.stanford.edu/plugins/owl/dc/dublincore.owl#" xmln
s:geo="http://reliant.teknowledge.com/DAML/Geography.owl#" xmlns:icmsp="http://mets.d2lab.net/onts/icmsp.owl#" xmlns:isocc="http://www.daml.
org/2001/09/countries/iso-3166-ont#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:xsd
="http://www.w3.org/2001/XMLSchema#"><rdf:Description rdf:ID="AERO000001"><rdf:type rdf:resource="http://mets.d2lab.net/onts/core.owl#Munici
pality"/><core:hasName>ST PETERSBURG</core:hasName><core:hasRefs rdf:resource="#AERO000002"/><core:fromDocument rdf:resource="#id00001"/><co
re:hasName>SAINT  PETERSBURG</core:hasName><core:hasName>PETERSBURG</core:hasName></rdf:Description></rdf:RDF>
SQL> select xmlquery
  2         (
  3           'declare namespace rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; (: :)
  4            declare namespace core="http://mets.d2lab.net/onts/core.owl#"; (: :)
  5            for $doc in doc($DOCPATH)/rdf:RDF/rdf:Description/core:fromDocument/@rdf:resource return $doc'
  6            passing :DOCPATH as "DOCPATH" returning content
  7         )
  8    from dual
  9  /
#id00001
SQL> --You should be able to use collection to refer to all the documents if a folder...
Eg
select xmlquery( 'for $doc in collection($DOCPATH) return $doc' passing :DOCPATH as DOCPATH returning content)
from dual

Similar Messages

  • Using XMLQuery with namespace

    Hi,
    I have following XML document stored as XMLType column,
    <ocaStatus xmlns="http://xmlbeans.apache.org/ocastatus"><status><statusCode>934</statusCode><statusDate>Wed Apr 07 16:05:53 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>934</statusCode><statusDate>Wed Apr 07 15:58:25 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>934</statusCode><statusDate>Wed Apr 07 15:54:02 GMT+05:30 2010</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>750</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Document Metadata is correct.</comment></status><status><statusCode>934</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Sent to LTC</comment></status><status><statusCode>932</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Loaded to Novus</comment></status><status><statusCode>700</statusCode><statusDate>2010-03-31 12:39:41.580 GMT+05:30</statusDate><userId>u0121845</userId><comment>Document is deleted from OCA.</comment></status></ocaStatus>
    This XML row contains namespace in it. Also there are some XML that does not have any namespace in it.
    I am running following XMLQuery() to get statusCode,
    select docfamily_uuid,
    XMLQuery(
    'for $i in /ocaStatus/status
    where $i/statusCode = 934
    return <statusDate>{$i /statusDate}</statusDate>'
    passing document_status_bean RETURNING CONTENT)
    from document_status_xml;
    Interestingly the query returns null for XML with namespace and statusCode value for rest of the XMLs without any namespace.
    Please help me to get this resolved.
    Thanks in advanced.
    Edited by: user6117359 on Apr 8, 2010 12:17 AM

    user6117359 wrote:
    I have some XPath queries too which are using extract(). I am facing the similar problem with them.Hi,
    Extract() accepts a list of namespaces as its third parameter.
    Ex. : based on your sample, to extract the first "status" element :
    SELECT extract(document_status_bean, 'ocaStatus/status[1]', 'xmlns="http://xmlbeans.apache.org/ocastatus"')
    FROM document_status_xml

  • Execution of xquery with sql prompt(oracle 11g)

    Hi All I am executing the following query with squl prompt:
    SELECT XMLQuery('xquery version "1.0"; (: :)
    declare default element namespace "eNodeB"; (: :)
    for $m in ora:tokenize('oracle~','~')
    return ($m)'
    RETURNING CONTENT) AS RESULT
    FROM DUAL;
    But its giving the following exception
    for $m in ora:tokenize('deepa~','~')
    ERROR at line 3:
    ORA-19109: RETURNING keyword expected
    2) With the below mentioned query
    SELECT XMLQuery('xquery version "1.0"; (: :)
    declare default element namespace "eNodeB"; (: :)
    for $x in $eNodeBRef/eNodeBFile/eNodeB/eNodeBTop[eNodeBTopIndex='1']
    for $m in ora:tokenize('eNodeBTopAttr1~','~')
    let $r:=$x/following-sibling::*[local-name(.)=$m]
    where (exists($x/*[local-name(.)=$m]) or exists($r))
    return (
    if(exists($r) and not(exists($x/*[local-name(.)=$m]))) then
    element{local-name($r)}{data($r)} else(), if(exists($x/*[local-na
    me(.)=$m])) then element{local-name($x/*[local-name(.)=$m])}{data($x/*[local-name(.)=$m])} else()' PASSING p.OBJECT_VALUE AS
    "eNodeBRef"
    RETURNING CONTENT) AS RESULT
    FROM A_ENODEB p
    WHERE
    existsNode(p.OBJECT_VALUE,
    '/eNodeBFile/fileHeader[@fileName="eNodeB_inst_1.xml"]') =1;
    its giving the below error while executing through sql prompt
    *for $x in $eNodeBRef/eNodeBFile/eNodeB/eNodeBTop[eNodeBTopIndex='1']
    ERROR at line 3:
    ORA-19109: RETURNING keyword expected*

    Login to SQL Developer as the SYS user for Getting Started tutorial

  • XQuery with recuesive function and instance of operation gives problem

    Hi,
    << Using Oracle 11g .06. release >>
    I have an Xquery that has recursive functions and "instance of" operation.
    I facing the following problem
    "error raised during evaluation: oracle.xquery.XQException: XPTY0004: It is a type error if, during the static analysis phase, an expression is found to have a static type that is not appropriate for the context in which the expression occurs, or during the dynamic evaluation phase, the dynamic type of a value does not match a required type as specified by the matching rules in 2.5.4 SequenceType Matching.
    Detail: empty sequence encountered where a sequence of length one is expected
    The same xQuery works on Berkely DB, Altova XML and Oxygen. I could able to figure out the problem in oracle, where i need an help from you people.
    The below is the XQuery Function
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    SELECT XMLQuery('xquery version "1.0";
    declare default element namespace "WiMax_CAPC_XML";(: :)
    declare namespace HHP="HHP";(: :)
    declare namespace AtomicXQuery="AtomicXQuery";(: :)
    declare function AtomicXQuery:filter-modifier($element as element(), $attribute-name as xs:string*) {
    element {node-name($element)}
    for $child in $element/node()
    return if ($child instance of element())
    then (("deepa instance"),$child,"45",name($child),$attribute-name,
    if($child/node() instance of element())
    then ("it is an instance of element")
    else($child),
    AtomicXQuery:filter-modifier($child, $attribute-name))
    else $child
    let $i:= ora:view("NECB")/node()/child::*[2]/HHP:HHP/HHP:hapNe/HHP:maxCageCount
    let $m:=element HHP:deepa {element HHP:deepa1 {"deepa1"}} return AtomicXQuery:filter-modifier($m,"modifier")'
    RETURNING CONTENT) AS RESULT
    FROM DUAL;
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    The XML data is available in XMLType table NECB.
    The XMLData is as follows
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <ConfigDataFile xmlns="WiMax_CAPC_XML" xmlns:HHP="HHP" xmlns:SWM="SWM" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <fileHeader cfgMinorVersion="0" cfgSavedMinorVersion="0" cfgVersion="0" fileFormatVersion="CAPC_I1" fileName="NECB.xml" fileType="necb" senderName="CNEOMI" swVersion="D00.00.01.05" vendorName="Motorola"/>
    <configData dnPrefix="String">
    <HHP:HHP>
    <HHP:hapNe>
    <HHP:maxCageCount>3</HHP:maxCageCount>
    <HHP:minLogLevel>1</HHP:minLogLevel>
    </HHP:hapNe>
    <HHP:hapCageTable>
    <HHP:hapCageEntry cageId="1">
    <HHP:numOfModems>1</HHP:numOfModems>
    <HHP:numOfBackupModems>1</HHP:numOfBackupModems>
    <HHP:hapCagemaxModemCount>1</HHP:hapCagemaxModemCount>
    <HHP:minModemLogLevel>1</HHP:minModemLogLevel>
    <HHP:hapModemTable>
    <HHP:hapModemEntry cageId="1" modemId="1">
    <HHP:maxServiceTypeCount>1</HHP:maxServiceTypeCount>
    <HHP:hapModemLogLevel>1</HHP:hapModemLogLevel>
    <HHP:maxBlackboxCount>1</HHP:maxBlackboxCount>
    <HHP:minBlackboxLogLevel>1</HHP:minBlackboxLogLevel>
    <HHP:hapBlackboxTable>
    <HHP:hapBlackboxEntry cageId="1" modemId="1" blackboxId="1">
    <HHP:hapBlackboxLogLevel>1</HHP:hapBlackboxLogLevel>
    </HHP:hapBlackboxEntry>
    </HHP:hapBlackboxTable>
    </HHP:hapModemEntry>
    </HHP:hapModemTable>
    </HHP:hapCageEntry>
    </HHP:hapCageTable>
    <HHP:serviceTypeTable>
    <HHP:serviceTypeEntry serviceTypeId="1">
    <HHP:priority>1</HHP:priority>
    <HHP:serviceTypemaxModemCount>1</HHP:serviceTypemaxModemCount>
    </HHP:serviceTypeEntry>
    </HHP:serviceTypeTable>
    <HHP:serviceMappingTable>
    <HHP:serviceMappingEntry cageId="1" modemId="1" serviceTypeId="1">
    </HHP:serviceMappingEntry>
    </HHP:serviceMappingTable>
    </HHP:HHP>
         <SWM:SWM>
    <SWM:wmanIfBsPagingGroupTable>
    <SWM:wmanIfBsPagingGroupEntry ifIndex="1" wmanIfBsPagingGroupIndex="1">
    <SWM:wmanIfBsPagingGroupId>1</SWM:wmanIfBsPagingGroupId>
    <SWM:wmanIfBsPagingControllerId>9</SWM:wmanIfBsPagingControllerId>
    <SWM:wmanIfBsPagingCycle>100</SWM:wmanIfBsPagingCycle>
    <SWM:wmanIfBsPagingOffset>1</SWM:wmanIfBsPagingOffset>
    <SWM:wmanIfBsPagingRetryCount>3</SWM:wmanIfBsPagingRetryCount>
    <SWM:wmanIfBsPagingBcastRetryCount>3</SWM:wmanIfBsPagingBcastRetryCount>
    <SWM:wmanIfBsPagingControllerAddress>aabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeffaabb</SWM:wmanIfBsPagingControllerAddress>
    <SWM:wmanIfBsPagingControllerAddressType>1</SWM:wmanIfBsPagingControllerAddressType>
    <SWM:wmanIfBsPagingControllerAsnMmId>aabbccddeeff</SWM:wmanIfBsPagingControllerAsnMmId>
    </SWM:wmanIfBsPagingGroupEntry>
    </SWM:wmanIfBsPagingGroupTable>
    <SWM:wmanIfAsnMmTable>
    <SWM:wmanIfAsnMmEntry ifIndex="1">
    <SWM:wmanIfAsnMmId>AAffFFAAAAFF</SWM:wmanIfAsnMmId>
    <SWM:wmanIfAsnMmId/>
    </SWM:wmanIfAsnMmEntry>
    </SWM:wmanIfAsnMmTable>
    <SWM:wmanIfNeighborAsnMmTable>
    <SWM:wmanIfNeighborAsnMmEntry ifIndex="1" wmanIfNbrAsnMmId="AAffFFAAAAFFFFFF">
    <SWM:wmanIfNbrAsnMmAddress>AAffFFAAAAFFFFFF</SWM:wmanIfNbrAsnMmAddress>
    <SWM:wmanIfNbrAsnMmAddressType>1</SWM:wmanIfNbrAsnMmAddressType>
    <SWM:wmanIfNbrAsnMmControlSecurityProtocol>1</SWM:wmanIfNbrAsnMmControlSecurityProtocol>
    </SWM:wmanIfNeighborAsnMmEntry>
    </SWM:wmanIfNeighborAsnMmTable>
    </SWM:SWM>
    </configData>
    <fileFooter dateTime="2007-11-07T09:30:47.0Z" update="2007-11-07T09:30:47.0Z"/>
    </ConfigDataFile>
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    The expected output XML is as follows
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    <HHP:deepa xmlns="WiMax_CAPC_XML" xmlns:HHP="HHP">deepa instance<HHP:deepa1>deepa1</HHP:deepa1>45 HHP:deepa1 modifier<HHP:deepa1>deepa1</HHP:deepa1>
         <HHP:deepa1>deepa1</HHP:deepa1>
    </HHP:deepa>
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Thanks in advance!

    Ashwin,
    Please try it with 11.1.0.7 instead and let us know if it works.
    Regards,
    Geoff

  • Writing request XQUERY with oracle 11G

    Hi,
    What is exactly the best way to make an XMLTYPE object (column with type XMLType) request with Oracle 11 g ? (Oracle 11g  Release 11.2.0.3.0)
    In different books, we see a lot of different requests.
    Simple example :
    create table contact_file_tbl(filename varchar2(255), xml xmltype);
    insert into contact_file_tbl (filename, xml)
    values ('john_smith.xml', xmltype(bfilename('XML_DIR', 'john_smith.xml'),nls_charset_id('AL32UTF8')));
    Ok for now
    But impossible to make a good query :
    select XMLQuery('declare namespace book="http://xmlbook.com/sample/contact.xsd"; (:
    for $c in /book:contact
    return $c/book:first_name' PASSING a.xml RETURNING CONTENT)
    from contact_file_tbl a;
    returns nothing.
    why this request works ?
    SELECT filename, XMLQuery('toto'
             PASSING xml RETURNING CONTENT) dataResult
      FROM contact_file_tbl;
    Could you send me a request with this example.
    Here the XML document :
    <?xml version="1.0" encoding="UTF-8"?>
    <contact xmlns="http://xmlbook.com/sample/contact.xsd" id="1">
       <category>customer</category>
       <first_name Chinese="约翰">John</first_name>
       <last_name>Smith</last_name>
       <email>[email protected]</email>
       <phone>(512)781-9230</phone>
       <cellphone>(512)781-9230</cellphone>
       <address>
           <street1>1234 sunflower road</street1>
           <city>austin</city>
           <state>texas</state>
           <zipcode>78701</zipcode>
           <country>USA</country>
       </address>
       <references>
         <reference relationship="account manager, tech sales">
           <first_name>robert</first_name>
           <last_name>tian</last_name>
             <email>[email protected]</email>
         </reference>
         <reference relationship="account manager, app sales">
           <first_name>Richard</first_name>
           <last_name>Liu</last_name>
           <email>[email protected]</email>
         </reference>
       </references>
    </contact>
    Thank you very much

    This works fine for me :
    SQL> select XMLQuery(
      2  'declare namespace book="http://xmlbook.com/sample/contact.xsd"; (::)
      3  for $c in /book:contact
      4  return $c/book:first_name'
      5  PASSING a.xml
      6  RETURNING CONTENT
      7  )
      8  from contact_file_tbl a;
    XMLQUERY('DECLARENAMESPACEBOOK
    <first_name xmlns="http://xmlbook.com/sample/contact.xsd" Chinese="??">John</fir
    SQL>
    SQL> select XMLCast(
      2  XMLQuery(
      3  'declare namespace book="http://xmlbook.com/sample/contact.xsd"; (::)
      4  for $c in /book:contact
      5  return $c/book:first_name'
      6  PASSING a.xml
      7  RETURNING CONTENT
      8  )
      9  as varchar2(30)
    10  ) as first_name
    11  from contact_file_tbl a;
    FIRST_NAME
    John
    What's your client tool/version?

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • How can I get the element value with namespace?

    I tried to get a element value in xml has namespace but i can't.
    I removed the namespace, i can get a element value.
    How can i get a element value with namespace?
    --1. Error ----------- xml ------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    *<TaxInvoice xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 http://www.kec.or.kr/standard/Tax/TaxInvoiceSchemaModule_1.0.xsd">*
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    --2. sucess ----------- xml ---------remove namespace---------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <TaxInvoice>
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    ---------- program ------------
    procedure insert_table
    l_clob clob,
    wellformed out boolean,
    error out varchar2
    is
    l_parser dbms_xmlparser.Parser;
    xmldoc xmldom.domdocument;
    l_doc dbms_xmldom.DOMDocument;
    l_nl dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    l_root DBMS_XMLDOM.domelement;
    l_node DBMS_XMLDOM.domnode;
    l_node2 DBMS_XMLDOM.domnode;
    l_text DBMS_XMLDOM.DOMTEXT;
    buf VARCHAR2(30000);
    xmlparseerror exception;
    TYPE tab_type is Table of xml_upload%ROWTYPE;
    t_tab tab_type := tab_type();
    pragma exception_init(xmlparseerror, -20100);
    l_node_name varchar2(300);
    begin
    l_parser := dbms_xmlparser.newParser;
    l_doc := DBMS_XMLDOM.newdomdocument;
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    l_n := dbms_xmldom.makeNode(l_doc);
    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');
    FOR cur_tax In 0..dbms_xmldom.getLength(l_nl) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl, cur_tax);
    t_tab.extend;
    t_tab(t_tab.last).ed_id := '5000000';
    dbms_xslprocessor.valueOf(l_n, 'IssueID/text()', t_tab(t_tab.last).tid_issue_id);
    dbms_xslprocessor.valueOf(l_n, 'TypeCode/text()', t_tab(t_tab.last).tid_type_code);
    END LOOP;
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO xml_upload VALUES t_tab(i);
    COMMIT;
    dbms_xmldom.freeDocument(l_doc);
    wellformed := true;
    exception
    when xmlparseerror then
    --xmlparser.freeparser(l_parser);
    wellformed := false;
    error := sqlerrm;
    end insert_table;

    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');try to change as follow
    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');Edited by: AlexAnd on Aug 17, 2011 12:36 AM

  • Namespace not found error when creating data server for xml with namespace

    Hi
    I tried creating XML data server in ODI with namespace in xml file. I followed the below steps but could not success in creating the dataserver. however when I remove the namespace in xml file I am able to reverse engineer the xml file.
    1) Create xml data server
    2) select xml driver - com.sunopsis.jdbc.driver.xml.SnpsXmlDriver
    3) Provide the jdbc url - jdbc:snps:xml?f=D:/xmlnew/sample_namespace.xml&s=xmlns&d=D:/xmlnew/sample_namespace.dtd
    xml content
    <f:root xmlns:f="http://www.w3.org/TR/html4/">
    <table>
    <name>African Coffee Table</name>
    <width>80</width>
    <length>120</length>
    </table>
    </f:root>
    DTD content
    <!ELEMENT f:root ( table ) >
    <!ELEMENT length ( #PCDATA ) >
    <!ELEMENT name ( #PCDATA ) >
    <!ELEMENT table ( name, width, length ) >
    <!ELEMENT width ( #PCDATA ) >
    when I test connection it shows the following error.
    java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Model not accepted: Namespace not found:
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:133)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java:1100)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.getLocalConnect(SnpsDialogTestConnet.java:371)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.localConnect(SnpsDialogTestConnet.java:794)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.jButtonTest_ActionPerformed(SnpsDialogTestConnet.java:754)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.connEtoC1(SnpsDialogTestConnet.java:137)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet.access$1(SnpsDialogTestConnet.java:133)
         at com.sunopsis.graphical.dialog.SnpsDialogTestConnet$IvjEventHandler.actionPerformed(SnpsDialogTestConnet.java:87)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Model not accepted: Namespace not found:
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:389)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.initialize(SnpsXmlDTD.java:421)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDTD.<init>(SnpsXmlDTD.java:150)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchema.<init>(SnpsXmlSchema.java:478)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.createNewSchema(SnpsXmlSchemaManager.java:292)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlSchemaManager.getSchemaFromProperties(SnpsXmlSchemaManager.java:270)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlDriver.connect(SnpsXmlDriver.java:114)
         at oracle.odi.jdbc.datasource.DriverManagerUtils$DriverProxy.connect(DriverManagerUtils.java:23)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:368)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:352)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:316)
         at oracle.odi.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:275)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.doGetConnection(LoginTimeoutDatasourceAdapter.java:99)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter.getConnection(LoginTimeoutDatasourceAdapter.java:62)
         at oracle.odi.jdbc.datasource.LoginTimeoutDatasourceAdapter$ConnectionProcessor.run(LoginTimeoutDatasourceAdapter.java:217)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:662)

    Hi,
    Thans for your reply.
    This is the DTD for my xmldoc.
    <!ELEMENT Data (Department+)>
    <!ELEMENT EmployeeID (#PCDATA)>
    <!ATTLIST EmployeeID col (EMPID) #IMPLIED>
    <!ELEMENT Education (EmployeeID, Sequence, Dgree)>
    <!ATTLIST Education table NMTOKEN #IMPLIED>
    <!ELEMENT Employee (EmployeeName, EmployeeID, DepartmentID, Education*)>
    <!ATTLIST Employee table NMTOKEN #IMPLIED>
    <!ELEMENT EmployeeName (#PCDATA)>
    <!ATTLIST EmployeeName col NMTOKEN #IMPLIED>
    <!ELEMENT DepartName (#PCDATA)>
    <!ATTLIST DepartName col NMTOKEN #IMPLIED>
    <!ELEMENT Table (Column+)>
    <!ATTLIST Table importType NMTOKEN #IMPLIED>
    <!ATTLIST Table parentTable NMTOKEN #IMPLIED>
    <!ATTLIST Table tag NMTOKEN #IMPLIED>
    <!ATTLIST Table columns NMTOKEN #IMPLIED>
    <!ATTLIST Table name NMTOKEN #IMPLIED>
    <!ELEMENT DepartID (#PCDATA)>
    <!ATTLIST DepartID col NMTOKEN #IMPLIED>
    <!ELEMENT MetaData (Table+)>
    <!ELEMENT Sequence (#PCDATA)>
    <!ATTLIST Sequence col NMTOKEN #IMPLIED>
    <!ELEMENT Dgree (#PCDATA)>
    <!ATTLIST Dgree col NMTOKEN #IMPLIED>
    <!ELEMENT Export (MetaData, Data)>
    <!ELEMENT DepartmentID (#PCDATA)>
    <!ATTLIST DepartmentID col NMTOKEN #IMPLIED>
    <!ELEMENT Column (#PCDATA)>
    <!ATTLIST Column deleteKey NMTOKEN #IMPLIED>
    <!ATTLIST Column isKey NMTOKEN #IMPLIED>
    <!ELEMENT Department (DepartName, DepartID, Employee+)>
    <!ATTLIST Department table NMTOKEN #IMPLIED>
    Thanks again!
    Yan

  • WebDynpro Exception: IDs with Namespace Must Have the Format / namespace /

    Hi Experts,
        Can you please help me with this:
        I get the following error when I execute a webdynpro application.  Can you please let me know where do
        I need to look to verify the <namespace> and <id>.
       Error when processing your request
    What has happened?
    The URL http://sapdev.tfi.local:8000/sap/bc/webdynpro/sap/z_temp_disp_mara/ was not called due to an error.
    Note
    The following error text was processed in the system DEV : WebDynpro Exception: IDs with Namespace Must Have the Format /<namespace>/<id>
    The error occurred on the application server sapdev_DEV_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TABLE_COLUMN============CP
    Method: NEW_TABLE_COLUMN of program CL_WD_TABLE_COLUMN============CP
    Method: IF_WDR_VIEW_DELEGATE~WD_CREATE_UI_TREE of program /1BCWDY/6JQCRML58TRPAX42J5MQ==CP
    Method: CREATE_UI_TREE of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DEV in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server sapdev_DEV_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server sapdev_DEV_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Edited by: arshad mohammed on Sep 24, 2009 2:19 AM

    Hello experts,
    i got the same error but we use sap basis 700 with sps 15. What to do here?

  • Add child element by name with namespace

    I'm trying to add element by name that is in namespace. This call
    mod.addAppendStep ( Exp, XmlModify.Element, Name, Text )
    fails with error:
    Error: XmlModify::addStep: Cannot create content for step
    Name in abobe call is "my_ns:elem_name", query context is linked to that namespace (I tried query context not linked to namespace as well).

    If you want to add an element in a namespace, you need to do it using an empty name, and put the element (with namespace decl). E.g.:
    mod.addAppendStep(Exp, XmlModify.Element, "", "<my_ns:elem_name xmlns:my_ns='uri_for_my_ns' />").
    The exception you're seeing is saying that it can't create the content, and the content is created by parsing what is passed in, and <my_ns:elem_name/> is not well-formed (namespace prefix hasn't been mapped).
    Regards,
    George

  • Why XPath didnot work with Namespace ?

    Dear all,
    When I parsing a xml document with Namespace by XPath , it didnot work well , but if I remove the part of Namespace , it worked well , I am not sure if I processed with right steps , any help is appreciated :
    My parser : jdom-b9
    jdk : 1.4.1
    My code is like :
    import java.io.*;
    import java.util.*;
    import org.jdom.*;
    import org.jdom.input.*;
    import org.jdom.output.*;
    import org.jdom.xpath.*;
    public class XPathTest {   
        public static void main(String[] args) throws IOException, JDOMException {
            if (args.length != 1) {
                System.err.println("Usage: samples.XPathTest [test.xml]");
                return;
            String filename = args[0];
            PrintStream out = System.out;
            SAXBuilder builder = new SAXBuilder();
            Document doc = builder.build(new File(filename));
            Element root = doc.getRootElement();          
            XPath path = XPath.newInstance("//Worksheet");          
            path.addNamespace("ss","urn:schemas-microsoft-com:office:spreadsheet");
            // or use :
            //Namespace ns = root.getNamespace();
            //path.addNamespace(ns);
            List elementNames = path.selectNodes(doc);
            if (elementNames.size() == 0) {
                out.println("This xml contains no element <Worksheet>");
            } else {
                out.println("This xml contains " + elementNames.size() + " <Worksheet> :");
                Iterator i = elementNames.iterator();
                while (i.hasNext()) {
                    out.println("\t" + ((Element)i.next()).getName());
    }and test.xml :
    <?xml version="1.0"?>
    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <Worksheet ss:Name="Sheet2">
      <Table ss:ExpandedColumnCount="12" ss:ExpandedRowCount="38" x:FullColumns="1"
       x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="14.25">
       <Column ss:Width="63"/>
       <Column ss:Width="76.5"/>
       <Column ss:Width="103.5"/>
       <Column ss:Width="123"/>
       <Column ss:Width="136.5"/>
       <Column ss:Width="83.25"/>
       <Column ss:Width="39"/>
       <Column ss:Width="76.5"/>
       <Column ss:Width="103.5"/>
       <Column ss:Width="90"/>
       <Column ss:Width="76.5"/>
       <Column ss:Width="90"/>
       <Row>
        <Cell><Data ss:Type="String">PORT_CODE</Data></Cell>
        <Cell><Data ss:Type="String">EFFECT_DATE</Data></Cell>
        <Cell><Data ss:Type="String">END_DATE</Data></Cell>
        <Cell><Data ss:Type="String">ENCODE_SCHEME_PORT</Data></Cell>
        <Cell><Data ss:Type="String">PORT_NAME</Data></Cell>
        <Cell><Data ss:Type="String">COUNTRY_CODE</Data></Cell>
        <Cell><Data ss:Type="String">IS_RT</Data></Cell>
        <Cell><Data ss:Type="String">DATA_SOURCE</Data></Cell>
        <Cell><Data ss:Type="String">LAST_UPD_DATE</Data></Cell>
        <Cell><Data ss:Type="String">LAST_UPD_USER</Data></Cell>
        <Cell><Data ss:Type="String">BP_UPD_DATE</Data></Cell>
        <Cell><Data ss:Type="String">PROVINCE_CODE</Data></Cell>
       </Row>
      </Table>
    </Worksheet>
    </Workbook>test1.xml
    <?xml version="1.0"?>
    <Workbook>
    <Worksheet Name="Sheet2">
      <Table>
       <Column Width="63"/>
       <Column Width="76.5"/>
       <Column Width="103.5"/>
       <Column Width="123"/>
       <Column Width="136.5"/>
       <Column Width="83.25"/>
       <Column Width="39"/>
       <Column Width="76.5"/>
       <Column Width="103.5"/>
       <Column Width="90"/>
       <Column Width="76.5"/>
       <Column Width="90"/>
       <Row>
        <Cell><Data Type="String">PORT_CODE</Data></Cell>
        <Cell><Data Type="String">EFFECT_DATE</Data></Cell>
        <Cell><Data Type="String">END_DATE</Data></Cell>
        <Cell><Data Type="String">ENCODE_SCHEME_PORT</Data></Cell>
        <Cell><Data Type="String">PORT_NAME</Data></Cell>
        <Cell><Data Type="String">COUNTRY_CODE</Data></Cell>
        <Cell><Data Type="String">IS_RT</Data></Cell>
        <Cell><Data Type="String">DATA_SOURCE</Data></Cell>
        <Cell><Data Type="String">LAST_UPD_DATE</Data></Cell>
        <Cell><Data Type="String">LAST_UPD_USER</Data></Cell>
        <Cell><Data Type="String">BP_UPD_DATE</Data></Cell>
        <Cell><Data Type="String">PROVINCE_CODE</Data></Cell>
       </Row>
      </Table>
    </Worksheet>
    </Workbook>The output of test.xml is : This xml contains no element <Worksheet>
    The output of test1.xml with no namespace part is :
    This xml contains 1 <Worksheet> :
    Worksheet
    WHY ????????????????????????????

    I do not use jdom but I had similar problems. You can try "//:worksheet". The prefix for the default namespace might be "". it fixed my problem.
    wz

  • Getting Error :  WebDynpro Exception: IDs with Namespace Must Have the

    Hi Experts,
    I am getting following error while running Webdynpro application, Please give me solution
    The following error text was processed in the system E6I : WebDynpro Exception: IDs with Namespace Must Have the Format /<namespace>/<id>
    The error occurred on the application server HCSAP2950-1_E6I_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TABLE_COLUMN============CP
    Method: NEW_TABLE_COLUMN of program CL_WD_TABLE_COLUMN============CP
    Method: IF_WDR_VIEW_DELEGATE~WD_CREATE_UI_TREE of program /1BCWDY/AK98KQL1OONYBLIT9ARC==CP
    Method: CREATE_UI_TREE of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CPThanks,
    satish

    Hi,
    SAP Notes 1242377, 1381873, 1389146
    Threads:
    WebDynpro Exception: IDs with Namespace Must Have the Format /<namespace>/<
    regards, Lukas

  • Unexpected start node "Insert" with namespace...

    Hi,
           I have a simple Biztalk app which receives an XML and sends to oracle DB using WCF-custom adapter.
    I generated schema from Visual Studio, created a map for inbound XSD to generated XSD mapping, deployed the app.
    Send port is configured to use the map and there is no orchestration.
    I run into following error. The error description is understood, but I am not able to see why it is happening.
    The adapter failed to transmit message going to send port "SendPort12" with URL "oracledb://DEVDB/". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: Unexpected start node "Insert" with namespace "http://Microsoft.LobServices.OracleDB/2007/03/DEVSCHEMA/Table/SITES" found.
    SOAP Action is :
    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Operation Name="Insert" Action="http://Microsoft.LobServices.OracleDB/2007/03/DEVSCHEMA/Table/SITES/Insert" />
    </BtsActionMapping>
    I have checked multiple posts on different sites for this error. I am still not able to figure out what is causing this. Any help is appreciated.
    Thanks,
    SRG

    Hi SRG,
    Can you try generating schema again as may be some table change may have occurred . It may be silly but you can try 
    There are tow different post which can relate to your issue and resolution
    https://social.msdn.microsoft.com/Forums/en-US/c9e15c82-3bec-4bbb-b3c2-2507206c2d40/microsoftservicemodelchannelscommonxmlreaderparsingexception-unexpected-start-node?forum=biztalkr2adapters 
    https://social.msdn.microsoft.com/Forums/en-US/59ef69e7-3159-4fd6-ba67-9120d907f95e/wcforacledb-unexpected-start-node-node-with-namespace?forum=biztalkr2adapters
    Thanks
    Abhishek

  • How to extract  XML with namespace?

    Hi all,
    Below is the XML i have :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
    - <Request>
    <Memid>10</Memid>
    <Actid>32</Actid>
    <Pax>3</Pax>
    <Flt>2012-DEC-10</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    <Request>
    <Memid>1</Memid>
    <Actid>3</Actid>
    <Pax>2</Pax>
    <Flt>2012-DEC-12</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    </Transaction>
    I want to extract the element values :
    The below code will help me when i have no namespace , what must be done in order to work with namespace and etract element value
    v_string_xml :=
    ' //Request[' || TO_CHAR (counter_xml) || ']/Memid/text()';
    v_ssp_table (v_ssp_table.COUNT).memid :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request[' || TO_CHAR (counter_xml) || ']/Actid/text()';
    v_ssp_table (v_ssp_table.COUNT).actid :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request['
    || TO_CHAR (counter_xml)
    || ']/Pax/text()';
    v_ssp_table (v_ssp_table.COUNT).pax :=
    p_xml_in.EXTRACT (v_string_xml).getnumberval ();
    v_string_xml :=
    '//Request[' || TO_CHAR (counter_xml) || ']/Flt/text()';
    v_ssp_table (v_ssp_table.COUNT).flt :=
    p_xml_in.EXTRACT (v_string_xml).getstringval ();
    v_string_xml :=
    '//Request['
    || TO_CHAR (counter_xml)
    || ']/Username/text()';
    v_ssp_table (v_ssp_table.COUNT).username :=
    p_xml_in.EXTRACT (v_string_xml).getstringval ();

    declare
      v_xml xmltype := xmltype( '<?xml version="1.0" encoding="UTF-8" ?>
    <Transaction xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.test.com/Support/Services/test1/2012" xsi:schemaLocation="http://schemas.test.com/Support/Services/test1/2012 Support.test1.v1.xsd">
    <Request>
    <Memid>10</Memid>
    <Actid>32</Actid>
    <Pax>3</Pax>
    <Flt>2012-DEC-10</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    <Request>
    <Memid>1</Memid>
    <Actid>3</Actid>
    <Pax>2</Pax>
    <Flt>2012-DEC-12</Flt>
    <Username>WebUserNameTest</Username>
    </Request>
    </Transaction>' );
    begin
      for r_xml in ( select *
                     from xmltable( xmlnamespaces( default 'http://schemas.test.com/Support/Services/test1/2012' )
                                   , '/Transaction/Request'
                                   passing v_xml
                                     columns memid number path 'Memid'
                                           , actid number path 'Actid'
                                           , pax number path 'Pax'
                                           , flt varchar2(100) path 'Flt'
                                           , username varchar2(100) path 'Username'
      loop
        dbms_output.put_line( r_xml.memid );
        dbms_output.put_line( r_xml.actid );
        dbms_output.put_line( r_xml.pax );
        dbms_output.put_line( r_xml.flt );
        dbms_output.put_line( r_xml.username );
      end loop;
    end;

  • [svn:fx-trunk] 5564: New mustella.swc with namespace changes.

    Revision: 5564
    Author: [email protected]
    Date: 2009-03-25 20:24:48 -0700 (Wed, 25 Mar 2009)
    Log Message:
    New mustella.swc with namespace changes.
    Modified Paths:
    flex/sdk/trunk/mustella/mustella.swc

Maybe you are looking for

  • Iphone 4 to 5

    Is it possible for me to upgrade from iphone 4 to 5 at nominal cost than the market price? Is there any offers for existing customers if we visit apple store?

  • Best Practices for Payroll Conversions

    Hi All We are currently trying to do data conversion at a client with 100,000 + Employees. We are trying load the tables T558B - Payroll Periods T558C - Payroll Account Transfer: Old Wage Types T5U8C - Transfer external payroll results (USA) for all

  • Display tab page

    Hi, I have created manually a tab canvas named as CA$TAB_PAGE and two pages page1 and page1 in Forms 10g. Content canvas name is Page_1. Content canvas only displayed When i run the form. so, how to display tab canvas programatically? Regards, Murali

  • When typing my mac keeps highlighting and deleting stuff or it jumps back into an old word and starts typing in the middle of it  what is going on??

    When typing my mac will highlight words and totally delete them or it will jump back into something I already typed and start typing in the middle of that word... just started doing this about three weeks ago.  Any idea what is up???

  • Schedule line category - CN

    Hi, I'm PP Consultant. I want to know the meaning of Schedule line category CN - No Mat. Planning for sales order line items Thanks & Regards, Sankaran