This section 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 unique features:
The following services are available to work via 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 proxy to convert parameter types. For example, Java collections are not supported in .NET so Java collection is converted to the 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 following:
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; }