The following topic describes the interaction with TrackStudio Enterprise via SOAP API.
To interact with external applications, import or export data, you can use TrackStudio SOAP API.
TrackStudio SOAP API features:
The following services are available using SOAP API:
This service functionality corresponds to the gran.app.adapter.external adapters. For example, the Acl service allows you to call the gran.app.adapter.external.SecuredAclAdapter adapter methods via SOAP. In order to provide compatibility with various SOAP implementations, TrackStudio uses a proxy to convert parameter types. For example, Java collections are not supported in .NET so a Java collection is converted to arrays. The conversion is done in the com.trackstudio.soap.service classes. For example, the proxy for the getEmailTypeList method is the following:
public EmailTypeBean[] getEmailTypeList(String sessionId) throws GranException { ArrayList list = new ArrayList(); for (Iterator it = manager.getEmailTypeList(sessionId).iterator(); it.hasNext();) list.add(((SecuredEmailTypeBean) it.next()).getSOAP()); return (EmailTypeBean[]) list.toArray(new EmailTypeBean[]{new EmailTypeBean()}); }
Sometimes more complex conversions can be done. For example, the proxy for the getUserList method from the SecuredUserAdapter is as follows:
public UserSliderBean getUserList(String sessionId, String managerId, int page) throws GranException { Slider slider = manager.getUserList(sessionId, managerId, page); UserSliderBean bean = new UserSliderBean(); bean.setId(slider.getId()); bean.setKeyword(slider.getKeyword()); bean.setPage(slider.getPage()); bean.setPageSize(slider.getPageSize()); bean.setSortOrder(slider.getSortorder()); ArrayList list = new ArrayList(); for (Iterator it = slider.getCol().iterator(); it.hasNext();) list.add(((SecuredUserBean) it.next()).getSOAP()); bean.setUsers((UserBean[]) list.toArray(new UserBean[]{new UserBean()})); return bean; }
Copyright (c) 2002-2006. All rights reserved.
|
What do you think about this topic? Send feedback!
|