com.esri.mKit
Class TokenServiceProxy

java.lang.Object
  |
  +--com.esri.mKit.TokenServiceProxy

public class TokenServiceProxy
extends java.lang.Object

This class allows a user to obtain a token for use by ArcWebServiceProxy.

The ArcWeb Mobile Toolkit uses Bouncy Castle (license) encryption to authenticate access to ArcWeb Services. Bouncy Castle is a client side library that allows you to encrypt sensitive information before sending it to a server such as ArcWeb. This encryption is important because you send your ArcWeb user name and password via HTTP.

Author:
javi4211

Constructor Summary
TokenServiceProxy(java.lang.String url, java.lang.String sg, java.lang.String uname, java.lang.String password, java.lang.String midpVersion)
          Constructor to set all dynamic values.
 
Method Summary
 java.lang.String sendRequest()
          Send a request to the Connector requesting a token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenServiceProxy

public TokenServiceProxy(java.lang.String url,
                         java.lang.String sg,
                         java.lang.String uname,
                         java.lang.String password,
                         java.lang.String midpVersion)
                  throws java.lang.Exception
Constructor to set all dynamic values. Constructor will throw an exception of midpVersion string passed in does not correspond to a supported version of MIDP.

Parameters:
url - URL of connector which translates and processes the request.
sg - The String value of Service Group. Valid values listed here.
uname - Username required for Authentication.
password - Password required for Authentication.
midpVersion - Version of MIDP the application is running under.
Throws:
java.lang.Exception
Method Detail

sendRequest

public java.lang.String sendRequest()
                             throws java.lang.Exception
Send a request to the Connector requesting a token. If you are using the Toolkit with Bouncy Castle, then this will encrypt the username and password sent to ArcWeb Services when requesting the token. If you are not using the Toolkit with BouncyCastle, then this method will use SSL to send the username password when requesting a token.

Returns:
token
Throws:
java.lang.Exception


Copyright © 2001 by Environmental Systems Research Institute Inc. All Rights Reserved.