Http post with cgi script

Hello everyone,
I currently have a pl/sql web form that executes a cgi script... Instead of that cgi containing any html and printing a page, I would like to just grab the output and print it as text, wrapping it in my pl/sql headers and footers and the like...
I want to use util_http post to grab the cgi output, but am a little unsure how to do this - any tips??
Many thanks

See this link for help:
http://download-west.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89852/utl_htt4.htm#1003115

Similar Messages

  • Http post with parameters

    Hi All,
    We want to send an HTTP post with parameters,  and we are not sure how to do that.  We tried to do that like the code below,but we get the parameters in the body and not in the header ...
      DATA lo_client      TYPE REF TO  if_http_client.
      DATA lv_status_code TYPE i.
      DATA lv_reason      TYPE string.
      CALL METHOD cl_http_client=>create_by_destination
        EXPORTING
          destination  = 'ZRFC_TEST'
        IMPORTING
          client       = lo_client.
      lo_client->request->set_method( if_http_request=>co_request_method_post ).
      cl_http_utility=>set_request_uri( request = lo_client->request
                                        uri     = '?param1=value1' ).
      lo_client->send( ).
      lo_client->receive( ).
      lo_client->response->get_status( IMPORTING code   = lv_status_code
                                                 reason = lv_reason ).
    Thanks a lot,
    Tuvia.

    Hi,
    what do you mean by "parameters on the query". In any http request you can have two types of variables: POST or GET. The post variables are transferred in http header and you can add them using methods from my previous post. GET variables are transferred in URL. HTTP client has a method APPEND_FIELD_URL which can be used to add variable into URL string.
    Cheers

  • Start Virtual Machines with CGI-Scripts

    Hi @all,
    i have running some Virtual Machines on my Mac Mini Server that i want to start and stop dynamicly. I thought i can do that with CGI-Scripts. If i know the correct URL the VM will start or stop. The problem is that the script must be started with my user-id. The _www user cannot start the VM's. Is it possible that i run a CGI-Script with a different user-id? Or do you have an other idea how can i realise my requirement.
    Thank you very much
    BR
    Manuel

    thanks for your help Strontium90.
    I have compiled the binary and copied it in the path that apache wishes:
    ls -l /usr/bin/suexec
    -rwsr-x---  1 root  _www  18760 30 Mai 22:41 /usr/bin/suexec
    But when i restart the Apache Server the suexec would not be loaded. When i read the Apache Docu i should see an message an the error log that the Wrapper was loaded, but in my case the message did not appear.
    [Wed May 30 23:10:01 2012] [notice] caught SIGTERM, shutting down
    [Wed May 30 23:10:02 2012] [notice] Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.8 with Suhosin-Patch configured -- resuming normal operations
    Have you another tip for me?
    Thank you very much.
    BR
    Manuel

  • How would I do a http post with a xml file

    How would I do a http post with a xml file.
    I have a url called https://localhost:8443/wss/WSS and the XML file is sent as part of the HTTP POST body.
    How would I send this XML file when posting?

    most people just add feedback to the comments they've asked about already, rather than ignoring all the feedback and making a new post with the exact same information:
    http://forum.java.sun.com/thread.jspa?threadID=5247331&messageID=10020973#10020973
    If you want to add in an XML file to a POST command, you'd add it just like any other file you'd attach to a post request, especially (if you're request is the same as your last post) if you're just doing a jsp page. I'd do it something like this:
    <form method=POST ENCTYPE="multipart/form-data" action="https://rcpdm.mnb.gd-ais.com/Windchill/servlet/IE/tasks/DJK/fcsAddContentComplete.xml">
    <H3> File Name </H3>
    <input type=file name=filename>
    <input type=submit value="Do it!">
    </form>Then again, this solution has literally nothing to do with java, and you still need to make sure that your servlet knows what to actually do with that information you're sending it.

  • HTTPS post with certificate - certificate exception

    Hi,
    I am trying to create java program to do HTTPS post with certiticate.
    I get certificate in *.P12 file. When I open HttpsURLConnection I have received exception : javax.net.ssl.SSLException: No certificate authorities are registered for this secure application
    during startHandshake. I run java with properties
    -Djavax.net.ssl.keyStore=value -Djavax.net.ssl.keyStorePassword=value -Djavax.net.ssl.keyStoreType=pkcs12
    Shell I use JKS (trustStore properties) for server certificate ? Or I have to add some more code ?
    Thanks in advance
    M

    I am trying to create java program to do HTTPS post with certiticate.Do you mean that the server requires client authentication and the clients each have a keypair and signed certificate in their keystore?
    Shell I use JKS (trustStore properties) for server certificate?Yes. But you need to find out whether the server's certificate is self-signed or signed by a CA. If it is self-signed you will have to get them to export it, and import it into the truststore of each client. NB not the keystore of each client.
    Or I have to add some more code ?No.

  • Can I use third party web services that communicate via http-post with webui builder?

    Hi, 
    I have 5 computers (services) that are controlled via http-post. 3 of these services are implemented as labview webservices, 1 is labview socket (with python http-wrapper) and the last one is implemented with c# (lighttpd + cgi). 
    Can I use webui builder to controll all of them? Or, what is the simplest change so I can use webui builder?
    What I would like to do, is to change the current javascript-UI to labview-webui. For the interfaces implemented with labview webservices, this is not a problem. For non-labview services, I don't know if it is even possible.
    br,
    Juha

    To add to Mike's answer, the only caveat is that the server needs an appropriate clientaccesspolicy.xml file at the root level (http://yourserver/clientaccesspolicy.xml), or a completely open crossdomain.xml file, for the editor and built apps to be able to communicate with it. There's a help topic which explains this in the context of LV web services, but it's true for Web UI Builder to be able to communicate with arbitrary web servers also.
    Since it sounds like you control all the web servers in question, it shouldn't be too difficult to get this file in place, though.

  • One  last try... emulating HTTP POST with applet

    I am trying emulate the HTTP POST method for file uploading using an applet. More specifically, I am trying to upload raw data to a PHP script by making the PHP script think it is receiving a file when in reality all it is receiving is a series of headers, some other necessary info, the data, and a closer. The PHP is then supposed to save the data into a file.
    I have looked at eight or ten threads, explanations, and sample code in this and other forums that deal with this exact same thing, some even specific to PHP, read various documents on and explanations of HTTP headers and so forth, corrected every code error and possible code error I could find, and tried a gazillion variations, but still can't get the PHP script to think that it is receiving a file.
    As far as I can tell, communication with the server is being established, the server is receiving info and sending responses back, the PHP script is defrinitely being activated to do its thing, but the PHP is not recognizing anything that looks like a file or even a file name to it.
    The following information may be relevant:
    The PHP works perfectly with real files uploaded from real HTML pages.
    The server uses Apache.
    The server has no Java support (shouldn't matter, but otherwise I would be using servlets at that end instead of PHP).
    the applet is in a signed jar, and is trying to store information in the same directory that it came from.
    I am using the Firefox browser (shouldn't matter?) .
    I am hoping that someone knowegeable about this can look at the code below and point our any errors. I've also included the response I get from the server, and the PHP code. If there are no obvious errors, can you think of anything else tthat might be going wrong besides the code itsef?
    Please don't suggest I try alternate means of doing this or grab some working code from somewhere. I may very well wind up doing that, but I'm a stubborn bastard and want to find out what the #^%R$($ is going wrong here!!!
    Here is the latest incarnation of the applet code: All it does is immediately try to send some text to the PHP script in such a way that the script thinks it is uploading text within a file. it also displays the responses it gets from the server, including what the PHP script sends back.
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    public class test1 extends Applet{
    DataOutputStream osToServer;
    DataInputStream isFromServer;
    HttpURLConnection uc;
    String content = "This is a test upload";
    public void init(){
    try
    URL url = new URL( "http://www.mywebpage.com/handleapplet.php" );
    uc = (HttpURLConnection)url.openConnection();
    uc.setRequestMethod("POST");
    uc.setDoOutput(true);
    uc.setDoInput(true);
    uc.setUseCaches(false);
    uc.setAllowUserInteraction(false);
    uc.setRequestProperty("Connection", "Keep-Alive");
    //uc.setRequestProperty("HTTP_REFERER", "http://applet.getcodebase");
    uc.setRequestProperty("Content-Type","multipart/form-data; boundary=7d1234cf4353");
    uc.setRequestProperty( "Content-length", ( Integer.toString( content.length() ) ) );
    osToServer = new DataOutputStream(uc.getOutputStream());
    isFromServer = new DataInputStream(uc.getInputStream());
    catch(IOException e)
    System.out.println ("Error etc. etc.");
    return;
    try{
    osToServer.writeBytes("------------------------7d1234cf4353\r\nContent-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n\r\n");
    osToServer.writeBytes(content);
    osToServer.writeBytes("\r\n------------------------7d1234cf4353--\r\n");
    osToServer.flush();
    osToServer.close();
    catch (Exception e) {
    System.out.println(e);
    System.out.println("did not sucessfully connect or write to server");
    System.exit(0);
    }//end catch
    try{
    String fieldName="",fieldValue="";
    for ( int i=0; i<15; i++ )
    fieldName = uc.getHeaderFieldKey(i);
    System.out.print (" " + fieldName +": ");
    fieldValue = uc.getHeaderField(fieldName);
    System.out.println (fieldValue);
    }catch(Exception e){
    System.out.println ("Didn't get any headers");
         try{        
    String sIn = isFromServer.readLine();
                        for ( int j=0; j<20; j++ )
                             if(sIn!=null)
    System.out.println(sIn);
                             sIn = isFromServer.readLine();
    isFromServer.close();
    }catch(Exception e){
              e.printStackTrace();
    }//end AudioUp.java
    Here's the response I get back from the server:
    null: HTTP/1.1 200 OK
    Date: Sun, 03 Apr 2005 18:40:04 GMT
    Server: Apache
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: text/html
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    null: HTTP/1.1 200 OK
    <html>
    <head>
    <title>Handling uploaded files from an applet, etc.</title>
    </head>
    <body>
    No file was uploaded.
    </body>
    </html>
    The <html> and the "No file uploaded" message is simply what the PHP script sends back when it does not detect any uploaded file.
    Here is the PHP code on the server:
    <html>
    <head>
    <title>Handling uploaded files from an applet, etc.</title>
    </head>
    <body>
    <?php
    if ($testfile)
    print "The temporary name of the test file is: $testfile<br />";
    $uplfile=$testfile_name;
    $uplfile=trim($uplfile);
    print "The filename is: $uplfile<br />";
    if ($uplfile)
    copy ($testfile, "$testfile_name");
    unlink ($testfile);
    }else{
    print "No file was uploaded.";
    ?>
    </body>
    </html>

    xyz's sample code didn't work - PHP doesn't like the getallheaders line at all. I'm going back to the manual now.
    I had another thought. When I first started using PHP, I had problems with ordinary text field uploads from web pages because somewhere in the process, extra blank lines or spurious carriage returns were being inserted into the strings. For example, if I had a place where people could enter their name, password, and brief message, and tried to store the incoming strings in an array, I'd wind up with some thing like:
    name
    password
    brief message
    instead of:
    name
    password
    brief message
    Which played havoc when trying to read out information by counting lines.
    Anyway, the problem was solved by using the trim($string) function on all incoming strings, which I now do as a matter of course. I never could figure out why it was happening though.
    Do you think something like that could be happening here?? I mean, if spurious blank lines or carriage returns were being inserted where they shouldn't be, could that be screwing things up in this way? HTTP seems to insist on having new lines and blank lines inserted in just the right places.

  • HTTP POST with XML with HTTPService

    Hi,
    I need to be able to send an HTTP POST request to a server I
    have on Tomcat. In the body of the POST Request I need to have the
    following:
    <setView domain="someDomain" view="macro" />
    We have tried the following using the HTTPService, but with
    no such luck
    <mx:HTTPService id="setViewHTTPService" url="{serverURL}"
    resultFormat="object" contentType="application/xml"
    method="POST">
    <mx:request>
    <setView domain="abc" view="xyz" />
    </mx:request>
    </mx:HTTPService>
    Is there a way for us to specify the body of the HTTP Post
    using HTTPService, or a different class for that matter.

    var variables:URLVariables = new
    URLVariables("name=Franklin");
    //or variables.name = "Franklin";
    var request:URLRequest = new URLRequest();
    request.url = "
    http://www.[yourdomain
    request.method = URLRequestMethod.POST;
    request.data = variables;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, completeHandler);
    try
    loader.load(request);
    catch (error:Error)
    trace("Unable to load URL");
    function completeHandler(event:Event):void
    trace(event.target.data.welcomeMessage);
    This is in the help documentation and what I generally use.

  • Http post with bpel

    I am not sure if this forum is the right forum for my question but I post anyway to see if anyone can help
    me. I have created a very simple bpel using http post; all it does is to copy the input to the output.
    The output from my bpel looks like this:
    <myContact xmlns="http://xml.netbeans.org/schema/XmlPost">
    <ns0:LastName xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" />
    <ns0:FirstName xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" />
    <ns0:EmailAddress xmlns:ns0="http://xml.netbeans.org/schema/XmlPost">
    LastName=aa&FirstName=bb&EmailAddress=cc&OfficeAddress=dd</ns0:EmailAddress>
    <ns0:OfficeAddress xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" />
    </myContact>
    My question is why the EmailAddress element contains all my input data. I should expect the lastname element
    has 'aa', the firstname element has 'bb', the emailAddress has 'cc' and the officeAddress has 'dd'.
    Can someone please tell me what I do wrong in here.
    Thanks,
    ================================================================================================
    Here's my html page to call the bpel process:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="http://localhost:18182/XmlPostServiceService/XmlPostServicePort/submit" method="POST">
    Last Name: <input type="text" name="LastName" value="" size="10" />
    First Name: <input type="text" name="FirstName" value="" size="10" />
    Email Address: <input type="text" name="EmailAddress" value="" size="10" />
    Office Address: <input type="text" name="OfficeAddress" value="" size="10" />
    <input type="submit" value="post" />
    </form>
    </body>
    </html>
    ==================================================================================================
    Here is the xsd file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://xml.netbeans.org/schema/XmlPost"
    xmlns:tns="http://xml.netbeans.org/schema/XmlPost"
    elementFormDefault="qualified">
    <xsd:complexType name="MyContact">
    <xsd:sequence>
    <xsd:element name="LastName" nillable="true" type="xsd:string"/>
    <xsd:element name="FirstName" nillable="true" type="xsd:string"/>
    <xsd:element name="EmailAddress" nillable="true" type="xsd:string"/>
    <xsd:element name="OfficeAddress" nillable="true" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="myContact" nillable="true" type="tns:MyContact"/>
    </xsd:schema>
    =================================================================================================
    Here is my bpel file:
    <?xml version="1.0" encoding="UTF-8"?>
    <process
    name="XmlPost"
    targetNamespace="http://enterprise.netbeans.org/bpel/XmlPost/XmlPost"
    xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://enterprise.netbeans.org/bpel/XmlPost/XmlPost" xmlns:ns1="http://j2ee.netbeans.org/wsdl/XmlPostService" xmlns:ns0="http://xml.netbeans.org/schema/XmlPost" xmlns:ns2="http://enterprise.netbeans.org/bpel/LogServiceServiceWrapper" xmlns:ns3="http://service.log.com/">
    <import namespace="http://j2ee.netbeans.org/wsdl/XmlPostService" location="XmlPostService.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
    <partnerLinks>
    <partnerLink name="PartnerLink1" partnerLinkType="ns1:XmlPostService1" myRole="XmlPostServicePortTypeRole"/>
    </partnerLinks>
    <variables>
    <variable name="XmlPostServiceOperationOut" messageType="ns1:XmlPostServiceOperationReply"/>
    <variable name="XmlPostServiceOperationIn" messageType="ns1:XmlPostServiceOperationRequest"/>
    </variables>
    <sequence>
    <receive name="Receive1" createInstance="yes" partnerLink="PartnerLink1" operation="XmlPostServiceOperation" portType="ns1:XmlPostServicePortType" variable="XmlPostServiceOperationIn"/>
    <assign name="Assign1">
    <copy>
    <from variable="XmlPostServiceOperationIn" part="LastName"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:LastName</to>
    </copy>
    <copy>
    <from variable="XmlPostServiceOperationIn" part="FirstName"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:FirstName</to>
    </copy>
    <copy>
    <from variable="XmlPostServiceOperationIn" part="EmailAddress"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:EmailAddress</to>
    </copy>
    <copy>
    <from variable="XmlPostServiceOperationIn" part="OfficeAddress"/>
    <to>$XmlPostServiceOperationOut.outcome/ns0:OfficeAddress</to>
    </copy>
    </assign>
    <reply name="Reply1" partnerLink="PartnerLink1" operation="XmlPostServiceOperation" portType="ns1:XmlPostServicePortType" variable="XmlPostServiceOperationOut"/>
    </sequence>
    </process>
    ======================================================================================================
    Here's my wsdl file:
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions name="XmlPostService" targetNamespace="http://j2ee.netbeans.org/wsdl/XmlPostService"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="http://xml.netbeans.org/schema/XmlPost"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:tns="http://j2ee.netbeans.org/wsdl/XmlPostService">
    <types>
    <xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/XmlPostService">
    <xsd:import namespace="http://xml.netbeans.org/schema/XmlPost" schemaLocation="XmlPost.xsd"/>
    </xsd:schema>
    </types>
    <message name="XmlPostServiceOperationRequest">
    <part name="LastName" type="xsd:string"/>
    <part name="FirstName" type="xsd:string"/>
    <part name="EmailAddress" type="xsd:string"/>
    <part name="OfficeAddress" type="xsd:string"/>
    <!-- part name="request" element="ns:myContact"/ -->
    </message>
    <message name="XmlPostServiceOperationReply">
    <part name="outcome" element="ns:myContact"/>
    </message>
    <portType name="XmlPostServicePortType">
    <operation name="XmlPostServiceOperation">
    <input name="input1" message="tns:XmlPostServiceOperationRequest"/>
    <output name="output1" message="tns:XmlPostServiceOperationReply"/>
    </operation>
    </portType>
    <binding name="XmlPostServiceBinding" type="tns:XmlPostServicePortType">
    <http:binding verb="POST"/>
    <operation name="XmlPostServiceOperation">
    <http:operation location="submit"/>
    <input name="input1">
    <http:urlEncoded/>
    </input>
    <output name="output1">
    <mime:mimeXml part="outcome"/>
    </output>
    </operation>
    </binding>
    <service name="XmlPostServiceService">
    <port name="XmlPostServicePort" binding="tns:XmlPostServiceBinding">
    <http:address location="http://localhost:18182/XmlPostServiceService/XmlPostServicePort"/>
    </port>
    </service>
    <plnk:partnerLinkType name="XmlPostService1">
    <!-- A partner link type is automatically generated when a new port type is added. Partner link types are used by BPEL processes.
    In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
    A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
    <plnk:role name="XmlPostServicePortTypeRole" portType="tns:XmlPostServicePortType"/>
    </plnk:partnerLinkType>
    </definitions>
    ================================================================================================

    sure you send the right xml?
    what I would try is to copy the xml from the receive, paste and extend it, and see if this works . . these errors are mostly because of no namespace defined or such ..
    sure your element has the right namespace?
    hth clemens
    2)
    here is the xml for the following schema ..
    XML
    <ns1:AttributetestProcessRequest xmlns:ns1="http://xmlns.oracle.com/Attributetest">
    <ns1:input/>
    </ns1:AttributetestProcessRequest>
    schema
    schema attributeFormDefault="unqualified"
         elementFormDefault="qualified"
         targetNamespace="http://xmlns.oracle.com/Attributetest"
         xmlns="http://www.w3.org/2001/XMLSchema">
         <element name="AttributetestProcessRequest">
              <complexType>
                   <sequence>
                        <element name="input" type="string"/>
                   </sequence>
    <attribute name="service" use="required" type="string"/>
              </complexType>
         </element>
         <element name="AttributetestProcessResponse">
              <complexType>
                   <sequence>
                        <element name="result" type="string"/>
                   </sequence>
              </complexType>
         </element>
    </schema>
    it works design and runtime in 10.1.3.1
    Message was edited by:
    clemens.utschig

  • Make HTTP request with Idoc Script

    Is there a way to make an HTTP request to a remote host with Idoc?
    For example, in PHP you could do:
    file_get_contents('http://website.com/');
    Does Idoc have a similar method?

    "garry.b" <[email protected]> wrote in
    message
    news:gnndbf$i2q$[email protected]..
    > Hi,
    >
    > When using AS3 to generate an HTTP POST request:
    >
    > var service:HTTPService = new HTTPService ();
    > service.url = "
    http://localhost:9090/service";
    > service.method = "post";
    > // service.request = {itemId: "12345"};
    > service.send ({itemId: "12345"});
    >
    > my CherryPy web server complains about unexpected body
    parameters:
    >
    > HTTPError: (400, 'Unexpected body parameters: itemId')
    >
    > Using Firebug's Network display, its Post tab shows the
    following content:
    >
    > Referer:
    http://localhost:8080/log/log-1.0-SNAPSHOT.swf
    > Content-type: application/x-www-form-urlencoded
    > Content-length: 12
    >
    > itemId=12345
    >
    > which looks very strange to me as I would expect the
    Referer, etc.,
    > request
    > headers to show up in the Request Headers section and
    not as POST body
    > content.
    > While this could be some Firebug issue, I think the
    request message is
    > really
    > formatted incorrectly. When the web server gets the
    request, it does
    > recognize
    > 'itemId' as a body parameter but then complains that
    it's unexpected.
    >
    > I've googled the error message, studied HTTPService
    examples, spent
    > several
    > hours playing with it and am stumped. Tracy Spratt
    suggested setting the
    > service 'request' to force a POST and I tried it but am
    getting the same
    > error.
    > How do I make a POST request? Can I get POST data into
    the message body?
    > Stick with URL parameters only?
    What happens if you post to the same service using an html
    form?

  • HTTPS Post with XI

    Hi mates,
    I've a scenario that complains a RFC call to XI and then, XI makes a HTTPS Post on a specific server.
    I've created a HTTP Destination (type G) on SM59, set it to use SSL at Logon & Security tab, using the DFAULT ssl client(that i've created at STRUST transaction).
    The problem is when i try to TEST the connection, an successful textless message appears in the bottom and nothing happens! The server that will receive the request doesn't receive nothing when it occurs.
    I've debugged the testbutton of SM59 and i found that the problem occurs in cl_http_client, in the method IF_HTTP_CLIENT~RECEIVE, and the exception is http_communication_failure.
    Somebody faced the same problem?
    Is the Destinations created on the J2EE Admin Service avaliable to my XI Communication Channel?
    Thanks in advance.

    Hi Bruno,
    Try using the SOAP adapater instead of the plain HTTP way.
    These links might help:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/frameset.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a22024f79
    Coe

  • HTTP POST with Java? (Submit file)

    I want to submit a file to a web service using Java, specifically the JXXX Compiler Service (http://www.innovation.ch/java/java_compile.html). It seems like the page uses HTTP POST. How can I do this?
    Any help would be appreciated.

    I suggest you ask them you question.
    Have you read the instructions on how to use it.
    http://www.innovation.ch/java/java_comp_instr.html

  • HTTP POST with advance balance cookies

    Hello
    I am trying to keep a session sticky for 20 mins based on cookies. The problem is the application is using HTTP POSTs and the balance method only looks into the HTTP GET. How can I get the CSS to look into the HTTP POST?
    Any examples would be great.
    Thanks.
    Donagh

    Hi Gilles
    Thanks for your reply. I have obviously been misinformed about the POST and the GET. That is good but now I don't have an answer to my problem!! I am balancing on a cookie called ASP.NET_SessionId=
    Here is my config
    content Toughbook_PDAs
    vip address 10.40.21.28
    add service w2k-eolasprd1
    add service w2k-eolasprd2
    protocol tcp
    port 80
    string prefix "ASP.NET_SessionId="
    sticky-inact-timeout 20
    advanced-balance cookies
    active
    I have attached a trace and I am looking for
    ASP.NET_SessionId=1w0cql550wou04albf4jrjfoy45
    Hopefully my config is incorrect.
    Thank You
    Donagh

  • Http post with applet

    Hi, im really new to java, and i just read the previous posts about posting with java but i dont get it pretty well, and i am triyng to post a simple string, to get it in the php as a variable and use it. Can anyone help me please?

    I see, you read the errorstream in the catch block.
    Thanks for that tip, I will of course add it to my
    implementations :)
    My current one (without error handling from above)
    is the following (it works good so far)
    Maybe it helps someone, or maybe someone
    detects problems in it:
      *  Post the string document to the server from where the
      *  applet has been loaded.
      *  Then wait for the string response, suppose it is html
      *  and display it in a html editor pane.
      public boolean postDocument( final String document,
                                 final String documentParameter )
        System.out.println("postDocument(): starts.");
        boolean success = true;
        try
           // Establish a connection to the server:
           System.out.println("postDocument(): using basis URL: " + super.getDocumentBase().toExternalForm() );
           System.out.println("postDocument(): postURL " + this.postURL );
           URL url = new URL( super.getDocumentBase(), this.postURL );
           URLConnection con = url.openConnection();
           System.out.println("postDocument(): Received a URLConnection subclass of type " +
                                   con.getClass().getName() );
           con.setDoInput(true);
           con.setDoOutput(true);
           con.setUseCaches(false);
           con.setRequestProperty("CONTENT_LENGTH", "" + document.length() ); // actually not checked
           System.out.println("postDocument(): Set content-length to: " + document.length() );
           System.out.println("postDocument(): Getting an output stream...");
           OutputStream os = con.getOutputStream();
           OutputStreamWriter osw = new OutputStreamWriter(os);
           osw.write("RequestDocument=");
           osw.write( document );
           if( ( documentParameter != null ) && (documentParameter.length() > 0) )
            osw.write("&RequestDocumentParameter=");
            osw.write( documentParameter );            
           osw.flush();
           osw.close();
           System.out.println("postDocument(): After flushing the output stream...");
           System.out.println("postDocument(): Getting an input stream...");
           InputStream is = con.getInputStream();
           // any response ?
           InputStreamReader isr = new InputStreamReader(is);
           BufferedReader br = new BufferedReader(isr);
           StringBuffer htmlReply = new StringBuffer();
           String line = null;
           while( (line = br.readLine()) != null )
                 htmlReply.append(line);
             System.out.println("postDocument() response: " + line);
           } // while
           // error interception:
           if( htmlReply.length() == 0 )
                 htmlReply.append("<html><body>No reply from the server. An error has occured.</body></html>");
           String replyText = htmlReply.toString();
           this.showHTML( replyText );
           // and look, if the the applet has received a page redirection directive,
           // in which case, the applet will tell the browser to
           // redirect to that page:
           if( this.redirectionAddressAfterPost != null )
             this.gotoRedirectionPage();      
        catch(Exception e)
          success = false;
          System.out.println("*** postDocument(): Exception catched:");
          e.printStackTrace();
        System.out.println("postDocument() has ended.");
        return success;
      } // postDocument

  • Safari hangs and times out on pages with CGI scripts

    I don't know if this is a Safari problem or a system wide problem. I running OS 10.4.9 with Safari 2.0.4. When I try to load a page that begins with "http://cgi." it begins to load but hangs and eventually times out. Has anyone else run into this problem? I did a search of the forum but came back with no results.
    PowerBook G4   Mac OS X (10.4.9)  

    I don't know if this is a Safari problem or a system wide problem. I running OS 10.4.9 with Safari 2.0.4. When I try to load a page that begins with "http://cgi." it begins to load but hangs and eventually times out. Has anyone else run into this problem? I did a search of the forum but came back with no results.
    PowerBook G4   Mac OS X (10.4.9)  

Maybe you are looking for

  • Helo. How to get my security questions because i forget the question.

    Helo, How to get my security question because i forget the answer. Please help me.

  • Can you improve the speed of my CSV Reader and Writer?

    hi all, i'm trying to develop a CSV Writer and Reader. i have done a good work to implement the special character and quoting it, it's also support multi line value but it's incredibly slow. can someone help to make it faster? here it's how to use th

  • Resolution of my macbook changed to 256

    I was connected via bluetooth to another mac. When the other mac tried to send me a file via blue tooth the resolution of my computer changed to 256. I have tried to do many things to change it back and nothing works. Anyone has idea of what is happe

  • The function of upload in content management

    Hello ,all. i am a newer to the km ,and i am doing some exercises in the EP300, i find that could only download the file on the portal but couldnt upload on it ,why ? Can anybody give me some useful tips? Thanks in advance.

  • Arbitrary casting between interfaces is allowed?

    hi, i'm confused since i thought you could not do this interface ITreePlanter {      public void plantTree(); interface IMotorCycleRepairer {      public void repairMotorCycle(); class foo {      void bar() {           ITreePlanter a = null;