Plain http payload xml format

Hi,
Can anyone point me to any documentation/example on the xml layout for the payload. I am using the plain http send to XI and I need to know how to put the data into the right xml format. Thanks..

Hi Shilton,
As said already you can get the payload from the "src" of the test tab. But you have to be careful while creating it as a payload. Usually we create the payload as string. And also the XML needs the " compulsorily. for example in <?xml version=<b>"</b>1.0<b>"</b>.
while creating the string be careful and use '\' character before these quotes.
something like this.
var payload = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:input_mt xmlns:ns0=\"http://com.somenamespace\">
   <val>000000000000001135</val>
</ns0:input_mt>";
hope this helps.
regards
venkat

Similar Messages

  • In sap 4.7 ver i want to  dispatch an Idoc through http in xml format

    Hi
    Here i am giving the brief scenario of about my
    requirements "::::
    Our organization need to receive an IDoc through
    HTTP into XML format  then we have to send an acknowledgement  back to USA (external  system
    located)
    then we hav eto process tha tIDoc an dsend it back
    to the edi 850 ...
    we are not using Sap Business Connector
    Plz send the suggestions as soon as possible
    I really appreciated if u can give the suggestions
    regarding my  business scenario ..
    without using any thirdparty tool in sap 4.7 version it is possible how can i do that ??
    Thanks & Regards ,
    bak

    The exact error message I'm getting is :
    ABAP XML formatting error in XML node of type "element", name: "abap"

  • 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

  • Send Idoc to URL in XML format

    Dear All
    We are working on SAP ECC6 version. Where my  customers requirement is send an idoc
    Which contains dispatch details to there customer on URL (HTTP) in XML format
    Plz suggest how to send an Idoc to URL.
    Regards
    Arun

    Hi Arun,
    Check this links
    [idoc|http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm]
    [Port Creation|http://wiki.sdn.sap.com/wiki/display/XI/StepbyStepprocessforsendingCustomerorVendorMasterDatafromECCsystemtoanexternalsystemmysqldatabasethroughSAPProcess+Integration]
    Regards,
    Madhu.

  • Plain HTTP sender adapter - Extract XML from request

    Hi all,
    I face a blocking issue in one of my B2B process.
    A marketplace must send Purchase orders to my customer with synchronous HTTPs requests.
    When messages arrive, we can see the following payload in incoming message (SXMB_MONI)
    %24xmldata=+%3C%3Fxmlversion%3D%221.0%22encoding%3D%22UTF-8%22%3F%3E%0D%0A-%3CMessage%3E%0D%0A-%3CHeader%3E%0D%0A%3CFrom%3EPA%3C%2FFrom%3E%0D%0A+%3CTo%3E83092SAC01%3C%2FTo%3E%0D%0A+%3CDocType%3ETAEPa-xCBL30PO%3C%2FDocType%3E%0D%0A++%3CDocID%3EP-20050502T125611-TATG310-
    %0D%0A++%3C%2FMessage%3E&submit=Soumission
    WebServer of B2B partners don't put XML data in HTTP body but as HTML form in .
    Is there a way in Plain http adapter to interpret such a request ?
    How can we decode hexadecimal sequence ?
    Thanks to help us.
    Jean-Charles

    Hi Jean-Charles !
    Unfortunately, I don't know any other option (based on XI; maybe you can develop some kind of external translator between your system and  XI's http adapter). The first link (although it is based on a escenario in the oposite direction) speaks about using java proxy instead of the http adapter.
    Here are some links:
    /people/thorsten.nordholmsbirk/blog/2006/08/06/use-a-java-proxy-instead-of-a-jca-adapter
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30572c6a-d311-2a10-99ab-f646ec3b5b12
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06315a6-e66e-2910-039c-ba8bbbd23702
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+proxy&adv=false&sortby=cm_rnd_rankvalue&start=21#
    Regards,
    Matias
    ps: please award points if helpful.

  • I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the butten is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    I am creating a form on LiveCycle Designer and I am trying to create a form that has a e-mail submit button.  When the button is utilized it attaches the form to the e-mail in an plain text .xml format rather than the pdf format.  Is there a quick fix?

    Hi,
    You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button Object palette, the "Submit As";
    In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
    Regards
    Bruce

  • What is the most plain xml format to import clips and sequence into Premiere ?

    I want to create xml includes sequence and clips to import Premeire.
    In this case, I have a reference xml that is exported from premiere for finalcut pro. But this finalcut pro export format looks so complicated because has alot of property  that is belong to premiere pro. I tested by deleting some of them from xml and imported again, didn't effected anything.
    Here is the question, How can I create an xml which requires minimum property details for premiere sequence and clips ? Is there any reference better than FinalCut Pro export xml format ?

    Bruce from adobe replied that FCP Format is the best to import Premiere.
    So I read FCP Format Documentation from http://documentation.apple.com/en/finalcutpro/usermanual/index.html#chapter=97%26section=3 %26tasks=true

  • Plain HTTP sending Post Requests and Multipart Uploads

    Hi,
    I have a scenaio where I need to send an normal POST request
    to the server. This request needs to have not the XML payload but
    the same data in the form of a POST request.
    Is there a way to transform the data out of the XML format into
    the plain POST format prior to sending it?
    Also, another scenario requires an file upload via HTTP (like a
    file submitted by a web-form). Is this possible with PI and how?
    Thanks for any pointers
    Best regrads

    Hi,
    If you do not send any payload in the http request you are going to get a http error.
    For your second requirement, There is no any problem, You can use any existent tool, or maybe develop you own program.
    Http client.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID1536482550DB10501227175138097442End?blog=/pub/wlg/15296
    Regards
    Ivan

  • R3- RFC- XI-Plain HTTP

    Hi,
    I have a scenario where R/3 sends IDoc's to our external system using XI plain HTTP adapter. My configuration works fine but, the only issue is , I need to parse through the payload XML, in order to determine the IDOC type at my external system http listener. Is there a way I can get this information passed in the HTTP header(Message Interface/IDOC name or any info) which I can then use to uniquely identify the incoming IDOC?
    Thanks
    Don

    Hi Don
    Did you check the following blog.. You can write info to header parameters while sending to the target.. Use the same while receiving to PI
    /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

  • Converting File Content.Unexpected XML format

    Hello,
    I need to convert file content in File Receiver Adapter.
    In my opinion, i have unexpected XML format of a payload message. (At least, the format does not contain a structure element):
    That is,
    I have the XML message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>
    I need to convert it into plane text format with fieldseparator.
    How to convert this xml message into plane text format if it does not contain any structure elements  (that is, <struc1>  <field1>value</field1>  </struc1>) according to help guide?
    How should i configure RecordSet in File Adapter?
    I am confused.
    Thank you

    Igor,
    Are u getting the format from the source?
    <ns0:MT_BW ID="123" BirthDay="20/03/1969" Title="consultant" Name="John" LastName="Smith" xmlns:ns0="http://sap.com/xi/BASIS"/>
    If yes, then create one more data type with structure
    <Record>
    <ID/>
    <BirthDay/>
    <Title/>
    <Name/>
    <LastName/>
    </Record>
    And do direct mapping. So now you can easily configure the content conversion for the target format isn't it?
    Its my thought, I don't know whether its feasible for you or not..
    raj.

  • SOAP Adapter and plain HTTP

    Hello,
    what does the option
    "Do not use SOAP envelope" on a SOAP SENDER adapter mean?
    Does this mean, that only the payload from the soap message is sent to the integration server? (without the soap envelope)
    Or does this mean, that I can send a XML message without SOAP envelope to the adapter from a HTTP client?
    Which means, I can use the SOAP adapter like the standard PLAIN HTTP adapter, but I can implement a adapter module!
    How knows more details on that?
    Best regards
    Werner Magerl

    Hi Werner,
    > When I use the option nosoap=true and the setting "Do
    > not use SOAP envelope" then it works.
    > So both things must be used together.
    > Is this correct?
    Yes. In your scenario you need both parameters.
    > What does this mean, that the XI message is created
    > after the self-defined modules?
    When you write a module for sender file-adapter, you have to deal with an XI message, as the file adapter fisrt creates the XI message, then calls the customer module.
    When you write a module for sender SOAP adapter, you have to deal with the incoming message, as the SOAP adapter first calls the customer module, then creates the XI message.
    > We just want to check the incoming XML message
    > against a local XSD. If there is an error against the
    > XSD, we do not want to receive the message, we want
    > to send back a specific HTTP error code.
    > This is the reason, why we just want to send a
    > plainHTTP message and not a SOAP Message.
    > In my opinion this should work?!
    > We do not want to use other modules.
    Yes, that should work.
    > Do you have experience on adapter modules for SOAP
    > adapter?
    No, I have no experience with adapter modules for sender SOAP adapter.
    Regards
    Stefan

  • Plain HTTP post connections

    HI,
    Is there any way to limit HTTP posting connections? I know I can limit SAP max conn. in transaction SMQS, but is there any way limiting plain HTTP post?
    Now XI is posting XML messages with speed that receiver cannot handle...

    Hi,
    If you do not send any payload in the http request you are going to get a http error.
    For your second requirement, There is no any problem, You can use any existent tool, or maybe develop you own program.
    Http client.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID1536482550DB10501227175138097442End?blog=/pub/wlg/15296
    Regards
    Ivan

  • HTTP payload issue

    Hey all,
    I have an RFC to HTTP scenario, i have managed so far to execute the RFC, pass those values to an XML which is send to an HTTP (Oanda web) and get a response (this last part is the problem)
    i'm trying to map this response from that site to my RFC.Response, but while i see the response in the monitoring  i don't see that this is passing in the format i need which would be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Response xmlns:ns0="http://test/Fxml">
       <RESPONSE>
          <EXPR/>
          <EXCH/>
          <AMOUNT/>
          <NPRICES/>
          <CONVERSION>
             <DATE/>
             <ASK/>
             <BID/>
          </CONVERSION>
       </RESPONSE>
    </ns0:MT_Response>
    I just see the response in the format send back by the site
    <RESPONSE>
    <EXPR>
    <EXCH>
    <AMOUNT>
    <NPRICES>
    <CONVERSION>
    <DATE>
    <ASK>
    <BID>
    </CONVERSION>
    </RESPONSE>
    - So, as you can see, it seems like the response from the web is making no relation to my Message Type (synchronous), and since my MT is not related, i have an empty response from the RFC
    - How is this possible? what would i need to do in order to create the response in the xml format i created and fill with the correct payload format?
    any help would be apreciated,
    Thanks in advance!

    I tried that but is not working
    if i try to map MT_Response => ZRFC.Response header
    or
    MT_Response/RESPONSE  => ZRFC.Response header
    I get an error (red flag on moni) and i have a mapping exception, my guess is this is because ZRFC.Response is 1.1 and i'm mapping something empty, that's why i was telling that i can't generate the MT_Response file (but in moni i see the RESPONSE format from the web, but is not translating that to my MT)
    of course that if i map a constant to ZRFC.Response i create an empty response, but then again the problem is my MT_Response, maybe im missing a parameter in the HTTP channel that takes the xml payload?
    Edited by: Alexis Alanis on Oct 7, 2008 10:35 AM

  • XML format for input to BPEL process from client stub

    Hi,
    I have deployed SyncHelloWorld BPEL process as given in the tutorial in the BPEL Server. It is working fine. Now I am trying to invoke the process by creating a Java client stub . I created a stub using the Web-services wizard by specifying the WSDL of the BPEL. Now I want to know how to pass some string through XML document to the BPEL process.
    I am using this code in the main method of the stub., but the value is not being passed to the BPEL nodes correctly. the output I am getting is "Hello "
    and not "Hello XYZString". I think I am not able to form the XML document to pass as input correctly. Can anyone help.
    Can anyone please help :
    public static void main(String[] args)
    try
    SyncHelloWorldStub stub = new SyncHelloWorldStub();
    // Add your own code here.
    // Create an empty XML document
    XMLDocument doc = new XMLDocument();
    // Create an element
    Element body = doc.createElementNS("http://xmlns.oracle.com/SyncHelloWorld", "SyncHelloWorldProcessRequest");
    // Create the inner element
    Element ip = doc.createElementNS("http://xmlns.oracle.com/SyncHelloWorld", "input");
    // Create a text node
    Text text = doc.createTextNode("input");
    // Set the input parameter
    text.setNodeValue("XYZString");
    ip.appendChild(text);
    body.appendChild(ip);
    // Call the process. It returns a vector
    Vector v = stub.process(body);
    // Code to print the returned xml.
    System.out.println("Received " + v.size() + " element");
    Enumeration enum = v.elements();
    // Walk through the vector and print out contents
    while (enum.hasMoreElements())
    Object o = enum.nextElement();
    System.out.println("Returned a " + o.getClass().getName());
    //If it is an element, print it out
    if (o instanceof XMLElement)
    XMLElement xml = (XMLElement)o;
    xml.print(System.out);
    else
    System.out.println("Returned " + o.toString());
    System.out.println("After executing : "+v.toString());
    catch(Exception ex)
    ex.printStackTrace();
    This is the code for WSDL file for the BPEL process.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions name="SyncHelloWorld" targetNamespace="http://xmlns.oracle.com/SyncHelloWorld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/SyncHelloWorld" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/SyncHelloWorld">
    - <types>
    - <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/SyncHelloWorld" xmlns="http://www.w3.org/2001/XMLSchema">
    - <element name="SyncHelloWorldProcessRequest">
    - <complexType>
    - <sequence>
    <element name="input" type="string" />
    </sequence>
    </complexType>
    </element>
    - <element name="SyncHelloWorldProcessResponse">
    - <complexType>
    - <sequence>
    <element name="result" type="string" />
    </sequence>
    </complexType>
    </element>
    </schema>
    </types>
    - <message name="SyncHelloWorldRequestMessage">
    <part name="payload" element="tns:SyncHelloWorldProcessRequest" />
    </message>
    - <message name="SyncHelloWorldResponseMessage">
    <part name="payload" element="tns:SyncHelloWorldProcessResponse" />
    </message>
    - <portType name="SyncHelloWorld">
    - <operation name="process">
    <input message="tns:SyncHelloWorldRequestMessage" />
    <output message="tns:SyncHelloWorldResponseMessage" />
    </operation>
    </portType>
    - <binding name="SyncHelloWorldBinding" type="tns:SyncHelloWorld">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="process">
    <soap:operation style="document" soapAction="process" />
    - <input>
    <soap:body use="literal" />
    </input>
    - <output>
    <soap:body use="literal" />
    </output>
    </operation>
    </binding>
    - <service name="SyncHelloWorld">
    - <port name="SyncHelloWorldPort" binding="tns:SyncHelloWorldBinding">
    <soap:address location="http://cisoidd001.corporate.ge.com:5843/orabpel/default/SyncHelloWorld/v2006_06_19__40924" />
    </port>
    </service>
    - <plnk:partnerLinkType name="SyncHelloWorld">
    - <plnk:role name="SyncHelloWorldProvider">
    <plnk:portType name="tns:SyncHelloWorld" />
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    Also, while running the BPEL process from console, we can give the input as html or string. Can anyone give the me xml format of the input.
    Any help would be highly appreciated.
    Thanks,
    Debojyoty

    Your last question shows that you might have solved this by now.
    The xml document you are composing in java might not exactly be the xml input bpel excepts. The way to compare is first initiate a process by posting an html message, using the initiate tab for your process in the BPEL console. Check the box "Save as default input" before you send the html request.
    Then again do an initiate from the BPEL console and select "XML Source" instead of "HTML Form". You will see the xml message you just have sent as html.
    You might also want to test your java program with one of the many free soap clients available on the internet.
    HTH,
    Ruerd
    http://www.numericalexample.com

  • How to get the metadata (in xml format) of all the fileds in SQl query ?

    Good day ,
    I am using the dbms_xmlgen.getXMLfunction to get the result of any query in xml format.
    With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.
    I tried to Google it but couldn't find any solution , it's easy to do it in java where I can get the resultset meta data from the resultset but I have to do it in Oracle function since I want the result in xml format and want to use the oracle XML API.
    You may think why I need metadata , the reason is the application will later use this information to sort the data contained in these fields according to their data type provided to.
    Regards
    Sajjad Ahmed Paracha

    Hi,
    Please always say which version of Oracle you're using (SELECT * FROM v$version).
    With this XML I also want the metadata information about all the fields used in the query (passed to getXML function). Is it possible and how can I achieve this.It is possible but with a bit of effort.
    I would use DBMS_SQL utility to parse the query, extract each column's description and then build a METADATA element with the required information.
    Here's an example (11g) :
    DECLARE
      v_query      varchar2(30) := 'select * from scott.emp';
      v_cur        integer;
      v_desc_tab   dbms_sql.desc_tab;
      v_col_cnt    number;
      v_col_lst    varchar2(4000);
      v_xml_query  varchar2(32767);
      xml_metadata_coll xmlsequencetype := xmlsequencetype();
      xml_metadata      xmltype;
      res          clob;
    BEGIN
      v_cur := dbms_sql.open_cursor;
      dbms_sql.parse(v_cur, v_query, dbms_sql.native);
      dbms_sql.describe_columns(v_cur, v_col_cnt, v_desc_tab);
      dbms_sql.close_cursor(v_cur);
      for i in 1 .. v_col_cnt loop
        if i > 1 then
          v_col_lst := v_col_lst || ', ';
        end if;
        v_col_lst := v_col_lst || v_desc_tab(i).col_name;
        xml_metadata_coll.extend;
        select xmlelement("COLUMN"
               , xmlattributes(v_desc_tab(i).col_name as "name")
               , xmlforest(
                   case v_desc_tab(i).col_type
                     when 1   then 'VARCHAR2'
                     when 2   then 'NUMBER'
                     when 12  then 'DATE'
                     when 180 then 'TIMESTAMP'
                     else 'UNKNOWN'
                   end as "DATATYPE"
                 , v_desc_tab(i).col_max_len as "MAX_LENGTH"
                 , v_desc_tab(i).col_precision as "PRECISION"
                 , v_desc_tab(i).col_scale as "SCALE"
        into xml_metadata_coll(i)
        from dual;
      end loop;
      v_xml_query :=
    'SELECT XMLSerialize(document
             XMLElement("ROOT"
             , :1
             , XMLElement("ROWSET"
               , XMLAgg(
                   XMLElement("ROW", XMLForest(' || v_col_lst || '))
             ) as clob indent
    FROM ( ' || v_query || ')';
      select xmlelement("METADATA", xmlagg(column_value))
      into xml_metadata
      from table(xml_metadata_coll)
      execute immediate v_xml_query into res using xml_metadata;
      dbms_output.put_line(res);
    END;
    /Ouput :
    <ROOT>
      <METADATA>
        <COLUMN name="EMPNO">
          <DATATYPE>NUMBER</DATATYPE>
          <MAX_LENGTH>22</MAX_LENGTH>
          <PRECISION>4</PRECISION>
          <SCALE>0</SCALE>
        </COLUMN>
        <COLUMN name="ENAME">
          <DATATYPE>VARCHAR2</DATATYPE>
          <MAX_LENGTH>10</MAX_LENGTH>
          <PRECISION>0</PRECISION>
          <SCALE>0</SCALE>
        </COLUMN>
        <COLUMN name="JOB">
          <DATATYPE>VARCHAR2</DATATYPE>
          <MAX_LENGTH>9</MAX_LENGTH>
          <PRECISION>0</PRECISION>
          <SCALE>0</SCALE>
        </COLUMN>
        <COLUMN name="MGR">
          <DATATYPE>NUMBER</DATATYPE>
          <MAX_LENGTH>22</MAX_LENGTH>
          <PRECISION>4</PRECISION>
          <SCALE>0</SCALE>
        </COLUMN>
        <COLUMN name="HIREDATE">
          <DATATYPE>DATE</DATATYPE>
          <MAX_LENGTH>7</MAX_LENGTH>
          <PRECISION>0</PRECISION>
          <SCALE>0</SCALE>
        </COLUMN>
        <COLUMN name="SAL">
          <DATATYPE>NUMBER</DATATYPE>
          <MAX_LENGTH>22</MAX_LENGTH>
          <PRECISION>7</PRECISION>
          <SCALE>2</SCALE>
        </COLUMN>
        <COLUMN name="COMM">
          <DATATYPE>NUMBER</DATATYPE>
          <MAX_LENGTH>22</MAX_LENGTH>
          <PRECISION>7</PRECISION>
          <SCALE>2</SCALE>
        </COLUMN>
        <COLUMN name="DEPTNO">
          <DATATYPE>NUMBER</DATATYPE>
          <MAX_LENGTH>22</MAX_LENGTH>
          <PRECISION>2</PRECISION>
          <SCALE>0</SCALE>
        </COLUMN>
      </METADATA>
      <ROWSET>
        <ROW>
          <EMPNO>7369</EMPNO>
          <ENAME>SMITH</ENAME>
          <JOB>CLERK</JOB>
          <MGR>7902</MGR>
          <HIREDATE>1980-12-17</HIREDATE>
          <SAL>800</SAL>
          <DEPTNO>20</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7499</EMPNO>
          <ENAME>ALLEN</ENAME>
          <JOB>SALESMAN</JOB>
          <MGR>7698</MGR>
          <HIREDATE>1981-02-20</HIREDATE>
          <SAL>1600</SAL>
          <COMM>300</COMM>
          <DEPTNO>30</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7521</EMPNO>
          <ENAME>WARD</ENAME>
          <JOB>SALESMAN</JOB>
          <MGR>7698</MGR>
          <HIREDATE>1981-02-22</HIREDATE>
          <SAL>1250</SAL>
          <COMM>500</COMM>
          <DEPTNO>30</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7566</EMPNO>
          <ENAME>JONES</ENAME>
          <JOB>MANAGER</JOB>
          <MGR>7839</MGR>
          <HIREDATE>1981-04-02</HIREDATE>
          <SAL>2975</SAL>
          <DEPTNO>20</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7654</EMPNO>
          <ENAME>MARTIN</ENAME>
          <JOB>SALESMAN</JOB>
          <MGR>7698</MGR>
          <HIREDATE>1981-09-28</HIREDATE>
          <SAL>1250</SAL>
          <COMM>1400</COMM>
          <DEPTNO>30</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7698</EMPNO>
          <ENAME>BLAKE</ENAME>
          <JOB>MANAGER</JOB>
          <MGR>7839</MGR>
          <HIREDATE>1981-05-01</HIREDATE>
          <SAL>2850</SAL>
          <DEPTNO>30</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7782</EMPNO>
          <ENAME>CLARK</ENAME>
          <JOB>MANAGER</JOB>
          <MGR>7839</MGR>
          <HIREDATE>1981-06-09</HIREDATE>
          <SAL>2450</SAL>
          <DEPTNO>10</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7839</EMPNO>
          <ENAME>KING</ENAME>
          <JOB>PRESIDENT</JOB>
          <HIREDATE>1981-11-17</HIREDATE>
          <SAL>5000</SAL>
          <DEPTNO>10</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7844</EMPNO>
          <ENAME>TURNER</ENAME>
          <JOB>SALESMAN</JOB>
          <MGR>7698</MGR>
          <HIREDATE>1981-09-08</HIREDATE>
          <SAL>1500</SAL>
          <COMM>0</COMM>
          <DEPTNO>30</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7900</EMPNO>
          <ENAME>JAMES</ENAME>
          <JOB>CLERK</JOB>
          <MGR>7698</MGR>
          <HIREDATE>1981-12-03</HIREDATE>
          <SAL>950</SAL>
          <DEPTNO>30</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7902</EMPNO>
          <ENAME>FORD</ENAME>
          <JOB>ANALYST</JOB>
          <MGR>7566</MGR>
          <HIREDATE>1981-12-03</HIREDATE>
          <SAL>3000</SAL>
          <DEPTNO>20</DEPTNO>
        </ROW>
        <ROW>
          <EMPNO>7934</EMPNO>
          <ENAME>MILLER</ENAME>
          <JOB>CLERK</JOB>
          <MGR>7782</MGR>
          <HIREDATE>1982-01-23</HIREDATE>
          <SAL>1300</SAL>
          <DEPTNO>10</DEPTNO>
        </ROW>
      </ROWSET>
    </ROOT>A couple of comments :
    <li> I handle only four datatypes here (VARCHAR2, NUMBER, DATE, TIMESTAMP). Of course you can add more.
    The list of Oracle Type Number is available here : http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#i54330
    Starting with 11g (not sure which release), DBMS_SQL package also declares these numbers through named constants.
    <li> I don't use DBMS_XMLGEN in this example. Instead I rebuild the query using SQL/XML functions and the list of columns that's just been described.

Maybe you are looking for