コード例 #1
0
  /**
   * Creates the impl model from blank wsdl.
   *
   * @param paramModel the param model
   * @param interfaceProject the interface project
   * @param monitor the monitor
   * @return the sOA impl project
   * @throws Exception the exception
   */
  public static SOAImplProject createImplModelFromBlankWsdl(
      ServiceFromWsdlParamModel paramModel,
      SOAIntfProject interfaceProject,
      IProgressMonitor monitor)
      throws Exception {
    // Creates the SOA related metadata
    SOAImplMetadata implMetadata =
        SOAImplMetadata.create(paramModel, interfaceProject.getMetadata());
    ProgressUtil.progressOneStep(monitor);

    SOAProjectEclipseMetadata eclipseMetadata =
        SOAProjectEclipseMetadata.create(
            implMetadata.getServiceImplProjectName(), paramModel.getWorkspaceRootDirectory());
    ProgressUtil.progressOneStep(monitor);

    SOAImplProject implProject = SOAImplProject.create(implMetadata, eclipseMetadata);
    ProgressUtil.progressOneStep(monitor);

    final ISOAOrganizationProvider orgProvider =
        GlobalRepositorySystem.instanceOf()
            .getActiveRepositorySystem()
            .getActiveOrganizationProvider();
    Set<String> requiredLibraries = paramModel.getImplLibs();
    requiredLibraries.addAll(orgProvider.getDefaultDependencies(SupportedProjectType.IMPL));
    implProject.setRequiredLibraries(requiredLibraries);
    // adding the service project now
    Set<String> requiredProjects = paramModel.getImplProjects();
    requiredProjects.add(interfaceProject.getEclipseMetadata().getProjectName());
    implProject.setRequiredProjects(requiredProjects);
    ProgressUtil.progressOneStep(monitor);
    return implProject;
  }
コード例 #2
0
 /**
  * This is called from the UI processors. Since we have the user entered information at the
  * creation flow the UI object is passed and is converted to this intermediate object for the rest
  * of the processing logic.
  *
  * @param paramModel the param model
  * @return This has been made a static factory to enable object pooling and controlled creation.
  * @throws WSDLException the wSDL exception
  */
 public static SOAIntfMetadata create(ServiceFromWsdlParamModel paramModel) throws WSDLException {
   SOAIntfMetadata metadata = new SOAIntfMetadata();
   metadata.setPublicServiceName(paramModel.getPublicServiceName());
   metadata.setServiceName(paramModel.getServiceName());
   metadata.setTypeNamespace(paramModel.getTypeNamespace());
   metadata.setTypeFolding(paramModel.getTypeFolding());
   metadata.setServiceVersion(paramModel.getServiceVersion());
   metadata.setServiceInterface(paramModel.getServiceInterface());
   metadata.setServiceLayer(paramModel.getServiceLayer());
   metadata.setSourceType(SOAProjectConstants.InterfaceSourceType.WSDL);
   metadata.setWsdlSourceType(paramModel.getWSDLSourceType());
   metadata.setOriginalWSDLUrl(paramModel.getOriginalWsdlUrl());
   metadata.setMetadataVersion(SOAProjectConstants.PROPS_DEFAULT_PROPERTY_VERSION);
   metadata.setNamespaceToPackageMappings(paramModel.getNamespaceToPacakgeMappings());
   metadata.setServiceNamespacePart(paramModel.getNamespacePart());
   metadata.setServiceDomainName(paramModel.getServiceDomain());
   SOAIntfUtil.setInformationFromWsdl(paramModel.getOriginalWsdlUrl(), metadata);
   return metadata;
 }