Valued Contributor
Project Management Web Services

Hi everybody,


I'm using for the first time PPM Web Service and I have a question regardly simpleFields in the Project Management Web Services.


When creating a request I dont have troubles creating fields and notes using the objects SimpleFields and Notes but in the ProjectService wsdl I don't know how to create a project with the simple fields I want like in DemandServices. Notes objects are supported by ProjectType


createProject cp = new createProject();
cp.projectBean = new projectType();
cp.projectBean.Item = tipoProyecto;
cp.projectBean.projectName = nombreProyecto;
cp.projectBean.plannedFinishPeriodFullName = periodoI;
cp.projectBean.plannedStartPeriodFullName = periodoF;
cp.projectBean.regionName = region;
cp.projectBean.projectManagerUserName = new string[1] { projectManager };


ProjectService.Note[] notes = new ProjectService.Note[indNotas];
//Indice 1
notes[0] = new ProjectService.Note();
notes[0].author = ConfigurationManager.AppSettings["userPPM"].ToString();
notes[0].content = "Actualización desde WebService";
notes[0].creationDate = DateTime.Now;
notes[0].creationDateSpecified = true;

if (!nota.Equals(String.Empty))
notes[1] = new ProjectService.Note();
notes[1].author = ConfigurationManager.AppSettings["userPPM"].ToString();
notes[1].content = nota;
notes[1].creationDate = DateTime.Now;
notes[1].creationDateSpecified = true;

cp.projectBean.notes = notes;


Do I miss something or should I need to use the DemandService to update the fields?





Honored Contributor
Re: Project Management Web Services

Once the Project us created, you need to use seperate Demand service to update the Project Request ID.

Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
Valued Contributor
Re: Project Management Web Services

Hi Utkarsh,


Thanks for your reply, I have another question, now regarding creating workplan template or creating Blank Work Plan, this object use workPlanInputType instead projectInputType but what I see is that I cannot specified to use the project ID instead the Project Name, there is no ItemElementName object for the input type.


I'm using PPM 9.22, is this normal or is something related to the version?





Honored Contributor
Re: Project Management Web Services
[ Edited ]

The WordPlanInputType data type is typically used for operations on a project’s work plan.


You can either specify the projectName property or the projectId property, but not both of them. Neither
of these properties is “required,” but at least one must be specified.


Below is the code to set Project ID in workplaninputtype.


private void createBlankWorkPlan(Long projectID) throws RemoteException {		
		//Create inpput document
		CreateBlankWorkPlanDocument crtblkWpDoc = CreateBlankWorkPlanDocument.Factory.newInstance();
		//create and add an empty CreateBlankWorkPlan element
		CreateBlankWorkPlan cbwp = crtblkWpDoc.addNewCreateBlankWorkPlan();
		//Create and add an empty WorkPlanInputType element
		WorkPlanInputType wpit = cbwp.addNewProjectInput();
		//Set the value for this element
		//Calling web service 
		ProjectServiceStub stub = new ProjectServiceStub(ctx, WSURL);




Secondly if you want you can easily use Project Name, as PPM does not allow duplicate Project Name in the system.


Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)