ADT Absent Member.
Absent Member.
1204 views

Update Program Web Service Error - Please help

Jump to solution

Hi all,

I am new to Program Web Service in PPM. Recently our PPM 8.0 is updated to PPM 9.x.

I am trying to update Program Name and my program doesnt work.

Basically what I do is I read the Program first (the read program part is working fine, because when I print out the result it actually shows the program details). However, when I run the update program part, ppm returns some errors.

So this is my code to update (I'm using the example in the webservice toolkit to update program):

private void testUpdateProgram(final ProgramInfo program) throws Exception {
System.out.println("testUpdateProgram started...");
final ProgramServiceStub stub = new ProgramServiceStub(context, serviceURL);
final UpdateProgramDocument doc = UpdateProgramDocument.Factory.newInstance();
final String programNewName = "Enterprise Wide Surveillance System" + "_Update";
program.setName(programNewName);
doc.addNewUpdateProgram().setProgram(program);
final UpdateProgramResponseDocument reDoc = stub.updateProgram(doc);
final ProgramInfo programRead = this.testReadProgram(program.getId().longValue());
System.out.println("New Program after update:");
printProgramInfo(programRead);
System.out.println("testUpdateProgram completed.");
}


and this is the error im getting:

 

org.apache.axis2.AxisFault: Internal error has occurred while calling PPM Web Service. Contact PPM Center support with the detailed information if the problem persists. (KNTA-11186) Details: Missing required data: Expected "{http://mercury.com/ppm/pgm/1.0}userData" end tag, found "{http://mercury.com/ppm/pgm/1.0}userData1" start tag (line -1, col -1, in SOAP-message).
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
at com.mercury.itg.ws.pgm.client.ProgramServiceStub.updateProgram(ProgramServiceStub.java:707)
at com.velosoft.dbs.projectcreation.ProjectCreationAddProgram.testUpdateProgram(ProjectCreationAddProgram.java:268)

 

Please kindly help me. I really no clue of whats this error is about. Thank you!

0 Likes
1 Solution

Accepted Solutions
Established Member.. Utkarsh_Mishra
Established Member..

Re: Update Program Web Service Error - Please help

Jump to solution

This issue you are facing is due to Program web service bug. The web service is not able to handle the User date objects.

 

To make your code work add the lines shown in RED in your code. (this is for validating the bug, as after adding these lines it will remove the user data value; but your code will execute properly).

 

final ProgramInfo program = mainReadProgram(prgmID);
final ContentInfo content = program.getContent();


/* Add these lines */

program.unsetUserData();
program.unsetNotes();


.
.
.
.
/*Your code*/

doc.addNewUpdateProgram().setProgram(program);
final UpdateProgramResponseDocument reDoc = stub.updateProgram(doc);

 

Right Now I am doing like this.

 

  1. Take backup of user data in ArrayList
  2. Perform web service operation for Program
  3. Unset User data(s)
  4. Complete Web service transaction
  5. Restore User data via DB call using Array List

 

This issue is resolved in version 9.2 onward.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
6 Replies
Outstanding Contributor.. Loc_Nguyen_PPM Outstanding Contributor..
Outstanding Contributor..

Re: Update Program Web Service Error - Please help

Jump to solution

Hi ADT,

 

Can you provide more detail about your issue ? 

 

Can you reproduce this error and provide log "serverLog.txt"  for find out the root cause.

 

I found some people had the error like you and it can be resolve by upgrade they PPM to higher version.

 

 

Thanks,

 

 

 

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
0 Likes
Established Member.. Utkarsh_Mishra
Established Member..

Re: Update Program Web Service Error - Please help

Jump to solution

I think your user data 1 is mandatory feild in the Program. Make it non-mandatory and try to run the code.

 

Till PPM version 9.14 SP 08 this issue is there, HP fixed this issue in next versions. But for this you need to specifically set the user data object in the code itself.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
ADT Absent Member.
Absent Member.

Re: Update Program Web Service Error - Please help

Jump to solution

Hi vinhloc81,
This is my code. So basically what I do here is to read a Program with PPM Program ID 3000. After I read the program, I would like to update the Program Name.

serviceURL = "http://localhost/itg/ppmservices/ProgramService"
//read program
ProgramServiceStub stub = new ProgramServiceStub(context, serviceURL);
ReadProgramDocument doc = ReadProgramDocument.Factory.newInstance();
ReadProgram readProgram = doc.addNewReadProgram();
readProgram.setProgramId(30000);
ReadProgramResponseDocument responseDoc = stub.readProgram(doc);
ProgramInfo program = responseDoc.getReadProgramResponse().getProgram();
testUpdateProgram(program);

//update program
private void testUpdateProgram(ProgramInfo program) throws Exception {
System.out.println("testUpdateProgram started...");
ProgramServiceStub stub = new ProgramServiceStub(context, serviceURL);
UpdateProgramDocument doc = UpdateProgramDocument.Factory.newInstance();
String programNewName = "Enterprise Wide Surveillance System" + "_Update";
program.setName(programNewName);
doc.addNewUpdateProgram().setProgram(program);
UpdateProgramResponseDocument reDoc = stub.updateProgram(doc);
}


I manage to reproduce the error and capture the "serverLog.txt":

DEBUG JSESSIONID=E84A75379D6BCB39C0C04A3D0A74BBC4.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.cleanup.CleanupHandler:2014/07/04-14:20:49.431 SGT: In server side cleanup
DEBUG JSESSIONID=1E112DDD163ABB5D1D4230E1CAB2DBD9.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.security.PreSecurityHandler:2014/07/04-14:20:49.506 SGT: Http Basic Authentication is enforced
DEBUG JSESSIONID=1E112DDD163ABB5D1D4230E1CAB2DBD9.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.security.PreSecurityHandler:2014/07/04-14:20:49.506 SGT: Client ip address: 127.0.0.1
DEBUG JSESSIONID=1E112DDD163ABB5D1D4230E1CAB2DBD9.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.security.PasswordCallbackHandler:2014/07/04-14:20:49.516 SGT: Retrieving decryption password from configuration.
DEBUG JSESSIONID=1E112DDD163ABB5D1D4230E1CAB2DBD9.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.security.PasswordCallbackHandler:2014/07/04-14:20:49.523 SGT: Authenticating user with 'PasswordText' type password.
DEBUG JSESSIONID=1E112DDD163ABB5D1D4230E1CAB2DBD9.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.logging.LoggingHandler:2014/07/04-14:20:49.614 SGT:

==== Server Request ====

To: http://localhost/itg/ppmservices/ProgramService

expect: 100-continue
content-type: application/soap+xml; charset=UTF-8;action="urn:updateProgram";
connection: Keep-Alive
host: localhost
content-length: 14405
user-agent: Axis2

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="true"><xenc:EncryptedKey Id="EncKeyId-389001391">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<wsse:SecurityTokenReference><ds:X509Data>
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=ppmservice,OU=RND,O=Mercury,C=US</ds:X509IssuerName>

<ds:X509SerialNumber>1168891337</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data></wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData><xenc:CipherValue>n23ZGVtGvGTwU3KoBYfNVjcfeqGqcIxYJ8nrQOliemd/FklrXlhmWcZPx4sMRvZ/Ajo/5nKvs+K7pEZCXi3x5tPBj7HP+Fu8dlNF9B3uKjILQ2x8Z1ZSQiw+LC9wG0kY6JsVMn7MU+ItdXzA3fuZt0NUaizVpEmi9xes/VpkAMI=</xenc:CipherValue></xenc:CipherData>
<xenc:ReferenceList><xenc:DataReference URI="#EncDataId-1006157069" /></xenc:ReferenceList></xenc:EncryptedKey><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-2083747981"><wsu:Created>2014-07-04T06:20:49.493Z</wsu:Created><wsu:Expires>2014-07-04T06:25:49.493Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-701343131"><wsse:Username>admin</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><updateProgram xmlns="http://mercury.com/ppm/pgm/service/1.0"><program xmlns:service="http://mercury.com/ppm/pgm/service/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><id xmlns="http://mercury.com/ppm/pgm/1.0">30000</id><name xmlns="http://mercury.com/ppm/pgm/1.0">Enterprise Wide Surveillance System_Update</name><managers xmlns="http://mercury.com/ppm/pgm/1.0">
Processor2:com.mercury.itg.ws.core.handlers.logging.LoggingHandler:2014/07/04-14:20:49.618 SGT:

==== Server Fault Response ====

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header /><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Sender</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">Expected "{http://mercury.com/ppm/pgm/1.0}userData" end tag, found "{http://mercury.com/ppm/pgm/1.0}userData1" start tag (line -1, col -1, in SOAP-message)</soapenv:Text></soapenv:Reason><soapenv:Detail></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>


DEBUG JSESSIONID=1E112DDD163ABB5D1D4230E1CAB2DBD9.DBS,USERNAME=:TP-Processor2:com.mercury.itg.ws.core.handlers.cleanup.CleanupHandler:2014/07/04-14:20:49.618 SGT: In server side cleanup
ERROR JSESSIONID=271C050BA85E750E817CAF5DCB47CA3A.DBS,USERNAME=admin server:TP-Processor2:com.kintana.core.server.servlet.download:2014/07/04-14:20:56.950 SGT:
Filtered Out 35 Stack Trace Lines.

0 Likes
ADT Absent Member.
Absent Member.

Re: Update Program Web Service Error - Please help

Jump to solution

Hi Utkarsh,

 

I have made it non mandatory and run the code. Still encounter the same error. My code is basically trying to update the program name. I wonder why the error. Has it got to do with the webservice version that is outdated or some missing configurations?

 

Thank you.

0 Likes
Established Member.. Utkarsh_Mishra
Established Member..

Re: Update Program Web Service Error - Please help

Jump to solution

This issue you are facing is due to Program web service bug. The web service is not able to handle the User date objects.

 

To make your code work add the lines shown in RED in your code. (this is for validating the bug, as after adding these lines it will remove the user data value; but your code will execute properly).

 

final ProgramInfo program = mainReadProgram(prgmID);
final ContentInfo content = program.getContent();


/* Add these lines */

program.unsetUserData();
program.unsetNotes();


.
.
.
.
/*Your code*/

doc.addNewUpdateProgram().setProgram(program);
final UpdateProgramResponseDocument reDoc = stub.updateProgram(doc);

 

Right Now I am doing like this.

 

  1. Take backup of user data in ArrayList
  2. Perform web service operation for Program
  3. Unset User data(s)
  4. Complete Web service transaction
  5. Restore User data via DB call using Array List

 

This issue is resolved in version 9.2 onward.

Cheers..
Utkarsh Mishra

-- Remember to give Kudos to answers! (click the KUDOS star)
ADT Absent Member.
Absent Member.

Re: Update Program Web Service Error - Please help

Jump to solution

Hi Utkarsh,

 

It's working now. Thank you so much for your help!

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.