Domain Value Mapping with Text file

Hai,
I have done the Domain value mapping with the xml file to xml file and it is working fine.
But in the case of Text file to Text file it is not working i.e. If the citiname is the
first field it is domain value mapping and working fine.
INPUT:
Erode, Mahes, 22
Coimbatore, Veera, 22
OUTPUT:
ED, Mahes, 22
CBE, Veera, 22
But if I change the Citiname to the second column it is not working the problem is
it is not working for subsequent columns.
INPUT:
Mahes, Erode, 22
Veera, Coimbatore, 22
OUTPUT:
Mahes,, 22
Veera,, 22
The input Text files are delimited by "comma" and optionally enclosed by "space".
Does anyone have attained the DVM in the Text file successfully.
Please help me.

Thank you for the reply Abhi
Text to Text means instead of giving the input file as XML file i am giving the input as a simple .txt file and I also want the output in the .txt format.
For the text file only it is not working fine in the xml file to xml file it is working fine.
For your another query I am not providing the correct parameters for "lookup-dvm"
I am giving the xsl file
<?xml version="1.0" encoding="UTF-8" ?>
<?oracle-xsl-mapper
<!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
<mapSources>
<source type="WSDL">
<schema location="TextInput1.wsdl"/>
<rootElement name="Root-Element" namespace="http://TargetNamespace.com/TextInput1"/>
</source>
</mapSources>
<mapTargets>
<target type="WSDL">
<schema location="TextOutput1.wsdl"/>
<rootElement name="Root-Element" namespace="http://TargetNamespace.com/TextInput1"/>
</target>
</mapTargets>
<!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [TUE JUL 15 15:31:55 IST 2008]. -->
?>
<xsl:stylesheet version="1.0"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:pc="http://xmlns.oracle.com/pcbpel/"
xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
xmlns:ns0="http://www.w3.org/2001/XMLSchema"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:imp1="http://TargetNamespace.com/TextInput1"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/TextInput1/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/TextOutput1/"
exclude-result-prefixes="xsl plt pc ns0 jca imp1 tns hdr ns1 bpws ehdr hwf xp20 xref ora ids orcl">
<xsl:template match="/">
<imp1:Root-Element>
<xsl:for-each select="/imp1:Root-Element/imp1:Leaf-Element">
<imp1:Leaf-Element>
<imp1:C1>
<xsl:value-of select="imp1:C1"/>
</imp1:C1>
<imp1:C2>
<xsl:value-of select='orcl:lookup-dvm("Citinames","Long",imp1:C2,"Short","")'/>
</imp1:C2>
<imp1:C3>
<xsl:value-of select="imp1:C3"/>
</imp1:C3>
</imp1:Leaf-Element>
</xsl:for-each>
</imp1:Root-Element>
</xsl:template>
</xsl:stylesheet>
Here I am checking the DVM function for the Second column and it is not working and I have given their Inputs and Outputs in my first message .
I have another question as you told both import and export of the DVM is always in the XML format only so I have a doubt whether the lookup-dvm will be working for xml files only and not for text files.
But in my case in text file it is working for the first column but not in the subsequent columns.
Thanks.

Similar Messages

  • How to create a mapping with text file as my target

    I need to create a mapping with source as a table and target as a text file.
    I am using OWB 10g R2. with database Oracle10g.
    Any one can help me to create a mapping with a text file as target.

    Hi,
    just create a File-Location and File-definition and use this file-operator as target object inside your mapping.
    Regards jwehner

  • Error in Domain value mapping.

    Dear all,
    I was trying a simple file to file scenario using ESB with the Domain value mapping(DVM).
    I was trying to replace the incoming long state codes with the short keywords.
    I was using the DVM to configure the field to be changed in the XSL map.
    I have also configured tracking fields for Routing service and the Outbound adapter in the ESB Console.
    But after the instance the long names are not replaced with short keywords it come as blank in the place of names.
    In the ESB console the RS is tracking the fields and the outbound adapter not. I was using a simle text file which has two columns Andrew, Bangalore delimited by comma and optionally enclosed by space.
    Please help me.

    Thanks for the reply Chintan,
    Yes it is not working, I was doing the esb-customerdvm.pdf sample DVM as specified in the following link
    http://www.oracle.com/technology/products/integration/esb/files/esb-customerdvm.pdf
    My map also has three columns and I was the specifying Map name, Source column name as "Long" and the target column name as "Short" and the default value as "" in the lookup-dvm function in the XSL stylesheet.
    And I have also specified the trackable fields for the Routing service and the Outbound adapter in the ESB Console but after the instance only the RS shows the tracked data and the Outbound adapter doesnot and it shows Nodata.
    When I give the Input as the text file with columns Prasath, Chennai in the output file the Prasath is only coming what I expect is Chennai should be replaced by its short name CH but it is not coming like that.
    Here I also specify the coding of XSL Stylesheet map.
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="WSDL">
    <schema location="DVMapsInput.wsdl"/>
    <rootElement name="Leaf" namespace="http://TargetNamespace.com/DVMapsInput"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="WSDL">
    <schema location="DVMapsOutput.wsdl"/>
    <rootElement name="Leaf" namespace="http://TargetNamespace.com/DVMapsInput"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 10.1.3.3.0(build 070615.0525) AT [FRI MAY 23 12:31:40 IST 2008]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:ehdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.esb.server.headers.ESBHeaderFunctions"
    xmlns:imp1="http://TargetNamespace.com/DVMapsInput"
    xmlns:ns0="http://www.w3.org/2001/XMLSchema"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/DVMapsInput/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/file/DVMapsOutput/"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/file/"
    exclude-result-prefixes="xsl plt pc imp1 ns0 jca ns1 hdr tns bpws ehdr hwf xp20 xref ora ids orcl">
    <xsl:template match="/">
    <imp1:Leaf>
    <imp1:C1>
    <xsl:value-of select="/imp1:Leaf/imp1:C1"/>
    </imp1:C1>
    <imp1:C2>
    <xsl:value-of select='orcl:lookup-dvm("Citycode","Long",/imp1:Leaf/imp1:C2,"Short","")'/>
    </imp1:C2>
    </imp1:Leaf>
    </xsl:template>
    </xsl:stylesheet>
    Please help on this.
    Thanks.

  • How to write list values to a text file?

    Hi. Does anyone know how to write values stored in a List to a text file? I have a program that asks the user to enter a name and stores it in a list. The number of names in the list depends on how many times the user wants to enter a name. The problem is that my writeToFile method, which handles writing values to a text file, only writes one name and overwrites any previous names. How could I fix this so that it goes thru the list and writes every value to the file? Any hints would be appreciated!
    peace
    Chris
    import java.util.*;
    import java.io.*;
    public class StoreNames
    String name;
    char answer;
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    public void anotherName(List a)throws IOException
    System.out.println("Enter another name? (Y or N)");
    answer = (char)System.in.read();
    System.in.skip(2);
    while(answer == 'Y' || answer == 'y')
    inputName(a);
    System.out.println("Enter another name? (Y or N)");
    answer = (char)System.in.read();
    System.in.skip(2);
    if (answer == 'N' || answer == 'n')
    System.out.println("Ok. GoodBye");
    writeToFile(a);
    //prompts user to input names
    public void inputName(List a) throws IOException
    System.out.print("Enter a name: ");
    name = input.readLine();
    a.add(name);
    public void writeToFile(List a)throws IOException
    PrintWriter output = new PrintWriter(new FileWriter("names.txt"));
    output.print(name); //Problem area - handles only one line of input, overwrites previous input
    output.close();

    System.out is an instance of PrintStream (check the API documents for the System class to see this).
    So the easiest way to convert from a "print to screen" class to a "print to file" class is to acquire a PrintStream that prints to a file, and use it exactly the same as you'd have used System.out...
    So start with your console code...
            PrintStream out = System.out;
            for(int i = 0; i <10; i++){
                out.println("Number " +i);
            }Then you adapt to file code:
            FileOutputStream fos = new FileOutputStream("temp.txt");
            PrintStream out = new PrintStream(fos);
            for(int i = 0; i <10; i++){
                out.println("Number " +i);
            out.flush();
            out.close();Note that we flush the stream because for reasons of efficiency files aren't necessarily written to disk until you explicitly ask the system to do so (memory is fast, disks are slow, that's why).
    Closing the stream releases system resources associated with it.
    Actually, that's redundant, because close calls flush automatically, but I left it in for clarity.
    Any use ?

  • Domain Value Mapping in Oracle Service Bus

    Hi all,
    I am looking for a similar functionality with Oracle Service Bus that exist in the Enterprise Service Bus.
    The XPath function is lookup-dvm() that looks up the value based on a domain value mapping.
    The case is to use this in a XQuery mapping.
    Any input or experience on this?
    Thanks,
    Knut

    Currently out-of-box implement of similar functionality in OSB is not possible. This DVM feature will supplied out of box in future releases of OSB. Talk to your sales representative to get exact date lines for this feature.
    Thanks
    Manoj

  • How do I overide the values in the text file

    I am reading a text file using loadvars, to get some values
    such as
    &yourid=123456 from the text file.
    How do I overide the values in the text file
    <PARAM NAME=movie VALUE="jamietrailer.swf?yourid=65432
    <---- this doesn't seem to work
    So I can change the values from the html file?

    I want to do this:
    # It should look like this:
    <PARAM NAME=movie VALUE= "movie.swf?text=hello">
    # Find the EMBED tag. Look for this:
    <EMBED src="/support/flash/ts/documents/movie.swf"
    # Again, replace the filename "movie.swf" with
    "movie.swf?text=hello".
    It should look like this:
    <EMBED
    src="/support/flash/ts/documents/movie.swf?text=hello"
    Is this supposed to overide the value I am reading using
    loadvars?
    or do I have to not read the value from the file if I am
    going to give it a value in html?

  • Domain value Mapping types.

    Hi,
    I have a doubt with the Domain value mapping whether they are classified into static DVM and dynamic DVM.
    The static part I have finished where we will be creating a new map in the ESB console and refering it in the XSLT map using the lookup-dvm tool.
    I want to know whether there is dynamic type of DVM is there and how it works.
    If there is any link for the dynamic type of DVM please specify me.
    Thanks.

    Thanks for the reply Chintan,
    Consider my case I have given the Incoming cityname Chennai as Long in ESB console, and the Output after Domain value mapping will be CHI as mentioned in short field in the ESB console.
    If this is the case anyone give the older name of Chennai which is Madras the incoming cityname Madras after Domain value mapping must also come as CHI in output where Madras is not mentioned in the Console.
    I want to know whether it is possible or not.
    Thanks.

  • Domain Value Mapping (DVM)..

    Hi,
    We are using Domain Value Mapping (DVM) for quick retrieval of required data value for a field at run-time.
    I have found one solution at : http://guidoschmutz.wordpress.com/2009/12/25/implement-domain-value-maps-dvm-with-oracle-service-bus-osb-10r3/
    Scenario:
    From legacy service I get value of field - CountryName as complete name of country. (e.g.India)
    I want to convert the value to "IN" before passing back to proxy service.
    While using above link solution i get following errors:
    1. Runtime mismatch
    2. Expected exactly 1 item, got 0 items (The legacy service has compulsory value for CountryName, legacy is not passing null back)
    The platform we use is, OSB 10gR3, does it support DVM?
    Any ideas how to use DVM? How to use binding variables in DVM?
    Thanks in advance.
    Thanks and Regards,
    Piyush Kapoor.

    Task Completed

  • Domain value maps

    HI
    Can any body help me what is DVM(domain value map)
    Thanks
    Phani

    Hi,
    Please refer this blog. Yatan has explained clearly with screenshots.
    http://yatanveersingh.blogspot.com/2011/07/mds-implementation-in-oracle-soa-11g.html
    In the MDS repository, you can keep the artifacts like abstract wsdl's, dvm's, xsd's, fault-policies, fault-bindings etc..
    Hope this helps...
    Thanks,
    N

  • SQL Loader-How to insert -ve & date values from flat text file into coloumn

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide.

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide. Try something like
    someDate    DATE 'DDMMYYYY'
    someNumber1      "TO_NUMBER ('s99999999.00')"
    someNumber2      "TO_NUMBER ('99999999.00s')"Good luck,
    Eric Kamradt

  • Anybody having experiences on Domain Value Mapping in interconnect?

    Hi
    Anybody have experiences on Domain Value Mapping in interconnect or any case study for the same.
    If so please forward it to the forum or my mail id [email protected]
    Thanks in advance.
    Sandeep Gaadhe

    Hi siyer1,
    Thanks for responding.
    i have created a case that uses Cross reference table. Now i want to design a case study using domain value mapping. I am having following doubts.
    1. How DVM is different than CRT?
    2. I used cross reference tab while subscribing to message(as suggested by Ian
    in one thread) and specified the CRT table to application . Now i have created the table for DVM and added my applications to it. Now how do i specify the DVM table name to application?
    I hope i am able to post doubts clearly.
    I read oracle documentation but it is too short and difficult to implement it in some practical scene.
    A case study or a document which can give more on DVM can help.

  • Value mapping with BPM

    Hi Experts
    How to do value mapping with BPM.
    I tried searching for blogs in SDN but i didnt get any solution
    Regards
    Sowmya

    Hi,
    Your question is not very clear. Let me know how you want to use Value mapping?
    You can implement value mapping in two ways..
    1. Value Mapping Replecation Method, in which we create ABAP program (outbound proxy) in R3 which selects data from R3 tables and sends into XI, and which get stored in XI JAVA Cache untill you run the ABAP program next time which is very rare. This kind of method is best when you have large amount of R3 data.
    2. If you have some data which is used just to varify the conditions at run time then in that case we go for Value Mapping creation in Integration Directiory. Below mentiond blog will give an idea how to use Value mapping in ID.
    /people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
    Value Mapping is used in Graphical Mapping which gives the value at run time only, so you cannot test it in TEST Tab of message mapping.
    So as per you question, BPM can come into picture later on after you maintain the value mapping in ID and do the corresponding mapping in IR.
    Regards,
    Sarvesh

  • Can esb DVM(Domain-value mapping ) support multi-language  ?

    I create a dvm , and add some rows in Chinese , but when I restart the soa service , all the DVM that I created disappeared.
    Can esb DVM(Domain-value mapping ) support multi-language ?
    Edited by: user10732687 on 2009-8-23 下午7:39

    DVM is designed to use in English only and not intended to support Multi language. It is the job of consumer application to convert from English to native language(Chinese in your case).
    Thanks,
    Vamsee.

  • Mapping 2 text files with conditions

    Hi,
    I am just trying to get my head around what would be the best solution that could be implemented in ODI to the following task I have.
    I have 2 text files the first file is in the format of
    AccCode | ChildCodeStart | ChildCodeFinish
    B1000 1000 1099
    B1001 1100 1199
    The second text file
    ChildCode | Alias
    1000 Expense1
    1001 Expense2
    1100 Revenue1
    1101 Revenue2
    Now the logic is that I want to map AccCode from the first file and match all the codes in file two which are between ChildCodeStart and ChildCodeFinish
    So my output would be
    AccCode | ChildCode | Alias
    B1000 1000 Expense1
    B1000 1001 Expense2
    B1001 1100 Revenue1
    B1001 1101 Revenue2
    I am not sure what would the best route to this in ODI, would I have to load the files into tables first or can it done straight through an interface?
    Thanks for any help
    John

    Hi,
    Thanks it does help but I am still not there yet I will explain what I have done.
    File1
    CCTYPE~CC_CODE~CC_ALIAS
    2~101000~Test1
    2~101001~Testi2
    2~110000~Does it work
    2~110001~AnyGood
    File2
    CCTYPE~CC~CCIGNORE~ACCSTART~ACCFIN
    2~B10100~Dummy1~101000~109999
    2~B10101~Dummy2~110000~119999
    I created an interface and dragged the 2 datastores linked to the flat files
    I added a join between CC_Code and AccStart and a join between CC_code and AccFinish
    so it became (COA.CC_CODE>=HIE.ACCSTART) AND (COA.CC_CODE<=HIE.ACCFIN)
    I then put the target as a table as CC_CODE, CC, CC_Alias
    It runs through fine but it is only populating one record
    B10101,110000,Does it work
    Maybe my logic is wrong somewhere ?
    Cheers
    John

  • Applescript wont use a value from a text file as a number

    I want to perform math operations on a value (0.0092926025390625) that is stored in a text file, i have no problem getting it into the applescript but it says "applescript error cant make "0.0092926025390625" into a number" i know that i am inputting the correct value but it still wont work.
    This is just an example code but it does the same thing.
    set csv to choose file with prompt "select a file"
    read csv
    set csv to result
    set var1 to word 1 of paragraph 2 of csv
    set var1 to var1+1
    I get the error on the last line

    Sure...
    set var1 to word 1 of paragraph 2 of csv
    by definition, 'words' are string/text objects.
    set var1 to var1+1
    You can't add integers to strings. Sure, you see the string as being a series of digits, but they could just as easily be letters, symbols, or any other characters. How would you add 1 to "hello", for example?
    All is not lost, though. You just need to give AppleScript a hint:
    set var1 to (word 1 of paragraph 2 of csv) as number
    Now it will read the text and attempt to coerce it to a number. Once it's a number you can add 1 to it.

Maybe you are looking for

  • USE OF FINALIZE IN EJB'S

    Hi 1// I have a method that performs a delete statement on the database and this method is called inside ejbRemove(Stateful session bean). How different is this from using a finalize method and in that giving a call to the method that performs the de

  • Events are automatically being split

    When importing a set of photos, iphoto is splitting up my photos and placing my set into two events. To be clear, I want the chosen imported photos to go into one event, but iphoto is splitting them up. What am I doing wrong?? Also, should I reunite

  • Changing Print head on HP Officejet Pro 8500

    How do you install a new printhead on the HP officejet 8500 pro? I cannot get the print heads to move to the left so I can change the printhead. There is no OK botton to push and when you open the top, it says to change the printhead, push the * for

  • Count PS_Open_Item_GL

    I'm having some issues getting a count of Journal Headers and Journal Lines and haven't found any similar threads so far. I'm essentially trying to get a count of all journal lines and headers from FY 2009 and that have an open_item_status of 'C'lose

  • RE: memory utilization : more info

    Jeanne, Here is some stuff from experience and also (very importantly) the Advanced Application Dev course : 1. Sometimes with large objects particularly arrays within arrays, BLOBS and large windows the garbage collector can get inself into a knot.