How to get client side encoded request in web service


J

Jitendra Bachhav

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

Advertisements


Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top