Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Testing HP Demand Management Web Services

SOLVED
Go to solution
Highlighted
Diegasus
Acclaimed Contributor

Testing HP Demand Management Web Services

Hi all,

 

i'm writing this post because i'm new with HP PPM WebServices. I want to test the WS on Demand management and i'm using soapUI tool. But i have some issues on testing... The expected results are not show.

 

I hope someone cann give me some tips ;-)

 

 

1. First of all, i started soapUI and i create a new Project. I enter "Project Name" and in the field "Initial WSDL/WADL" i entered <Host>:<Port>/itg/ppmservices/DemandService?wsdl (i'm using the "Web Services Guide" of HP PPM v9.20 as reference)

 

2. The Project is created and i see my project on the left side of soapUI with all the possible Requests that a can test:

-addRequestNote

-createRequest

-deleteRequest

-executeWFtransitions

-executeWFtransitionsWithSecurityCheck

-getRequests

-setRequestsField

-setrequestRemoteReferenceStatus

 

3. Now i try to test a simple funktion: "getRequests". I dobleClick on the function and the tool open a new window with the URL where the XML function will be sent (POST). The URL is <Host>:<Port>/itg/ppmservices/DemandService

On the right-side i see the XML for the "getRequests":

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://mercury.com/ppm/dm/service/1.0" xmlns:ns1="http://mercury.com/ppm/dm/1.0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:getRequests>
         <!--1 or more repetitions:-->
         <ns:requestIds>
            <ns1:id>30164</ns1:id>
            <!--Optional:-->
            <ns1:serverURL></ns1:serverURL>
         </ns:requestIds>
      </ns:getRequests>
   </soapenv:Body>
</soapenv:Envelope>

I set the requestID 30164 (the requestID exist on PPM...)

 

I set the Headers parameter:

Content-Type: appplication/xml

Authorization: Basic ......

 

Now i'm ready for the test, i send the request but i receive this answare:

 

<soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Header>
      <wsa:ReplyTo>
         <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
      </wsa:ReplyTo>
      <wsa:MessageID>urn:uuid:8F9474EA4E247C0FFC1365600677340</wsa:MessageID>
      <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action>
   </soapenv:Header>
   <soapenv:Body>
      <soapenv:Fault>
         <soapenv:Code>
            <soapenv:Value>soapenv:Sender</soapenv:Value>
         </soapenv:Code>
         <soapenv:Reason>
            <soapenv:Text xml:lang="en-US">com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]</soapenv:Text>
         </soapenv:Reason>
         <soapenv:Detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

 

I've tried other URL or Client settings and i've checked the configuration on PPM (WS are active)

 

Do i something wrong in what i've described?

Or should i test on a different way?

How should i debug?

What is the standard way to use these WS?

 

 

I've tried with the REST WS, in my browser, for example :

<Host>:<Port>/itg/rest/dm/requests/30163 or

<Host>:<Port>/itg/rest/dm/requestTypes

 

and it work, the Browser show the corresponding XML data.

 

 

Someone had some tips/inputs?

Tks

 

Diegasus

 

 

2 REPLIES
Diegasus
Acclaimed Contributor
Solution

Re: Testing HP Demand Management Web Services

Solved.

 

 

Hi,

 

i think the Problem was the Header "Content-Type: appplication/xml".

 

When i use just the basis Authentication (or just User/Password) and i give an ID in the XML (like in my preview post) i receive the espected answare.

 

Regards

Diego

 

 

 

DipK
Occasional Contributor

Re: Testing HP Demand Management Web Services

Hi Diego,

 

 

I was testing the createRequest through SOAPUI but its giving error:

Missing required data&colon; Expected "{http://mercury.com/ppm/dm/1.0}fieldChangeNotes" end tag, found "{http://mercury.com/ppm/dm/1.0}newValue" start tag (line -1, col -1, in SOAP-message).</exception:detail>

 

I have checked the code and end tag does exists. Not sure what is the issue.

 

Please help me on the same and provide me the code if you have tried it.

 

Thanks & Regards,

Dip

 

//Add this to "OnDomLoad" event