20.01.2015 Views

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

XmlParameters<br />

pass additional parameters to the business object.<br />

This is a well formed XML string providing<br />

parameters to the Post method.<br />

All the example code in this chapter assumes an operator code called<br />

"ADMIN" with no password and the use of company "1" with no password.<br />

When a method is invoked the return is provided by the business object specified. If the<br />

output of a business object is an XML instance, it will be "Well-Formed" and "Valid". The<br />

tree structure and element values contained in the returned XML will depend on the<br />

Business Logic embodied by the business object and the parameters passed within the<br />

input XML instances. Return information can then be used within the e.<strong>net</strong> solutions<br />

application. If an exception is raised, the return will contain the errors (see Section 9.1,<br />

“Error Handling” [9–1]).<br />

The application of XML within SYSPRO e.<strong>net</strong> solutions, combined with the generic<br />

nature of the class library, provides maximum flexibility in developing truly dynamic,<br />

scalable applications that preserve the integrity of data stored within SYSPRO. It also<br />

means that enhancements to existing e.<strong>net</strong> solutions applications are relatively easy to<br />

develop as the application is independent from the SYSPRO version or the specific<br />

implementation of SYSPRO within an organization.<br />

5.1. Utilities Class<br />

There are four Methods in the SYSPRO Utilities class structure: Logon, Logoff,<br />

GetLogonProfile, and Run. As their names suggest, they are used for logging on and<br />

off of the SYSPRO e.<strong>net</strong> solutions system, retrieving user settings and running custom<br />

written programs.<br />

5.1.1. Utilities.Logon<br />

Syntax:<br />

Utilities.Logon(Operator, OperatorPassword, CompanyId,<br />

CompanyPassword, LanguageCode, LogLevel, <strong>Syspro</strong>Instance, XmlIn)<br />

The Logon method enables authentication. If authentication is successful a unique<br />

UserID is returned. The UserID is a string that uniquely identifies an e.<strong>net</strong> solutions<br />

session. The UserID is therefore used to create a new session and authenticate the<br />

connection throughout the session and must be passed to all subsequent e.<strong>net</strong> solutions<br />

method calls for the duration of a session. To close a session use the Logoff method (see<br />

Section 5.1.2, “Utilities.Logoff” [5–6]).<br />

Business objects available to this method include:<br />

5–4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!