Store XML-fragment without Namespace Information

Hello,
I register a schema, create a table with a XMLTYPE column, insert a row and create a view to query the data.
ALTER SESSION SET nls_numeric_characters = '.,';
BEGIN
    dbms_xmlschema.registerSchema(
         'http://test_datetime.xsd'
        ,q'[<?xml version="1.0" encoding="WE8ISO8859P1" standalone="no"?>
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99" elementFormDefault="qualified">
  <xs:element name="Document" type="Document"/>
    <xs:complexType name="Document">
        <xs:sequence>
            <xs:element name="CreDtTm" type="ISODateTime"/>
        </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="ISODateTime" xdb:SQLType="TIMESTAMP WITH TIME ZONE">
        <xs:restriction base="xs:dateTime"/>
    </xs:simpleType>
</xs:schema>]'
        ,TRUE
        ,FALSE
        ,FALSE
END;
CREATE TABLE test_datetime (
     id             NUMBER
    ,xml_document   XMLTYPE
    XMLTYPE COLUMN xml_document
    ELEMENT "pain.001.002.99.xsd#Document";
INSERT INTO test_datetime (id,xml_document)
    VALUES (
         1
        ,XMLTYPE(
q'[<?xml version="1.0" encoding="UTF-8"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99
pain.001.002.99.xsd">
<CreDtTm>2012-06-02T09:30:47.000Z</CreDtTm>
</Document>]')
COMMIT;
CREATE OR REPLACE VIEW v_dateTime_xml AS
SELECT  created.CreationDateTime
       ,created.CreDtTm
FROM    test_datetime,
        XMLTABLE(XMLNAMESPACES(DEFAULT 'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99'),
            '/Document'
            PASSING test_datetime.xml_document
            COLUMNS
             CreationDateTime TIMESTAMP WITH TIME ZONE  PATH 'CreDtTm'
            ,CreDtTm          XMLTYPE                   PATH 'CreDtTm'
            ) created;I want to store the element CreDtTm in another table to use it later without recreating it (in my real code it is not a simple element, but a fragment with many elements).
Yet the selected element contains the schema information
<CreDtTm xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99">2012-06-02T09:30:47.000000+00:00</CreDtTm>Therefore, when I later use it in another XML document it is includes together with the xmlns attribute.
SELECT  XMLELEMENT(
             "Document"
            ,XMLAttributes(
                 'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99' AS "xmlns"
                ,'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
                ,'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99 pain.001.002.99.xsd' AS "xsi:schemaLocation"
            ,(  SELECT  XMLAGG(CreDtTm)
                FROM    v_dateTime_xml
FROM    dual;
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99 pain.001.002.99.xsd">
<CreDtTm xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.002.99">2012-06-02T09:30:47.000000+00:00</CreDtTm>
</Document>How can I store or retrieve it without the schema information?
Regards
Marcus
Edited by: Marwim on 08.08.2012 14:06
Corrected schema

P.S.: Perhaps something dirty likeSure, you can always do that :)
Here are two examples with XQuery or XSLT :
SQL> var xsldoc varchar2(4000)
SQL>
SQL> begin
  2 
  3   :xsldoc := '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4    <xsl:output method="xml" omit-xml-declaration="yes"/>
  5    <xsl:template match="*">
  6      <xsl:element name="{local-name()}">
  7        <xsl:apply-templates select="@*|*|text()"/>
  8      </xsl:element>
  9    </xsl:template>
10    <xsl:template match="@*|text()">
11      <xsl:copy/>
12    </xsl:template>
13  </xsl:stylesheet>';
14 
15  end;
16  /
PL/SQL procedure successfully completed
SQL>
SQL> SELECT XMLQuery(
  2         'declare function local:strip-ns($e as element()) as element()
  3          {
  4            element {local-name($e)}
  5            {
  6              for $i in $e/(@*|node())
  7              return typeswitch ($i)
  8                       case element() return local:strip-ns($i)
  9                       default return $i
10            }
11          }; local:strip-ns(*)'
12          passing x.CreDtTm
13          returning content
14         ) as "XQuery method"
15       , XMLTransform(x.CreDtTm, :xsldoc) as "XSLT method"
16  FROM test_datetime
17     , XMLTable(
18         XMLNamespaces(default 'urn:iso:std:iso:20022:tech:xsd:pain.001.002.99')
19       , '/Document'
20         PASSING test_datetime.xml_document
21         COLUMNS CreDtTm   XMLTYPE PATH 'CreDtTm'
22       ) x
23  ;
XQuery method                                                                    XSLT method
<CreDtTm> 2012-06-02T09:30:47,000000+00:00</CreDtTm>                             <CreDtTm> 2012-06-02T09:30:47,000000+00:00</CreDtTm>

Similar Messages

  • How To Store XML Fragments Using Functions Such As XMLElement

    Hi
    Not sure what I am missing. I wish to store XML fragments in variables so can pass around and concatenate with other fragments to make final XML document. Even before attempting to concatenate XML fragments, I am struggling to store any XML fragment in a variable. I am trying to use simple functions such as XMLElement to generate XML so can store in variable. I have seen many examples of XMLElement in SQL select statement. Can XMLElement be used in plsql? XMLElement says it returns value of type XMLType. Functions such as XMLElement make generating XML easier than creating all tags manually.
    Below is simple example that demonstrates what I would like to do. I would like to be able to pass the XML fragment as either XMLType or clob. I receive error saying PLS-00201: identifier 'XMLELEMENT' must be declared
    declare
    vTheData XMLType;
    vTheDataClob clob;
    begin
      vTheData:= XMLelement("empno",'1234567');
      vTheDataClob:= xmlelement("empno",'1234567').getclobval();
    end;
    Where as I can use below, but surely don't have to use select into from dual method. I just expect can use XMLElement function in plsql same as sql, such as most other functions eg length, rtrim etc.
    declare
    vTheData XMLType;
    vTheDataClob clob;
    begin
      select xmlelement("empno",'1234567')
      into vTheData
      from dual;
      select xmlelement("empno",'1234567').getclobval()
      into vTheDataClob
      from dual;
    end;
    Hope this makes sense.
    Thanks

    Having said that, is there a more elegant way to achieve below. That is populate two XML fragments and concatenate together.
    Sure, why not just only one statement?
    select XMLConcat(
             XMLElement( ... )
           , XMLElement( ... )
    into vTheResult
    from dual;
    As a second question, is it better to build and pass XML fragments as XMLType or clob?
    I would say stay with XMLType but it depends on your requirement.
    I generally avoid passing around pieces of data, SQL/XML functions are powerful in the way they can be used with set operations, so using them in a piecewise approach kinda negates what they're for.

  • Splitting XML Files without namespaces

    Hello,
    I have a file that looks similar to this:
    <?xml version="1.0" encoding="UTF-8"?>
    <File>
     <Header>
      <Location>Phoenix</Location>
      <Date>052214</Date>  
     </Header>  
     <Bill></Bill>
     <Trailer>
      <Total>1076</Total>
     </Trailer>
    </File>
    What I would like to do is split the file (<Bill> is repeating) and I understand I should be able to do this with an envelope schema. I've done some research and every example I'm coming across happens to have a namespace in the sample schema.
    How can I accomplish the same thing without the namespace?
    Do I need to add the namespace using the ESB Toolkit, and if so, am I supposed to add a namespace to the repeating element? I looked into that solution and couldn't understand how to add a namespace to the Bill element, only the root. Unfortunately I trashed
    that approach and went with an orchestration. While that is working, it just doesn't seem right if I can accomplish this task in the receive stage.
    Any help/encouragement would be appreciated.

    The problem is that if you split the message on an element that has no namespace, you will need a Schema without namespace (in your case with a root element of "Bill" and no namespace).
    Having Schemas without namespaces in BizTalk is bad practice and should, in general and if possible, be avoided.
    So what I would do is create a custom Pipeline Component that (either using XDocument, XMLDocument or Regular Expression) appends a namespace to all "Bill" elements and also a namespace to the Root. 
    Apply the Component in the Decode Stage on your Receive Pipeline so that it is applied BEFORE the disassemble stage, and then create your "Bill" Schema with the newly appended Namespace, and also Apply the Batch namespace to your Envelope Schema.
    An Example:
    <?xml version="1.0" encoding="UTF-8"?>
    <b:File xmlns:b="http://Batch">
    <Header>
    <Location>Phoenix</Location>
    <Date>052214</Date>
    </Header>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <c:Bill xmlns:c="http://namespace"></c:Bill>
    <Trailer>
    <Total>1076</Total>
    </Trailer>
    </b:File>
    Morten la Cour

  • How to store XML fragments in a XMLTYPE column

    Hi all,
    maybe just another newbie question.
    I've imported a lot of xml documents into an Oracle table with a xmltype column (stored as CLOB). Now I try to select a specific part of these documents and store thsi xml fragment in another table, also in a xmltype column.
    Unfortunately this doesn't work, I get ORA-19010: Cannot insert XML fragments.
    What can I do to store part of a xml document?
    Best regards
    Matthias

    Is there a way to transform the xml fragments into valid xml documents?

  • Xml file without namespace with file adapter

    Hi,
    Please can you assist. We will be receiving a XML file from an application without the namespace in the file.
    As I tested thusfar PI requires a namespace as part of the xml file.
    How would it be possible to you handle this with the file adapter.
    Ex.
    <?xml version="1.0" encoding="UTF-8"?>
    <applicatrion>
         <orders>
              <order>
                   <action>I</action>
                   <orderId>4261A92485</orderId>
              </order>
         </orders>
    </application>
    Regards
    Willie Hugo

    Hi Hugo,
    Please see if this link could clear some doubts http://www.w3schools.com/XML/xml_namespaces.asp
    We generally get an idoc xml in the below format without any issues:
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ORDERS05>
    - <IDOC BEGIN="1">
    - <EDI_DC40 SEGMENT="1">
      <TABNAM>EDI_DC40</TABNAM>
      <MANDT>510</MANDT>
      <DOCNUM>0000000000127051</DOCNUM>
      <DOCREL>700</DOCREL>
      <DIRECT>1</DIRECT>
      <IDOCTYP>ORDERS05</IDOCTYP>
      </EDI_DC40>
    Thanks,
    Sudhansu

  • Plain HTTP Adapter (XML return without namespace)

    Hello Experts,
    I'm very new at XI.
    I'm using XI 7.0 SP9.
    I wanna make interface with public website using plain HTTP adapter.
    The receiver url is
    http://openapi.naver.com/search?key=cdb64b1f218b55acbb73105b3b6f68a9&query=news&target=rank
    It returns XML like
    <?xml version="1.0" encoding="UTF-8" ?>
    <result>
    <item>
        <R1>
            <K>CHOICE</K>
            <S>new</S>
            <V>0</V>
        </R1>
      </item>
    </result>
    How I can specify namespace and root document type ?
    I learned that I can specify namespace and root document type in JDBC communication channel.
    In plain HTTP, Is there any possibility to specify namespace like JDBC?

    Ji,
    look at this it will help u.
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    Sreeram Reddy

  • JMS Adapter getting xml without namespace

    Hello,
    We're using BPEL 10.1.3.4 and we need to integrate a legacy system with a new one. The legacy system writes in a JMS queue a simple xml message without namespaces (following although a specific schema). When in BPEL I try to get this xml I cannot access its elements and I'm getting errors like the following:
    variable/ expression is empty
    Which seems normal as bpel tries to access the element using namespaces.
    I found this thread which seems to be the same issue Re: writing XML without namespace? but I cannot actually understand the approach.
    Any help will be really usefull!
    Thank you!

    Hi,
    Did the solution mentioned in the other thread worked for you? I am having the exact problem.
    Thanks.

  • Writing XML without namespace?

    Hi,
    I have a "strange" xml schema in a system I need to export data to. It lacks any forms of namespace (possibly a converted DTD) and it seemd the FTP adapter (from BPEL) cant handle XML-types without namespaces.
    Is there a way to do this without using an opaque adapter and writing the data as "text"?
    The schema the file uses can be found here: http://services.agresso.com/schema/ABWSupplierCustomer/2004/07/02/ABWSupplierCustomer542.xsd
    // Michael Medin

    This works for both BPEL & ESB:
    1. Build an XSD for the source system adapter/process with no XSD.
    2. Build another XSD which acts like wrapper of original XSD.
    3. In the Wrapper XSD include the actual xsd.This one is sample xsd which has the piece of code
          <?xml version="1.0" encoding="windows-1252" ?>
           <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://xmlns.oracle.com/BPELProcess2"
          xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="DTD"
          elementFormDefault="qualified">
          <include schemaLocation="actual.xsd"/>
          </xsd:schema>The Target Namespace can be of any URL and this could be of anything.While polling the file or any JMS queue the adapter should include the wrapper xsd instead of actual xsd.This would read the file or any queue even if there is no namespace and the values can be transformed or assigned inside the process.
    Peace,
    G.

  • Read XML data without name spaces from PL/SQL

    Hi,
    I am trying to upload XML data without namespaces into Oracle tables from PL/SQL. Below is the sample XML data.
    Please let me know,How this is achievable in PL/SQL?
    <?xml version="1.0" ?>
    <insplist ver="2" count="1">
    <insp id="219991" timestamp="134817078" stat="G" operator_id="999999" >
    <data name="TIME CLOCK - PUNCH" val="INNER" type="STRING" />
    </insp>
    </insplist>
    Thanks

    And it's even simpler with the GET method as we just have to pass the url :
    SQL> DECLARE
      2 
      3    v_url      varchar2(200) := 'http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=';
      4    v_address  varchar2(200) := '1 rue Victor Hugo Paris France';
      5 
      6    v_req      utl_http.req;
      7    v_rsp      utl_http.resp;
      8 
      9 
    10 
    11    v_xml      varchar2(32767);
    12 
    13    v_lng      number;
    14    v_lat      number;
    15 
    16  BEGIN
    17 
    18    v_req := utl_http.begin_request(v_url || utl_url.escape(v_address), 'GET', utl_http.HTTP_VERSION_1_1);
    19    v_rsp := utl_http.get_response(v_req);
    20 
    21    utl_http.read_text(v_rsp, v_xml);
    22    utl_http.end_response(v_rsp);
    23 
    24    select longitude, latitude
    25    into v_lng, v_lat
    26    from xmltable(
    27         '/GeocodeResponse/result/geometry/location'
    28         passing xmlparse(document v_xml)
    29         columns longitude number path 'lng'
    30               , latitude  number path 'lat'
    31         )
    32    ;
    33 
    34    dbms_output.put_line('Longitude = ' || v_lng);
    35    dbms_output.put_line('Latitude = ' || v_lat);
    36 
    37  END;
    38  /
    Longitude = 2.2734472
    Latitude = 48.8282741
    PL/SQL procedure successfully completed
    Or, taking shorcuts :
    SQL> select *
      2  from xmltable(
      3       '/GeocodeResponse/result/geometry/location'
      4       passing httpuritype('http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address='
      5                           || utl_url.escape('1 rue Victor Hugo Paris France')
      6                           ).getxml()
      7       columns longitude number path 'lng'
      8             , latitude  number path 'lat'
      9       )
    10  ;
    LONGITUDE   LATITUDE
    2,2734472 48,8282741

  • How to store xml data fragments, that will not be queried?

    Hello,
    Delphi Client application communicates with Java Server application via XML messages. Client sends XML message over HTTP Post method. Java Servlet gets XML message, parses it, performs requested action (select/insert/update/delete), generates resulting response and sends it back to the Client.
    I use Oracle DB XE 10.2.
    For example: Client sends a request to the server, to append certain Order with new Product info:
    Request:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <Request OrderID="123123123" Action="NewProduct">
    - <Product TempProdID="2" ProdName="L01" VisualID="1" Amount="1" TechClass="1" TechSubject="1" TechVersion="0" TechName="TestTech" ElemOk="0">
    <Modified UserID="XXX" UserGroup="XXX" GroupLevel="0" />
    - <QuickInfo>
    <ProdIcon Format="PNG"
    Encoding="Base64">iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAA
    lC+aJAAAAA3RSTlP////6yOLMAAAAvElEQVR42u3aQQ6EIAwAQP7/afe0
    mo1mBVur0emJgwGmRDFNWwvH9I153OpjyoisefqXW3afm4WypP+MgomvT
    z8AAAAAAAAAAAAAAMAzAClzAWQAdvexfqATEKmA/Fm0rYs5ozvoAWyWj4
    ZqJ9efQKR8BJAHOPEdKAAc/lLdAhC/K68EBG+JWwAixfABgF8Jf6MAAAA
    AAAAAAAAAAAAALwRUGgAAAAAAsgGJ3cfVrcfFl2jiIZzV+V7Zd/8BOtNi
    0MnJ58oAAAAASUVORK5CYII=
    </ProdIcon>
    <Parameters />
    </QuickInfo>
    - <TechProduct CurVer="1" MinVer="1" TotalItems="330" ItemNodeSize="55074">
    - <SubItem Class="TPlGraph" BindID="00B9C004">
    <PropList />
    - <SubItem Ident="Profiles" Class="TProfileList" Child="1" BindID="0188598C">
    <PropList />
    - <SubItem Class="TPlProfile" Child="1" BindID="018CA6CC">
    - <PropList>
    <Property PropIdent="ProfBaze0X" ValText="0" />
    <Property PropIdent="ProfBaze0Y" ValText="990" />
    <Property PropIdent="ProfBaze1X" ValText="990" />
    <Property PropIdent="ProfHier0" ValText="0" />
    - <Property PropIdent="InBorder" ValIdent="None" ValText="N&#279;ra">
    <ExtValue ColIdent="ItemCode" Value="None" />
    <ExtValue ColIdent="Type" Value="" />
    <ExtValue ColIdent="Filter" Value="" />
    <ExtValue ColIdent="Width" Value="0" />
    <ExtValue ColIdent="TechCall" Value="" />
    </Property>
    </PropList>
    </SubItem>
    </SubItem>
    </SubItem>
    </TechProduct>
    </Product>
    </Request>
    I use DOM parsers to parse the received requests, extract certain info and insert it into relational tables using standart SQL queries.
    My question is: what is the best way to store XML data fragments, that are not required to be saved relationally? I need to save the content of node <TechProduct> from the above example to relational table's column. There will be no need to query this column, no need to use relational views. I will use it only when Client application will request to modify certain order's product. Then I will have to send back the same <TechProduct> node via XML response.
    So what column type do I have to use? CLOB? XMLType? Is it better to use object types? Do I have to register XML Schema for better performance? The size of the fragment can be ~2MB.
    Thanks for your help
    Message was edited by:
    Kichas

    Thank you for reply,
    As you suggested, I will use XMLType storage as CLOB (without XML Schema).
    As I mentioned before, I use Java Servlet, deployed on Tomcat WebServer, to receive XML messages from Client application via HTTP POST method.
    I use these libs to get the XML payload and parse it into a Document:
    import org.w3c.dom.*;
    import org.xml.sax.InputSource;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    And here is the code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try {
    // get the XML payload and parse it into a Document
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    Document dom;
    InputSource input = new InputSource(request.getInputStream());
    dom = docBuilder.parse(input);
    catch(Exception ex) {
    System.out.println("Exception thrown in XmlService");
    ex.printStackTrace();
    throw new ServletException(ex);
    I create a relational table, that contains XMLType column:
    CREATE TABLE xwarehouses (
    warehouse_id NUMBER,
    warehouse_spec XMLTYPE)
    XMLTYPE warehouse_spec STORE AS CLOB;
    Now I want to insert all DOM Document into XMLType column. So I do like this:
    import oracle.xdb.XMLType;
    String SQLTEXT = "INSERT INTO XWAREHOUSES (WAREHOUSE_ID, WAREHOUSE_SPEC) VALUES (?, ?)";
    XMLType xml = XMLType.createXML(con,dom);
    PreparedStatement sqlStatement = con.prepareStatement(SQLTEXT);
    sqlStatement.setInt(1,2);
    sqlStatement.setObject(2,xml);
    sqlStatement.execute();
    sqlStatement.close();
    dom is the Document, that I got from HTTP Request input stream.
    My servlet throws an exception:
    java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
    at XmlService.GetMatListServiceHandler.processRequest(GetMatListServiceHandler.java:111)
    at XmlService.XmlServiceHandler.handleRequest(XmlServiceHandler.java:43)
    at XmlService.XmlServiceServlet.doPost(XmlServiceServlet.java:69)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
    why does he needs oracle.xml.parser.v2.XMLParseException? I don't use Oracle parser? Does this code line throws the exception (I am not able to debug my code, because I have not configured JDeveloper to be able to use Remote Debuging):
    XMLType xml = XMLType.createXML(con,dom);
    Does it reparses the given dom Document or what?. When I deploy xmlparserv2.jar to Tomcat, everything is ok, application inserts XML data into XMLType column.
    Is there another way to insert the whole org.w3c.dom Document or Document fragment (that is already parsed) into XMLType column. Can you provide any sample code?
    The Document may contain national symbols, so they should be correctly stored and then later retrieved.
    Many thanks.

  • XML without namespace and prefix, modified package-info.java, JAX-WS option

    Hello
    I have created a consumer business service which will be called from JDEdwards EOne, pulls data from database and send it to Fusion Middleware.
    SO, I have created proxy using JAX-WS option. And suggested in oracle doc, I created proxy outside OMW and then copied it to my project. XML payload is getting generated without namespace and prefix. After some research, I modified package-info.java. Now, I am able to send the payload and if test it locally from Jdeveloper and take xml output using marshaller I can see it has namespace and prefix as well. BUt, when I run this from server it does not have namespace and prefix.
    Please help.
    Thanks
    TK

    Just to clerify,
    The common complex types are StatusInfo, IdcProperty and IdcPropertyList. I ahve 3 more WSDL's with the exact same entires for those 3.

  • Assign default namespace to XML fragment using XQuery

    Hi everybody!
    I need to add a default namespace declaration to a XML fragment using XQuery. I wrote following statement to assign fragment to $body:
    <soap-env:Body>{
    fn-bea:inlinedXML($content/text())}
    </soap-env:Body>
    The problem is "$content/text()" has no namespace declaration so I need to assign a default namespace (xmlns="") to it in order to apply some XQuery transformations to its content.
    I know this can be easily done with a XSLT but I would like use XQuery instead.
    Could anyone tell me how I could perform this task?
    Thank you in advance,
    Daniel.

    Re: xquery function - send namespace as binding variable and define it in a tag

  • Wrapping xml-fragment into AnyDocument looses runtime type information

    I would like to store a fragment of xml in a database. However, to stay XML compatible,
    I don't want to have <xml-fragment> tags. To avoid this, I attempt to "wrap"
    the xml-fragment inside of an AnyDocument using the following code:
    private static AnyDocument wrap(final XmlObject o) {
    final AnyDocument anyDocument = AnyDocument.Factory.newInstance();
    final AnyDocument.Any any = anyDocument.addNewAny();
    any.set(o);
    return anyDocument;
    The problem, is that somehow my runtime type is getting lost after the wrapping
    occurs.
    Here is how the data looks BEFORE wrap (o.save()):
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment xsi:type="loc:AddTermRequestT" xmlns:loc="http://www.overture.com/service/common/local"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:dis="http://www.overture.com/service/display">
    <loc:accountId>1123223ZZZ</loc:accountId>
    <loc:term>dog</loc:term>
    <loc:price>0.55</loc:price>
    </xml-fragment>
    Note that in the above XML the runtime type is set as: xsi:type="loc:AddTermRequestT
    Here is how the data looks after I attempt to wrap it with AnyDocument:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:any xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:dis="http://www.overture.com/service/display"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:loc="http://www.overture.com/service/common/local">
    <loc:accountId>1123223ZZZ</loc:accountId>
    <loc:term>dog</loc:term>
    <loc:price>0.55</loc:price>
    </xsd:any>
    The runtime type is gone and it's not clear how to parse the new XML.
    Am I doing something wrong? Why does the runtime type go away? Is this the correct
    way to "warp" some fragment with a valid document.
    Again, the intent here is to store something to the database that a different
    tool can understand later.
    Thanks.
    -AP_

    Use:
    xmlOptions.setSaveOuter();

  • XML message without encoding type

    Hi,
    Is there any possibility to generate the XML file without encoding?
    Should convert  <?xml version="1.0"; encoding="UTF-8"?> to <?xml version="1.0";?>. I have checked the blog and the answer was either Java mapping or XSLT mapping. Is it possible to handle in graphical mapping?
    I am using the AS2 adapter to send the file to customer and External defination for the target message. Below are few information on the AS2 configuration:
    Signing Algorithm: SHA-1
    Encryption: 3DES
    Your suggestion is highly appreciated.
    Regards,
    Vasantha

    HI Vasantha,
        It is not possible with Graphical Mapping you need to go either with JAVA or XSLT mapping.
    /people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
    Cheers!!!
    Naveen

  • Adding xml fragment to SOAP body (SAAJ)

    Hi all,
    we are using SOAP (or better SAAJ) in a modular design as packaging/enveloping format for arbitrary payloads which are generated by different modules.
    How is it possible to add a xml fragment (as InputStream or DOM Node) to a SOAP Body ?
    Nick
    [email protected]

    Hi Vicky,
    I guess, we have a little misunderstanding here. The core SOAP specification defines the structure of the envelope, the "SOAP with attachments" specification extends that by defining how to add binary attachments. This is accomplished by using MIME. Every attachment is another MIMEPart, but the SOAP Envelope always has to be present as first MIMEPart. Now I don't want to add any attachments, I only want to construct a SOAP Envelope that contains arbitrary xml docs (fragments) in the body.
    Look at the example below, the tags with namespace "S" belong to the SOAP specification and are built by our SOAP layer, the tags with namespace "m" belong to some other namespace and are generated by a totally different component.
    My question was how I could add (within SAAJ) the xml fragment starting with "m:PurchaseOrder" to the envelope without having to add element by element.
    <S:Envelope>
         <S:Header>
              ...optional header tags
         </S:Header>
         <S:Body>
                    <!---from here it is a different namespace, SOAP doesn't know about PurchaseOrders>
              <m:PurchaseOrder>
                   <m:position>
                        <m:article>0815</m:article>
                        <m:description>mainboard</m:description>
                        <m:price>50</m:price>
                   </m:position>
                   <m:position>
                        <m:article>0816</m:article>
                        <m:description>cpu</m:description>
                        <m:price>100</m:price>
                   </m:position>
              </PurchaseOrder>
                    <!---from here, it is SOAP again>
         </S:Body>
    </S:Envelope>

Maybe you are looking for

  • To pull data from avarchar field into a date field in another table

    Hi I pulled some records into a table from a remote server by means of a database link and one of the field which is varchar(30) needs to be pulled into other database which has a date column. so the varchar field needs to be converted into the date

  • Decimal space problem in Condition value of Import PO

    Dear All, In PO the condition value found to be 0.00. When the problem explored,we find only 2 decimal places appears for the value. If the value is 0.0021,it appears as 0.00 only due to decimal space given in KOMV(structure) against KWERT field is 2

  • Crystal Reports and Business One Problems

    Hello all Some questions about Crystal Reports and Business One, I try run some Crystal reports developed in special but for some reason when I ussing Terminal Services this unplug, so, more strange its when the user are not administrators because wh

  • Where can i find the files downloaded by Adobe Creative Cloud?

    I installed illustrator CC today by using the Adobe Creative Cloud, i want install it on another machine, but i do not want download it again. unlike the old Adobe Download Assistant, it don't let you select a folder to save the downloaded files. Any

  • 3000 K100 Always boots into Onekey Recovery

    I have a 3000 k100.  At one point I told the windows software to make a Onekey Backup.  The comptuer rebooted and started running the "Onekey Recovery" software.  However it hangs and never finishes.  Everytime I shutdown and reboot it goes into the