Posting twice on JSSE socket

Has anyone run into a problem of a POST request being sent twice on one call - the first time the data is sent without request for authorization and the second time with authorization information.
Using a net mon I see the two Posts in different frames which besides confusing Oblix is a performance drag.
Am using jdk 1.3x and the JSSE 1.0.3
thanks

The following has worked for me in the past:  URL orderURL = new URL(reqStr);
  HttpURLConnection cnx = (HttpURLConnection) orderURL.openConnection();
  cnx.setRequestMethod("POST");
  cnx.setRequestProperty("User-Agent", USER_AGENT);
  cnx.setRequestProperty("Content-length", _len);
  cnx.setRequestProperty("Authorization", "Basic " + _digestAuth);
  cnx.setDoInput(true);
  cnx.setDoOutput(true);
  cnx.connect();Replace "_digestAuth" with the Base64'd string of userid:pwd. Fill in "USER_AGENT" with whatever floats your boat. Make sure "_len" accurately represents the length of your content in bytes. Note that I use this for an HTTPS URL - but since I'm not trying to do anything HTTPS-specific with it, I only treat it as an HttpURLConnection.
Since it hits the server with the uid:pwd already in place, I don't get the 403.
Grant

Similar Messages

  • PayPal IPN Posting Twice

    I have a test page called order.cfm. This page posts to
    PayPal for payments. I have a file called ipn.cfm which waits for
    PayPals verification. However, it is being executed twice. The
    first time through it has all the form variables, but the sencond
    time it does not. How can I stop it from being posted twice. Below
    is my code:
    ORDER.CFM
    <form action="https://www.paypal.com/cgi-bin/webscr"
    method="post">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="business"
    value="mybusiness@mybusinesscom">
    <input type="hidden" name="item_name_1" value="Item Name
    1">
    <input type="hidden" name="amount_1" value="0.01">
    <input type="hidden" name="invoice" value="101">
    <input type="hidden" name="tax_cart" value="0.00">
    <input type="hidden" name="shipping" value="0.00">
    <input type="submit" value="PayPal">
    </form>
    IPN.CFM
    <cfheader statuscode="200" statustext="OK">
    <cffile action="append"
    file="#GetDirectoryFromPath(GetBaseTemplatePath())#IPN_log.txt"
    output="THIS PAGE HAS BEEN CALLED ON
    #DateFormat(Now(),'mm/dd/yyyy') & TimeFormat(Now(), '
    hh:mm:ss')#" addnewline="yes">
    <cfset x = GetHttpRequestData()>
    <cfset str="cmd=_notify-validate&" & x.content>
    <!---post back to PayPal for validation--->
    <cfhttp url="https://www.paypal.com/cgi-bin/webscr?#str#"
    method="GET" resolveurl="no">
    </cfhttp>
    <cffile action="append"
    file="#GetDirectoryFromPath(GetBaseTemplatePath())#IPN_log.txt"
    output="
    Paypal Says the transaction is: #CFHTTP.FileContent#
    Transaction status: #FORM.payment_status#
    Seller account: #FORM.RECEIVER_EMAIL#
    addnewline="yes">
    <cfloop index="TheField" list="#Form.FieldNames#">
    <cfset str = str &
    "#LCase(TheField)#=#URLEncodedFormat(Form[TheField])#">
    <cffile action="append"
    file="#GetDirectoryFromPath(GetBaseTemplatePath())#IPN_log.txt"
    output="#LCase(TheField)#----#(Form[TheField])#"
    addnewline="yes">
    </cfloop>
    <cfoutput>
    <!--- Payment verified --->
    <cfif CFHTTP.FileContent is "VERIFIED">
    VERIFIED<br />
    <!-- check that payment_status=Completed -->
    <cfif FORM.payment_status eq "Completed">
    Completed<br />
    <!-- check that receiver_email is your email address
    (that money went into your account -->
    <cfif FORM.RECEIVER_EMAIL eq
    "[email protected]">
    Paypal says the funds went into your account<br />
    <!--- Everything checked ok, add your action here
    (typically you would want to update your database here --->
    <cfelse>
    <!--- The receiver email doesn't match. Log this as
    possible fraud --->
    The receiver email, #FORM.RECEIVER_EMAIL#, doesn't match.
    </cfif>
    </cfif>
    <cfelseif CFHTTP.FileContent is "INVALID">
    <!-- The information is not valid, please investigate and
    trace invalid info -->
    Invalid Info<br />
    <!---Something that was purchased was invalid, either the
    order or the information provided. This is usually good to log in
    case someone is trying to purchase with stolen card numbers, etc.
    Here simply place a QUERY tag that insert the data above into a
    database.--->
    <cfelse>
    Error<br />
    <!-- ERROR -->
    <!---This usually means that something went wrong along
    the way, you can use this area to log it and keep for your
    records.--->
    </cfif>
    </cfoutput>

    What do you mean about entering details again, do you mean when they are on paypal?

  • This.submitForm posting twice !!!

    Environment:
    Acrobat Pro 9 with LifeCycle Designer ES 8.2
    OS - Windows 2003
    ToolKit used - Adding Javascript using PDFNet toolkit
    Control - Adding Javascript to "Button" Control
    Event - MouseDown [also tried with MouseUp]
    Symptoms: this.submitForm action posting the form data twice, other actions like app.alert('testing'); displays only one time.
    this.submitForm({
    cURL: "/testPage.aspx?IsXML=true#FDF",
    cSubmitAs: "XML",
    cCharset: "utf-8"
    How to aviod double post back? Eagerly waiting for the answer.
    Thank You
    inath

    Hi Paul,
    Thanks for your reply.
    Intially we had Button Control Submit Url and Submit type properties setup in LC Designer (allowed to edit only button properties in LC designer).
    (using button control to receive xml form data, whereas http submit button posting FDF format)
    Based on our requirement we are not allowed to edit/modify the pdf document in life cycle designer to add javascript for validation, navigation control and etc. So we adopted pdfnet toolkit to inject javascript into pdf document to meet our client side requirement. Using this tool, adding javascript to radio button group need to be refresh the field (RefreshFieldAppearence()) then only JScript trigger event will take place into action. When I use this method submit button is not triggering (not posting to the URL), alternate solution would be injecting JavaScript to button control to post document data to the server and noticed this.submitForm posting twice.
    Is there a way to notify the Event Manager or button control to post the document only once using javascript?
    -regards
    inath

  • Duty Posting has been posted twice

    Hello Experts,
    The start of Debugging Phase will be on Create Billing Document VF01.
    The issue of the user lies on the Accounting Document created upon Billing. On the Document Flow the Accounts were posted twice having the same Assignment Field.
    Instead of Reversing the Account, the system had double post the SIT Duty Account and COS Excise Duty.
    The expected outcome should be:
    50 MK1 22051 SITDutyUp Wh Spirit 34787653 -10,087.50 GBP
    40 MK1 45000 COS Excise Duty     34787653  10,087.50 GBP
    40 MK1 22051 SITDutyUp Wh Spirit 34787653 -10,087.50 GBP
    50 MK1 45000 COS Excise Duty     34787653  10,087.50 GBP
    And not: 
    50 MK1 22051 SITDutyUp Wh Spirit 34787653 -10,087.50 GBP
    40 MK1 45000 COS Excise Duty     34787653  10,087.50 GBP
    50 MK1 22051 SITDutyUp Wh Spirit 34787653 -10,087.50 GBP
    40 MK1 45000 COS Excise Duty     34787653  10,087.50 GBP
    Where can i start debugging this?what specific user exit can i debug to trace the problem.
    I appreciate your help guys
    Thanks!

    Dear Jan,
    Please do settings as per below SAP Note:
    *Note 551932 - Cancellation of Billing with Excise invoice
    Note Language: English Version: 2 Validity: Valid from 05.09.2002*
    Summary
    Symptom
    When a billing document is cancelled, the attached excise invoice also gets
    reversed. Again the user can go and cancel the excise invoice independently
    through CIN making double accounting of the reversal.
    More Terms
    Excise invoice, Cancellation of excise invoice, j1iH, VF11
    Cause and Prerequisites
    This is because of the new cancellation procedure of the billing.
    This happens because the accounting document for Excise invoice posting is
    linked to the document flow of SD. So when you cancel the billing all the
    related accounting documents are reversed.
    Solution
    This is because of the new Billing cancellation procedure. You have to
    implement the userexit mentioned in note 339928. This will ensure that the
    cancellation of excise invoice works as it used to do before the new
    cancellation procedure.
    In the userexit userexit_fll_xkomk1 in function rv_accounting_document
    create add the code attached below. The userexit is in rv60bfza. This will
    not get overwritten in upgrades.
    FORM USEREXIT_FILL_XKOMK1.
    rule_new_cancel = 'A'.
    ENDFORM.
    This will ensure that excise invoice related accounting document is not
    reversed at the time of billing. You may use the existing functionality to
    cancel the excise invoice
    *Related NotesNumber Short Text
    339928 New cancellation procedure cannot be deactivated*
    Regards,
    Barathi S.

  • F.05- Exchange  diff amnt getting posted twice in the same period

    We have an issue relating to the F.05 job run in SAP. This T-code will revaluate all the forex transactions to the specified rate only once during the month and post the differential entry to ensure that all the balances are restated.
    During the month of Mar 08, while we processed the F.05, we were not able to take the download in excel and hence we again processed F.05 inorder to extract the report. While we processed again F.05, the system has again posted another entry in SAP for the same amount as earlier.
    I am explaning with an example as below :
    First Run : System Entry
    Dr. Exch Difference Rs. 200
    Cr. Revaluation A/c Rs.(200)
    Second Run : System Entry
    Dr. Exch Difference Rs. 200
    Cr. Revaluation A/c Rs.(200)
    Net Imapact
    Dr. Exch Difference Rs. 400
    Cr. Revaluation A/c Rs.(400)
    Based on the above example, the system has processed the F.05 run twice and posted the amounts double. Let us know whether the F.05 needs to be processed only once a month (if yes, then how do we extract a report if needed later), or can we process multiple times in a month (in that case, there shouldn't be additional entries posted).

    Hi,
    Usually, F.05 only run once per month or per quarter. There are two kinds of FX run,
    1) balance sheet preparation valuation, it was selected if you check the box in the posting page. System would generate the FX posting, plus write a FX difference amount to each open item. And when you run the transaction 2nd time in next month, only the difference between 1st and 2nd time would be posted. Let's say if next month has the same valuation rate as 1st time, then, it would not have postings generated.
    2) Valuation without open item flagged, system would valuate the open items all the time as new, there is no flag in the open item which has been valuated. Therefore, every time when you run the valuation and postings would be generated no matter your valuation rate has been changed or not. And usually, would reverse the postings on the 1st day of next period.
    In your case, I think you are running the 2nd type since you have 2nd batch of postings generated which have the same value as the first one. Please check whether it is correct, because it would have different correction handling for each type.
    If you are the 2nd type, just simply reverse one of the batches documents by F.80 is ok.
    Regards,

  • Problems obtaining POST data / content using Sockets

    Hi,
    I have a servlet which needs to listen on a specific port for HTTP post requests.
    At present I have the following code:
    try{
       inputStream=client.getInputStream();
       streamReader=new InputStreamReader(inputStream);
       reader=new BufferedReader(streamReader);
    }catch(IOException e){
       //Write error entry in the log file.
    //Get the request and HOPEFULLY the params...
    try{
       System.out.println("encoder "+streamReader.getEncoding());
       for (String thisLine = reader.readLine();thisLine!=null;thisLine = reader.readLine()){
          if (thisLine!=null){
         System.out.println(thisLine);
    }     This produces the following....
    POST /sms HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-
    powerpoint, application/vnd.ms-excel, application/msword, */*
    Referer: http://localhost/test.html
    Accept-Language: en-gb
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
    Host: 127.0.0.1:9999
    Content-Length: 74
    Connection: Keep-Alive
    Cache-Control: no-cache
    I can see that the content is there 74 bytes of it, and it is encoded application/x-www-form-urlencoded, however I don't understand what I need to do to get the FORM information???????
    It works fine if it is an HTTP Get, however I have to get it to work with a POST.
    Can Anyone help??????????
    Thanks
    Glenn

    client is a java.net.Socket.
    Found some further information:
    I'm actually getting an exception I've just noticed from the log files see below:
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read
         at java.net.SocketInputStream.socketRead(Native Method)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.net.SocketInputStream.read(Unknown Source)
         at java.io.InputStreamReader.fill(Unknown Source)
         at java.io.InputStreamReader.read(Unknown Source)
         at java.io.BufferedReader.fill(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at java.io.BufferedReader.readLine(Unknown Source)
         at com.nokia.wap.server.IM.service.hd.run(hd.java:108)
    the offending line in my code from above is line 108:
    for (String thisLine = reader.readLine();thisLine!=null;thisLine = reader.readLine()){though i'm not sure if this is a code problem / when I close the html browser and hence cancel the http request?!
    sorry to add to the situation. :o(

  • Messages posted twice - ALWAYS

    My boss is getting all her emails twice? Is there a setting that is causing this to happen? I have her email being retreived on 3 computers but I don't think that would be a problem. Also sometimes Mail does make us enter our passwords multiple times. Until we restart our computers sometimes.

    .oO(iigot2bme)
    >I am getting ready to post my own art work on my web site
    and would like to
    >copyright my images.
    Your images are protected by copyright already.
    >Using a watermark isn't an option at this time.
    It's your best option. Use it.
    >I do have
    >the Java Script code to disable the right-click on a page
    Impossible. Modern browsers will prevent that.
    >but I have no idea
    >where to put it in the code.
    Please look through the archive of this group, this issue was
    discussed
    often enough. In short - there's always only one answer:
    Don't do it.
    > Also, I was told that a better option was to place the
    image in the background
    >of a cell and layer a transparent image on top so that if
    someone right-clicks
    >to save, they get an empty white box. How would I go
    about doing this? I know
    >you would use an HTML wrapper, but I can't figure out
    how.
    Why do so many people always want to make things much more
    complicated
    for their visitors than they have to be?
    > I'm also open to any other suggestions.
    What about
    <img src="/path/to/your/image.jpg" alt="..."
    title="...">
    Nice, clean, userfriendly, reliable. That's how it's supposed
    to be.
    Micha

  • [deleted because accidentally posted twice]

    Sorry, had accidentally posted this thread twice (so have deleted erroneous first one)!
    Message was edited by: arko2

    To Apple Discussions!
    My bundled software shows the same items as yours. However, it also included:
    *Photo Booth*
    Aperture Trial
    Office 2004
    iWork
    GarageBand & iDVD were greyed out.
    My MBP came pre-installed w/10.5.2 or 10.5.3.

  • HT4623 I update my new iphone with the data of my old iphone.  Now every email is post twice.  Can someone tell me how to correct that from happening?

    I purchase a new iphone.  I backed up my old iphone and moved the data to my new iphone.  My new iphone shows my emails twice every time a new email comes up.  How can I correct this issue?

    Just to make sure - You're saying you had backed up your iPhone 4. When you plug in the 3GS, and try to "restore" the data from the iPhone 4 backup onto the 3GS, you get that error? Check to see if the iOS version is up-to-date, and hopefully it isn't. It might also be because your iPhone 4 wasn't, and is causing some sort of problem.
    Good luck!

  • Colors Screwed Up (sorry if this posted twice)

    Last time I clicked post nothing happened so I'm not sure if this posted.
    Anyway, the light blue color used in Aqua in places like iChat buddylists (bg of every other person on list), Mail Sidebar, Aquasition........, for some reason used in color labels in finder, and other apps has somehow been replaced with ugly, plain old cyan.
    http://img419.imageshack.us/my.php?image=colorscrewupza6.png <-- Note that some of the parts of this picture are screwed up only because of poor quality. (sorry about that.) Those icons aren't messed up. Aquasition is a good example though, because it shows three common places where the color is used. 1)sidebars 2)lists 3)mixing colors (shown with that ad at the bottom which should be orange.)
    Things that led up to my problem are:
    1. Yesterday things were crashing and in the error message the unselected buttons were just like text; the button part was missing. *fixed after restart
    2. desktop icons weren't showing up until highlighted or single clicked. *fixed after restart.

    This is only in my account. I created a test account and everything is fine.
    In that case, it's very likely a corrupt preference file. Try deleting the following files from the ~/Library/Preferences/ folder in your user account.
    com.apple.desktop.plist
    com.apple.finder.plist
    com.apple.systempreferences.plist
    Actually, you could move those three items to the desktop. Restart and see if it fixes things. If not, you can then move them back and replace the new ones that were created. If it does fix things, you'll have to check and see if some of your other custom settings changed in the System Preferences, as the one .plist holds various settings.

  • I paid my bill on line, and it somehow posted twice, so that I overpaid by $443.57. I have spoken to customer service several times over the last 5 days, and was told that my refund request was "sent via TOPS form to the treasury department". Having recei

    >> Duplicate post removed to comply with the Verizon Wireless Terms of Service   Please see Bill Over-Payment <<
    Message was edited by: Verizon Moderator

    See my reply to the other identical post you made on this issue.

  • Genius can compile list but cannot locate songs from folder, any tips, sorry if this is posted twice, I'm very new

    Hi All
    Another atttempt at question, I'm new at this
    New computer, downloaded Itunes 10.5 imported songs from old folder from portable harddrive, all's well music plays, genius can compile list but can"t locate files from folder, I can do it 1 by 1 but it's very slow any suggestions
    regards
    Richard
    thanks

    I'm not certain, but it sounds like you are describing missing file syndrome where tracks show up with exclamation marks...
    This normally happens if the file is no longer where iTunes expects to find it. It may be a by-product of the way you moved the library. Other possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

  • Invoice Posted Twice

    Hi
    I have been posting an invoices using an interface but the invoices are getting posted for duplication.When I try to do manually for duplication it says document no exist with company code this is how it should work even for my interface.Can any please tell me what whould be the problem.
    Thanks In Advance
    Sri

    Hi
    When you say manually SAP gives you the error for duplication, that would mean that SAP is checking for some field. Normally if this is a vendor invoice, this would be the reference document number field in the accounting document.
    However, it looks like that when you are posting the invoice by the interface the SAP code that is doing the validation is either getting skipped or is not being invoked at all.
    You will need ABAP help to debug and identify the code that does the validation check when you post the invoice manually. Thereafter you will have to check if the interface posting is also going through the same code or not.
    Regards

  • Manual postings to PCA for previous periods seems to get posted twice

    Dear All,
    Actual postings to PCA are performed manually using a custom job from SA38. Postings were made in FI for all previous (closed) periods . After running those jobs for previous periods to transfer those entries, some companies and accounts are showing duplicate amounts or just a balance on comparison ledger and not in base ledger. How to correct this.
    Thanks a lot for your help

    Hi
    You will have to use 9KE0 or a custom job again to rectify this
    Ajay M

  • Socket POST connection close

    Hello all,
    I was wondering if there was a way to close a connection once the server writes back to the connection? I have this post:
    var conn = new Socket;
    //conn.timeout = 300;
    //conn.timeout = 10;
    conn.timeout = 2;
    var tempzzz = $.hiresTimer;
    conn.open(vHost);
    conn.write("POST " +vSubDir+"/update.asp HTTP/1.1\r\n");
    conn.write("Host: " + vHost + "\r\n");
    conn.write("Content-Length: " + data_string.length + "\r\n");
    conn.write("Content-Type: application/x-www-form-urlencoded\r\n");
    conn.write("\r\n");
    conn.write(data_string);
    var reply = "";
    reply = conn.read(999999);
    conn.close();
    var myTime = $.hiresTimer/1000000;
    alert("found reply "+myTime)
    When I run this code with the timeout set to 2 my alert states found the reply in 1.75 sec.
    When I run this code with the timeout set to 10 my alert states found the reply in 9.87 sec.
    When I run this code with the timeout set to 300 my alert states found the reply in 126.23 sec.
    Any idea how to close the connection and therefore make indesign active again the moment a server replies? I cannot use a get because I am sending a lot of data to the server which would exceed the URL size limit. Any information would be helpful, thanks!

    Hi,
    when you are talking about the weblogic level, connection pooling is implemented through configiration level,
    Please note we have 3 variables in configiration level :
    1. InitialCapacity
    2. MaxCapacity
    3. CapacityIncrement
    initialCapacity means the number of physical connections which will open during the starting of the Server.
    which can be initially 0, MaxCapacity means the number of maximum connection which can be opened. i mean maximum physical connections.CapacityIncrement means if it finds like the number of opened coonection is used then it will again open that much Capacity increment of connection. Please not this will not increase the MaxCapacity.
    when you are closing the cnnection using connection close methord, you are returning the connection to connection pool , which will increase the number of connection available in the connection pool.
    Regards,
    Anu Unnithan

Maybe you are looking for

  • Change fiscal year to 2006 in Asset Management : error in year-end closing

    SAP version: 4.0B Transaction Codes used: Year-end closing – AJAB, Fiscal year change – AJRW We are trying to change the fiscal year to 2006 in Asset Management. I tried to change the fiscal year to 2006 for the company code 0055 using transaction co

  • Is there a way to easily locate original files in iTunes after moving everything to an external harddrive?

    I recently moved my itunes folder (everything including library and music folders) from my computer harddrive to an external harddrive.  I was able to find the library and it opens, but the music (all 7000+ songs) gives me this error.  "The song "Bea

  • Tracking Vendor Payments Using WBS

    Hi Guys, We have a requirement to track the Payments made to Vendor Using the wbs Elemenet . As such we are just assigning the WBS as account assignment for the Purchase requisitions and Purchase orders ..But Venodr payments are made using Purchase o

  • IDVD "error during formatting"

    ok so this is my first movie...and I must say I had to figure a lot of things by myself...dispite all of the help from others and what seemed to work for others on forums, discusions, so on and so forth...it didn't help for me...so I ussually have to

  • JAVA_OBJECT support in Oracle 9i

    Hi, I'd like to find out if Oracle 9i supports java.sql.Types.JAVA_OBJECT as specified in JDBC 2.0. I'd like to store serializable Java objects directly in the database and let the JDBC driver handle the serialialization and deserialization. Is there