M
mnvikefan
What would be the best way to process a return from an http api login
function that returns one of the following two XML streams?
Successful login with a session ID returned
<?xml version="1.0" encoding="UTF-8" ?>
<CreateSessionResponse>
<result>0</result>
<warning>CreateSession succeeded</warning>
<return>
<SessionID>1126765227212</SessionID>
</return>
</CreateSessionResponse>
Unsuccessful return with a fault code and message
<?xml version="1.0" encoding="UTF-8" ?>
<CreateSessionResponse>
<fault>
<faultcode>80004005</faultcode>
<faultstring>AgentIntegration error : Login failed. Reason is:
Invalid User Name or Password. Please try again.</faultstring>
</fault>
</CreateSessionResponse>
function that returns one of the following two XML streams?
Successful login with a session ID returned
<?xml version="1.0" encoding="UTF-8" ?>
<CreateSessionResponse>
<result>0</result>
<warning>CreateSession succeeded</warning>
<return>
<SessionID>1126765227212</SessionID>
</return>
</CreateSessionResponse>
Unsuccessful return with a fault code and message
<?xml version="1.0" encoding="UTF-8" ?>
<CreateSessionResponse>
<fault>
<faultcode>80004005</faultcode>
<faultstring>AgentIntegration error : Login failed. Reason is:
Invalid User Name or Password. Please try again.</faultstring>
</fault>
</CreateSessionResponse>