Proxy service reading from XML file..

Hey all - i am a newbie here.
my project need is to access a xml file, retrieve its content by a proxy service and send its contents to client back.
Do i need to use java callout / MFL transformation? If yes, how?
I do not wish to make use of any corresponding business service for this purpose. Is above possible without using a business service? If yes then how?
Please help me out..!!
Thanks and Regards,
Swapnil K.

Hi Swapnil K.
do the following
1. Create an XML file registered as an XQuery resource like below:
<mapping>
<row>
<key>key1</key>
<value>value1</value>
</row>
<row>
<key>key2</key>
<value>value2</value>
</row>
</mapping>
2. create a simple soap proxy based on your wsdl I assume it would have only one operation with in parameter keyParam and one return paramter rerturnValue
3. add a pipeline pair and create an assing action to the variable rerturnValue assigning the follwing value
$mapping/row[key/text()=$keyParam]/value/text()
where $mapping is your eternal xml resource and $keyParam is the input parameter of your wsdl method.
by doing so you can modify your xml mapping without touching your proxy.
4. in the response pipe of your pipeline pair populate the $body with the appropriate wsdl reponse message containing the value of the rerturnValue varaible
regards,
Tony

Similar Messages

  • Output data type of Read from XML file.vi

    LV 7.1:
    How can I enforce the output data type of the polymorphic "Read from XML file.vi" to be a string instead of an array of strings?

    ahlers01 wrote:
    LV 7.1:
    How can I enforce the output data type of the polymorphic "Read from XML file.vi" to be a string instead of an array of strings?
    In reply to my own post:
    I found the answer and described it in another forum

  • Reading from XML file is too slow

    I am trying to read some values from XML file, it takes about 1 or 2 minutes to finish reading, my xml file has about 4000 xml elements. Does anyone know this is normal or something wrong? How could make it faster?
    Thank you

    fine if it helps others... i hope NI will not be angry *fg*
    thx for your bug-report, i do not test the sub.vi until now.
    exchange the OR with an AND, solves the problem with the endless-loop, but error checking will not work (the loop only stops if no error AND no start-tag is found)
    changing the loop termination condition and putting the NOT from the error condition to the no_starttag_flag do both. correctly stops the loop when error occurs OR no further elements found.
    i attached the new sub.vi for version 7.0 and 7.1, also but some colors in the logo, for your convinience
    catweazle
    Attachments:
    xmlFile_GetElements_(Array).vi ‏76 KB
    xmlFile_GetElements_(Array).vi ‏65 KB

  • Reading from XML File to Oracle

    hello,
    I am facing an issue.
    I have an xml file which i want to read into an Oracle dB.
    for ex
    <user>
    <user1 ident="1" />
    <user2 ident="2" />
    </user>
    I would want to pick those attributes and insert them into the dB. i have been hunting high and low, but not reached anywhere.
    The reason, i am using the xml file is, that the user enters values from 3 forms and those values are stored in the xml file. Now, i want to insert these values in the database.
    Any help/suggestion are welcomed and appreciated.
    Thank You
    Sean

    Hi,
    I have been able to read the xml file and convert them into textboxes. The problem, i am facing is, how to i relate each of those values which are generated in the form of textboxes into values required by the Stored Procedure.
    has anyone come across this problem or is there a better approach.
    please advice
    thank you all

  • Reading from XML file using DOM parser.

    Hi,
    I have written the following java code to read the XML file and print the values. It reads the XML file. It gets the node NAME and prints it. But it returns null when trying to get the node VALUE. I am unable to figure out why.
    Can anyone please help me with this.
    Thanks and Regards,
    Shweta
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class ReadNodes
    private static XMLDocument mDoc;
    public ReadNodes () {
         try {
    DOMParser lParser = new DOMParser();
    URL lUrl = createURL("mot.xml");
    System.out.println("after creating the URL object ");
    lParser.setErrorStream(System.out);
    lParser.showWarnings(true);
    lParser.parse(lUrl);
    mDoc = lParser.getDocument();
         System.out.println("after creating the URL object "+mDoc);
    lParser.reset();
    } catch (Exception e) {
    e.printStackTrace();
    } // end catch block
    } // End of constructor
    public void read() throws DOMException {
    try {
         NodeList lTrans = this.mDoc.getElementsByTagName("TRANSLATION");
         for(int i=0;i<lTrans.getLength();i++) {
              NodeList lTrans1 = lTrans.item(i).getChildNodes();
              System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getNodeName());
              System.out.println("lTrans1.item(0).getNodeValue : " + lTrans1.item(0).getNodeValue());
              System.out.println("lTrans1.item(1).getNodeName : " + lTrans1.item(1).getNodeName());
              System.out.println("lTrans1.item(1).getNodeValue : " + lTrans1.item(1).getNodeValue());
         } catch (Exception e) {
         System.out.println("Exception "+e);
         e.printStackTrace();
         } catch (Throwable t) {
              System.out.println("Exception "+t);
    public static URL createURL(String pFileName) throws MalformedURLException {
    URL url = null;
    try {
    url = new URL(pFileName);
    } catch (MalformedURLException ex) {
    File f = new File(pFileName);
    String path = f.getAbsolutePath();
    String fs = System.getProperty("file.separator");
    System.out.println(" path of file : "+path +"separator " +fs);
    if (fs.length() == 1) {
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    System.out.println("path is : "+path);
    // Try again, if this throws an exception we just raise it up
    url = new URL(path);
    } // End catch block
    return url;
    } // end method create URL
    public static void main (String args[]) {
         ReadNodes mXML = new ReadNodes();
         mXML.read();
    The XML file that I am using is
    <?xml version = "1.0"?>
    <DOCUMENT>
    <LANGUAGE_TRANS>
    <TRANSLATION>
    <CODE>3</CODE>
    <VALUE>Please select a number</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>5</CODE>
    <VALUE>Patni</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>6</CODE>
    <VALUE>Status Messages</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>7</CODE>
    <VALUE>Progress</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>8</CODE>
    <VALUE>Create Data Files...</VALUE>
    </TRANSLATION>
    <TRANSLATION>
    <CODE>9</CODE>
    <VALUE>OK</VALUE>
    </TRANSLATION>
    </LANGUAGE_TRANS>
    </DOCUMENT>

    because what you want is not the node value of CODE but the node value of the text nodes into it!
    assuming only one text node into it, try this:
    System.out.println("lTrans1.item(0).getNodeName : " + lTrans1.item(0).getFirstChild().getNodeValue());

  • Reading from XML file and updating the table ????

    Hi
    I have package which reads the hier.XML file and does Update inserts into the 5 tables
    i have table called MAIN_tbl with the column cur_date.
    The package kicks if this cur_date is one day less than the hier.XML file DT.
    Currently i m manually checking this date's to make sure the Main_tbl cur_date is n sync with
    hier.XML file DT.
    for example :- hier.xml file DT is "20091020" then main_table cur_date should be 10/19/2009
    in order to kicks of the pakage.
    what i m looking to do ??
    compare the hier.xml DT with the main_table cur_date,
    if cur_date is -1(Preivous day) of hier.xml DT then run hier_pkg(Package)
    if not then update main_table cur_date to -1(previous day) of the hier.xml DATE
    Then later write the above logic to update the main_table in a procedure, and
    then call the package from the procedure.
    below are the top few lines of the hier.XML file which is relevant to the one which we are trying to do
    <?xml version = '1.0'?>
    <HIER_POSTING num ="111" HIER_TYP="CD" DT="20091020" Global="Y">
    FYI : The hier.XML file is located in UNIX space.
    How do i accomplish this. any idea ????
    Thank you so much in advance. For giving a thought on this problem!!!

    Any thought on this guys ???
    Thanks!!

  • Trouble with multiline text box reading from xml file

    Hi,
    I have a text area, set to multiline.  For some reason, when my text imported from xml shows up in the box, it starts several lines down into the box.  So for example, my Text box is positioned with the top at the midpoint of my stage, but the text starts about 3/4 down the page, about half way down the text box.  Can someone please tell me why this is happening and what I can do to fix it?
    I noticed that when I put my cursor in the box and move it up and down, the rest of the text 'scrolls' into the frame, but otherwise it's cut off.  please help!
    Thanks,
    Stan

    Could you show your XML?

  • BO Data Services - Reading from excel file and writing to SQL Server Table

    Hi,
    I would like to read data from an excel file and write it to a SQL Server Data base table without making any transformations using Data Services. I have created an excel file format as source and created target table in SQL Server. The data flow will just have source and target. I am not sure how to map the columns between source and target. Appreciate your quick help in providing a detailed steps of mapping.
    Regards,
    Ramesh

    Ramesh,
    were you able to get this to work? if not, let me know and I can help you out with it.
    Lynne

  • How to create a proxy to retrieve the xml file from web services

    Hi Every one,
    We have a requirment where we receive a xml file from Kenexa, a third party HR tool using a middleware tool. from SAP side We have to create a proxy to retrieve the xml  file from web services by initiating call through middleware tool i used earlier.
    these are the steps i intend to follow to accomlish the requirement.  
    1) middleware tool has to initiate the call to kenexa web services to  receive the xml file when it is available.
    2) On SAP we need to create a ABAP Proxy service provider to middleware where this file can be received.
    Can any one guide me how i can create a proxy to retrieve the xml  file from web services by initiating call through other middlewre (its not PI). 
    Any help would be really great, i am not a ABAP developer, so please help me with this. Thanks.

    Thank for reply.
    The computers are in different locations, but yes it's possible, the users in this enviroment are all local administrator of the machines, and we can distribute the script centrally from the DC automatically
    Acrobat use Java, right? I'm not so expert in java, but something about it could not be so difficult to manage.
    Do you know some place where i can get some info about JS and acrobat?

  • Issue with reading a xml file from xsl

    Hi,
    When I am trying to read a xml file from xsl, I am getting unwanted output.
    Following is the XSL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
      <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
      <mapSources>
        <source type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </source>
      </mapSources>
      <mapTargets>
        <target type="XSD">
          <schema location="../xsd/B2BMarketProperties.xsd"/>
          <rootElement name="ReceipentIDType" namespace="http://www.example.org"/>
        </target>
      </mapTargets>
      <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.4.0(build 110106.1932.5682) AT [TUE DEC 03 16:06:03 EST 2013]. -->
    ?>
    <xsl:stylesheet version="1.0"
                    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
                    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
                    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
                    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
                    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xmlns:ns0="http://www.example.org"
                    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
                    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:med="http://schemas.oracle.com/mediator/xpath"
                    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
                    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
                    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
                    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
                    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                    xmlns:ora="http://schemas.oracle.com/xpath/extension"
                    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
                    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
                    exclude-result-prefixes="xsi xsl ns0 xsd bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref ora socket ldap">
      <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:variable name="ReceipentID" select="document('../xsd/B2BMarketProperties.xml')"/>
      <xsl:template match="/">
        <ns0:ReceipentIDType>
        <xsl:for-each select="$ReceipentID">
          <ns0:ReceipentID>
            <xsl:value-of select="$ReceipentID"/>
          </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>
    </xsl:stylesheet>
    Following is the XML ( B2BMarketProperties.xml)
    <?xml version="1.0" encoding="UTF-8" ?>
    <ReceipentIDType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.example.org B2BMarketProperties.xsd"
                     xmlns="http://www.example.org">
      <ReceipentID>123</ReceipentID>
      <ReceipentID>345</ReceipentID>
    </ReceipentIDType>
    The output i am getting with this code is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    But, I need output in the following format
    <ns0:ReceipentIDType xmlns:ns0="http://www.example.org">
        <ns0:ReceipentID>123</ns0:ReceipentID>
         <ns0:ReceipentID>345</ns0:ReceipentID>
    </ns0:ReceipentIDType>
    Could you guys let me know what i am doing wrong. Any help would be appreciated.
    Thanks,

    This worked for me :
      <xsl:template match="/">
        <ns0:ReceipentIDType>
          <xsl:for-each select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID">
            <xsl:variable name="count" select="position()"/>
            <ns0:ReceipentID>
              <xsl:value-of select="document('B2BMarketProperties.xml')/*:ReceipentIDType/*:ReceipentID[$count]"/>
            </ns0:ReceipentID>
          </xsl:for-each>
        </ns0:ReceipentIDType>
      </xsl:template>

  • Reading A xml file and sending that XML Data as input  to a Service

    Hi All,
    I have a requirement to read(I am using File adapter to read) a xml file and map the data in that xml to a service(schema) input variable.
    Example of  xml file that I have to read and the content of that xml file like below:
      <StudentList>
        <student>
           <Name> ravi</Name>
           <branch>EEE</branch>
          <fathername> raghu</fathername>
        </student>
      <student>
           <Name> raju</Name>
           <branch>ECE</branch>
          <fathername> ravi</fathername>
        </student>
    <StudentList>
    I have to pass the data(ravi,EEE,raghu etc) to a service input varible. That invoked Service input variable(schema) contains the schema similar to above schema.
    My flow is like below:
      ReadFile file adapter -------------------> BPEL process -----> Target Service.I am using transform activity in BPEL process to map the data from xml file to Service.
    I am using above xml file as sample in Native Data format(to create XSD schema file).
    After I built the process,I checked file adapter polls the data and receive the file(I am getting View xml document in EM console flow).
    But transform activity does not have anything and it is not mapping the data.I am getting blank data in the transform activity with only element names like below
    ---------------------------------------------------------------------------EM console Audit trail (I am giving this because u can clearly understand what is happening-----------------------------------------------------
       -ReceiveFile
            -some datedetails      received file
              View XML document  (This xml contains data and structure like above  xml )
        - transformData:
            <payload>
              <InvokeService_inputvariable>
                  <part name="body">
                     <StudentList>
                         <student>
                           <name/>
                            <branch/>
                            <fathername/>
                         </student>
                   </StudentList>
              </part>
             </InvokeService_inputvariable>
    'Why I am getting like this".Is there any problem with native data format configuration.?
    Please help me out regarding this issue as I am running out my time.

    Hi syam,
    Thank you very much for your replies so far so that I have some progrees in my task.
    As you told I could have put default directory in composite.xml,but what happenes is the everyday new final subdirectory gets created  in the 'soafolder' folder.What I mean is in  the c:/soafolder/1234_xmlfiles folder, the '1234_xmlfiles' is not manually created one.It is created automatically by executing some jar.
    Basically we can't know the sub folder name until it is created by jar with its own logic. whereas main folder is same(soafolder) ever.
    I will give you example with our folder name so that it would be more convenient for us to understand.
    1) yesterday's  the folder structure :  'c:/soafolder/130731_LS' .The  '130731_LS' folder is created automatically by executing some jar file(it has its own logic to control and create the subdirectories which is not in our control).
    2) Today's folder structure :  'c:/soafolder/130804_LS. The folder is created automatically(everytime the number part(130731,130804).I think that number is indicating 2013 july 31 st like that.I have to enquire about this)is changing) at a particular time and xml files will be loaded in the folder.
    Our challenge : It is not that we can put the default or further path in composite.xml and poll the file adapter.Not everytime we have to change the path in composite.xml.The process should know the folder path (I don't know whether it is possible or not.) and  everyday and file adapter poll the files in that created subfolders.
    I hope you can understand my requirement .Please help me out in this regard.

  • File Adapter and reading all XML files from direcotry

    Problem occurs on PI 7.1
    I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory.
    Quality of service is: Exactly One.
    Poll Interval: 30
    Retry interval: 30
    Processing mode: Archive with option "Add Timestamp".
    Processing sequence: by name.
    I though that with above configuration my File Adapter will be reading folder for all coming XML files. But  somehow it is reading XMLs only when I'm activating it in Integration Builder.
    Any idea what can cause such strange problem?

    Hi Tomasz,
    As per my understanding, you need to activate the file adapter for reading the XML files on your directory. Right?
    If that is the case, then the issue might be with the Cache.
    1. Clear the cache from the Integration Builder.
    2. Check in SXI_CACHE whether there are any issues. Click on Delta Cache refresh to find out if there are any cache related issues.
    Thanks,

  • Reading an XML file from a package .....

    I m trying to read an xml file from a package. The XML file is located on desktop (not on unix system). if i mention the path of the file in a package, is it sufficient ???. OR do i need to CREATE DIRECTORY in oracle and mention the file path in this directory ???
    I have granted CREATE directory permissions...
    If not any suggestion or advice is great ???
    Thank you!!

    BANNER
    1     Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    2     PL/SQL Release 11.1.0.6.0 - Production
    3     CORE     11.1.0.6.0     Production
    4     TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    5     NLSRTL Version 11.1.0.6.0 - Production
    Thank you !!!

  • Reading an xml file from a jar file

    Short question:
    Is it possible to read an xml file from a jar file when the dtd is
    placed inside the jar file? I am using jdom (SAXBuilder) and the default
    sax parser which comes with it.
    Long Question:
    I am trying to create an enterprise archive file on Weblogic 6.1. We
    have a framework that is similar to the struts framework which uses it's
    own configuration files
    I could place the dtd files outside the jar ear file and specify the
    absolute path in an environment variable in web.xml which is
    configurable through the admin console.
    But I want to avoid this step and specify a relative path within the jar
    file.
    I have tried to use a class which implements the entityresolver as well
    as try to extend the saxparser and set the entity resolver within this
    class explicitly, but I always seem to sun into problems like:
    The setEntityresolver method does not get called or there is a
    classloader problem. i.e. JDOM complains that it cannot load My custom
    parser which is part of the application
    Vijay

    Please contact the main BEA Support team [email protected]
    They will need to check with product support to determine
    the interoperatablity of Weblogic Server with these other
    products.

  • Reading an xml file from jar

    I have an xml file in a jar file other than the class that needs to read it. Most of teh posts I've seen reccomend using class.getResource to get access to the jar, but since the file is in a different jar this wont work.
    I load classes using URLClassLoader and explicitely access the class I need from a specific jar by creating a url thusly....
    jar:file:/" + workingDirectory + "/folder/jarfile.jar!/specificfolder/specificfile.class"
    Is there a similar thing for reading an xml file for a jar?

    Have you tried:
    "jar:file:/" + workingDirectory + "/folder/jarfile.jar!/specificfolder/specificfile.xml"
    ;o)
    V.V.

Maybe you are looking for

  • Black and White Screen

    My Iphone 4 has been shutting down to a black dos like screen with White letters. Debugger messag: panic\ OS Version: not yet set Kernel Version: Darwin Kernel Version 13.0 Sunday August 19 I b boot version: i Bott-1537.4.18 panic: we are hanging her

  • To Determine latest 3 entries in a table

    Hello All, I have a table with the stucture Table A PK_ID NUMBER, Name_ID_FK Number, Entry_Date Date // Where Entry date is date the row is inserted This might have data like 1,1,12/12/2001 2,1,12/13/2001 3,2,12/14/2001 4,2,12/15/2001 5,4,12/16/2001

  • Convert smartform as pdf

    Hi, I am able to run the following program in ABAP editor/se38. I am not able to run this in ABAP webdynpro. Plz check and let me know, where the problem is? I am getting "Access via NULL object reference is not possible". Especially i am getting an

  • Overdelivery Tolerance

    Hi, Just a simple query...In PO the overdelivery tolerances acts on total quantity or quantity yet to be received? For example lets say a PO has 100 tones of material with an overdelivery tolerance og 5%. Against the PO already 30 tonnes has been rec

  • Cannot attach library - webforms

    Hi, People!! I'm working with forms 6i. When I execute the forms in client-server mode, everything is alright. But when I try to execute them in web mode, I got the error 'cannot attach library'. How could it happen? I mean, how could it just work ou