How to get client side encoded request in web service

Discussion in 'ASP .Net Web Services' started by Jitendra Bachhav, Sep 23, 2008.

  1. 1) Client Side: (in Java)

    Suppose my username = testuser and password = test123;
    Then code like this :

    String login = username+":"+password;

    // Stream connection object used to establish the communication with the
    server.
    StreamConnection =
    StreamConnection)Connector.open("https://192.168.1.68/sample.asmx/login");

    // Http connection object used to communicate with the server.
    HttpsConnection httpConn = (HttpsConnection)strConn;

    //Encode the login information in Base64 format.
    byte[] encoded = Base64OutputStream.encode(login.getBytes(), 0,
    login.length(), false, false);

    httpConn.setRequestProperty(auth, authType + new String(encoded));

    ===================================================================
    2) On server side (C# web service) how i access this encoded request.

    After getting this request I know how to decode it and doing further
    procedure. Only I want know the how I get this http request.
     
    Jitendra Bachhav, Sep 23, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    14
    Views:
    4,498
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  2. moondaddy
    Replies:
    2
    Views:
    1,205
    Steven Cheng[MSFT]
    Jul 16, 2004
  3. Replies:
    0
    Views:
    668
  4. Replies:
    1
    Views:
    6,621
  5. Boss302
    Replies:
    0
    Views:
    1,324
    Boss302
    Nov 21, 2006
  6. Bogdan
    Replies:
    2
    Views:
    846
    Bogdan
    Jun 9, 2008
  7. Zoe Hart
    Replies:
    1
    Views:
    583
    Scott Wisniewski
    Jan 8, 2004
  8. Replies:
    0
    Views:
    354
Loading...