2 Replies Latest reply on Feb 22, 2011 7:16 AM by user243146

    User Defined Fields Through Web Services


      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 ++)

      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.