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. Advertising

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. moondaddy
    Replies:
    2
    Views:
    1,038
    Steven Cheng[MSFT]
    Jul 16, 2004
  2. Boss302
    Replies:
    0
    Views:
    1,056
    Boss302
    Nov 21, 2006
  3. Bogdan
    Replies:
    2
    Views:
    655
    Bogdan
    Jun 9, 2008
  4. Ron Garret
    Replies:
    7
    Views:
    1,078
    Ron Garret
    Jul 6, 2008
  5. Zoe Hart
    Replies:
    1
    Views:
    373
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page