HTML Post method.

HI Experts,
Here my scenario is Proxy to HTTP.
My Receiver system need HTML Post method in place of XML file. Normally PI will send the XML but receiver system is expecting HTML POST method.
For this i have to do in configuration.
Receiver is expecting below format.
<html>
<head>
<title>Authorize</title>
</head>
<body>
<form action="https://developer.skipjackic.com/scripts/evolvcc.dll?AuthorizeAPI" method="post" >
     SerialNumber<input type="text" name="serialnumber" value="000014661324"><br />
     DeveloperSerialNumber<input type="text" name="developerserialnumber" value="464787130566"><br />
     Sjname<input type="text" name="sjname" value="TSYS Test"><br />
     street address<input type="text" name="streetaddress" value="2230 Park Ave"/><br />
     city<input type="text" name="city" value="Cincinnati"/><br />
     state<input type="text" name="state"  value="OH"/><br />
     zipcode<input type="text" name="zipcode"  value="45206"/><br />
     credit card account number<input type="text" name="accountnumber" value="4445999922225"/><br />
     CVV2<input type="text" name="CVV2" value=""><br>
     expiration month<input type="text" name="month" value="12"/><br />
     expiration year<input type="text" name="year" value="2012"/><br />
     amount<input type="text" name="transactionamount" value="1.00"/><br />
     order number<input type="text" name="ordernumber" value="123"/><br />
     phone<input type="text" name="shiptophone" value="8883688507"/>
  orderstring<input type="text" name="orderstring" value="Test1Test Item 13.001N||210.001N||310.001N||410.001N||510.001N~||" /><br />
     <br />
     <input type="submit" value="submit" />
</form>
</body>
</html>
Thank you
Srinivas

Hi Srinivas,
I have the same issue with Form submit using Java HTTP adapter.
It would be great if you can share your java mapping code or advise what should be the outcome of java mapping?
Should the result of java mapping be some kind of XML payload or some html code ?
Many Thanks,
Kind Regards
Ravi

Similar Messages

  • Trying to Imitate the html POST  method with an applet

    I am trying to imitate the POST method with an applet, so that I can eventually send sound from a microphone to a PHP script which will store it in a file on a server. I am starting out by trying to post a simple line of text by making the PHP script think that it is receiving the text within a POST-ed file. The reason I am doing things this way is in part because I am, for the time being, limited to a shared server without any support for servlets or any other server side java.
    The code I am trying is based in part on an old thread found elsewhere in this forum, concerning sending data to a PHP file by imitating the POST method:
    link:
    http://forum.java.sun.com/thread.jspa?threadID=530399&messageID=2603608
    someone named "harmmeijer" provided most of the answers on that thread. If that person is still around hope they take a look at this,also I have some questions to clarify what they said on the other thread..
    My first attempt at code is below. The applet is in a signed jar file and is trying to pass a text line to the PHP script in the same directory and on the same server that the applet came from. It is doing this by sending header information that is supposed to be identical to what an html form would send if it was uploading a .txt file with the line of text within it. The applet displays one button. When you press it, it sucessfully starts up the postsim method (defined at the end), which is supposed to send the info to the PHP script at the server.
    I have two questions:
    1) I know that the PHP script is starting up, because it prints out a few messages depending on what happens. However, the script does not recognize any file coming down the line, so it does not save anyting on the server, and prints out a message saying the no file was uploaded.
    Any idea what might be going wrong? I'm not getting any error messages from the applet. I've tried a few different variations of the 'header' information contained in the line:
    osToServer.writeBytes("--****4353\r\nContent-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n");
    The commented out line below it shows one variation (which was given in the thread mentioned above).
    2) You'll notice that I've commented out the two lines having to do with the input line:
    //InputStream isFromServer;
    and
    //isFromServer = uc.getInputStream();
    The reason is that the program crahes whenever I put the latter line in - to the extent that Opera closes down the JVM and then crashes when I tried to exit it.. I must be doing something horribly wrong there! I first tried using isFromServer = new DataInputStream(uc.getInputStream());
    becuase it was consistent with the output stream, but that caused the same problem.
    Here's the code:
    public class AudioUptest1 extends Applet{
    //There are a few spurious things defined in this section, having to do with the fact the microphone data is evenuatly going to be sent. haven't yet insterted code to get input from a microphone.
    AudioFormat audioFormat;
    TargetDataLine targetDataLine;
    SourceDataLine sourceDataLine;
    DataOutputStream osToServer;
    //InputStream isFromServer;
    URLConnection uc;
    final JButton captureBtn = new JButton("Capture");
    final JPanel btnPanel = new JPanel();
    public void init(){
    System.out.println("Started the applet");
    try
    URL url = new URL( "http://www.mywebsite.com/handleapplet.php" );
    uc = url.openConnection();
    //Post multipart data
    uc.setDoOutput(true);
    uc.setDoInput(true);
    uc.setUseCaches(false);
    //set request headers
    uc.setRequestProperty("Connection", "Keep-Alive");
    uc.setRequestProperty("HTTP_REFERER", "http://applet.getcodebase");
    uc.setRequestProperty("Content-Type","multipart/form-data; boundary=****4353");
    osToServer = new DataOutputStream(uc.getOutputStream());
    //isFromServer = uc.getInputStream();
    catch(IOException e)
    System.out.println ("Error etc. etc.");
    return;
    //Start of GUI stuff
    captureBtn.setEnabled(true);
    //Register listeners
    captureBtn.addActionListener(
    new ActionListener(){
    public void actionPerformed(
    ActionEvent e){
    captureBtn.setEnabled(false);
    //Postsim method will send simulated POST to PHP script on server.
    postsim();
    }//end actionPerformed
    }//end ActionListener
    );//end addActionListener()
    add(captureBtn);
    add(btnPanel);
    // getContentPane().setLayout(new FlowLayout());
    // setDefaultCloseOperation(EXIT_ON_CLOSE);
    setSize(250,70);
    setVisible(true);
    }//end of GUI stuff, constructor.
    //These buffers might be made larger.
    byte tempOutBuffer[] = new byte[100];
    byte tempInBuffer[] = new byte[100];
    private void postsim(){
    System.out.println("Got to the postsim method");
    try{
    //******The next four lines are supposed to imitate a POST upload from a form******
    osToServer.writeBytes("--****4353\r\nContent-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n");
    //osToServer.writeBytes("Content-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n");
    //This is the text that's cupposed to be written into the file.
    osToServer.writeBytes("This is a test file");
    osToServer.writeBytes("--****4353--\r\n\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
    }//end method postsim
    }//end AudioUp.java

    Hi All,
    I was trying to write a signed applet that helps the
    user of the applet to browse the local hard disk and
    select a file from the same. The JFileChooser class
    from Swing is what I used in my applet. The problem
    is with the policy file. I am not able to trace the
    exact way to write a policy file which gives a total
    access to read,write,delete,execute on all the drives
    of the local hard disk.
    I am successful in signing the applets and performing
    operations : read,write,delete & execute on a single
    file but failing to grant permission for the entire
    file.
    Any help would be highly appreciated.Which policy file are you using? there might be more than one policy file.
    also, u have to specify the alias of the signed certificate in the policy file to grant the necessary priviledges to the signed applet.

  • HTML POST method in a dynamic page

    Greetings Portalists,
    I have a basic question here. I need to pass the values of an html form (constructed within a dynamic page) to a procedure to process the users' inputs. The form is highly dynamic in terms of numbers of parameters, but we're talking about upwards of 200 text fields that require passing. Now, I realise that this in itself isn't a problem, and I've set this up without too much difficulty using method="POST" - but the called procedure in the form's action=... attribute seems to need to be publicly-executable for this scenario to work. For a production environment, I don't want to keep the PUBLIC grant on the procedure, but whenever I revoke it, the Portal throws me back a 404 Not Found when I submit the form.
    So my question is this -- how can I tighten the security around executing the procedure? Are there any best practices for this sort of situation (which I can't imagine are all that rare)?
    I've searched through many various web toolkit and Portal documents looking for an answer to this but to no avail, so any suggestions really would be highly appreciated.
    Many thanks.
    *.s.*

    Granting execute to public make a procedure accessible to portal_public (the schema) which contains the mappings to all the authenticated light-weight users. You can keep the public or portal_public grant for execution on the procedure and yet have a good control on who would be able to see your form. That would be based on your pl/sql logic.
    For instance, if you wish to keep it for only authenticated users (users who are in registered with your portal) or with any certain group of users, you can always apply a block containing code for checking their group memberships. If a user belongs to your desired group, you can let the desired logic expose to them, otherwise not.
    Please check the portal pl/sql api's that come with portal version you are using, for help.
    AMN

  • How to display html document returned by utl_http package (POST method)

    I am using oracle forms 10g, data base version is 10g.
    I have written a database procedure that calls utl_http package POST method and request returns an html document. How do display this html document from oracle form?
    Thank you
    Hema

    Here you have...
    A Full Web Browser Java Bean - Oracle Forms PJCs/Java Beans
    http://forms.pjc.bean.over-blog.com/article-26251949.html

  • Passing Parameters via Post Method from Webdynpro Java to a web application

    Hello Experts,
    I want to pass few parameters from a web dynpro application to an external web application.
    In order to achieve this, I am referring to the below thread:
    HTTP Post
    As mentioned in the thread, I am trying to create an additional Suspend Plug parameter (besides 'Url' of type String) with name 'postParams' and of type Map.
    But when I build my DC, I am getting the same error which most of the people in the thread have mentioned:
    Controller XXXCompInterfaceView [Suspend]: Outbound plug (of type 'Suspend') 'Suspend' may have at most two parameters: 'Url' of type 'string' and 'postParams' of type 'Map'.
    I am using SAP NetWeaver Developer Studio Version: 7.01.00
    Kindly suggest if this is the NWDS version issue or is it something else that I am missing out.
    Also, if it is the NWDS version issue please let me know the NWDS version that I can use to avoid this error.
    Any other suggestion/alternative approach to pass the parameters via POST method from webdynpro java to an external web application apart from the one which is mentioned in the above thread is most welcome.
    Thanks & Regards,
    Anurag

    Hi,
    This is purely a java approach, even you can try this for your requirement.
    There are two types of http calls synchronous call or Asynchronous call. So you have to choose the way to pass parameters in post method based on the http call.
    if it is synchronous means, collect all the values from users/parameters using UI element eg: form and pass all the values via form to the next page is nothing but your web application url.
    If it is Asynchronous  means, write a http client in java and integrate the same with your custom code and you can find an option for sending parameters in post method.
    here you go and find the way to implement Asynchronous  scenario,
    http://www.theserverside.com/news/1365153/HttpClient-and-FileUpload
    http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html
    http://digiassn.blogspot.com/2008/10/java-simple-httpurlconnection-example.html
    Thanks & Regards
    Rajesh A

  • HELP!!! Wierd CF 9.02 issue when "to many" form fields are posted in "post" method

    So we just installed cf9.02 64 bit on all brand new windows server 2003 machines and migrated all code over and we have run into the wierdest (and very dead on the water) issue, any form posting to a cf templae with a "large" amount of fields using method = "post"  barfs, works fine with method = "get" or with a smaller amount of fields.  Here are some "basic" examples I pulled out of our app: 
    https://dev1.mystudentsprogress.com/testposting/smallform.html --> this is using method = "post" and works fine with a small number of fields, click save and it calls a cf template that simply says "index.cfm here" 
    https://dev1.mystudentsprogress.com/testposting/formget.html ---> this is using method = "get" and also works fine, click save  and it calls a cf template that simply says "index.cfm here" 
    https://dev1.mystudentsprogress.com/testposting/formpost.html --> this is using method = "post" and it barfs, click save and you get an error 500 page  And once this happens the "next" call for even the succesfull pages returns a blank page i.e. go here: 
    https://dev1.mystudentsprogress.com/testposting/smallform.html and click save No go here again and click save: 
    https://dev1.mystudentsprogress.com/testposting/smallform.html 
    ...there is nothing in any of the CF logs indicating any kind of errors, it just flat barfs on forms with post method and a large amount of fields, clearly a MAJOR issue as our app has lots ot screens with lots of fields!!

    You might investigate the postParametersLimit and postSizeLimit values in your server's neo-runtime.xml file.  I suspect you'll need to increase the values for those two settings.  Remember to back up this file before making any changes. You will need to restart the CF server to apply any changes made to the settings in this file.
    See the CF 9.0.2 release notes for more information: http://helpx.adobe.com/coldfusion/release-note/coldfusion-9-0-update-2.html

  • Generate html post request from form9i applet

    I need to interact with a 3rd party credit card processing server form my form9i application.I need to create a html post request with all the input information encapsulated in it and also receive the http response and parse it and display an alert in the form(approved or rejected).Can I do that?
    any answer is going to help me greatly
    Sathi

    GET method may be the easier way. web.show_document('your_url?v1=123&v2=abc'); as of POST method, I guess you need JSP to do it, but how to do it from applet, I like to know too.
    getting back info, I used perl to read the html POST data on web server, then perl parses it and writes to a file on server, then use text_io or utl_file to read data into webform applet fields.
    The drawback I found that the cursor will not get back to webform applet from html pages. I tried to print every possible Javascript methods to wake up it, but it cannot get it.

  • How to send recomposed data in post method.

    Currently, i try to build up MVC user authentication. I used login.html as View, servletA as controller to invoked Model and servletB as Model. The servletB will return queried result to servletA then servletA will decide redirected to specific url.
    I has successful use the RequestDispatcher.forward(request, response) to post data from servletA to servletB. whereas i faced a trouble to post data back from servletB to servletA, which i unable put the queried result into request obj before post it back to servletA.
    Any genius recommendation about this? or Any method composed data to send via post method?

    Here's a quick rundown that might help:
    Use request.setAttribute() to put an item in request scope in a servlet before dispatching to another servlet or JSP.
    Use <useBean> tag in a JSP to read the data on the JSP that the servlet put in request scope.
    Alternatively, you can use request.getAttribute(), but the useBean is preferred.
    Use request.getParameter() in a servlet to read data that the <form> tag on the JSP page put in request scope.
    Use request.setAttribute() and request.getAttribute() to get send/get data between servlets (it could be request.getParameter(), but I dont think so).
    There is a RequestDispatcher.forward() and a RequestDispatcher.include(). I'm not sure what the differences are (you'll have to research it.
    In MVC, I have a single servlet for the controller (receive all url's, and dispatch to the appropriate JSP). I dont hava a separate servlet for the model. Instead, I instansiate a business object on the servlet, pass data to it, and let it do the calcuations. Then I have it return the data to the servlet which puts it in request scope for the JSP page when I dispatch to it. My MVC usuallyconsists of:
    JSP -presentation layer
    servlet - control layer
    business logic layer
    database layer (DAO).
    Each layer does not contain the functionality of one of the other layers (clean separation of concerns).
    Last note: Whereas you can use a servlet for the controller, a framework such as Spring or Struts is often used instead.

  • Redirect page with POST method in JSTL

    how to redirect page with POST method in JSTL.
    below is the code that i make, but the page redirected with GET method,
    so, the URL shown as http://localhost:8080/tes2/coba2.jsp?nama=saya
    how to hide the parameter, so it didn't show at the URL..??
    anybody help me..??
    server1 -> coba1.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>coba1</title>
    </head>
    <body>
    <c:url value="http://localhost:8080/tes2/coba2.jsp" var="displayURL">
      <c:param name="nama" value="saya"/>
    </c:url>
    <c:redirect url="${displayURL}"/>
    </body>
    </html>server2->coba2.jsp
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head>
    <title>coba2</title>
    </head>
    <body>
    <c:forEach items="${param}" var="currentParam">
            <li><c:out value="${currentParam.key}" />
                = <c:out value="${currentParam.value}" /></li>
          </c:forEach>
    </body>
    </html>

    There are other two way communications methods as well. One such would be:
    Server1Page1: Take response with parameters.  Use HttpURLConnection to make a request to DataInputServlet
                  on Server2 and send the parameters there with a POST operation
    Server2DataInputServer: Takes request with data in it and starts a new session.  Puts the data into the session and
                  returns the session id to the requester
    Server1Page1: Reads the response from the DataInputServer (the session id) and generates a sendRedirect to
                  Server2's display page using the session id.  Server1Page1 is now done.
    Server2Page1: Gets a request from the client with the session id, and pulls the parameters out of the session.  Then
                  can continue as normal.Server2Page1 can also do a quick refresh to itself not using the session id as well, which will keep the URL visible by the client relatively clean.

  • Open URL, use POST method in new window

    From a Java program, how do we open a https connection, basically a secured site, in a new window and pass some parameters to the link, using POST method?

    Hi
    Is JavaProgram a Applet or Servlet?
    Opening a new window directly from server,probably not possible? From your question
    what I understand is, A html page is displayed
    and when u click on a link opens a new window.
    The parameters to the link should be posted using POST method, again
    it is not possible this can be done only by appending
    "?name1=value1&name2=value2..."to the link
    Vinay
    [email protected]

  • How to use post method in j2me

    I used post method and when im about to receive the response from the servelt i get the output like
    str=<html><head><title>Apache Tomcat/4.1.24 - Error report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} H3{font-family : sans-serif,Arial,Tahoma;color : white;background-color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color : black;background-color : white;} B{ ................                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thanks supareno I have tried the weblink u hav given. It helped me a lot

  • HTTP POST method does not pass parameters to the server

    Hi ,
    I am using SSO using VSJ product and implemented using a filter.
    I have problems as below
    1. Every request to the web server will be intercepted by this vsj filter and if sso does not succeed it will send 403
    2. my system will detect 403 in web.xml and redirect to login page
    3. user key in username and password and log in
    4. after successful login set the HttpSession and redirect to homepage
    Problem is subsquent form submit / ajax call using "POST" method cannot pass any parameters to the servers ( parameters sent using POST will be null in the servers )  ? GET is okay
    If i comment out the vsj filter altogether , everything works as per normal.
    My Question is
    1. Is there anyway to overcome come ?
    2. Is there any method to clear off whatever this sso vsj has set ( clear cookies / start new browser instance / etc ) in order to forget the state
    Any idea?
    Thanks

    Yes.
    here to illustrate
    public MyFilter extends VSJAuthFilter
    *public void doFilter(){*
    *if(session.getAttribute("loginSucces") != true){*
    super.doFilter(); //call VSJ Auth filter to perform SSO in order to get User Principal populated.
    *}else{*
    chain.doFilter(); // normal filter
    My Filter only intercepts *.jsp and *.do
    Basically here is the pattern that i observe
    1. If i hit default url (homepage.do) for the first time it will trigger the super.doFilter() , it will then throw 403 and redirect to login.html , after success and go to homepage , subsequent POST parameter is missing
    2. if i hit the external login page directly just to simulate ( eg : login.html ) it wont trigger this filter , after success and go to homepage , subsequenet POST parameter is okay
    3. GET is always ok
    I am using weblogic server 10.x btw
    Thanks

  • HTTP Transformation using POST Method

    Hi, I will have to use POST method with header as application/json to get the results in http transformation. I downloaded the RESTFUL client utility from Chrome, to see how JSON would look like by passing parameters and the result is displayed as expected.  But I'm not sure how the URL to be constructed in HTTP transformation and appreciate if you have any suggestions. My URLL http://dev1.com/contract-api/contract/public/contractValidationMy input parameters:  {"hierarchies":[10],"properties":[18],"licId":123} If I use the above URL and parameters in RESTFUL client, I'm getting the output, but having difficulty in setting up the URL using HTTP transformation.  RegardsSelva

    Thanks Marc.
    Let me rephrase the scenario.
    I have an external application which is capable of sending information only in XML through HTTP requests. It does not send SOAP messages. I guess in this case, we would need to use the HTTP binding using POST method. Much like the sample at http://blogs.oracle.com/reynolds/2005/09/invoking_bpel_from_an_html_for.html which uses the GET method.
    In this sample reynolds is using the GET method. I have been trying to get the POST method to work.
    Regards
    John

  • Generate a HTML POST url and open the page.

    Hello,
    I need to generate a HTML POST url with 4 parameters.
    I tried like this.
    String URLtobeOpened = "<url>?param1=val1&param2=val2&param3=val3&param4=val4";
              HttpServletResponse resp = request.getServletResponse(true);
              try {
                   resp. sendRedirect(URLtobeOpened);
              } catch (IOException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
    This is showing me a login prompt, instead of directly logging me in.
    Also when I checked using HTTPWatch, the request is showing as a GET, but I need it as a POST.
    How to code it in the right way.
    Thanks
    Srinivas

    Here is what I tried sofar
    I am using this jar commons-httpclient-3.1.jar
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.methods.PostMethod;
              String url = "https://www.independentinc.com/scripts/insupport.exe/db_connect";
                try {
                 HttpClient client = new HttpClient();
                 PostMethod method = new PostMethod( url );
                   // Configure the form parameters
                   method.addParameter( "param1", "val1" );
                   method.addParameter( "param2", "val2" );
                   method.addParameter( "param3", "val3" );
                   method.addParameter( "param4", "val4" );
                   // Execute the POST method
                 int statusCode = client.executeMethod( method );
                 if( statusCode != -1 ) {
                    String contents = method.getResponseBodyAsString();
                    method.releaseConnection();
    //                System.out.println( contents );
                catch( Exception e ) {
                 e.printStackTrace();
                }I am getting a weird exception
    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at
    HttpClient client = new HttpClient();How to fix this exception...
    Is this the right approach at all...

  • Can i call a HTTP Post method in ABAP or XI?

    Hi All,
    Can you please let me know how to call a HTTP Post method in ABAP or XI?
    my HTTP Post is looks like (HTML form)
    <form action="http://111.111.111.1:8080/sample_url" method="POST">
    <table>
    <tr><th>applicationId</th><td><input type="text" name="applicationId" value="test"></td></tr>
    <tr><th>authCode</th><td><input type="text" name="authCode" value="test"></td></tr>
    <tr><th>message</th><td><input type="text" name="message" value="Hello"></td></tr>
    <!--<tr><th>version</th><td><input type="text" name="version" value="3.1"></td></tr> -->
    <tr><th>contractId</th><td><input type="text" name="contractId" value="test"></td></tr>
    <tr><th>receiverMobileNumber</th><td><input type="text" name="receiver" value="11111111111"></td></tr>
    <tr><td colspan="2"><input type="submit" name="send" value="send"></td></tr>
    </table>
    </form>
    I have a requirement to send a message to the above mention URL using the POST method.
    Please let me know the possibility of sending it from ABAP or XI adaptor.
    Thanks & Regards,
    Chaminda

    Hi Prateek,
    shoul we send the below code as the payload?
    <tr><th>applicationId</th><td><input type="text" name="applicationId" value="test"></td></tr>
    <tr><th>authCode</th><td><input type="text" name="authCode" value="test"></td></tr>
    <tr><th>message</th><td><input type="text" name="message" value="Hello"></td></tr>
    <!--<tr><th>version</th><td><input type="text" name="version" value="3.1"></td></tr> -->
    <tr><th>contractId</th><td><input type="text" name="contractId" value="test"></td></tr>
    <tr><th>receiverMobileNumber</th><td><input type="text" name="receiver" value="11111111111"></td></tr>
    Thanks.
    Chaminda

Maybe you are looking for