This discussion is archived
2 Replies Latest reply: Feb 21, 2011 11:16 PM by user243146 RSS

User Defined Fields Through Web Services

751780 Newbie
Currently Being Moderated
Hi,

I have written a function which can return Activities using the Primavera web services

The code I have used looks like this

private static List readActivities()
throws Exception
{
URL url = new URL("http://localhost:7001/p6ws/services/ActivityService?wsdl");
ActivityService activityservice = new ActivityService(url);
ActivityPortType activityporttype = activityservice.getActivityPort();
BindingProvider bindingprovider = (BindingProvider)activityporttype;

List fieldList = new ArrayList();
ActivityFieldType[] fTypes = ActivityFieldType.values();

for(int Counter = 0; Counter < fTypes.length; Counter ++)
fieldList.add(fTypes[Counter].value());

List actList = activityporttype.readActivities(fieldList, "Id = '123456'");

return actList;
}

This then returns a list activities with the ID 123456 however I don't know how to return the User Definaed fields that relate to the Activities along with it.

If any one can offer any insight into this, I will be very grateful.

Thanks in advance for your help.

Chris

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points