admin 发表于 2015-2-6 10:19:02

Teamcenter SOA开发源码分享:设置自定义的policy文件

Teamcenter SOA开发源码分享:设置自定义的policy文件


public void setPolicyFile()
{
    String policy = connection.getCurrentObjectPropertyPolicy();
    System.out.println("\n Current Policy Name: " + policy);

    SessionService sessionSvc = SessionService.getService(connection);

    try
    {
      System.out.println(" Setting Policy File...\n");

      // Policy File: %TC_DATA%\soa\policies\Test.xml
    boolean setPolicy = sessionSvc.setObjectPropertyPolicy("Test");            
    }
    catch (ServiceException e)
    {         
      e.printStackTrace();
    }

    String newPolicy= connection.getCurrentObjectPropertyPolicy();
    System.out.println(" New Policy Name: " + newPolicy);
}

页: [1]
查看完整版本: Teamcenter SOA开发源码分享:设置自定义的policy文件