XML data response object
The CMS returns its response to the client in XML format in an effort to make the response information structured and extensible. This XML format provides a good base for allowing structured access to the return data today and flexibility for expansion and improvement in the future. The following XML schema defines the format of the XML document:
<schema targetNamespace=""
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="zieweb-sso-credential" type="zieweb-sso-credentialType" />
<complexType name="zieweb-sso-credentialType">
<sequence>
<element name="userid" type="string" />
<element name="password" type="string" />
<element name="status" type="string" />
</sequence>
<attribute name="version" type="string" />
</complexType>
</schema>
Based on the above schema, the following code is a sample of the
XML return document that is streamed over the HTTPS connection:
<?xml version="1.0"?>
<zieweb-sso-credential version="1.0" >
<userid>&^$#^&</userid>
<password>&^$#^&</password>
<status>0</status>
</zieweb-sso-credential>
In the above code, the user ID and password elements return garbage
characters because they are encrypted. Z and I Emulator for Web includes an
object called
com.ibm.eNetwork.security.sso.PasswordCipher
to
accomplish this. It contains the following two methods:
- public static String encrypt (String plainText)
- This method returns an encrypted string passed as a parameter.
- public static String decrypt (String cipherText)
- This method reverses the encryption process by returning a decrypted string. If the cipherText was not encrypted using the encrypt method, it returns the original input string
status
element provides the status of the return
value. If the credential mapper query fails for any reason, this field
reports that failure to the client. Failure codes are defined in the
SSOConstants class, which serves as a static repository of related
SSO static information. The following table contains the status code
definitions:
Status code | Description |
0 | Success |
1 | Unknown status code |
2 | Suitable HCM plug-in not found |
3 | Invalid network user ID |
4 | Invalid application ID |
5 | Invalid server address |
6 | Database connection error |
7 | User ID not found in database |
8 | Exception |
9 | Invalid user ID |
10 | Passticket error |
11 | Timeout |
12 | Unexpected DCAS return code |
13 | API not supported |
14 | Bad URL |
15 | Unable to parse response |
16 | Local user ID not available |
17 | Duplicate XML tags |
18 | An exception occurred while processing the credential request |
19 | Network Security plug-in is not defined to the CMS |
20 | Portal ID not available |
21 | A matching user ID not found in Portal Vault |