Soap GetProjectsByQuery

A forum for discussing new installs or conversions from other software.
craigbtg
Posts: 2
Joined: Tue Jul 14, 2015 4:13 pm
Number of Employees: 0
Number of Offices: 0

Soap GetProjectsByQuery

Postby craigbtg » Tue Jul 14, 2015 4:18 pm

Hello, I am trying to write an application that queries the Deltek web service API for Vision Cloud. I am able to retrieve results from the web service but only when the data set returned is small. Can someone please tell me how to better run the GetProjectsByQuery method so that I can retrieve a full list of projects without having to narrow down the list with a Where clause? When I run the following code I get an error 529 without the Where clause in the query but it runs fine when I narrow down the results.

Code: Select all

            string UserID = "user";
            string Password = "password";
            string Domain = "domain.com";
            string DatabaseDescription = "DBDesc";         // from Web link - see doc
            string IntegratedSecurity = "Y";

            com.deltekfirst.name.DeltekVisionOpenAPIWebService proxy = new com.deltekfirst.name.DeltekVisionOpenAPIWebService();

            string ConnInfoXml = @"<VisionConnInfo><databaseDescription>" + DatabaseDescription + @"</databaseDescription>";
            ConnInfoXml += @"<userName>" + UserID + @"</userName>";
            ConnInfoXml += @"<userPassword>" + Password + @"</userPassword>";
            ConnInfoXml += @" <integratedSecurity>" + IntegratedSecurity + @"</integratedSecurity>";
            ConnInfoXml += @"</VisionConnInfo>";

            string RecordDetail = "Primary";

            proxy.UseDefaultCredentials = true;
            proxy.Credentials = new NetworkCredential(UserID, Password, Domain);
            proxy.Timeout = 600000;

            string WSResponse = proxy.GetProjectsByQuery(ConnInfoXml, "Select PR.* From PR", RecordDetail);

            MessageBox.Show(WSResponse);

craigbtg
Posts: 2
Joined: Tue Jul 14, 2015 4:13 pm
Number of Employees: 0
Number of Offices: 0

Re: Soap GetProjectsByQuery

Postby craigbtg » Fri Jul 17, 2015 1:40 pm

Turns out the code is correct and that the problem was due to the MessageBox at the end. When the returned string was too long the MessageBox does not display making it appear as if the application is not working. Once the MessageBox is removed the code performs as expected. Hope someone else finds it useful.


Return to “Vision Implementation & Integration”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest