How to send XML file to https server using POST

Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
Thanks,

Can anybody give me the solution

Similar Messages

  • How to upload XML file from Application server.

    Hi,
    How to upload XML file from Application server.Please tell me as early as possible.
    Regards,
    Sagar.

    Hi,
    parameters : p_file type ibipparms-path obligatory.
    ***DOWNLOAD---->SAP INTO EXCEL
    filename1 = p_file.
    call function 'GUI_DOWNLOAD'
      exporting
      BIN_FILESIZE                    =
        filename                        = filename1
        filetype                        = 'ASC'
      APPEND                          = ' '
      WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
      TRUNC_TRAILING_BLANKS           = ' '
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
    IMPORTING
      FILELENGTH                      =
      tables
        data_tab                        = it_stock
      FIELDNAMES                      =
    exceptions
       file_write_error                = 1
       no_batch                        = 2
       gui_refuse_filetransfer         = 3
       invalid_type                    = 4
       no_authority                    = 5
       unknown_error                   = 6
       header_not_allowed              = 7
       separator_not_allowed           = 8
       filesize_not_allowed            = 9
       header_too_long                 = 10
       dp_error_create                 = 11
       dp_error_send                   = 12
       dp_error_write                  = 13
       unknown_dp_error                = 14
       access_denied                   = 15
       dp_out_of_memory                = 16
       disk_full                       = 17
       dp_timeout                      = 18
       file_not_found                  = 19
       dataprovider_exception          = 20
       control_flush_error             = 21
       others                          = 22
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Regards,
    Deepthi.

  • How to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 using ftp

    how to edit xml file particular value. and how to send xml file over ip address 192.168.2.10 device using ftp through Ethernet

    Hello
    For using FTP function in LabVIEW, I recommend you to check this document: FTP Basics
    Also, take a look at FTP Browser.vi, which is available at the Example Finder.
    To edit a XML file, try to use VIs in XML palette. Maybe Write to XML.vi helps you.
    Post your current VI if possible.
    Regards
    Mondoni

  • How to send CSV files to external server

    Hi All,
    How to send CSV files to external server (not to application server).
    I know how to download files to application server.
    Please give me the steps to send CSV files to external server.
    Is it posiible with RFCs? If yes, then plz provide me the steps. Do we need to create RFC destination for this.
    Appriciate your help with rewarding points.
    Please help as this is an urgent requirement

    hi,
    you can send via xi.
    chk this blog
    a) content conversion (sender)
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    b)content conversion (receiver)
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    <b>
    reward points if this helps you.</b>
    Siva
    Message was edited by:
            SivaKumar

  • How to send a file as an attachment using mailx

    Hi
    Can any one tel me how to send a file as an attachment using mailx command in shell script.
    Thanks,
    Suman.

    Wrong forum where to ask such questions.
    Check this one link:
    http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254

  • How to send XML file into XI using sender HTTP adapter

    I am using HTTP sender adapter to post the XML file into XI. I tried to form the URL by using the following String query , but I am unable to execute file.
    String urlString = "http://<servername:portno>/sap/xi/adapter_plain?namespace=<namespace>&interface=<interface name>&service=<service name>&party=&agency=&scheme=&QOS=BE&sap-user=xiappluser&sap-password=satyam&sap-client=100&sap-language=EN";
    How can I execute xml file by using HTTP sender adapter.
    Any one with better suggestions, about this idea?
    Thanks in advance for all.
    Ram Raj

    Hi
    Just use the following parameter to send xml file using HTTP adapter.
    "http://xiserver:8000/sap/xi/adapter_plain?namespace="senderNamespace"&interface=senderinterface&service=sender service";
    "&party=sender party"&agency=&scheme=&QOS=BE&sap-user=userid &sap-password=password&sap-client=100&sap-language=D";
    with the help of this you are able to point out which interface you would like to use.
    And in payload pass the xml.
    and thats it
    carry on
    Cheers
    Regards
    Piyush

  • Send from file to http server and save http/xml response to another file

    Hallo,
    is there anybody who made running simple think. Read xml file, send it to http server using plain HTTP adapter and then wait for response which is to be saved as another file?
    ThanX a lot.
    Honza Vrzak

    Hello Honza,
    I've made running these two asynchronous scenario. Maybe that might help you?
    1.a) FileAdapter picks up XML and sends it to XI2.0
    1.b) XI uses PlainHTTP-Adapter to sends the message to Webserver
    1.c) HTTPRequestHandler (written in C#) receives the XML and writes it to HD.
    2.a) JavaScript sending an XML to PlainHTTP adapter of XI2.0.
    2.b) XI sends the message to FileAdapter
    2.c) FileAdapter writes the XML to HD
    What you need is an synchrounus scenario and I think I remember that the fileadapter is not able to work synchrounus. So I think you have to combine these two scenarious to one.
    Regards Björn

  • How to send XML files through Business Connector to client URL

    Dear ALL
    I am new to SAP BC. We have setup BC 4.8 and would like to send out a XML file from BC to Client URL. Could someone please guide me.
    Please suggest solutions.
    Thanks
    Ahmed

    Hello Mickael
    Thanks for your reply. No, we do not have PI. This BC will be used for point to point communication with client.
    Scenario:
    R/3 server to send XML files to BC. BC will load these files ( using pub.getfile service), this file is to be parsed using pub.loaddocument service and then sent to client in XML format wrapped with digital signature. As i am new to BC i am unable to parse this file and wrap it with the digital signaature to send it.
    Kindly advise on how best can we perform this action.
    Thanks
    Ahmed

  • How to send xml file from local folder to azure storage

    Hi,
    My plan is i have xml files which are under folders in my local.
    I want to use mobile service to send xml files to azure storage,
    how shall i do that, either by c# or mobile service.
    If internet stop, I will use my mobile service to transfer all xml files to azure storage and run web job to do to update azure
    sql by xml file.
    please advice.
    Superman

    Hi,
    You could refer the following link for assistance with uploading image files to Azure Blob Storage using Mobile Services:
    http://azure.microsoft.com/en-us/documentation/articles/mobile-services-windows-phone-upload-data-blob-storage/
    And for image files you could refer the following link:
    http://stackoverflow.com/questions/25977406/upload-a-text-file-with-azure-mobile-services
    Regards,
    Malar.

  • How to upload a file on HTTP server

    Hi All,
    I am porting a flex project to HTML5 where I need to upload a file on HTTP server.
    I do google and tried to find out a solutions.
    I could see following article on HTTP upload
    https://developer.tizen.org/dev-guide/2.2.1/org.tizen.web.appprogramming/html/tutorials/w3 c_tutorial/comm_tutorial/uploa…
    Uploading Files using AJAX | Holyhoehle's Blog
    File uploads using Node.js: once again | Componentix blog
    All article make use of file object for uploading.
    Unfortunately I do not have file object but have complete file path.
    is it possible to upload a file without showing a file selection dialog or without doing drag/drop.?
    Please help me in right direction for HTTP upload.
    Regards,
    Alam

    If you have a file path, you can read file like Base64 string:
    var fileStr = window.cep.fs.readFile(filePath, window.cep.encoding.Base64).data;
    then you can send this Base64 string to server. I'm using xmlhttpReguest for sending data to server (i'm using JSON format).
    And save file on server (Base64 string).
    window.cep.fs... functions - for working with File System. (read, write ...)
    Example for working with files - demo where to find it?
    CEP APIs information - Adobe CEP APIs | Adobe Developer Connection

  • How to send the file in *application server* as an email?

    Hi,
    I have a file in application server and I want to send that file as an email from application server.
    Please let me know how to do it.

    Hi Suman,
    look here:
    Re: How to send an email from Application server?
    Regards, Dieter

  • HELP!!! - How to send a file to a server?

    How to send a file(as it is) to the server i'm connected to, if i have access to the output-stream?

    Ummm read the APIs of anything you don't understand. Documentation is your friend, I hope you are not being lazy. But I'm in a good mood so here:
    // Make sure you try to catch any IOExceptions
    // Code expanded for clarity;
    OutputStream yourOutputStream = getYourOutputStream; // You said you can get the outputstream to the server/socket. I assume you made a connection.
    BufferedOutputStream bos = new BufferedOutputStream(
    yourOutputStream ); // Always a good idea to use buffers
    // Your object is your file
    File yourObject = new File("blabla.jpg");
    FileInputStream fis = new FileInputStream(yourObject);
    byte[] b = new byte[1024]; // A good size read
    while( fis.read(b) != -1){// read 1024 bytes into array at a time, returns -1 at end of file
       bos.write(); //write to the server
    fis.close(); // close the inputstream
    yourObject = null; // help the gc
    bos.flush(); // flush the buffer, close does this, but it is good form
    bos.close(); // close the output to the server--Thunder
    PS - The Duketer is in!

  • Send xml file over https - urgent

    Helo everybody.
    I need to solve next problem:
    1. Build/Use a client program that can operate with the HTTPS protocol. There are no restrictions on the type of client program used, providing it can use this protocol and deal with transactions synchronously.
    2. Build/Use a program that can build a valid request XML document and attach it via a POST parameter to a HTTPS request.
    POST /<URL_TO_SUBMISSION_SITE> HTTP/1.0
    Example
    User-Agent: HTTPTool/1.0
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 9999999
    <XML_DOCUMENT> &#1048773;Post Payload
    or
    POST /<URL_TO_SUBMISSION_SITE> HTTP/1.0
    User-Agent: HTTPTool/1.0
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 9999999
    xml=<XML_DOCUMENT>
    3. Ensure the program can retrieve the HTTPS response and parse the returned XML payload.
    4. Ensure the program can correctly interpret the inquiry response information within the XML return.
    Please help me in point 2. I don't know how to attach xml document to https request.
    I'm trying something like this :
    System.setProperty("java.protocol.handler.pkgs",
         "com.sun.net.ssl.internal.www.protocol");
         try {
    url = new URL("https://" + path);
    } catch (MalformedURLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    URLConnection con = null;
    try {
    con = url.openConnection();
    con.setDoInput(true);
    con.setDoOutput(true);
    con.setAllowUserInteraction(true);
    con.setRequestProperty("Content-type", "application/x-www-form-urlencoded;charset=Cp1250");
    con.setRequestProperty("Content-Length","9999999");
    } catch (IOException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    but without success. Please help

    Just saw a link, may be this will help you : http://resellers.tucows.com/documentation/xmlhttpspost.pdf

  • Upload xml file from aplication server using read dataset, parser error.

    Hi,
    I would like to upload xml file from app. server but parser failed. If I upload this xml file from workstation (using ws_upload) it is correct. For uploading xml file from app. server I use open dataset... read dataset. In loop section I remove '#' char. How do You upload xml file from app server? What Could be incorrect.
    I try to open dataset in binary mode, text mode...
    TYPES: BEGIN OF xml_line,
            data(255) TYPE c,
          END OF xml_line.
    DATA: gt_xml_table TYPE TABLE OF xml_line,
          gs_xml_structure TYPE  xml_line,
          gv_xml_table_size TYPE i.
    OPEN DATASET s FOR INPUT IN BINARY MODE.
      IF sy-subrc <> 0.
        MESSAGE e001(zet) WITH '....'.
      ENDIF.
      DO.
        READ DATASET s INTO gs_xml_structure.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
         len = STRLEN( gs_xml_structure ).
         len = len - 1.
         check len > 0.
         WRITE gs_xml_structure(len) TO gs_xml_structure.
          APPEND gs_xml_structure TO gt_xml_table.
        ENDIF.
      ENDDO.

    You Can do this too
    parameters: p_file like rlgrap-filename.
    data: subrc like sy-subrc.
      create object me.
      REFRESH t_data.
    *  Open XML File
      CALL METHOD me->CREATE_WITH_FILE
        EXPORTING
          filename = p_file
        RECEIVING
          retcode  = subrc.
    * Saves Data in an itab from XML File.
      CALL METHOD me->get_data
        IMPORTING
          retcode    = subrc
        CHANGING
          dataobject = t_data[].
    Regards,
    Claudio.

  • [b]Urgent How to send XML file from forms 6.0 to a url to access database[/

    hi
    i need to create an XML with some values file from Oracle Forms 6.0 and then send this XML file To a URL to access the database,which in turn will send me XML file with new values.Can any body help me out as i don't have any ideas
    Regards
    Sunil

    Sunil,
    and this must be using a URL and can't be handled by a database stored procedure ?
    Anyway, your scenario can be achieved using teh Java Importer in Forms 6i and above. You woudl write a Java program that takes a String and loads it to an URL. It then checks the response URL for its content.
    Frank

Maybe you are looking for

  • Outgoing payment exchange rate issue

    Hi all, i have an outgoing payment in yen. but the system 6 decimals does not alow me to calculate the amount without difference.How can i increase the decimal? or any workaround on this? Thanks in advance.. joanne

  • Print Issue in Sales Invoice

    Hi Friends, While printing the Invoice, it's not picking the additional VAT tax which is supposed to print after all individual Item values, then the VAT and finally the Total.... Eg.        Net Amount         x              VAT                    y

  • Routing messages in BPM

    Hi, I have the following scenario: I send an IDOC from SAP R/3 to PI. In PI this IDOC is sent to a BPM. In the BPM an select-statement is performed to get additional data from an external database Then a mapping is performed and I have to update the

  • Can't install I-tunes

    I get the error message "itunesSetup.exe is not a valid Win32 application" HELP!!

  • Regarding MM and SD

    Hi,   Can any body forward MM and SD flow in SAP? Regards, Ramesh.