Absent Member.. Absent Member..
Absent Member..
1734 views

how to create a PPM request from Service Manager

Hi;

I want to create a request automaticly from Service manager.

In service manager a group leader will tick a check box and press create request button.

Than request will be created directly.

 

There is a webservice in ppm called demandservice webservice. There is a create request attribute in the webservice. Can I send values from SM to that web service ?

 

 

I asked the same question in PPM forum. But they proposed using ALM. We are using QC 9,52. We are not using ALM yet.

 

Regards

0 Likes
4 Replies
Fleet Admiral
Fleet Admiral

Please have a look at SM webservices Tailoring Guide(Chapter 5-Consume an external webservice). This will give you a clear idea of how to consume an external webservice like PPM Webservice from SM.

0 Likes
Absent Member.. Absent Member..
Absent Member..

Here is webservice code:

 

using

System;

using

System.Collections.Generic;

using

System.Text;

using

DemandServiceTest.localhostDemandService;

using

Microsoft.Web.Services3;

using

Microsoft.Web.Services3.Design;

using

Microsoft.Web.Services3.Security;

using

Microsoft.Web.Services3.Security.Tokens;

//using Office = Microsoft.Office.Core;

using

Excel = Microsoft.Office.Interop.Excel;

 

namespace

DemandServiceTest

{

classProgram

{

staticDemandServiceWseserviceProxy;

 

staticvoid Main(string[] args)

{

 

// create service proxy

serviceProxy =

newDemandServiceWse();

 

UsernameOverTransportAssertion policyAssertion = newUsernameOverTransportAssertion();

 

Console.WriteLine("done");

 

Console.Write("\nSetting authentication policies...");

 

// setup WS-Security credentials

policyAssertion.UsernameTokenProvider =

newUsernameTokenProvider("admin", "-----");

 

Policy policy = newPolicy(policyAssertion);

serviceProxy.SetPolicy(policy);

Console.WriteLine("done");

 

//TestDemandService();//DeleteRequests("38400");inti = 1;

 

 

staticvoidTestDemandService()

 

Console.WriteLine("\nTests completed. Press any key to exit.");

 

Console.ReadKey();

 

 

 

}

staticvoidTestDemandService()

{

Console.WriteLine("\nStarting Demand Service tests...");

 

//Test Create RequestStringrequestID = CreateRequest();

 

//Test Get Request

GetRequests(requestID);

//Test Update Fields

SetRequestFields(requestID);

//Test Delete Requests

DeleteRequests(requestID);

Console.WriteLine("\nDemand Service tests complete.");

}

staticstringCreateRequest()

{

Console.WriteLine("\nIn CreateRequest");

 

//Convert request bean to the client stubRequest request = newRequest();

request.requestType =

"Bug";

 

//Set Required FieldsSimpleField[] fields = newSimpleField[6];

 

//Description

fields[0] =

newSimpleField();

fields[0].token =

"REQ.DESCRIPTION";

fields[0].stringValue =

newString[] { "WebService Test"};

 

//Department

fields[1] =

newSimpleField();

fields[1].token =

"REQ.DEPARTMENT_NAME";

fields[1].stringValue =

newString[] { "Finance"};

 

//Module

fields[2] =

newSimpleField();

fields[2].token =

"REQD.VP.MODULE";

fields[2].stringValue =

newString[] { "Module A"};

 

//Platform

fields[3] =

newSimpleField();

fields[3].token =

"REQD.VP.PLATFORM";

fields[3].stringValue =

newString[] { "Unix"};

 

//Impact

fields[4] =

newSimpleField();

fields[4].token =

"REQD.VP.IMPACT";

fields[4].stringValue =

newString[] { "Warning"};

 

//Reproducible

fields[5] =

newSimpleField();

fields[5].token =

"REQD.VP.REPRO";

fields[5].stringValue =

newString[] { "Y"};

 

//Add fields to request

request.simpleFields = fields;

//Set NotesNote[] notes = newNote[1];

notes[0] =

newNote();

notes[0].author =

"admin";

notes[0].content =

"WebService Test Note";

notes[0].creationDate =

DateTime.Now;

notes[0].creationDateSpecified =

true;

 

//Add notes to request

request.notes = notes;

//Call WebservicecreateRequest cr = newcreateRequest();

cr.requestObj = request;

createRequestResponseresponse = serviceProxy.createRequest(cr);

 

Console.WriteLine("createRequest Succeeded");

 

Console.WriteLine("Request: " + response.@return.identifier.id + " Status: "+ response.@return.status);

 

returnresponse.@return.identifier.id;

}

}

0 Likes
Absent Member.. Absent Member..
Absent Member..

To download PPM webservices:

 

MY_PPM_SERVER_ADRESS/itg/download/webservice/webservice_toolkit.zip

0 Likes
Absent Member.. Absent Member..
Absent Member..

could you guide me?

how can I call webservice to create request?

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.