Post XML from HTTPs server

How do I get the HTTPs server to send/post the XML file to user's mailbox?
The situation is like this: User from System A need to send XML file to User in System B. These 2 can't communicate directly.So the XML file will be posted to an HTTPs server. This HTTPs server will then post the XML to the recipient based on the mailboxid. This mailboxid is specified in the XML. How do i send the XML to the designated mailbox?

You write something that runs on the server, receives
the uploaded XML file, attaches it to an e-mail
message, and sends that message. Since you ask in the
Java context, that something could be a servlet. (You
will notice that this applies equally well to files
that aren't XML.)Hi there! Thanks for the feedback. So I need to create a servlet in the HTTPs server which upon receiving of the XML file, servlet need to read the XML content to get the mailboxid then attach the XML file to that mailboxid? All these can be done in one servlet? Please correct me id I'm wrong. Your feedback is highly appreciated. Thanks..:)

Similar Messages

  • Post XML over HTTPS

    We are trying to do the following. Can anyone help by providing any pointers as how to do it.
    1. A java client will be posting XML over http(s) to the Tomcat server.
    2. The Tomcat server has to do the following:
    - Validate the user credentails and verify that it is an valid user on IDM
    - Do some DB operations and return back a response XML
    We are trying to do this by having the Java client post XML over http to a jsp hosted on the Tomcat server
    How do i retrieve the XML data from the HTTP post (from the HTTP body) ?
    Thanks

    try the below example to read data over https,
    import java.net.*;
    import java.io.*;
    import javax.net.ssl.*;
    public class SSLSocketClient {
    public static void main(String[] args) throws Exception {
         String url="https://secure.com";
              try {
                   SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault();
                SSLSocket socket = (SSLSocket)factory.createSocket(url, 443);
                socket.startHandshake();
                /* read response */
                BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                String inputLine;
                while ((inputLine = in.readLine()) != null)
                    System.out.println(inputLine);
                in.close();
                socket.close();
            } catch (Exception e) {
                e.printStackTrace();
    }

  • Post XML over HTTPS in a loop

    HI,
    I have a requirement to post XMLs over HTTPS. I also am supposed to retrieve the response XML, interpret it and do some processing based on the response status in the response XML. This has to be done for each XML.
    Currently I am establishing a new HTTPsURLConnection for each XML, wrting the XML to output stream, retrieving the response from input stream and then releasing the connection using disconnect() method.
    Is this the recommended approach or should I be creating just one connection for posting all the XMLs? Also, does java use some kind of connection pooling while creating HTTPURLConnection?
    I am frequently getting "SocketTimeoutException Exception --> connect timed out" while processing large number of XMLs. Is this exception due to large number of connections that I am creating?
    This program is running as a stand alone program on unix box.
    Regards,
    Jacob

    Is this the recommended approachYes.
    or should I be creating just one connection for posting all the XMLs?No.
    Also, does java use some kind of connection pooling while creating HTTPURLConnection? Yes.
    I am frequently getting "SocketTimeoutException Exception --> connect timed out" while processing large number of XMLs. Is this exception due to large number of connections that I am creating?Could be, especially if you're doing them in parallel.

  • Read xml from https

    Hi experts,
    I need to read a XML from https address,i have no idea to make it possible, any idea?
    points for all
    thanks all.

    Hi,
    It is secure link at XI end need to configure SSL else it is not possible.  We can read data through HTTP & SOAP adapter.
    Find below links for more help.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f7/c2953fc405330ee10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/964f67ec-0701-0010-bd88-f995abf4e1fc
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/23894238-0701-0010-40b0-a0a6d5c4ad9f?prtmode=navigate

  • How to post  xml over http

    Hi experts,,
    My idea is to post XMl file from client application to server.
    user.XMl file will be created then and there dynamically based on user entered data.
    For this i have a .java program in client application.
    And one important thing is My XMl file contain image in binary data,, which is in Base64Encoded format.
                      <?xml version="1.0" encoding="UTF-8"?>
                    <FileAttachment>
                                         <UserName>krish</userName>
                                         <password>rao</password>
                                        <image type="jpg">
                                                   <PictureData>
                                                    QAAAAIAGtaMS2/u6RnIAAAAIYAAAAKAAAAYm
                                                          l0bWFwLmJtcHPybWOAADMg1gBiVihm
                                                      ZJAAiwcA8RE+CIaB/6iAYj4AUEsBAhQAFAAAAAgAa1oxLb+7
                                                     pGcgAAAAhgAAAAoAAAAAAAAA
                                                      AAAgALaBAAAAAGJpdG1hcC5ibXBQSwUGAAAAAA
                                                    EAAQA4AAAASAAAAAAA
                                             </PictureData>
                                        </image>
                     </FileAttachment>My .xml like above.. i have to post it to server . Some thing like http://myserver:8080/Requesthandler.java which recive the xml and parse it and do some other things.
    And one thing is My server at some location and my client application at other location.
    Plz do me some help as early as possible

    Thak u
    but i am sitting in front of laptop but i cant find perfect code match to me.
    Give me link if possible,
    <Product>
      <SKU>99238</SKU>
      <Description>Super Gidgetidoo</Description>
      <Picture>
    Content-Description: File encoded with ENCODE64.EXE.
    Content-Disposition: attachment; filename="foo.zip"
    Content-Transfer-Encoding: BASE64
    Content-Type: application/octet-stream
    UEsDBBQAAAAIAGtaMS2/u6RnIAAAAIYAAAAKAAAAYm
    l0bWFwLmJtcHPybWOAADMg1gBiVihm
    ZJAAiwcA8RE+CIaB/6iAYj4AUEsBAhQAFAAAAAgAa1oxLb+7
    pGcgAAAAhgAAAAoAAAAAAAAA
    AAAgALaBAAAAAGJpdG1hcC5ibXBQSwUGAAAAAA
    EAAQA4AAAASAAAAAAA
      </Picture>
    </Product> If my xml like above and its created dynamically based on client input.
    I find some code to post above xml, But it post an XMl file in hard disk
    it uses output stream to post , ie read every byte in xml and write to out put stream.like below
    response.setContentType("text/xml");
          response.addHeader("Content-Disposition", "attachment; filename="
              + fileName);
          response.setContentLength((int) xml.length());
          FileInputStream input = new FileInputStream(xml);
          buf = new BufferedInputStream(input);
          int readBytes = 0;
          while ((readBytes = buf.read()) != -1)
            stream.write(readBytes);But i want to post xml file as it is , means whole xml document as an element
    let me help

  • Fetch XML from Content server to Portlet and display as HTML

    Hi,
    I want to fetch the XML from the content server and display that XML in the Weblogic Portlet as HTML.
    The main reason is that data will be contributed by the users in UCM and then I had to get that data from content server and display in portlet
    Please Help........
    Thanks,
    Vinod

    Vinod:
    Probably what you're looking for is to bring the content over using the UCM SPI adapter for WLP's VCR:
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/ucm_adapter/intro.html]
    And then to display the content using a custom template using Content Presenter:
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/cm/displaytemplatesCM.html]
    [http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portlets/development.html]
    When you say you want to fetch xml, is that because it's a contributor data file? You can either read the property values directly from the VCR, or use the info you get from the node (such as dDocName) to then use a UCM/WCM web service to retrieve formatted content and put it in an iframe. There are a lot of ways to go in formatting the data.
    You can even add edit capabilities to your Presenter template by calling the 'edit data file' web service of WCM.

  • Change APEX from HTTP-Server to 11g

    Hello together
    I installed an Oracle 10gR2 Database and Apex 3.1 is running on the HTTP-Server (from the 10gR2 Companion CD).
    Now i want to upgrade to 11g and use the embedded PL/SQL Gateway so that i can turn off the HTTP-Server. Have you got any tips to do that ? Is there something specially ?
    Thanks for your help.

    Andrew, there is a number of posts on this forum with exactly the same issue and resolutions to the issue. Please search the forum. If you do not find a solution, let me know and I'll help you from there.
    Ludek

  • Invalid WSDL - Certificate not trusted - Exception while publishing WSDL in OSR from HTTPS Server

    Hi,
    I am publishing a Web Service in OSR from an HTTPS Server. I am getting exception as
    Error message:
    WSDLException: faultCode=INVALID_WSDL: java.io.IOException: java.security.cert.CertificateException: Server certificate ....... is not trusted!
    To remove this exception I have done following steps
    a) Added Certificate from remote server in Identity Store of WebLogic Server using keytool utilitity
    keytool -import -alias devCertificate -file c:/certificates/okdsoa.cer -truststore demoIdentityStore.jks
    b) Added Certificate from remote server in the trust store of weblogic server using keytool utility
    keytool -import -alias devCertificate -file c:/certificates/okdsoa.cer -truststore demoTrust.jks
    This didnot help.
    Then I imported certificate to OSR using PStoreTool command as
    PStoreTool.bat add -config C:/OSRHome/registry111/conf/clientconf.xml -certFile c:/certificates/okdsoa.cer
    Bounced the servers but that also didnot help.
    Can you please suggest?
    Thanks,
    Parshant

    I found the fix from Oracle Support Knowlededge Base
    sslTool serverInfo --url https://HOST:9043 --certFile newcert.cer
    PStoreTool located in REGISTRY_HOME/bin/PStoreTool add -config
    WEBLOGIC_HOME/user_projects/domains/[osr_domain_name]/servers/[osr_server_name]/tmp/_WL_user/registry/[unique id]/public/conf/pstore.xml -certFile newcert.cer
    I was updating wrong file with the certificate. It had to be pstore.xml. This solved my issue.
    Thanks & Regards,
    Parshant

  • Apex SSL from  HTTP server - err 29040

    Have apex environment (originally 3.1.2 now 3.2) workiing fine under http server 10.1.3. regular http port 7777.
    After going thru the ssl and wallet documentation steps to apply certificates supplied to me, and scouring all the blogs, I'm still failing under https 4443 with:
    SSL call to NZ function nzos_Handshake failed with error 29040
    The default oracle ewallet.p12 lets me in after first complaining about the certificates. I made a new wallet, with owm, and added in the trusted certs that are suppsoed to match our internal browsers. Thats when things go wrong.
    I've tried, and of course bounced opmnctl with stopall, startall after changing each one:
    (1) in opmn.xml verified <ssl enabled="true"
    (2) auto-logon checked in the wallet with cwallet.sso,
    (3) left it off, regen'd wallet and set SSLWalletPassword to it's value,
    (4) tried and verified different wallet locations and the right settings in ssl.conf. (feel confident the ssl.conf settings work cause I can cause other errors by commenting out SSLWalletPassword in ssl.conf with auto-logon=off),
    (5) SSLVerifyClient set to none
    (6) in opmn.xml verified <data id="start-mode" value="ssl-enabled"/>
    (7) set LogLevel in httpd.conf to Debug (more output but nothing obviously usefull)
    (8) set SSLLogLevel in ssl.conf to debug (more output but nothing obviously usefull)
    any ideas would be much appreciated. AND especially does anyone know what the default password is for that default ewallet.p12 ?
    if it told me during install I must have missed it. first born for that cause maybe I can modify it and add in my certs ?

    Srini, thanks so much for helping. Sorry I didn't reply right off hand. To be honest I couldn't find doc id 473047 in metalink and then I finally got hold of our Certificate group and have been busy with them and just now got things resolved. Thanks again for replying. Really appreciate it.
    If anyone else stumbles across this in the future, after having installed just the http server and not knowing much about it, the default pwd to the default wallet is welcome. (be sure and make a copy of this ewallet.p12 in conf/ssl.wlt/default before playing with it). The invalid cipher clues of the 29040 msg were not the direct problem in my case. For me it ended up being incomplete wallet information as the root cause under 10.1.3.
    At first we had been just inserting trusted certificates into the wallet thinking that should match our inhouse browser images. Instead the "Warning, this is a development" msg kept showing. Finally we went thru the steps outlined in the documentation, using owm xwindows (or orapki) to create a new wallet from scratch, add a user certificate request, save the wallet, then export the user cert req to a flat file. You can then send that to your internal security group (assuming you have one) or whoever your Cert Authority is. They then send you back a new certificate that should constitute your User Certificate. You must first load in your trusted certificates (usually a Root and Issuing type trusted certs to constitute your "chain"). Then you can do a Import User Cert under owm and load in the afiorementioned fiel recvd from you security group. Also note the ON= value on your request must equal your DNS name as in server.xyz.com Also, I was being sent .key files that I could never import in. They then sent me pem files that had the key info blended in from what I understand and those worked.
    I was able to get variations of the 29040 error (290xx) by trying different values within the HTTPD.conf -> ssl.conf file for the various SSL variables. In the end I've ended up with the modified settings of
    SSLCipherSuite ALL
    SSLProxyCipherSuite ALL
    SSLVerifyClient none
    SSLProtocol ALL
    SSLProxyProtocol ALL
    although I suspect other combinations would be fine as well.
    The opmn/conf settings were set to the various values as seen in other postings and blogs but in the end did nto seem to be the issue for me. Other than modifying those <port local="6xxx" remote="6xxx" request="6xxx"/> to prevent the opmn logs from filling up fast. To do that I had to try different values that the ones found in some of the main google postings.

  • Read XML from remote server

    Not sure if this is even possible.
    I am using APEX on a INTERNAL server, on the same network is another server hosting files.
    Using PL/SQL code, I need to read the XML file.
    So APEX/ORACLE is at http:\\server1\apex\f?p........
    And the files are at \\server2\xml\file.xml
    Can I load the xml from server2 using pl/sql in server1?
    The XML is generated automatically from another system and can not be stored on the APEX server. It does not need to go into the database, just read, parced, and displayed.

    Hi,
    Using PL/SQL code, I need to read the XML file. You can create a directory object pointing to the location on server2 :
    CREATE DIRECTORY xml_dir AS '\\server2\xml';then you can access the XML content like this :
    DECLARE
    v_xml_doc xmltype;
    BEGIN
    v_xml_doc := xmltype(bfilename('XML_DIR', 'file.xml'), nls_charset_id('CHAR_CS'));
    -- XML processing here...
    END;
    /

  • Error while posting XML from a scheduled transaction to another transaction

    When I try posting an XML from one transaction to another in a different project by calling it as a webservice, it doen't hit the other transaction.
    I see this in the Netweaver error logs:
    java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:111)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)  [see details]
    XML AssignXml Parse Error
    [EXCEPTION]
    org.xml.sax.SAXParseException: Premature end of file.... [see details]
    AND
    [Fatal Error] :-1:-1: Premature end of file.
    More interestingly it happens ONLY when I schedule the parent transaction, when I trigger it manual everything works fine.
    Any help appreciated.

    Hi Srinivas,
    I see that this post was marked as answered. Could you please elaborate on how this problem was fixed?
    I am experiencing a similar issue:
    I am trying to get the Active Portal application running in MII 12.1.7 (also 12.1.8) and all went well up to the point where the ActivePortalMonitor transaction is scheduled. In the logs I also receive the  org.xml.sax.SAXParseException.
    The culprit is the XMLQuery block in that txn. Just like with your situation, when ran from workbench it works; when scheduled it doesn't.
    I tried replacing the XMLQuery with other blocks that get the same result, i.e. XMLLoader or HTTPLoader + StringToXMLParser; and in all cases the XML fetching element bombs out.
    I also built a simple txn that does an XMLQuery on another txn and then dumps the output in a file. Same thing: when run from workbench it runs fine; from scheduler it gives "SAX" error
    I would post the specific error log, but it is always varying, here is one example:
    [ERROR] [Untitled_0]org.xml.sax.SAXParseException: Open quote is expected for attribute "DIR" associated with an element type "HTML".
    Any help/hints are much appreciated
    Kind Regards,
    Fanie

  • XML Database HTTP Server Log files

    I'm using Oracle 10g Express with Apex 4.0 and need to take a look at what would be the Apache error and access logs. Does anyone know how to access them?

    Hi,
    I'm not quite sure , but I think EPG do not produce that kind logs by default.
    Something you can see from listener.log and other database logs.
    This blog post might help
    http://daust.blogspot.com/2008/04/troubleshooting-404-not-found-error-on.html
    And
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_epg.htm
    Br,Jari

  • Read xml from application server

    Hello guys,
    I have craeted program read xml file from presentation server. its working fine...
    below is program
    now i want to program read xml file from Application server.
    so please give me some idea for that.........
    <MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
    thanks
    jigar
    Edited by: Alvaro Tejada Galindo on Jan 12, 2010 11:50 AM

    Hi
    U need to just replace the fm to upload the file with command OPEN DATASET / READ DATASET / CLOSE DATASET: if you upload the data from application server in the same internal table loaded by fm for presentation your report should be the same
    Max

  • Read xml from SQL Server

    Hello
    I need to read a xml from a sql server 2000 database. The field in the database is declare as text.
    When a try to read <a>3</a> the database adapter returns something like this.
    /a/3//a/.
    How do I solve the problem?
    Thanks
    Gonçalo Ribeiro

    Hello again.
    I'm using ora:parseEscapedXML to convert the string that contains XML into XML.
    I'm doing it in an assign. My doubt is what kind of variable should received the information?
    Thanks
    Gonçalo Ribeiro

  • Logging into APEX through Oracle XML DB HTTP Server and Embedded PL/SQL

    Hi,
    I have just finished installing Apex 3.0 on RHEL 4. I am not using HTTP Server, but Embedded PL/SQL. When I go to the page administrator page http://host:8080/pls/apex/apex_admin a prompt pops up and when I give the username as "admin" and the password then it doesn't log me in. I ran the apxconf.sql script and reset the admin password and it is still not letting me log in.
    Please advise

    Unfortunately, using the pl/sql gateway is not yet supported. The documentation should be more clear about that.
    You'll need to use the HTTP server.
    See FAQ #8:
    http://www.oracle.com/technology/products/database/application_express/html/3.0_fsps.html#08

Maybe you are looking for