authenticate()

AuthenticationResponse authenticate(AuthenticationRequest authenticationRequest)

This method authenticates credentials for Smile subscriptions and returns the subscription's USN. Use this method when you need to validate customer credentials.

You cannot use this method to log in to Smile.

Parameters

authenticationRequest
Format: AuthenticationRequest XML
Purpose: Defines an AuthenticationRequest XML document that specifies the credentials to authenticate.
The parameters in this document are determined by the authentication request type. The default authentication request type is 1 and validates a username and password. Contact Inomial to define additional authentication request types.
The <serviceType> element has the following key attributes:
1
Smile
2
CAT
For additional service types contact Inomial.

Example: Authenticate a username and password

This example authenticates a username and password. The authentication request type is 1.

<AuthenticationRequest xmlns="http://xml.inomial.com/smile/2.xsd">
  <AuthenticationRequestType>1</AuthenticationRequestType>
  <Parameters>
    <Object>
      <String name="username">joe@example.com</String>
      <String name="password">password</String>
      <Integer name="serviceType">2<Integer>
    </Object>
  </Parameters>  
</AuthenticationRequest>   

Results

This method returns an AuthenticationResponse XML document that contains the authentication results. If the authentication is successful, the document also contains the subscription's USN.

There are no messages defined by this method.

Example: A returned AuthenticationResponse document

This example shows a successful authentication response. Note the subscription's USN is included in the response.

<AuthenticationResponse xmlns="http://xml.inomial.com/smile/2.xsd">
  <Success>true</Success>
  <USN>1923102312</USN>
</AuthenticationResponse>   

Faults

AuthenticationException

This fault is returned when the request is invalid or the caller does not have permission to perform this action.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.Authenticate filename
filename
Purpose: Defines the filename of the AuthenticationRequest XML document.
Note: For more information about the Java client and the options it accepts, see Java client syntax.