Build an adapter class

While building a custom application, it is helpful to have an adapter class. You create an instance of the class for each user login session, and the adapter handles connecting to the server, logging the user in, making requests to the XML API, and parsing XML responses.


See the sample files, login.jsp, and mymeetings.jsp

Write constructors for the adapter class

The following constructor (from the sample application file creates an instance of the adapter class to represent a user accessing Adobe Connect. This is the constructor to use when you already have the BREEZESESSION cookie value (see Log in from an application). The constructor also calls the createXPaths method to create valid XPath instances to use in other methods:

 public XMLApiAdapter(String baseUrl, String breezesession) 
             throws XMLApiException { 
     this.breezesession = breezesession; 

The second constructor takes a user’s login ID and password, as well as a BREEZESESSION cookie value:

 public XMLApiAdapter(String baseUrl, String login, String password, 
             String breezesession) throws XMLApiException { 
     this(baseUrl, breezesession); 

You can get the BREEZESESSION cookie value before the user logs in by calling common-info.

Create an instance of the adapter

The following code (from mymeetings.jsp) creates an instance of the XMLApiAdapter class to represent a user who is logged in to Adobe Connect. The current value of breezesession, which holds the BREEZESESSION cookie value, is then stored in the JSP session attribute for other files to access.

 <%! XMLApiAdapter breeze = null; %> 
 breeze = new XMLApiAdapter(breezeBase, login, password, breezesession); 
 session.setAttribute("breezesession", breeze); 
Adobe logo

Sign in to your account

[Feedback V2 Badge]