Need help : how to send 3 parameters over http using Java POST

I am trying to sending some data to agency company over http using Java POST
They need 3 parameters and some contents like below
1. Cmd : cmd=_RequestInsertNewLead
2 Live : False
3 XMLData : 3C%3Fxml+version%3D%........
I already have XML done ,but I don't know how to send these guy over http
is that like
this.out = new DataOutputStream(os);
out.writeBytes("Cmd");
out.writeBytes(" cmd=_RequestInsertNewLead");
out.writeBytes(" Live ");
out.writeBytes("False");
anyone could give help :)

First of all, are you getting any exception?
You didn't put much logging information in your code.
You can also try this.Instead of doing sos.println(".....") try to build the output string using string buffer.
Like:
StringBuffer sb = new StringBuffer();
sb.append("Some output");
sb.append("More output");
sos.print(sb.toString());
sos.flush();Let me know if this works.

Similar Messages

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to send results to actionscript using java

    Hi,
    I do RPC using HttpService.
    In my situation, I need to send results from Java code to
    Flex Action script. I have defined a Java Servlet receiving data
    from Flex application, then it processes with the data, finally the
    Servlet is supposed to send some feedbacks to the client(Flex).
    My question is that how can I define codes in doPost() method
    that the following function will get "result" from the Java side.
    public static function httpResult(event:ResultEvent):void
    var result:Object = event.result;
    //Do something with the result.
    if (result.toString() == "success")
    resultMessage.text = "Login Success";
    resultMessage.text = "Invalid User";
    }

    Hi,
    Try this: If you are sending a simple text as "sucess" or
    "error" after doing some process in the servlet..
    set your content type to "text/plain" and simply
    println(<data to be sent>);
    In the flex application, get the result text that the servlet
    send using:
    resultString = String(httpUrl.lastResult);
    where httpUrl is the id of the HTTPService. Now you can
    compare what the servlet send by:
    if(resultString=="sucess") {
    Hope this solves your problem :)
    Regards,
    -- Abdel Olakara
    http://olakara.googlepages.com
    http://technopaper.blogspot.com

  • How to send results to actionscript using java via HttpService

    Hi,
    I do RPC using HttpService.
    In my situation, I need to send results from Java code to
    Flex Action script. I have defined a Java Servlet receiving data
    from Flex application, then it processes with the data, finally the
    Servlet is supposed to send some feedbacks to the client(Flex).
    My question is that how can I define codes in doPost() method
    that the following function will get "result" from the Java side.
    public static function httpResult(event:ResultEvent):void
    var result:Object = event.result;
    //Do something with the result.
    if (result.toString() == "success")
    resultMessage.text = "Login Success";
    resultMessage.text = "Invalid User";
    }

    I advise having your servlet build an xml string, maybe put a
    status attribute in the root tag, like this:
    <myroot status="success">
    <mytext>Some text</mytext>
    </myroot>
    and return that to the calling Flex client. XML is easier to
    work with than Object. On the HTTPService tag, set
    resultFormat="e4x", and it will return plain XML.
    then in the handler, do:
    var xmlResult:XML = XML(event.result); //this will already be
    the myroot node
    //Do something with the result.
    if (xmlResult.@status== "success") //reads the status
    attribute
    resultMessage.text = xmlResult.mytext.text(); //get the
    value of themytext text() node
    resultMessage.text = "Error";
    Tracy

  • How applet transfers data over HTTP

    hello,
    I found out that you cannot you sockets in applets (cannot create a socken on the client side) so I want to know how to transfer data over HTTP. What class should I use or some short example would be of much help.

    You can make connections back to the same server the applet came from. If you need to make connections directly to other servers, then you can sign the applet, which will lift the security restrictions (provided users accept your signature as trustworthy).

  • Mail server not responding. Need help how to verify my account

    Mail server not responding. Need help how to verify my account

    There are instructions on this page for how to create a new account without giving credit card details (the instructions won't work with existing accounts) : http://support.apple.com/kb/HT2534
    Unless an account is created via those instructions then credit card details will need to be entered on it before the account can be used.

  • Need help how to use itunes card to download music

    Need help how to use itunes card to download music

    If you want to add the iTunes card to your account, then in the iTunes app on the iPad you should be able to scroll to the bottom of the Music tab and there should be a Redeem button - there is more info here : http://support.apple.com/kb/HT1574

  • My Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    Carlos-
    Start by signing out and back in to see if it will see the subscription: 
    How to sign in and sign out of creative cloud (activate/deactivate)
    If the apps are installed fine and close after launch see this link:
    CC applications close immediately after launch
    If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise  you on a solution
    Pattie

  • Need help in modifying mapping parameters of out the box mapping

    Hi There,
    I am a new bee to dac.
    Need help in modifying mapping parameters of out the box mapping, which is invoked by DAC task.
    We got a requirement to edit mapping parameter. When I go and see parameter under mappings tab in a mapping, I could not see any values in it.
    But when I set any value, and validate it. It is successful.
    Is it right way to do it?
    What my concern is, When I initially go and see parameter values under maapings tab in a mapping, they are blank.
    Where is it storing these values?
    Thanks,
    Rag

    If you modify mapping then u have to create new task in dac and dac itself craete parameter file at run time. if you want to add more parameters then do it in dac system parameters tab.
    Thanks
    Jay.

  • Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Thanks

    Hi, I have this green mark (with pointing arrow looks like a link) on some words show on my window screen when I open a web page, I wonder if it is a virus link or such. Need help how to get rid of it. Here's the example:
    WING
    GAMES
    MAJORITY
    Thanks

    If the third link you posted (the link containing the word "majority") does not look like the following then you inadvertently installed adware.
    That particular page should resemble the following:
    The word "majority" in the third paragraph should not be a link and should not have the green icon associated with it.
    To learn how this may have occurred, and how to prevent it from occurring in the future, read How to install adware
    Most so-called "news" websites are nothing more than entertainment outlets that cater to prurient interests, and contain advertisements that leave the user about three clicks away from installing junk. If you decide to frequent those websites, Safari's "Reader" feature helps minimize that exposure.
    Try it:

  • How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help

    How can I get a stripped screw out of the bottom of my iPhone?? I need help, How can I get a stripped screw out of the bottom of my iPhone?? I need help

    Try asking at ifixit.com. The iPhone is not considered user servicable. You're not going to get much help on an Apple sponsored forum.

  • I have I pad one use iOS 5.1.1 i want update to iOS 8 itry a lot time but no possible  i need  help how ican doit

    I have I pad one use iOS 5.1.1 i want update to iOS 8 itry a lot time but no possible  i need  help how ican doit.

    The iPad 1 can not be upgraded beyond 5.1.1.

  • I need help, How could I add Aliases to Local Administrator account via terminal commands???

    I need help, How could I add Aliases to Local Administrator account via terminal commands???
    I want to use commands to add alias for existing administrator account remotly by using ARD.
    Thanks.

    Hi,
    a Windows Domain Controller does not have any local user or groups. So you might add the user to the admin group at Domain level.
    B RGDS,
    Gregor
    Edited by: Gregor Gasper on Jan 9, 2009 1:44 PM

  • Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    Hi I am new on the Mac, I need help, how can I run my apps from my library on my Mac Pro?  All my apps I was used in my iPad, thanks guys!!!!

    The Mac OS X and iOS versions are separate products

  • Hi..i am trying to login i message but i cant access ,it thing i forgot my password number, please i need help,how i can reset new password number. please i need help.

    hi..i am trying to login i message but i cant access ,it thing i forgot my password number, please i need help,how i can reset new password number. please i need help.

    Go here.
    Good luck,
    Clinton

Maybe you are looking for

  • Right way to add graphic sidebars around the container or any div for that matter?

    *** Note sidebars maybe the wrong term and confuse you here If i want graphical sidebars around both sides of the main container div..... so that if i had a margin of say 20px on each side and the sidebars are maybe 8px in width, well i can create a

  • Windows 7 and Networks with High Latency

    We are currently trying to rollout Windows 7 on our network to replace XP but have encountered an issue whereby we have remote clients that access the network over high-latency satallite links (BGAN and Vocality/Satellite). The latency of the links (

  • Power problem with Time Capsule 2 To

    Ma Time Capsule ne redémarre plus, ce n'est pas la première fois mais cette fois, je crains que ce soit définitif. Elle n'est plus couverte par la garantie et j'aimerais savoir si il est possible de la réparer ou échanger à moindre frais. Merci d'ava

  • Safari using Keychain ?s

    I'm trying to understand the auto fill of internet forms. Is there any site/article that explains for the curious this topic and any security issues? I think I understand that Safari uses Keychain to store IDs and passwords and uses past history to f

  • How do I get a file with just my bookmarks in a readable and usable form?

    I want a file with all my bookmarks, a file in html format or a file that I can have in a word document. I don't want to have to go through my entire bookmarks display, clicking on each one and copy/pasting the associated URL into a word document. I