コード例 #1
0
 private static PSItem LoadItem(contentSOAP contentSvc, long id)
 {
     LoadItemsRequest req = new LoadItemsRequest();
     req.Id = new long[] { id };
     req.IncludeBinary = true;
     PSItem[] items = contentSvc.LoadItems(req);
     return items[0];
 }
コード例 #2
0
        private void connectToServer(String address, String port, String user, String password)
        {
            m_secSvc = new global::RhythmyxBrowser.RXWeb.securitySOAP();

            m_secSvc.Url = "http://localhost:9992/Rhythmyx/webservices/securitySOAP"; // address + ":" + port + "/Rhythmyx/webservices/" + m_secSvc.Url;

            CookieContainer  cookies = new CookieContainer();
            m_secSvc.CookieContainer = cookies;

            RXWeb.LoginRequest loginReq = new RXWeb.LoginRequest();

            loginReq.Username = user;
            loginReq.Password = password;
            loginReq.LocaleCode = "en-us";
            loginReq.Community = "Enterprise_Investments";
            RXWeb.LoginResponse loginResp = m_secSvc.Login(loginReq);

            m_rxSession = loginResp.PSLogin.sessionId;
            m_secSvc.PSAuthenticationHeaderValue = new PSAuthenticationHeader();
            m_secSvc.PSAuthenticationHeaderValue.Session = m_rxSession;

            m_contentSvc = new contentSOAP();
            m_contentSvc.Url = "http://localhost:9992/Rhythmyx/webservices/contentSOAP";

            m_contentSvc.CookieContainer = m_secSvc.CookieContainer;
            m_contentSvc.PSAuthenticationHeaderValue = m_secSvc.PSAuthenticationHeaderValue;

            FindFolderChildrenRequest folderReq = new FindFolderChildrenRequest();

            folderReq.Folder = new FolderRef();
            folderReq.Folder.Id = 1;

            m_contentSvc.FindFolderChildrenCompleted+= new FindFolderChildrenCompletedEventHandler(this.m_contentSvc_FindFolderChildrenCompleted);
               // m_contentSvc.FindFolderChildrenAsync(folderReq);

               PSItemSummary[] items = m_contentSvc.FindFolderChildren(folderReq);

               addFolderChildren(items, null);
        }