Asked by:
code to publish project from workflow code

Question
-
All replies
-
My apologies if i am missing any of the details about your query, but code to publish the project is as follows:
Below: dsprojectRelation is not important, i was using it to verify the return value. ProjectUID is must of the project you want to publish and that you can get from the Project data set you have created for your project.
Let me know if any more help is requrired.
_______________________________________________________________________
//add the webservice and create a reference in your project solution
public
static WebSvcProject.Project Project = new WebSvcProject.Project();
//Publish the project
jobGuid = Guid.NewGuid();
string wssUrl = "";
bool fullPublish = true;
WebSvcProject.ProjectRelationsDataSet dsProjectRelations =
new WebSvcProject.ProjectRelationsDataSet();
dsProjectRelations = Project.QueuePublish(jobGuid, ProjectUid, fullPublish, wssUrl);
__________________________________________________________________
dsprojectRelation is not important, i was using it to verify the return value. ProjectUID is must of the project you want to publish and that you can get from the Project data set you have created for your project.
Let me know if any more help is requrired.
| Khurram Jamshed | Follow my blog about Enterprise Project Management Solution | http://khurramjamshed.blogspot.com |- Proposed as answer by Khurram Jamshed Sunday, December 12, 2010 8:36 AM
- Unproposed as answer by Adil Hussain Sunday, December 19, 2010 8:32 PM
-
Thanks khurram for the reply,
Actually i tried the piece of code, there is some small thing i am missing here for couple of days, when i just add the project web service like http://adil/pwa3/_vti_bin/PSI/Project.asmx?wsdl then i do not get all the classes in project web service like I am not getting ProjectWebSvc.Project , what am i missing here?
Regards
Adil- Marked as answer by Adil Hussain Sunday, December 19, 2010 8:32 PM
- Unmarked as answer by Adil Hussain Sunday, December 19, 2010 8:32 PM
-
no prob dost.
this is quite strange.
tell me, are you able to access the web service directly from the browser?
just a guess but try access web service without using ?wsdl in your IDE - that if you haven't tried already.
| Khurram Jamshed | Follow my blog about Enterprise Project Management Solution | http://khurramjamshed.blogspot.com | -
-
Hi All,
I just want sample steps of creating a simple solution for writing some PSI code which will query, create, checkin or publish project to the project server. I just want to publish the project from Project Server workflow code. I just added the reference to the project web service and thats its but i am not able to find most of the classes through project web service instance.
Regards
Adil Hussain