How to write non-XML data to a file using an OSB FTP Routing?

Hi --
Situation ... I need to write non-XML data to a file using FTP. A proxy service retrieves XML and transforms it with XSLT to CSV format, then gives it to a Biz service to file it out, using FTP. Simple.
Problem ... OSB sends the contents of $body to any service it calls. Because $body is a SOAP document, it has to contain XML. So therefore I have to put my CSV data into an XML element, in order to put it into $body; and this inner element then gets written to the file, which I don’t want. But if I don't enclose my CSV content in a tag, I get "Unexpected CDATA encountered" trying to assign it to a variable.
There has to be away around this!
Thanks for your help.
John Taylor

Solved. Steps:
-- Transform the XML to CSV using an XSL transform. Put the CSV data inside enclosing XML elements, and use a Replace action to put the XML element + CSV contents back into *$body*.
-- Define an MFL transform that only knows about the enclosing XML elements. Use a delimiter of "\n" (hard return).
-- Route from the proxy service to a Biz service that has Service Type = Messaging Service and Request Message Type = MFL; specify the MFL transform, which will receive the incoming *$body* variable, strip off the enclosing XML element within it, and pass the CSV contents to the FTP service.
Edited by: DunedainRanger on Nov 29, 2011 9:03 AM

Similar Messages

  • How to submit pdf xml data to a file server

    Hi, I am hoping someone can help me. I have created a dynamic pdf in livecycle designer ES, which appears as the requester wants it to. I now just need to work out how to collect the submitted data. Is it possible to submit the xml data to a file server? I have succeeded in emailing the data, but each response is separate xml attachment and would then need to collated, etc. It would be preferable to submit the data directly to a file server if this is possible. Even if it submitted into a database or something. From everything I have read so far, it seems that this is not possible, unless I am missing something. As a newbie to this, any assistance would be much appreciated. Thank you.

    You can submit the data as XML or URL-encoded data (HTTP POST). In either case you will need to have a server-side process to receive and parse the data stream. The server-side process may be a JSP, a servlet, PHP or any technology that can manage HTTP requests/responses.
    See About submitting data using a button at http://help.adobe.com/en_US/livecycle/9.0/designerHelp/000330.html .
    Steve

  • Appending XML data to a file using file adaptor

    Hi,
    I am trying to append data to a file using file adaptor in XML format. (Objective is to store data as XML message in the file). I understand it is possible to append data to an existing file by making appropriate changes in WSDL manually. However, my issue is every time the XML data is appended to a file even the XML header message is also getting appended. As a result the file data does not adhere to defined schema structure anymore.
    Is there a way to save XML data in a file in append mode ?
    Thanks, Riz

    I am having the same issue as well, which makes the output XML an invalid one. I have an XSD that has a hierarchy of elements. whenever I am wiriting the child elements the header message & the name space is also getting written. For example
    <?xml version="1.0" ?><Parent xmlns="http://testSchema.com/outputSchema">
    <StartDate>01/01/2001</StartDate>
    <EndDate>01/30/2001</EndDate>
    <Child/>
    </Parent>
    <?xml version="1.0" ?><Child xmlns:ns1="http://testSchema.com/outputSchema">
    <ns1:Id>20012981</ns1:Id>
    <ns1:Value/>
    <ns1:Date>01/15/2001</ns1:Date>
    </Child>
    <?xml version="1.0" ?><Child xmlns:ns1="http://testSchema.com/outputSchema">
    <ns1:Id>20012981</ns1:Id>
    <ns1:Value/>
    <ns1:Date>01/15/2001</ns1:Date>
    </Child>
    I am using a onefile adapter partnerlink to write the parent & an another one for writing the child element, since the child elements will repeat more than once. One other way to fix this issue is write the data using java embedded activity, but that would need a lot of boiler plate code, for writing/reading/appending the same file & for handling all those IOexceptions & buffer IN/outs. I am curious if someone had the same issue & how they resolved it.

  • How to write & search array data in a file

    hi
    Can anyone give me an idea about writing an array into a file by placing
    each array element in a line and how to search an array element
    from that file.
    Thanks in advance

    Well, you can serialize any object - and of course re-read it.
    See http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectOutputStream.html for an example.
    The easiest way would be to create an encapsulating object, which you then fill with any data you want to serialize. For example:
    class mySerializableContainer implements Serializable{
       public int[][] myArray;
       public String name;
    }All you have to do, is to make sure that every attribute you want to serialize also includes the Serializable interface.
    So, you don't write one Array after another in your file, but only one object - but make this object as flexible as you need to.

  • How to Write Waveform graph data to Text File with user option to do so

    So, I'm new to labview and am having trouble writing one program in particular.  I have a waveform graph that runs for 120 seconds generating a sine curve.  I am, however, having a difficult time getting the program to write the x and y coordinates into a text file.  I have attached what I have so far.  
    The first task I was assigned was to write a program that creates a snusoidal curve on the front pannel adding one data point each half second for 120 seconds.  The plot should only start when the user presses a start button.
    The next part involves giving the user an option to write the generated data to a spreadsheet file called "sine.txt".  The file name and location should be hardcoded.  The file should contain the x and y coordinates of each data point in columns separated by tabs, also known as delimited.
    I have spent several hours tweaking the attached program and I just can't seem to get it to work right.  Any suggestions would help at this point.
    Sincerely,
    A frustrated chemistry student whose research mentor is out of town
    Solved!
    Go to Solution.
    Attachments:
    Sinusoidal Curve (saving to excel).vi ‏45 KB

    First, you are not creating Excel files.  You are creating text files.  And it seems that your Write to file is already creating X (time) vs. Y (data curve) that is tab delimited.
    Everything else you are doing is just too complicated or a Rube Goldberg.
    All you need is the attached.
    Attachments:
    Sinusoidal_Curve_(saving_to_Text_file).vi ‏69 KB

  • How to write a plain string into a file using File Adapter

    Hi All,
    I am new to ESB technology. I have created one ESB application to invoke a java web service(Which will return string as result) and to write retrieved result in to a file. To achieve it i have created the file adapter using user defined schema. It was working fine. But, I got the modifications in my requirement to store the returned result(String value) in to a text file without any user defined schema. So i used native format for FileAdapter and mapped the returnedResponse(String value) to opaque:opaqueElement. But i am facing relationship error.
    anybody can help me to solve this issue?.. is there any method to convert a string value to opaqueElement..
    Thanks in advance..

    Hi All,
    I am new to ESB technology. I have created one ESB application to invoke a java web service(Which will return string as result) and to write retrieved result in to a file. To achieve it i have created the file adapter using user defined schema. It was working fine. But, I got the modifications in my requirement to store the returned result(String value) in to a text file without any user defined schema. So i used native format for FileAdapter and mapped the returnedResponse(String value) to opaque:opaqueElement. But i am facing relationship error.
    anybody can help me to solve this issue?.. is there any method to convert a string value to opaqueElement..
    Thanks in advance..

  • How to write LOGO(SE78 CREATE) TO XLS FILE(USING OLE2 METHOD!

    HI
    FYI!
    i put a logo into sap!
    and i will download this logo into XLS file !
    how to do it!
    please give some demo code!
    thank you very much!

    Hi,
    Do you know the Bapi for qp02 .I am working on uploading changing inspection plan using bdc .I am only updating last screen details like Decimals and measurement and lower value and high value .
    I saw your post in sdn before 3 month .I think you have solution . Can you please give suggestion to me .
    How can we prepare flat file .
    Regards
    Nandan.

  • Write / store xml data in Xe and retrieve stored data using pl/sql

    Hi to all,
    i'm searching a tutorial on:
    A - how to write / store xml data in Xe and retrieve stored data using pl/sql
    I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
    I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
    1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
    Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
    Thanx

    Thank you very much Carl,
    However my fault is that i've not tried to create the table via sql plus.
    Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
    however with a ddl script like the following the table was created successfully.
    create table example1
    keyvalue varchar2(10) primary key,
    xmlcolumn xmltype
    Thank you very much for your link.
    Message was edited by:
    Marcello Nocito

  • How to write the oracle data as XML format. (.XML file)

    create or replace procedure pro(p_number )
    is
    cursor c1 is select *from emp where empno=p_number;
    v_file utl_file.file_type;
    begin
    v_file := utl_file.fopen('dirc','filename.txt','w');
    for i in c1 loop
    utl_file.put_line(v_file,i.ename || i.empno ||i.job);
    end loop;
    closef(v_file);
    end;
    Now my client want instead of .txt file he need .xml files
    File should contains xml tags. can any one help regarding this.. with one example.
    How to write the oracle data as XML format. (.XML file)

    hi,
    hope this example will do something....
    SQL> select employee_id, first_name, last_name, phone_number
    2 from employees where rownum < 6
    EMPLOYEE_ID FIRST_NAME LAST_NAME PHONE_NUMBER
    100 Steven King 515.123.4567
    101 Neena Kochhar 515.123.4568
    102 Lex De Haan 515.123.4569
    103 Alexander Hunold 590.423.4567
    104 Bruce Ernst 590.423.4568
    SQL> select dbms_xmlgen.getxml('select employee_id, first_name,
    2 last_name, phone_number from employees where rownum < 6') xml
    3 from dual;
    *<?xml version="1.0"?>*
    *<ROWSET>*
    *<ROW>*
    *<EMPLOYEE_ID>100</EMPLOYEE_ID>*
    *<FIRST_NAME>Steven</FIRST_NAME>*
    *<LAST_NAME>King</LAST_NAME>*
    *<PHONE_NUMBER>515.123.4567</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>101</EMPLOYEE_ID>*
    *<FIRST_NAME>Neena</FIRST_NAME>*
    *<LAST_NAME>Kochhar</LAST_NAME>*
    *<PHONE_NUMBER>515.123.4568</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>102</EMPLOYEE_ID>*
    *<FIRST_NAME>Lex</FIRST_NAME>*
    *<LAST_NAME>De Haan</LAST_NAME>*
    *<PHONE_NUMBER>515.123.4569</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>103</EMPLOYEE_ID>*
    *<FIRST_NAME>Alexander</FIRST_NAME>*
    *<LAST_NAME>Hunold</LAST_NAME>*
    *<PHONE_NUMBER>590.423.4567</PHONE_NUMBER>*
    *</ROW>*
    *<ROW>*
    *<EMPLOYEE_ID>104</EMPLOYEE_ID>*
    *<FIRST_NAME>Bruce</FIRST_NAME>*
    *<LAST_NAME>Ernst</LAST_NAME>*
    *<PHONE_NUMBER>590.423.4568</PHONE_NUMBER>*
    *</ROW>*
    *</ROWSET>*
    ask if you want more assistance.
    thanks.

  • How to write xml data to a file

    Hi all,
    We have a requirement of writing the xml data into a file in given directory in the server. Generating the xml data using the sql query below.
    SELECT XMLELEMENT ("ROW",
    XMLELEMENT ("CELL", xmlattributes ('EBIZCZMDL_01' AS "colname"), inventory_item_id),
    XMLELEMENT ("CELL", xmlattributes ('EBIZFFMT_01' AS "COLNAME"), attribute29),
    XMLELEMENT ("CELL", xmlattributes ('COMMON' AS "COLNAME"),inventory_item_id || '' || attribute29 || 'ITM')
    AS "RESULT") "XMLDATA"
    FROM apps.mtl_system_items_b
    When we try to write the the data from this query to a file using UTL_FILE.put_line, the script gives the error
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    If somebody can help us pls.......
    Thanks in advance

    Hi Odie,
    We are looking at the xml data to be like the below:
    - <xref xmlns="http://xmlns.oracle.com/xref">
    - <table name="NAPP_ITEM_ITEMID">
    - <columns>
    <column name="EBIZFFMT_01" />
    <column name="COMMON" />
    <column name="EBIZQOT_01" />
    <column name="EBIZCZMDL_01" />
    <column name="EBIZCZGOLD_01" />
    </columns>
    - <rows>
    - <row>
    <cell colName="EBIZFFMT_01">154</cell>
    <cell colName="COMMON">154811809990111362727</cell>
    <cell colName="EBIZQOT_01">81</cell>
    <cell colName="EBIZCZMDL_01">91</cell>
    <cell colName="EBIZCZGOLD_01">991</cell>
    </row>
    - <row>
    <cell colName="EBIZFFMT_01">180</cell>
    <cell colName="COMMON">180811809990111362727</cell>
    <cell colName="EBIZQOT_01">871</cell>
    <cell colName="EBIZCZMDL_01">731</cell>
    <cell colName="EBIZCZGOLD_01">341</cell>
    </row>
    </rows>
    </table>
    </xref>
    We have managed half way trying to get the structure. As we are new to this XML Programming.
    The call to dbms_xslprocessor.clob2file is within the cursor loop for the given SQL.
    DECLARE
    l_file_name VARCHAR2 (30);
    l_file_path VARCHAR2 (200);
    CURSOR xml_cur
    IS
    SELECT XMLELEMENT
    ("ROW",
    XMLELEMENT ("CELL",
    xmlattributes ('EBIZCZMDL_01' AS "colname"),
    inventory_item_id
    XMLELEMENT ("CELL",
    xmlattributes ('EBIZFFMT_01' AS "COLNAME"),
    attribute29
    XMLELEMENT ("CELL",
    xmlattributes ('COMMON' AS "COLNAME"),
    inventory_item_id || '' || attribute29 || 'ITM'
    ) AS "RESULT"
    ) "XMLDATA"
    FROM apps.mtl_system_items_b
    WHERE attribute29 IS NOT NULL;
    BEGIN
    l_file_path := '/usr/tmp';
    l_file_name := 'TEST_XREF4.xml';
    FOR xml_rec IN xml_cur
    LOOP
    dbms_xslprocessor.clob2file(xml_rec.XMLDATA, l_file_path, l_file_name, nls_charset_id('UTF8') );
    END LOOP;
    END;
    Please see the above code snippet and help us if we are doing something wrong.
    Thank you

  • How to write an xml Document to a flat file using JAVA....

    Can any one help me out.....
    How to write a XML Document to the current filesystem using JAVA....
    without using com.sun.xml.tree.*....
    Document xmlDoc;
         Node rows = (Node) xmlDoc.createElement("ROWS");
    xmlDoc.appendChild(rows);
    and i have to write this xmlDoc to a file called(abc.xml) for further use...

    Have you considered using JDOM? ( www.jdom.org )
    The XMLOutputter class can write the Document to a file. ( The Document however will be an org.jdom.Document object ).
    If you are weary of a new API, you could just create a new File object called abc.xml and stream the data from the XML Document you have to this new File object.

  • How to write a Xml installation file to build  web installer using IzPack.

    Hai everyone,
    I have got a problem in building a web installer using IzPack.I am getting this exception,when I am compiling my install.xml using a compile tool provided by IzPack soft.Eventhough I have not mentioned "packsinfo.xml" in my Xml installation file.
    Fatal error :
    null\packsinfo.xml (The system cannot find the path specified)
    java.io.FileNotFoundException: null\packsinfo.xml (The system cannot find the path specified)
    What went wrong??
    It is very very urgent. Could anyone tell me how to write a Xml installation file for building web installer,please??
    any help will be highly appreciated....
    Thank you very much in advance

    Hi,
    that is not really a java related question. Have you tried to find some IzPack support forum? I've never heard about it, so I can't help.

  • Can a Java Mapping be used on non-xml data

    I would like to use a java mapping to transform non-xml formatted data to an IDOC or XML format.
    1) Does the input or output of a Java Map have to be XML.
    2) If possible can the test feature be used to load and test a non-xml data file.
    3) Any comments or lessons learned in this area.

    Hi Johan,
    below are some suggestions for your scenario:
    <i>
    1) Structured flat picked up using J2EE FTP adapter.</i>
    Indeed; you can use the file adapter to receive/retrieve this file from "any" third party system.
    <i>2) Structured flat converted to XML (Using JAVA mapping?)</i>
    When you send any message to XI, it's the adapter's task to convert this message into a XI understandable format i.e. SOAP. So the flat file to XML conversion is not your concern.
    However, if you need to perform any data transformation (input file to IDOC) then you can opt for XSLT (XML stylesheets),  Java mappings or the XI mapping tool within the repository. Based on my own experience with IDOC mapping, I can tell you that XSLT and/or Java mapping is the best way to achieve this kind of mapping.
    <i>3) XML mapped to SAP IDoc using graphical editor.</i>
    See comments point 2)
    Cheers,
    Rob.
    Message was edited by: Rob Viana

  • How to write data to text file using external tables

    can anybody tell how to write data to text file using external tables concept?

    Hi,
    Using external table u can load the data in your local table in database,
    then using your local db table and UTL_FILE pacakge u can wrrite data to text file
    external table
    ~~~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7002.htm#i2153251
    UTL_FILE
    ~~~~~~~~~
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#sthref14093
    Message was edited by:
    Nicloei W
    Message was edited by:
    Nicloei W

  • How to parse thus XML data?

    Hi,experts:
    In below thread:
    Receiving .Net dataset with deployed proxies
    i asked how to create a external definition in IR base on above XML data.
    Now,i have created a XSD file base on the XML data.And importing it into IR successfully.
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:Locale="zh-CN">
    <xs:complexType>
    <xs:choice maxOccurs="unbounded">
    <xs:element name="Status">
    <xs:complexType>
    <xs:attribute name="Result" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    And now,the question is how to parse the XML data in diffgr:diffgram  segment.It seems a MS-XML syntax.Can it be parsed by XI?
    I tried,but the following error occurs:
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:ZMT_SD_ORDER01_RESULT. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start

    Hi,
    The above Exception seems to be because of mapping error.
    Check your mapping for all the mandatory 1-1 mapping, also the 1-unbounded parent node mapping.
    Once when you import the XSD and activate your External Definition if it does without any error then there is no problem with your External Definition.
    If this error occurs only when you test your mapping then this is mapping error and not because of XSD.
    Please check the parent node mapping like 1-unbounded.
    Reward Points if useful
    Regards
    Ashmi.

Maybe you are looking for

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given from

  • AppleStore won't help customers download Mavericks, what to do?

    I read on Macworld and the Missing Manual, to name two places, that AppleStore would download a copy of Mavericks for their customers.  I just went to one and they won't do it.  I don't have the bandwidth to do so at home, what to do?  What I need is

  • Audio but no video on .mov files

    I'm trying to watch a tutorial disc (working with Ableton Live). The video files are .mov, the disc comes with the install for Quicktime 7.03. I have Quicktime Pro 7.12. When I try to play the video files, I get audio but no video. When I try to play

  • Unprotect a .dir file

    i work for a media company and i am trying to open a .dir file with director mx. but it keeps telling me that the file is protected. how can i open the file and retreave the data??

  • Cant install dku-5 driver

    HELP!! Having a problem installing a DKU-5 cable driver. going out of my mind for days(3 of them just trying to log on to here!). I'm running xp pro sp2 on asrock k7s41gx. downloaded the driver from Nokia. Installed the software and says software ins