How to read XML file kept on NON-SAP server using the Http URL ?

Dear Experts,
I am working on CRM2007 web UI. I need to read a XML file placed on a shared server location by a third party program. Then process that XML file into CRM and create a quotation using the data extracted from the file.
All i have with me is the http URL that points to the location of the file.
I am supposed to read the file , create quotation and at later point of time i would be asked to update the quotation and then generated new XML representing updated quotation and replace the XML file on shared server location with this new updated XML file.
I know how to extract data from XML file into ABAP but i have no clue as to how to access the file on some other server using the http url i have and how to read it ?
I searched on the forum and i found the codes for reading XML file that is located either on client machine OR on the Application server wheareas my file is on some other than sap application server.
Please help me as its an urgent issue .
Points will be rewarded for sure.
Please help.
Thanks in advance,
Suchita.
p.s. : the http url to the file location is like -->
http://SomeServerDomain/SomeDirectory/file.xml

hi,
interesting task.
to request the file by a http call you need to create an if_http_client object.
More info is [here|http://help.sap.com/saphelp_nwmobile71/helpdata/en/e5/4d350bc11411d4ad310000e83539c3/frameset.htm]
to parse the file you either have to work with the ixml packages ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b5413acdb62f70e10000000a114084/content.htm]) or you use an XSLT transformation ([info|http://help.sap.com/saphelp_nwmobile71/helpdata/en/a8/824c3c66177414e10000000a114084/content.htm]).
uploading the final file isn't so easy. if you only have http, you should write a server script to allow uploading of the new file and copying it into the place of the old file. but you definitely need the script.
now it's your take. depending on how experienced you are in ABAP and networking this might turn out to be easy or pretty complicated.
have fun,
anton

Similar Messages

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • How to read xml file as shown below.

    Hello,
    I am using flash builder 4 and currently working on implementing AIR application.
    I need to read xml file data.
    Normal xml files are easy to read and i am much more aware of it.
    But can any one have idea how to read XML file which is given below.
    <node>
    <key>ID</key>
    <integer>1</integer>
    <key>Name</key>
    <string>Dhwani</string>
    <key>Postno</key>
    <integer>20</integer>
    <key>deskname</key>
    <string>flex</string>
    <key>empid</key>
    <integer>25</integer>
    <key>projectname</key>
    <string>abc</string>
    </node>
    Here i have xml file in form of key value pair. <key> node shows name of the key and after that <integer> or <string> node are the value for that specific key.
    if i select node.key then it shows me all the keys. and from that i cant make out what is the value for key ID.
    Is there any way to take first node and then second. i mean first i ll take value of key and store it into some arraycollection. and then value will be stored.
    Any help is appreciated.. Looking for positive reply.
    Thanks
    Dhwani

    There are different methods to access XML data which have pro's and cons. Let us know more about what you want to do and we can help you.

  • How to read XML file and write into another XML file

    Hi all, I am new to JAVAXML.
    My problem is I have to read one XML file and take some Nodes from that and write these nodes into another XML file...
    I solved, how to read XML file
    But I don't know how to Write nodes into another XML.
    Can anyone help in this???
    Thanks in advance..

    This was answered a bit ago. There was a thread called "XML Mergine" that started on Sept 14th. It has a lot of information about what it takes to copy nodes from one XML Document object into another.
    Dave Patterson

  • How to read XML file and update the data in MS CRM 2011?

    Hi Folks,
    Can anyone please help me finding some references to read XML files and push the data to MS CRM 2011 preferably by using a console application.
    Please let me know if any ways of handling it in simple ways.
    Thanks,
    Sri

    HI,
    How to read XML file:
    https://social.msdn.microsoft.com/Forums/en-US/5dd7261b-86c4-4ca8-ba87-95196ef3ba50/need-to-display-xml-file-in-textboxes-edit-the-data-and-save-the-new-xml-file?forum=csharpgeneral
    How to work with CRM:
    ClientCredentials credentials = new ClientCredentials();
    credentials.Windows.ClientCredential = new System.Net.NetworkCredential("USER", "Password", "Domain");
    Uri uri = new Uri("http://server/Organization/XRMServices/2011/Organization.svc");
    OrganizationServiceProxy proxy = new OrganizationServiceProxy(uri, null, credentials, null);
    proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    IOrganizationService service = (IOrganizationService)proxy;
    //using "service" you can create, update and retrieve entities.
    More information here about service functions:
    https://msdn.microsoft.com/en-us/library/gg328198.aspx

  • How to read xml file and place it into an internal table...

    hello all,
    can any one help me in - how to read xml data file (placed in application server) and placing the same into an internal table (remove the xml tags or say fetching the xml data without xml tags).

    Hi Murashali,
    use this.
    TYPES: BEGIN OF day,
    name TYPE string,
    work(1) TYPE c,
    END OF day.
    DATA: BEGIN OF week,
    day1 TYPE day,
    day2 TYPE day,
    day3 TYPE day,
    day4 TYPE day,
    day5 TYPE day,
    day6 TYPE day,
    day7 TYPE day,
    END OF week.
    DATA xml_string TYPE string.
    DATA result LIKE week.
    week-day1-name = 'Monday'. week-day1-work = 'X'.
    week-day2-name = 'Tuesday'. week-day2-work = 'X'.
    week-day3-name = 'Wednesday'. week-day3-work = 'X'.
    week-day4-name = 'Thursday'. week-day4-work = 'X'.
    week-day5-name = 'Friday'. week-day5-work = 'X'.
    week-day6-name = 'Saturday'. week-day6-work = ' '.
    week-day7-name = 'Sunday'. week-day7-work = ' '.
    CALL TRANSFORMATION ...
    SOURCE root = week
    RESULT XML xml_string.
    CALL TRANSFORMATION ...
    SOURCE XML xml_string
    RESULT root = result.
    Regards,
    Vijay

  • How to read xml file that has changing element names?

    Idon't know much about xml, nor reading it with java, but I have this problem with reading xml file. The file something like this:
    <configuration>
       <DEV001>
          <serial>001</serial>
          <id>number 1</id>
       </DEV001>
       <DEV002>
          <serial>002</serial>
          <id>number 2</id>
       </DEV002>
    </configuration>I have imported the org.w3c.dom.* api, that I use for parsing. I don't know is this a generic or a parser specific issue, but how can I get all the nodes starting with "DEV" into a NodeList?
    If you know a solution for this with another parser, please share it. I have no reason to use that specific parser, I just found a sample using that.
    kari-matti

    Well, NodeList is an interface, so you cannot construct one and put the "good" elements into it. But, you might be able to cast the NodeList with all of the children of the root into an IIOMetadaNode (which is the class that implements the NodeList interface. That class has a removeChild() method that might be able to remove the text nodes and any that don't start with DEV.
    But, if you remove nodes, and still want to do things with the full DOM Document, be very careful and run tests. It may remove those nodes from the full Document.
    If, on the other hand, the printingData( Nodelist nl) method could be modified so it takes an ArrayList or some other collection, it is very simple.
    Just create an ArrayList, and when you find an element starting with DEV, add it to the ArrayList. When you are done, process that list and you are finished.
    Dave Patterson

  • UCCX Reading XML file hosted on IIS web server

    hi guys,
    i have a customer on CCX 8.5 environment and they have a .NET application running on an IIS web server. As part of this .NET application, the app produce an XML file.
    My questions is
    "Can CCX read XML file that is hosted externally on IIS web server rather than parsing the XML file on CCX document repository?"
    All of the examples of XML parsing points to the XML file in document repository.
    Any pointers to links and documentation/example on how to do this would be greatly appreciated.
    If this is not achievable, if you could kindly suggest a different way of doing it too would be greatly appreciated.
    Thanks in advance,
    Daniel

    Hi,
    to be quite honest with you, I don't know anything about Sharepoint - so I am afraid I cannot help you with its XML editing capabilities. XML is just a well formed text file that follows some logical rules, so no additional application is required for editing, in fact, I always encourage everybody to use Notepad/Textpad/ to read and edit XML files. Of course, if it's not possible, you will find a great number of various user friendly XML editing applications.
    A UCCX script will normally access an XML using the Create URL Document step and then, using the Get XML Document data step with the help of an XPath expression, will filter out the necessary information from the XML document.
    The protocols used are standard and well known, including HTTP and XPath (and XML itself). So it does not really matter what kind of HTTP server serves the XML file, IIS is just an option.
    Examples may be found in the Scripting guides for your particular UCCX version.
    HTH
    G.

  • How to read xml file

    I want to create a component to read a XML file in Flex 2
    using Actionscript. I am able to do this using URLRequest and
    URLLoader but what happens is the component that calls my reader
    component keeps running through the code and the Complete event
    never gets called.
    So my question is how can I read a XML file through AS and
    return a value in that XML file all in a synchronized manner?
    Thanks

    All data access in Flex is asynchronous.
    There is NO WAY to stop or pause code execution in the Flash
    Player.
    You will need to use events to complete the processing after
    the call returns. This is a tough paradigm if you are new to it,
    but there is no other way.
    Resistance is futile.
    Also, in a related vein, Alert and other "modal" pop-ups are
    not truly modal. They do not stop code execution, and you must use
    events to continue processing.
    Tracy

  • How to Read Xml File and view into Data Grid View?

    hi all
    my Data into Xml file are:
    <Voucher>
    <Header>
    <txtHeaderId>259803</txtHeaderId>
    <txtDate>2015/02/01</txtDate>
    <txtDocNo>20</txtDocNo>
    <txtMemo>This is a Test .</txtMemo>
    </Header>
    <Item>
    <txtItemId>8562803</txtItemId>
    <txtHeaderRef>259803</txtHeaderRef>
    <txtDesc>This is Number 1</txtDesc>
    <txtDebit>350000</txtDebit>
    <txtCredit>0</txtCredit>
    <txtItemId>8562804</txtItemId>
    <txtHeaderRef>259803</txtHeaderRef>
    <txtDesc>This is Number 2</txtDesc>
    <txtDebit>0</txtDebit>
    <txtCredit>350000</txtCredit>
    </Item>
    </Voucher>
    now i have two DataGridViews 
    i want that data from xml file show into the DataGridViews by this codes:
    Private Sub btnReadXmlFile_Click(sender As Object, e As EventArgs) Handles btnReadXmlFile.Click
    Dim Document As XmlReader = New XmlTextReader(txtPath.Text)
    Dim ds As New DataSet
    ds.ReadXml(Document)
    DataGridView1.DataSource = ds.Tables(0)
    End Sub
    but i see this result:
    why i do not see any result into DataGridView2(Item)
    how to solve it ?
    please help me .
    thanks all
    Name of Allah, Most Gracious, Most Merciful and He created the human

    now how to correct it?
    Name of Allah, Most Gracious, Most Merciful and He created the human
    Please be explicit - I'm the only other one in this thread so I assume it's to me, but usually I just ignore the posts when the user isn't specific.
    I don't know what there is to correct. Create a NEW dataset in code, add the two tables, and use the methods that I suggested.
    I'm not a database guy so I can't get real specific. I create my own stuff in classes and use that but, if you're using SQL then there are lots of pro's here that can help you with specifics. I'm sure they'll need to know a lot more about your data, the
    connection, and all that, but the concept should be fairly simple to implement.
    Still lost in code, just at a little higher level.

  • How to read xml file present in the UCMS from  webcenter portal application

    Hi,
    I'm new to webcenter portal and would like to know how to read an xml file which is present in UCMS 11g(contributors folder) from webcenter portal application.
    Thanks in advance

    I guess I had mentioned that I want to read it via my webcenter portal app rather than login to ucms and searching it via url.
    I want text labels and button names being stored in the xml file which I'm going to keep in the UCMS.
    After reading that from the xml will be placed at appropriate locations like the button values and label feilds, so that we dont need to deploy entire app for this kind of simple changes.
    Now can anyone provide some help with the api's related to this?

  • How to read XML files from java

    i need a sugession that how to read a xml file using java code
    and i need to parse using some parsers and display attributes and entity seperately
    as a string.......

    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.io.SAXReader;
    import java.io.File;
    import java.text.AttributedCharacterIterator.Attribute;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    public class XmlParser
    private String Result="";
    private String Final="";
    private String Delim="";
    public void bar1(Document document) throws DocumentException
    org.dom4j.Element root = document.getRootElement();
    // System.out.println(root.getName());
    bar2(root);
    System.out.println(this.Result);
    process();
    public void bar2(org.dom4j.Element e)
    for(Iterator i = e.elementIterator();i.hasNext();)
    org.dom4j.Element Element = (org.dom4j.Element) i.next();
    Result += Element.getName()+"\t"+Element.getText()+"\n";
    bar2(Element);
    public void process()
    StringTokenizer Tokenizer = new StringTokenizer(this.Result,"\n");
    String element;
    while(Tokenizer.hasMoreTokens())
    element = Tokenizer.nextToken();
    StringTokenizer Tokenizer2 = new StringTokenizer(element,"\t");
    // Do what ever String Process here Example
    this.Final += element.getName();
    this.Final += this.Delim;
    System.out.println(this.Final);
    public static void main(String s[])throws Exception
    Document document = null;
    SAXReader reader = new SAXReader();
    File f1= new File("D:/Rajesh/EDI to XML/EDI.xml");
    document = reader.read(f1);
    Demo obj = new Demo();
    obj.bar1(document);
    i think this will hep full.......

  • How to load XML file to table (non-XML) with SQL*Loader -- issue with nulls

    I have been attempting to use SQL*Loader to load an XML file into a "regular" Oracle table. All fields work fine, unless a null is encountered. The way that nulls are represented is shown below:
    <PAYLOAD>
    <FIELD1>ABCDEF</FIELD1>
    <FIELD2/>
    <FIELD3>123456</FIELD3>
    </PAYLOAD>
    In the above example, FIELD2 is a null field and that is the way it is presented. I have searched everywhere and have not found how I could code for this. The issue is that if FIELD2 is present, it is coded like: <FIELD2>SOMEDATA</FIELD2>, but the null is represented as <FIELD2/>. Here is a sample of the control file I am using to attempt the load -- very simplistic, but works fine when fields are present:
    load data
    infile 'testdata.xml' "str '<PAYLOAD>'"
    TRUNCATE
    into table DATA_FROM_XML
    FIELD1 ENCLOSED BY '<FIELD1>' AND '</FIELD1>',
    FIELD2 ENCLOSED BY '<FIELD2>' AND '</FIELD2>',
    FIELD3 ENCLOSED BY '<FIELD3>' AND '</FIELD3>')
    What do I need to do to account for the way that nulls are presented? I have tried everything I could glean from the web and the documentation and nothing has worked. Any help would be really appreciated.

    I hadn't even got that far. can you direct me to where the docs are to import data that is stored within xml but that you don't need any xml functionality, that just happens to be the format the data is stored in? thx

  • How to Read XML files in OC4J???

    I wrote a Web Application with JBuilder, and deployed it in OC4J.
    In the Web App, there were a class and a Jsp, following:
    in the class:(load the .xml file and get the element's attribute value)import org.jdom.Element;
    import org.jdom.Document;
    import org.jdom.input.SAXBuilder;
    public Document loadXMLDoc(String AFileName) throws Exception
    SAXBuilder lSAXBuilder = new SAXBuilder(false);
    Document lDoc = lSAXBuilder.build(AFileName);
    return lDoc;
    public void testGetXMLValue(String AFileName)
    throws Exception
    Document lDoc = null;
    Element lElement = null;
    Element lElement1 = null;
    try
    lDoc = loadXMLDoc(AFileName);
    lElement = lDoc.getRootElement().getChild("client-setup.xml");
    lElement1 = lElement.getChild("connection-params");
    catch (Exception e)
    e.printStackTrace();
    throw new Exception(lErrorStr);
    in the JSP:(invoking the class's method)<%
    testJspBeanId.testGetXMLValue("client-setup.xml");
    %>
    When compiling the Web App, I had contained the "jdom.jar" and "xerces.jar" packages in .ear file,
    After deploying the .ear in OC4J, the two packages in the "/applications/Web App/Web App/WEB-INF/lib/"
    but when I run the Web App to , Error took place:
    org.jdom.JDOMException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found:in deed:
    "Document lDoc = lSAXBuilder.build(AFileName);" bring on the error,
    but I can't resolve it and I am needing your help!!!
    Thank you.

    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.io.SAXReader;
    import java.io.File;
    import java.text.AttributedCharacterIterator.Attribute;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    public class XmlParser
    private String Result="";
    private String Final="";
    private String Delim="";
    public void bar1(Document document) throws DocumentException
    org.dom4j.Element root = document.getRootElement();
    // System.out.println(root.getName());
    bar2(root);
    System.out.println(this.Result);
    process();
    public void bar2(org.dom4j.Element e)
    for(Iterator i = e.elementIterator();i.hasNext();)
    org.dom4j.Element Element = (org.dom4j.Element) i.next();
    Result += Element.getName()+"\t"+Element.getText()+"\n";
    bar2(Element);
    public void process()
    StringTokenizer Tokenizer = new StringTokenizer(this.Result,"\n");
    String element;
    while(Tokenizer.hasMoreTokens())
    element = Tokenizer.nextToken();
    StringTokenizer Tokenizer2 = new StringTokenizer(element,"\t");
    // Do what ever String Process here Example
    this.Final += element.getName();
    this.Final += this.Delim;
    System.out.println(this.Final);
    public static void main(String s[])throws Exception
    Document document = null;
    SAXReader reader = new SAXReader();
    File f1= new File("D:/Rajesh/EDI to XML/EDI.xml");
    document = reader.read(f1);
    Demo obj = new Demo();
    obj.bar1(document);
    i think this will hep full.......

  • How to read XML file format

    Presently calling a webservice to search for customer which generates a XML file. Requirement is to check the XML file format in case of success move to next step and in case of error exit from the application.
    The file generated can have multiple formats as per input supplied.
    Please advise how the file format can be checked.
    Thanks
    anya

    hi anya,
    Try to use FM IDOC_XML_FROM_FILE.
    or check the below code
    data: temp_str type string.
    concatenate '>' cl_abap_char_utilities=>cr_lf '<'><' in XML_STRING with temp_str.
    xml_string is the straing variable to hold the xml .
    now use xml_string to show it in texteditor.
    -Thanks
    Saurabh Goel

Maybe you are looking for

  • Handling hierarchy in oracle sql query

    I have two tables: The first contains COMPANY_ID and CATEGORY_ID The second contains CATEGORY_ID and PARENT_CATEGORY_ID I need to return a list containing COMPANY_ID and CATEGORY_ID. The entries, however, must come not only from the first table, but

  • PSE 6- Error: Could not load style because of a program error.

    I have PSE 6 on Vista. My program has always run fine until a few days ago when it started up a small white window pops up with a red X that says Could not load the styles because of a program error. I hit ok and the box keeps coming back. I can't do

  • Solaris 7 Video driver for IBM 810

    I'm trying to configure an IBM 6345 with Video 810e Chipset Graphics driver on board, and I can't do it. Now its working on Vga. Anyone can help me? I read that Roger Hull its looking for it, too.

  • Assignment number in Documnet

    Hi Experts, How to to populate some reference details to  assignment number of Document for a specific documnet type? In my case  I prefer to populate the ACH Paymnet reference no as asssignment number. Appreciate to get yr response early. Thanks, Se

  • Corrupt genre list

    When I browse through my library I see the 16 genres listed that I use. The menu for selecting a genre shows over 50 genres, several of which look like someone's attempt to make a keyword list. How can the genre list be cleaned out so it only reflect