Primavera (MOSC)

MOSC Banner

Connect P6 Webservice from Java

edited Oct 24, 2023 3:20PM in Primavera (MOSC) 1 commentAnswered

I am trying to connect to P6 web service from Java application.

Client Jar has built with Apache CXF in Java 17.

The code to invoke Read Project from Project Service is


 URL wsdlURL = new URL(projectUrl);

      System.out.println("control here1 " +projectUrl);

      ProjectService service = new ProjectService(wsdlURL);

      System.out.println("control here2");

      ProjectPortType servicePort = service.getProjectPort();

      System.out.println("control here3");

      Client client = ClientProxy.getClient(servicePort);

      System.out.println("control here4");

      client.getOutInterceptors().add(new SAAJOutInterceptor());

      client.getInInterceptors().add(new SAAJInInterceptor());

      client.getOutInterceptors().add(new OutInterceptor(userName, password));

      System.out.println("control here5");

      List<String> fields = new ArrayList<String>();

      fields.add("Name");

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center