none
code to publish project from workflow code RRS feed

  • Question

  • Hi All,

         Has anybody published project from the workflow by using code?

    Regards

    Adil

    Saturday, December 11, 2010 8:00 PM

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
    Sunday, December 12, 2010 8:35 AM
  • 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
    Monday, December 13, 2010 9:42 AM
  • 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 |
    Monday, December 13, 2010 10:48 AM
  • I am able to access it with ?wsdl but not able to access it without ?wsdl. Did I miss any binaries while installing project server or i am not sure  i need to add any dll reference?

     

    Regards

    Adil Hussain

    Monday, December 13, 2010 6:33 PM
  • 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

    Sunday, December 19, 2010 8:35 PM