|
Oracle Collaboration Suite Discussions Web Services Java API Reference 10g (10.1.2.2) Part No. B28210-01 |
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Provides core interface definitions for Oracle Discussions Webservices.
See:
Description
Interface Summary | |
CategoryService | Webservice interface providing Oracle Discussions Category related operations. |
ContainerService | Webservices interface providing operations common to both category service and forum service. |
ForumService | Webservice interface representing Oracle Discussions Forum related operations. |
MessageService | Webservice interface representing the operations related to Oracle Discussions Message. |
MyDiscussionsService | Web services interface providing methods to access content of user's interest. |
RssUrlService | |
S2SAuthenticationService | Webservices interface representing Service-To-Service login operation. |
SubscriptionService | Webservice interface providing methods related to Subscriptions on Discussions elements. |
TopicService | Webservice interface representing the operations related to Oracle Discussions Topic. |
UserService | Webservice interface providing Oracle Discussions user access operations. |
Provides core interface definitions for Oracle Discussions Webservices.
ws package provides the essential interface definitions and documentation required to invoke web service related operations, to access Oracle Discussions system.
Oracle Discssions system is exposed to the end user, in the form of web service interfaces. Each of the method invocations on the services, will result in a call to the web services layer. Various user actions are logged into a log file (ORACLE_HOME/j2ee/OC4J_OCSClient/application-deployments/discussions/OC4J_Default_Island_1/application.log) for auditing purposes.
Axis specific sample code given below illustrates the user's method invocation life cycle in Oracle Discussions Webservice invocations. Relevant changes need to be made for non-axis clients.
//STEP - 0 : Authenticating the user. //Initialize the service locator for authentication service. The service locator //contains the webservice endpoint url in the form of http://<<midtier instance name>>:<<port>>/discussions/ws/AuthenticationService. AuthenticationServiceServiceLocator assl = new AuthenticationServiceServiceLocator(); //Retrieve a reference to the remove webservices interface from the service locator. AuthenticationService as = assl.getAuthenticationService(); //Indicate the client's willingness to participate in the session. //Unless a true is set, the server assumes that client is not participating in session. //As HTTP is stateless, each webservice invocation will be different and the user's state is not //maintained across webservice invocations. ((AuthenticationServiceSoapBindingStub)as).setMaintainSession(true); //Invoke the login method, to authenticate the user. //User nickname and password are to be sent in plain text. as.login("td_globaladmin","welcome1"); //Once the authentication is successful, a http session is established between the web services server and the user. //A j2ee session is established between webservices server and the Oracle Discussions backend. A cookie //identifying user's http session is placed into the servlet application context. //This cookie is to be retrieved and supplied on each of the subsequent webservices invocations. String cookie = (String)((AuthenticationServiceSoapBindingStub)as)._getCall().getMessageContext().getProperty(HTTPConstants.HEADER_COOKIE); System.out.println("Cookie : " + cookie); //STEP - 1 : Webservice invocations. //Once authenticated, the user can invoke Oracle Discussions webservices, until he invokes the logout method. //The cookie retrieved in the previous operation is to be set on every client stub, that invokes operations on the webservices server. //Initialize the service locator for category service. //The service location contains webservices endpoint url for the category service. CategoryServiceServiceLocator catssl = new CategoryServiceServiceLocator(); //Retrieve a reference to the remote category service. CategoryService cats = catssl.getCategoryService(); //Indicate the client's willingness to participate in the session. ((CategoryServiceSoapBindingStub)cats).setMaintainSession(true); //Set the cookie before invoking the operation on the stub. //This cookie set, indicates the client's http session credentials to the server. //Sessions are managed through cookies. ((javax.xml.rpc.Stub)cats)._setProperty(HTTPConstants.HEADER_COOKIE,cookie); //Invoke webservices methods to perform various operations. CategorySettings cSettings = cats.getCategorySettings(1020); ................ ........ //STEP - 2 : User logout //Invoke the logout method to destroy the user credentials stored in the http session. //On logout invocation, the http session is invalidated an dcookie is destroyed. //User's state is lost and hence the user will not be able to invoke any other webservices methods //until he logs in again. //At the login time, agani a cookie is set and the steps from STEP - 0 above are repeated. as.logout();
|
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |