Need Help on HTTP Post ?

Hi @,
I need to perform HTTP Post from webdypro application some XML data. How can I do this , I tried searching forums and blogs but couldn't find a suitable solution or Help.
Is it possible or will have to go for any external apis to achieve the same?
Regards

Hi,
This is possible - though not directly with Exit Plug of Interface View Controller.
You need to use Suspend plug to pass parameters with http POST. See this thread and this document for further directions.
From thread above, Replace
Map postParams = new HashMap();
postParams.put("Key1", "Value 1");
postParams.put("Key2", "Value2");
postParams.put("Key3", "Value 3");
wdThis.wdGetWDSuspendResumeWindowController().wdFirePlugTestSupend("http://www.sap.com", postParams);
with
WDDeployableObjectPart deployableObjectPart = WDDeployableObject.getDeployableObjectPart(deployableObjectName, "TargetApp", DDeployableObjectPartType.APPLICATION);
String urlToTargetApp = WDURLGenerator.getApplicationURL(deployableObjectPart);
Map postParams = new HashMap();
postParams.put("Key1", "Value1");
postParams.put("Key2", "Value2");
postParams.put("Key3", "Value 3");
wdThis.wdGetStartWindowController().wdFirePlugStartAppSuspend(urlToTargetApp, postParams);
In target application, onPlugDefault, use this code to get the values for parameters.
String val1 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("Key1");
String val2 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("Key2");
String val3 = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("Key3");
wdComponentAPI.getMessageManager().reportSuccess(val1 + "   -   " + val2+ "   -   " + val3);
I've used this and it works.
Hope it helps.
Regards,
Sunaina Reddy T

Similar Messages

  • NEed help with HTTP Post

    I am doing an application to login to www.ideas.singtel.com website. There is no error but how do i know that my userName & password is verified?
    [codeimport java.net.*;
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.net.ssl.*;
    class demo_process implements Runnable, ActionListener
         private Thread on;
         //Create Output & Input Stream
         //Connection
         private URL url;
         private URLConnection connection;
         //Create The GUI
         demo client1;
         public void actionPerformed(ActionEvent e)
              String command = e.getActionCommand();
              //TC_MainGUI1 Action Performed
              if(command == "Log In"
              && !(client1.userName.getText().equals(""))
              && !(client1.password.getText().equals("")))
                   on = new Thread(this);
                   on.start();
                   //sms client2 = new sms();
              else if(command == "Log In"
              && !(client1.userName.getText().equals("")))
                   JOptionPane.showMessageDialog(client1,
                   "Invalid Password");
                   client1.userName.setText("");
              else if(command == "Log In"
              && !(client1.password.getText().equals("")))
                   JOptionPane.showMessageDialog(client1,
                   "Invalid User Name");
                   client1.password.setText("");
              else
                   JOptionPane.showMessageDialog(client1,
                   "Invalid User Name & Password");
                   client1.userName.setText("");
                   client1.password.setText("");
         public demo_process(demo client1)
              this.client1=client1;
         public void run()
              Thread thisThread = Thread.currentThread();     
              //Establishing the connection
              try
                   url = new URL("https://www.ideas.singtel.com/myideas/AccessController.jsp?");
                   connection = url.openConnection();
                   login();
              catch(IOException e)
                   System.out.println("Cannot get connected!");
                   System.out.println(e);
         public void login()
              try
                   //Send the Mobile no. & Password
                   connection.setAllowUserInteraction(true);
                   connection.setDoInput(true);
                   connection.setDoOutput(true);
                   connection.setUseCaches(false);
                   connection.setDefaultUseCaches(false);
                   //Establish the Input & Output Streams
                   OutputStream ostream = connection.getOutputStream();
                   String send = "userName="+client1.userName.getText()+"&password="+client1.password.getText();     
                   byte[] send2= send.getBytes();
                   ostream.write(send2);
                   ostream.close();
                   System.out.println(send2);
                   System.out.println("Echo: " + client1.userName.getText());
                   System.out.println("Echo: " + client1.password.getText());
                   InputStream in = connection.getInputStream();
                   InputStreamReader r = new InputStreamReader(in);
                   int c;
                   while((c = r.read()) != -1)
                        System.out.println((char) c);
                   System.out.println(c);
                   in.close();
              catch(IOException e)
                   System.out.println(e);
    }]

    If "form2.php" processes the POST request then you shouldn't be sending it to "myform.php" in the first place.

  • Need help with http POST concept

    hi i just started learning about HTTP..im trying to pass a value from a thin java client from command prompt through POST method directly to a destination (another java bean) without any HTML/jsp (no pages) .
    i've created a caller.java which is used on command prompt :
    java caller param1 param2
    then, this caller will actually point to a struts path on my server, (which i think is a servlet) and do proper processing.
    caller.java :
    public static void main(String[] args) {...
    String url = str + "/do_something/prog0001_getAnswer?" +
         "param1=" + args[0] +
    "&param2=" + args[1];
    URL server = new URL(url);
    HttpURLConnection connection =
    (HttpURLConnection) server.openConnection();
    connection.setRequestMethod("POST");
    connection.connect();
    System.out.println("connecting to server..... " + connection.getResponseMessage());
    then on servlet :
    httprequest's .getParameter("param1");
    httprequest's .getParameter("param2");
    to obtain the values.
    even if set my URL's instance (server) 's RequestMethod to POST, i'm still able to obtain the parameter values in the servlet? I thought POST method requires different way to pass the values to a servlet? i've been searching..the most i could get are examples with HTML's FORM's name attribute

    What method have you written in Servlet?
    service, doGet or doPost.
    If you have written service, then it does not matter what mthod you specified.

  • Need good example HTTP POST Business Service

    Hi guys,
    I've looked into the provided Reference Implementations in JDE for HTTP Post examples, but they only provided a business service (JRH90I13) and published business service (JPRH90I0) without any C BSFN to execute them. Does anyone have possible examples of how this works?
    Thanks in advance.

    Hi Gregory,
    In fact when i used route node to invoke a business service i modified "URL dynamically by setting the value in the pipeline variable $outbound", it worked here.
    Same i tried on Service Callout, it did not work. Also when we create a service callout action it expects us to select either "confugure soap body" or "configure payload document" followed by
    1) Request Document variable
    2) Response Document variable.
    What parameter should i set for above fields?
    Thanks,
    Anup

  • Need help on HTTP AAE Sender channel PI 7.4

    Hi Experts ,
    My scenario is sender system will be sending .xml file using HTTP request to Middle ware (SAP PI )  . Receiver is ECC System  where IDOC is generated  . Its Async Scenario .
    I have used HTTP AAE sender channel . Now need to some help on wheater to Select POST or GET Option to complete above requirement .
    Please suggest few points which option to select
    Regads,
    Khan

    Hi Aziz,
    Please refer the below blog for details and you can use the post method.
    HTTP Test Tool for SAP PI 7.3
    PI 7.30 HTTP Java Adapter Test Tools

  • Need help in getting posts deleted

    HI,
    I was trying to post a query problem whcih has been answered by Hugo earlier, but ran into  "Unexpected error" and am unable to delte the post now, or even access it.
    All post are in t-sql forum.
    Can you please help delete them. These are the 2 recent ones.
    Regards
    Akhil

    HI,
    I was trying to post a query problem whcih has been answered by Hugo earlier, but ran into  "Unexpected error" and am unable to delte the post now, or even access it.
    All post are in t-sql forum.
    Can you please help delete them. These are the 2 recent ones.
    Regards
    Akhil
    hi ,
    sign in , click delete and thats it  if it does not go report it , left below of a post and state in the windows that opens that you want it deleted , a mod can then do it when he or she has the time
    have a nice day and happy new yearhttp://www.microsoft.com/security + http://www.microsoft-hohm.com/default.aspx + http://www.getpivot.com/ + http://photosynth.net/ + http://seadragon.com/ + http://blogs.technet.com/mmpc + http://windowsteamblog.com/blogs/genuinewindows/default.aspx + http://technet.microsoft.com/en-us/sysinternals/default.aspx + https://www.microsoft.com/security/portal/Shared/Resources.aspx#rss + http://www.microsoft.com/security_essentials/ + http://onecare.live.com/site/en-us/center/whatsnew.htm + Plagued by the Privacy Center? Learn how to remove it > http://blogs.msdn.com/securitytipstalk/ + http://blogs.technet.com/ecostrat/ + http://memory.dataram.com/products-and-services/software/ramdisk + 50 Windows Tips > http://windowsvj.com/wpblog/2009/12/windowsvj-xclusive-release-windows-7-tips-tricks-ebook/ + http://windowsteamblog.com/

  • [SOLVED, Thanks]Need help with pacman post install

    Hi
    It took me a bit of time to install arch but i finally did it, turns out i just needed to disable ipv6. Anyway yesterday everything worked fine and now that i try to complete the install by downloading a wm suddenly pacman refuse to download anything, it says it can't synchronise.  Can anybody help pls ?
    http://www.hostingpics.net/viewer.php?i … roblem.png
    Last edited by oozernem (2015-05-09 08:15:51)

    Head_on_a_Stick wrote:
    Have you tried:
    # systemctl start dhcpcd.service
    If that brings your connection up, use:
    # systemctl enable dhcpcd.service
    https://wiki.archlinux.org/index.php/Be … uide#Wired
    Thanks m8, it fixed it
    Thanks to everybody else who replied in the thread.

  • Need help for a post-processing "trigger"

    Dear all,
    Without getting into much detail, I have a system that is simultaneously introducing a sinusoidal Force (F) and measuring the sinusoidal response (X) of a structure under resonance. I need to acquire the whole time signal, including the free decay response in the end (please find attached a sample picture of the time signal and the corresponding data file), so I cannot use a trigger during the measurement. During the stationary response it may be seen that the signal has a slight negative slope: that is due to a phenomenon of dilatation of my structure that is dissipating heat at the same time. 
    My problem is how to know exactly when my NI-USB 6216 DAQ has stopped the excitation force, which, in my sample waveform would be around 0.025s (I require an automatic process of identifying it).
    Is there any VI, filter or trigger function that might provide me that information?
    Thank you in advance for your help.
    Kind regards,
    Diogo Montalvão
    Attachments:
    R50_18um_controlo_40_60_temp_24_1_12_v0_time_16.txt ‏373 KB

    The brute force method:
    Can't you use another analog input channel and capture the excitation voltage?
    Or if you have a shaker with an amplifier that provide a current monitor output you can capture the excitation current and might find that due to the voltage control some amount of force is still introduced after setting the control voltage to zero   and you might have to implement a system model that include the shaker and the output impedance of your amplifier :0
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • Need help with HTTP keep-alive

    Hi folks!
    I have this very simple web server and I would like to add keep-alive support. I've been trying to get my head around it for a while and could need some help (I found this question in the archive, but those replies didn't help)...
    This is my starting point (stripped down to the basics):
    /* A listener thread that accept incoming requests by creating new request handlers */
    public class HTTPListener implements Runnable
        private ServerSocket serverSocket;
        public HTTPListener(int port)
            // Try to create a server socket on specified port
            try
                serverSocket = new ServerSocket(port, 0);
            catch (IOException ex)
                System.err.println("Oops!");
        public void run()
            while (!Thread.interrupted())
                try
                    // Listen on server socket until a request arrives
                    Socket s = serverSocket.accept();
                    // Create handler to service request
                    RequestHandler h = new RequestHandler(s);
                    new Thread(h).start();
                // Server socket closed when listening
                catch (SocketException ex)
                    Thread.currentThread().interrupt();
                // Failed to close socket or failure during server socket accept
                catch (IOException ex)
                    System.err.println("Failed to accept request");
            try
                serverSocket.close();
            catch (IOException ex)
                System.err.println("Hmpf...");
    /* Handler that prints out requests and always answers with status 200 */
    public class RequestHandler implements Runnable
        private Socket socket;
        public RequestHandler(Socket s)
            socket = s;
        public void run()
            System.out.println(">>> New request handler");
            try
                BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                String str;
                while ((str = reader.readLine()) != null)
                    System.out.println(str);
                sendDummyReplyWithKeepAlive();
                reader.close();
                socket.close();
            catch (IOException ex)
                System.err.println("Crap, got an exception!");
    }When I run the server (which in reality has a little more to it) I never get more than one request printed for each ">>> New request handler", which is not surprising!
    Now, with keep-alive support I expect to get consecutive requests from the same client printed by the same handler instance. What I have to do (as I've understood from my readings) is to modify the while loop in the request handler that reads from the socket so that it spins until the connection is closed by the client (or a keep-alive timeout occurs) and blocks while there is nothing to read.
    Perhaps I'm being stupid now, but how do I actually do this?

    ejp wrote:
    and also an incorrect implementation of the timeout period. This code will still wait forever if no data arrives.You're right... actually I didn't mean to put that while loop there! What I meant was simply
    if (!reader.ready())
        wait(keepAliveTimeout);
    if (!reader.ready())
        break mainLoop;
    // If we get here there is a new request to read...and I agree that it's ugly, that's why I'm asking you guys for help!
    setSoTimeout() is of course a way to go... didn't think of that although I have kind of already added it to my code but with a different timeout. Thanks!
    Last question then is:
    does reader.readLine() block like reader.read(), or do I have to use the latter?
    I would test for myself I could, but at the moment I can't...

  • Need help Reporting a post

    Hi. I'd also like to get some assistance in reporting a message and ultimately having it removed. The user has intentionally posted a potential hack for a piece of software and is encouraging other users to steal. If someone with some points could report it for me, I'd be grateful.
    Last Message: https://discussions.apple.com/message/23784678?tstart=0#23784678
    Thread: https://discussions.apple.com/message/18249268#18249268
    Username: William Stanton

    Twice, acually.
    Cheers, mate.

  • Need help on no post screen/ all outboard gadgets work

     1st-time building from scratch. when i power up, all the right fans and devices run that are supposed to, but no signal to monitor and d-bracket does  not light up, cpu fan going, vga fan right, both opticals going. had thought 480w would have been enough to power everything.   

    thanks, c things are better and wierder, posted and started to make my bios adjust.  only had cpu, psu, dvd's, vga, and hdds hooked up,
    sata 1& 2 hdds were reported as IDE 3 & 4.  2nd (slave) dvd not reported. couldn't unlock the raid menu to configure so I partitioned hdd 1 and loaded
    windows for the heck of it.  power readings were:  Vcore 1.34-1.37,   +3.3v  3.42,     +12v   12.09,   +5.0   5.13,    batt   3.25,   +5vsb   5.21
    Do I need a new psu to power the other cards and fans/mods?  good call there, now more chipper about the beast.

  • Need help on Tuxedo11g post installation

    Hi,
    I've installed Tuxedo 11g in Linux 5.3. Can anybody please tell what is the post installation steps to complete the configuration.

    Hi,
    I'm assuming you are using the workstation protocol. If so, after installing the client, you need to set the "standard" Tuxedo environment variables. There should be a script installed in the TUXDIR (where Tuxedo was installed) called $TUXDIR/tux.env that will set all necessary environment variables except WSNADDR. WSNADDR needs to be set to point to the host and port that the WSL is listening on. Also, your client application needs to be built using the -w switch to the buildclient command in order to use the workstation protocol.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Need help for http services

    Hi All,
    I am getting results from XML using http services
    see bellow
    EX:
    <mx:HTTPService id="simpletestFood"
    url="assets\foodlist.xml"
    result="foodList=simpletestFood.lastResult.list.food"/>
    But now i need to get data from java .
    So Could you please suggest me , how to integrate with java
    means in http service how to give my java(POJO) class--> methods
    name.
    And Please send me sample code for this.

    Here is a tutorial on the remote object service. HTH.
    http://www.flexlive.net/?p=92

  • ME_PROCESS_PO_CUST - Need Help on Methods POST, PROCESS_HEADER

    Hi,
    I will explain the requirement and my approach and the problem i am facing.
    During save of Purchase order, a confirm popup should be shown and according to the user confirmation, it will hit a Z Field in CI_EKKODB.
    For this, i implemented the solution in BADI ME_PROCESS_PO_CUST and Method POST. Even though i use SET_DATA to set the data, it never updates the database table.
    For testing purpose, i put the code in Method PROCESS_HEADER, the SET_DATA worked fine and it finally updated the database table. So, I thought of implementing the solution here by checking sy-ucomm and executing only during SAVE of PO. But here my problem is, Not always all the time this PROCESS_HEADER method executes. For example, If you change any header data and Press "Enter", then the "PROCESS_HEADER" is called. and then immediately without changing any data and you Press "SAVE", the Method PROCESS_HEADER will not be called.
    Could you please anyone suggest me either how to forcefully call the PROCESS_HEADER method everytime or is there any other way to set the Z Data into the database table.
    Thank you in advance.
    Karthik

    I have the same issue. Do you know how you solved ths issue? if so can you please post the reply. Thanks

  • Need help. first time posting

    i was updating my iphone and it came unplugged,so then i had to restore it. After the restore all my numbers were gone. is there anyway i can get them back? ANY help will be greatly appreciated.
    thanks for any help.

    OPEESE wrote:
    i was updating my iphone and it came unplugged,so then i had to restore it. After the restore all my numbers were gone. is there anyway i can get them back? ANY help will be greatly appreciated.
    See if you can find them in your PC, likely somewhere in 'MyDocuments'. If they are there (e.g., a prior backup version) you can probably put them somewhere that can be found by iTunes. Otherwise ...
    Phil

Maybe you are looking for

  • Setting up email on my iphone

    I am setting up email on my iphone.  A window came up stating it cannot connect, do I want to try without SSL.  I figure from some of the discussion out there I probably need SSL as a security for my iphone.  So..now I am at the part where it asks me

  • How I transfer the music from iTunes to the computer?

    Hi I was wondering, how I transfer the music from iTunes to the desktop computer? I would like that as back up on another device.

  • Passing Parameters between Java Portlets

    i hava java portlet and it does a search... the search result appears within the portlet region.... but i want to be able to click on the search button and take it to another portal page and have a portlet that contains the result of the porltet... h

  • IP address for standalone PC hosting vm's

    I'd never thought about this until recently. For a few years now I've been using VMworkstation (and now moving to VirtualBox) to create a virtual computer lab on my laptop. Built a variety of Windows and Linux virtual guests. when the linux guests we

  • What is the best practice for implementing scheduled tasks in ADF?

    Hi experts, I'm using Jdev 12.1.3, and I'd need your advice in how implement scheduled tasks. We have today a button that generates a Jasper pdf report correctly. The new requirement is to schedule a task that automatically send this pdf via email on