Post Transfer to ASP

Hi,
I am having trouble sending a username field to a url using post. My code is listed below:
HttpConnection http = null;
        OutputStream oStrm = null;
        InputStream i = null;
        boolean ret = false;
        // Data is passed as a separate stream for POST (below)
        String url = "http://MYWEBSITE/VerifyUsername.asp";
        try {
            rMUVHttpConnection = (HttpConnection)Connector.open(url);
            oStrm = rMUVHttpConnection.openOutputStream();
            // Client Request
             rMUVHttpConnection.setRequestMethod(HttpConnection.POST);
             rMUVHttpConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
            rMUVHttpConnection.setRequestProperty("Connection", "close");
            rMUVHttpConnection.setRequestProperty("u", username);
            byte data[] = ("u=" + username).getBytes();
            oStrm.write(data);
            oStrm.flush();
\\ InputStream Code is workin fine as it worded when using get to send dataMy asp file is simple javascript which is supposed to pick up the username value and then goes and does various checks.
The beginning part of this file is shown below:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
function quoteReplace(psString)
var lsRegExp = /'/g;
return String(psString).replace(lsRegExp,"''");
     //username_ = (quoteReplace(Request.QueryString("u")));
     username_ = (quoteReplace(Request.Form("u")));I know there is a problem with the way I'm doing POST as I had no problems with the GET method, but I dont want to use this as its not as secure as POST (right...?). Any help would be appreciated, the solution would be even more appreciated!!
Thanks,
Harry
p.s. can anyone tell me why is it useful to use urlencode before sending the url to the asp page? If so why...?

hi,
I want develop an application using ASP and J2ME. I am familiar with servlet and jsp but donot know nothing about ASP.
Can you please give me some url's which were pointing to tutorials about this topic or else any example about this was more useful please help me
thanks in advance
lakshman

Similar Messages

  • JPEG Corruption post transfer over USB External Drive (usb2.0)

    Hello
    I have two external drives, both support firewire400/800 and USB2.
    On the firewire 400 settings no issue at all.
    Previously on PPC powerbook, I used firewire 800 and no issues at all.
    While waiting for my expresscard34-firewire800 to arrive this week, I am using the USB2 port on the macbook pro to trasnfer a jpeg library (c24gb) to and from, using either the internal 7200rpm sata drive on the machine, or also from the connected firewire 400 lacie 1tb bigger disc.
    Whichever solution I use to copy from, all JPEG's that go via the USB2 port on the macbook, any usb2.0 port, get corrupted. I can open in aperture/bridge, or even testing in vista beta or xp and the files are corrupt. But if I transfer via the firewire 400, all is fine.
    I can switch around the external drives, I have deleted all partitions and reformatted, and even gone through both fat32/osx-journaled options to no avail. Weird or what?
    My only thinking option here is to create a .dmg 24gb file of the whole folder, and move that across, but that is just daft.
    P.s. transferring any other type of data works perfectly fine, e.g. .mp3/.doc.xls etc.
    Any thoughts on this weird one.
    thks in advance!
    MacBook Pro   Mac OS X (10.4.6)  

    Hello, 
    The iMac G4 17" 1GHz only has USB1.1 so it doesn't matter that the MyBook is USB2.0 you'll only transfer at USB1.1 speeds (1.5MBps). As there is no way to add USB2.0 to the iMac G4 ≤1GHz you need to look at a Firewire drive like the MyBook Pro/Premium; incidentally, both of these come with back-up software too.
    The iMac G4 can't boot from USB so if your internal drive fails you can't boot the iMac like you could on a Firewire drive.
    Personally I do have my MyBook Pro partitioned in to a back-up space which matches my internal hard drive and a separate media file partition.
    BTW you have posted in the Intel iMac forum. The users here will be less familiar with the specific issues that iMac (Flat Panel)s may suffer. I'd advise that you post future queries in the iMac G4 forum:
    G4 (aka Flat Panel): Intel:
    Click image to go to correct forum
    regards
    mrtotes

  • IDOC - XI - post HTTP on .ASP?& DATA_CONTENT

    HI ALL !
    I have this scenario :
    1) R3 send IDOC ORDERS01 to XI (3.0) 
    2) XI elabs IDOC fields (in mapping step)
    3) XI with HTTP Adapter post data to a "page".asp on webserver using querystring (like page.asp?&ID_CUSTOMER=123&ORD_DOC=WE ...etc..)
    My ASP page use this stantments for get values:
    ID_CUSTOMER = Request.Form("ID_CUSTOMER");
    ORD_DOC = Request.Form("ORD_DOC");
    xml_content = Request.Form("xml_content");
    At the moment XI call the page but the query string is empty ! I think that the message type of interface will be automatically added on URL (as when flags Additional Query on Comm.Channel - Sender Party, Sender Service... are selected).... it's wrong ?!? If yes how it's possible complete the flow ?!
    Thks !!

    Hi Jari,
    Thanks for the reply,
    I have the asp file as below and plz suggest for any changes,
    <%
    Function BinToText(varBinData, intDataSizeInBytes)
                Const adFldLong = 128 '&H00000080
                Const adVarChar = 129
                Set objRS = Server.CreateObject("ADODB.Recordset")
                objRS.Fields.Append "txt", adVarChar, intDataSizeInBytes, adFldLong
                objRS.Open
                objRS.AddNew
                objRS.Fields("txt").AppendChunk varBinData
                BinToText = objRS("txt").Value
                objRS.Close
                Set objRS = Nothing
    End Function
    server.scripttimeout = 600
    dim binXML, strXML, outXML, objFundsDelete
    'if Request.TotalBytes > 0 then
    '           binXML=Request.BinaryRead(Request.TotalBytes)
    '           strXML=BinToText(binXML,lenb(binXML))
    'else
    '           strXML=""
    'end if
    strxml = Request("xmlData")
    'Response.ContentType="TEXT/XML"
    'Response.Write(strXML)
       'dim fs, LogFile
       'logFile = "c:\received.xml"
       'set fs = server.CreateObject("Scripting.FilesystemObject")
       'on error resume next
       'if fs.FileExists(LogFile) = false then
       '  set ts = fs.CreateTextFile(LogFile)
       'end if 
       'set ts = fs.OpenTextFile(LogFile,2)
       'ts.writeline strXML
       'ts.close
       'set fs = nothing
       'set ts = nothing
    set objFundsDelete=server.CreateObject("FundsDelete.CFundsTransfer")
    outXML=objFundsDelete.FundsProcess(strXML)
    set objFundsDelete=nothing
    Response.ContentType="TEXT/XML"
    Response.Write(outXML)
    %>
    Thanks,
    srini

  • Post Data to ASP page

    Hi,
    I'm trying without success to write an AS3 script to post data to a server ASP page (which is scripted in ASP to insert the data into a DB. The ASP script does not return any data to Flash.). It is set up so that it only receives data and does not send any data back.
    I've written a script which follows, but I get back a trace of "error" (see script), and when I independently check the DB, no new data that I am trying to send, is received. So, not working.
    storeBtn.addEventListener(MouseEvent.CLICK,dbStore,false,0,true);
    function dbStore(event:MouseEvent):void{
    var g2:String;
    if (selectGm == true){
    g2 = "abc";
    if (selectGf == true){
    g2 = "xyz";
    var scriptPage6:String ="https://mysite.com/ASPpage.asp";
    var request6:URLRequest = new URLRequest(scriptPage6);
    request6.method = URLRequestMethod.POST;
    var variables6:URLVariables = new URLVariables();
    variables6.aaa = data88;
    variables6.bbb = data99;
    variables6.name = name6;//carried over in the script from text input in an earlier frame: var name6:String = username_txt.text;
    variables6.ggg = g2;
    var loader6:URLLoader = new URLLoader();
    loader6.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader6.addEventListener(Event.COMPLETE, handleComplete6);
    loader6.load(request6);
    //request6.data = variables6;
    var msg:String;
    function handleComplete6 (event:Event):void{
    var msg = event.target.data;
    if(msg=="true"){
    trace("Done!");
    } else{
    trace("Error: "+msg);
    I must be doing something wrong and would appreciate any help. I'm not sure how to send data when no return data is needed or requested?
    The goal is simply to send 4 items to the ASP page (aaa, bbb, name and ggg) which can process and insert these into a DB.
    Regards,

    Hi esdebon,
    Thank you. The script executes OK. No error, traces OK.
    But, I am still not geting any new data into the DB.
    This is most likely a mistake I am still making with the variables I am sending. I've used this ASP page before and it works. So, I will check what I am sending.
    Hi kglad,
    I am trying to adapt another script that I am using in the same FLA, but that script does get a return of data. So, I renamed it from variables to variables6, to give it a unique (non-conflicting name), and in my experimenting to try tofind what would work, I probably commented it out.
    Is it needed?
    One other way to deal with the data, if the DB will not work:
    SMTP Mail from the SWF/APK, using ASP, that sends the data to me.

  • HttpConnection.POST to an ASP page

    First - I'm new to J2ME & I'm a novice to java in general. I'm an ASP programmer & I need to write an app for a nextel phone in J2ME.
    I have written a test application that just sends an http request to my asp page and the page should send back the appropriate response to be displayed on the phone, however the asp page does not seem to be receiving the data. However it IS sending back a response. I have tried removing flush() from the dataOutputStream, but that didn't fix the problem. Here is the code inside my MIDlet:
    private void loginViaHTTPConnection(String strLogin) throws IOException {
    HttpConnection hconn = null;
    InputStream is = null;
    OutputStream os = null;
    StringBuffer data = new StringBuffer();
    try {
    hconn = (HttpConnection)Connector.open(url);
    hconn.setRequestMethod(HttpConnection.POST);
    hconn.setRequestProperty("IF-Modified-Since",
    "20 Jan 2001 16:19:14 GMT");
    hconn.setRequestProperty("User-Agent",
    "Profile/MIDP-2.0 Configuration/CLDC-1.0");
    hconn.setRequestProperty("Content-Language", "en-CA");
    os = hconn.openOutputStream();
    // send request to the ASP script
    String str = "PIN=" + strLogin;
    byte postmsg[] = str.getBytes();
    for(int i=0;i < postmsg.length;i++) {
    os.write(postmsg);
    //os.flush();
    //receive response
    is = hconn.openDataInputStream();
    int ch;
    while((ch = is.read()) != -1) {
    data.append((char) ch);
    } finally {
    if(is!= null) {
    is.close();
    if(os != null) {
    os.close();
    if(hconn != null) {
    hconn.close();
    resultItem.setText(data.toString());
    display.setCurrent(resultScreen);
    The ASP code is:
    <%
    PIN = request("PIN")
    If PIN = "" Then
    response.write "INVALID"
    Else
    response.write "GOOD"
    End If
    %>
    The response returned is always "INVALID" no matter what I pass it.
    Any help would be greatly appreciated.

    deepspace
    Thank you, Thank you, Thank you!!!
    That worked like a charm.
    Working Code in case anyone's interested:
    private void loginViaHTTPConnection(String strLogin) throws IOException {
            HttpConnection hconn = null;
            InputStream is = null;
            OutputStream os = null;
            StringBuffer data = new StringBuffer();
            try {
                String str = "PIN=" + strLogin + '\r';
                hconn = (HttpConnection)Connector.open(url);
                hconn.setRequestProperty("IF-Modified-Since",
                        "20 Jan 2001 16:19:14 GMT");
                hconn.setRequestProperty("User-Agent",
                        "Profile/MIDP-2.0 Configuration/CLDC-1.0");
                hconn.setRequestProperty("Content-Language", "en-CA");
                hconn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");          
                hconn.setRequestMethod(HttpConnection.POST);
                // Send request to ASP page
                os = hconn.openOutputStream();
                os.write(str.getBytes());
                os.flush();
                //receive response
                is = hconn.openDataInputStream();
                int ch;
                while((ch = is.read()) != -1) {
                    data.append((char) ch);
            } finally {
                if(is!= null) {
                    is.close();
                if(os != null) {
                    os.close();
                if(hconn != null) {
                    hconn.close();
            resultItem.setText(data.toString());
            display.setCurrent(resultScreen);
        }

  • POST DATA TO ASP

    Please help me to send post data.
    I can send data to asp but i dont know how to send file atachment to asp web page.
    any help wellcome
    <form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadForm.asp" onSubmit="return onSubmitForm();">
    <tr>
    <td><p> <b> Attach Your Previous Work: </b> </p>
    <p> <b>bbbbbbbbbbbbbbbbbb</b></p><p> (yyyyyyyyyyyyy) </p>
    Attach File: <input name="attach1" type="file" size=35><br>
    </td>
    </tr>
    <tr>
    <td width=100% align=right>
    <input type="Hidden" name=Uid value=16156>
    <input type ="Submit" value="Attach" id=Submit name=Submit> </td></tr>
    </form>
    </table>
    Message was edited by:
    samaraweera

    Read the HTTP/1.1 specs.
    Here's a hint - try learning for yourself by reading these things we call them books. Can you say that - B-O-O-K.
    To upload a file, is basically no different then any other form field data. You send your response with the field name "attach1=" and the data.
    Example:
    POST /uploadForm.asp HTTP/1.1
    formField1=something
    formField2=else
    attach1=5v75xc75xc75bx4bbn84x74bnx5n6mb756m4b975xb4mb5vm4
    5b4m5bvm45b6m468mmmmmmmmmm4c564v64c684mc4m4m684v
    8795c95675cxb6795xc967b5n67cb45x5c4xc6b3xc3848cb3nx8cn384m

  • NSS - Post Transfer ID

    Hello,
    i performed a "Transfer ID" from a Netware 6.5 SP7 server to OES2 SP3 without a problem.
    Services like "File System" & "iPrint" were consolidated before the Transfer ID.
    All systems & services are up & running. I wonder whether i still need to perform the following steps:
    delete <old server hostname>admin user object & recreate a new one with "yast2 nss"
    run the volrepair.rb script to update source server's volume object GUID
    Are there any chances to damage running NSS objects & services when performing above steps ?
    Thx in advance for your support,
    Ralf

    Originally Posted by BlueRamses
    Hello,
    i performed a "Transfer ID" from a Netware 6.5 SP7 server to OES2 SP3 without a problem.
    Services like "File System" & "iPrint" were consolidated before the Transfer ID.
    All systems & services are up & running. I wonder whether i still need to perform the following steps:
    delete <old server hostname>admin user object & recreate a new one with "yast2 nss"
    run the volrepair.rb script to update source server's volume object GUID
    Are there any chances to damage running NSS objects & services when performing above steps ?
    Thx in advance for your support,
    Ralf
    You should only need to recreate the <old server hostname> admin user object if you deleted it. NSS needs the nssadmin object for the server to exist, if it doesn't the NSS will not load. Since yours is working I wouldn't worry about it
    The volrepair.rb script helps make the GUIDs of the new servers volumes the same GUID as the old servers volume. That way if any application is referencing the a volume's GUID rather than its name the request can complete.

  • XML file transfer between ASP & JSP

    Hi !
    Actually the requirement is to provide an interface between an ASP application and a JSP application.
    What i could understand is that commonly used way is transfering XML files using SOAP.
    But, i have no idea on SOAP and need few clarifications.
    1. What are the roles of SOAP, WSDL and UDDI ? and does SOAP needs WSDL or UDDI and web services?
    2. Do i need to use web services just to transfer XML file from ASP to JSP ?
    3. is HttpURLConnection also used in this approach ?
    actually what my purpose is to know that to implement SOAP for XML file transfer what all i need to do ?

    Hi !
    Actually the requirement is to provide an interface
    between an ASP application and a JSP application.
    What i could understand is that commonly used way is
    transfering XML files using SOAP.
    But, i have no idea on SOAP and need few
    clarifications.
    1. What are the roles of SOAP, WSDL and UDDI ? and
    does SOAP needs WSDL or UDDI and web services?SOAP is a transfer protocol for exchanging structured and typed information : go to the w3 web site to understand better.
    WSDL are files to describe a web service : you will find inside an access point and signatures from your methods; if you want it's a little bit like an interface in java but with more informations. You don't need wsdl for soap.
    Last uddi is a repository for web services. You need to publish your service inside a Uddi registry and it's associated access point and tmodel (go to oasis web site for more informations). It's a little bit like yellow pages. You need to use Uddi only if you want to discover serviecs dynamically.
    Usually you use SOAP by calling a web services, as a web service is over the SOAP layer. The advantages of using SOAP is that it describes your data too. In fact if you have complex types to transfer between your two applications the partners have to know how to understand these data.
    2. Do i need to use web services just to transfer XML
    file from ASP to JSP ?Well, what do you want to transfer exactly between your applications. If this is just a text stream you can simply send your file by opening a socket. But if you want to work with your informations, to use them (that means you have to build the corresponding object) you could use web services as your informations are explicitely defined : what do you want to do exactly ? Last but not least if you have already XML file you can get your info directly and parse ir or ????
    3. is HttpURLConnection also used in this approach ?Yes you could call a servlet or something like that to transmit your informations
    actually what my purpose is to know that to implement
    SOAP for XML file transfer what all i need to do ?you have to be more precise with what you want to do with the info; simply display it or ???
    PA
    http://www.doffoel.com

  • Post transfer trouble

    I transferred my itunes to a hard drive. My songs all appear to be there but the personalized playlists I have spent so much time compiling have disappeared. They are still in my ipod but now I'm afraid to sync with the computer because I don't want them to be deleted. I guess my question is: does an ipod sync go both ways or will the computer think that I meant to dump all my old playlists and make me start over?

    hi,
    I want develop an application using ASP and J2ME. I am familiar with servlet and jsp but donot know nothing about ASP.
    Can you please give me some url's which were pointing to tutorials about this topic or else any example about this was more useful please help me
    thanks in advance
    lakshman

  • How do I post ( transfer) song on ipad 4 to facebook to send to friend

    I have transfered a song from my desktop to my ipad.  it is saved in my "music" app on bottom of home pagee.  IF I wanted to send this song to a friend over facebook.. hhow would I do that?

    There's no way to do that from your iPad.

  • Miss value FI Posting on Sales Order Transfer Posting movement Type 413 E

    Dear Expertise
                   I've a problem about sales order transfer posting. My both of Sales order (Source & Destination) are make to order and open with configurable material(KMAT). Both of sales order contain only one item on the same material no.
    Assume scenario material vastr
    Assume that material vastr is configurable material wait for sales order to fill characteristic and it was maintained standard price value = 1100
                    Sales order A  has plan cost  on material  VASTR  1000
                    Sales order B has plan cost material VASTR 980
    When we make a sales order transfer posting(Transfer from Sales Order A-> B) by transaction MIGO_TR by use movement type 413 E. It can post a transfer complete. But my problem is when I trace to FI-Document
                    It was post like this
                    Dr. Standard price                         1100
                    Cr. price for Sales order A(src.)  1000
                    Cr. Cost Variance                          +100
    I don't want it to offset with standarad price value. I want it to do like this
                    Dr. price for Sales order B(Des.)   980
                    Cr. price for Sales order A(src.)  1000
                    Dr. Cost Variance                           +20
    How can I configure it?   I trial to clear standard price by MR21, System can do it . But I don't want to clear it because it impact to other. I want to know. How can I configure system to take both of plan cost of sales order to offset each other please.
    Edited by: Gareth John on Aug 16, 2010 2:23 PM
    Edited by: Gareth John on Aug 16, 2010 2:42 PM
    Edited by: Gareth John on Aug 16, 2010 2:42 PM

    Hi,
    411- E- sales order to own stock
    412-E- Reversal of 411 E
    & 413-E-Sales order to sales order.
    Regards,
    Piyush

  • Transfer posting with Mov Type 311E in MIGO with reference to SC-PO

    Hi,
    I am working with MTO scenario.
    I want to carry out transfer posting of material with movement type 311E against subcontracting Purchase Order which is sale order specific.
    However, system does not allow me to do the same. whenever transfer posting, PO & movement type is selected in transaction MIGO, item details entry tabs are displayed blank.
    Below steps are being follow:
    Scenario is MTO ( special stock subcontracting)
    1. Subcontracting PO no. 4500000147 against Sale Order no 61 created.
    2. RM code - 61, available stock 100 TO & batch no.0000000127
    3. Transfer material to vendor for processing through MIGO ( since it is a special sales order stock, transferring happens from SL 0001- Main Stores to SL VLSC -Virtual storage location) using movement type 311 E
    5. Item Data details tabs are blank.---This is the issue / error.
    Note: I am restricted to post transfer posting through MIGO-Transfer Posting (will not use MB1B) due to some enhancement of MIGO and interfaces with legacy system.
    Please have a look on attachment for SAP screen issue.
    Regards
    Mohit Jaiswal

    Hi Mohit ,
    please check below link , you need to perform steps as given
    http://help.sap.com/saphelp_470/helpdata/en/4d/2b90b043ad11d189410000e829fbbd/content.htm
    also see the sales order subcontracting using the business addon
    http://help.sap.com/erp2005_ehp_04/helpdata/en/c7/2587b8dad94c52854ccd28015dceb0/frameset.htm

  • Auto print of Goods Issue/Transfer Posting Documents by Movement type

    Hi,
    We have created two different output types to print the layout's of Goods Issue/Transfer Posting Documents.
    The requirement is to default the message in the document by movement type (key combination)
    Meaning if it is 201 it should populate GI output type
    If it is 313 it should populate TP output type.
    we do not have any standard key combination  (NACR) by movement type wise.
    Any alternative way of meeting this requirement?
    Thanks
    Regards
    Ram

    Hello Kevin,
    I donu2019t think it is necessary to use a user exit to keep the Material B (that is transferred from Material A) in the same bin.
    This can be controlled in the customizing: indicator Post to same bin, that can be set in the WM Movement type (V_T333-KZUAP) and in the Storage type (V_T3010-KZUAP).
    Now I donu2019t know your business process but I am surprised that Material B requires more space than Material A since it is u2018bornu2019 by means of a transfer posting and not a production or packing step that makes it bigger in terms of capacity required.
    A workaround for this could be to transfer (LT10) Material A first to a separate Storage type (with the Post to same bin-flag set) that has no Capacity check and after the 309 posting transfer it back into the warehouse with LT10.
    Success and thanks beforehand for any credits!
    Kind regards,
    Bart

  • Error in Transfer posting for movement type 303

    Hi Sir,
    I am getting following error while doing Transfer posting for movement type 303 thru BAPI_GOODSMVT_CREATE
    Error in Function:
    Order    not found or not permitted for Goods Movement.
    I am passiing all mandatory parameter for it as per BAPI Documentaion in tcode BAPI
    Transfer posting
    Transfer posting without reference to a reservation
    The following fields must be populated:
    Material number
    Plant
    Storage location
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    If I am doing manually by MB1B tcode, it is successfully done.......here its not asking any ORDER No...
    Please help me .........
    Regards,
    Krishan

    I'm not sure what you're system set up is...   So I'd suggest looking at everything you enter on the screen and then checking to make sure you are passing all the information in the BAPI.
    With that said our system does require posting date, and batch.  You might check that.   Also check that you've included all the required information in the header.
    Did you use the same data when you tried to process the BAPI that you used when you tried to do MB1B manually?

  • Cross company tax transfer posting

    Dear All
    The following transaction is cross company related
    For cocd 4100
    Bank charges Export sales   Rs  1000 Dr    Tax code S1
    Service tax                                   100  Dr                    S1
    E.cess                                      2  Dr                    S1
      H cess                                          1 Dr                     S1
      Cross Co Clearing A/c                   1103 Cr
      For Cocd 1000
       HDFC bank                    1103 Cr
       Cross co clearing a/c                        1103 Dr.
    Our client would like to post the tax amount on co.code 1000.
    I have already set the configuration for
    SPRO>Financial Accounting (New)> Financial Accounting Basic Settings (New)> Tax on Sales/Purchases>Posting>Transfer Posting of Tax for Cross-Company Code Transactions
    Co.cd1        Cocd2      Taxcdorgin
      4100            1000            S1
    Then I have run  Program RFBUST10 through T/code SE38  but system showing u201CNo lsit generatedu201D
    Please advice.
    Regards
    Avijit

    Issue resolved by self !

Maybe you are looking for