org.apache.axis2.deployment.util.Utils类的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(10.5k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.apache.axis2.deployment.util.Utils类的一些代码示例,展示了Utils类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils类的具体详情如下:
包路径:org.apache.axis2.deployment.util.Utils
类名称:Utils

Utils介绍

暂无

代码示例

代码示例来源:origin: org.apache.axis2/axis2-kernel

public void setClassLoader(boolean isDirectory, ClassLoader parent, File file, boolean isChildFirstClassLoading) throws AxisFault {
  if (!isDirectory) {
    if (this.file != null) {
      URL[] urlsToLoadFrom;
      try {
        if (!this.file.exists()) {
          throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND,
                              this.file.getAbsolutePath()));
        }
        urlsToLoadFrom = new URL[]{this.file.toURI().toURL()};
        classLoader = Utils.createClassLoader(urlsToLoadFrom, parent, true, file, isChildFirstClassLoading);
      } catch (Exception e) {
        throw AxisFault.makeFault(e);
      }
    }
  } else {
    if (this.file != null) {
      classLoader = Utils.getClassLoader(parent, this.file, isChildFirstClassLoading);
    }
  }
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

private void processEndpoints(AxisService axisService,
    AxisConfiguration axisConfiguration) throws AxisFault {
  Map<String, AxisEndpoint> enspoints = axisService.getEndpoints();
  if (enspoints == null || enspoints.size() == 0) {
    org.apache.axis2.deployment.util.Utils.addEndpointsToService(
        axisService, axisConfiguration);
  }
}

代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ws-axis2

private void addFlowHandlers(Flow flow, ClassLoader moduleClassLoader) throws AxisFault {
  if (flow != null) {
    Utils.addFlowHandlers(flow, moduleClassLoader);
  }
}

代码示例来源:origin: apache/axis2-java

private void setServiceEPR(AxisService axisService, String urlString) throws Exception {
  
  // User can pass multiple location URIs, delimited by a comma.
  String[] urls = urlString.split(",");
  for (String url : urls)
  {
    Utils.addSoap11Endpoint(axisService, url);
    Utils.addSoap12Endpoint(axisService, url);
    if ("http".equals(org.apache.axis2.util.Utils.getURIScheme(url))
        || "https".equals(org.apache.axis2.util.Utils.getURIScheme(url)))
    {
      Utils.addHttpEndpoint(axisService, url);
    }
  }
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public void deploy(DeploymentFileData deploymentFileData) {
  ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
  String serviceHierarchy = Utils.getServiceHierarchy(deploymentFileData.getAbsolutePath(), 
      this.directory);
      File parentFile = file.getParentFile();
      ClassLoader classLoader =
          Utils.getClassLoader(configCtx.getAxisConfiguration().
              getSystemClassLoader(), parentFile,
              configCtx.getAxisConfiguration().isChildFirstClassLoading());
      String className = Utils.getClassNameFromResourceName(file.getName());
      log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_POJO,
          serviceHierarchy + className,
      List<String> classList = Utils.getListOfClasses(deploymentFileData);
      ArrayList<AxisService> axisServiceList = new ArrayList<AxisService>();
      for (String className : classList) {
          urls.add(new File(webLocation).toURI().toURL());
        ClassLoader classLoader = Utils.createClassLoader(
            urls,
            configCtx.getAxisConfiguration().getSystemClassLoader(),

代码示例来源:origin: org.apache.axis2/axis2-kernel

excludeops = new ArrayList<String>();
Utils.addExcludeMethods(excludeops);
Utils.processBeanPropertyExclude(service);
if (!service.isUseUserWSDL()) {
        Utils.fillAxisService(service, axisConfig,
            excludeops, null);
      } else {
        ArrayList nonRpcOperations = getNonRPCMethods(service);
        Utils.fillAxisService(service, axisConfig,
            excludeops, nonRpcOperations);

代码示例来源:origin: org.bluestemsoftware.open.eoa.ext/ext-client-test

serviceGroup.setServiceGroupName(serviceName);
servicesURL = new URL(servicesURL.toString() + "/"); // ADDED. url's a dir, not a file - TWW
ClassLoader serviceClassLoader = Utils.createClassLoader(new URL[] { servicesURL }, axisConfig
    .getServiceClassLoader(), false, null); // MODIFIED. SET extractJars TO FALSE - TWW
serviceGroup.setServiceGroupClassLoader(serviceClassLoader);

代码示例来源:origin: org.apache.axis2/axis2-kernel

serviceGroup.setServiceGroupName(serviceName);
ClassLoader serviceClassLoader = Utils
    .createClassLoader(new URL[] { servicesURL }, axisConfig
        .getServiceClassLoader(), true, (File) axisConfig
        .getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
    WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
        wsdlStream, null, null);
    File file = Utils.toFile(servicesURL);
    if (file != null && file.exists()) {
      wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
      WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
          wsdlStream, axisService);
      File file = Utils.toFile(servicesURL);
      if (file != null && file.exists()) {
        wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(

代码示例来源:origin: org.codehaus.fabric3/fabric3-binding-ws-axis2

private void setMessageReceivers(Wire wire, AxisService axisService) throws Exception {
  Map<String, InvocationChain> interceptors = new HashMap<String, InvocationChain>();
  for (InvocationChain chain : wire.getInvocationChains()) {
    interceptors.put(chain.getPhysicalOperation().getName(), chain);
  }
  Utils.fillAxisService(axisService, configurationContext.getAxisConfiguration(), null, null);
  for (Iterator<?> i = axisService.getOperations(); i.hasNext();) {
    AxisOperation axisOp = (AxisOperation) i.next();
    InvocationChain invocationChain = interceptors.get(axisOp.getName().getLocalPart());
    MessageReceiver messageReceiver = null;
    if (WSDL2Constants.MEP_URI_IN_ONLY.equals(axisOp.getMessageExchangePattern()) ||
        WSDL2Constants.MEP_URI_ROBUST_IN_ONLY.equals(axisOp.getMessageExchangePattern())) {
      messageReceiver = new InOnlyServiceProxyHandler(invocationChain);
    } else {//Default MEP is IN-OUT for backward compatibility
      messageReceiver = new InOutServiceProxyHandler(invocationChain);
    }
    axisOp.setMessageReceiver(messageReceiver);
  }
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public void undeploy(String fileName) throws DeploymentException {
  String serviceHierarchy = Utils.getServiceHierarchy(fileName, this.directory);
  fileName = Utils.getShortFileName(fileName);
  if (fileName.endsWith(".class")) {
    String className = Utils.getClassNameFromResourceName(fileName);
    className = serviceHierarchy + className;
    try {

代码示例来源:origin: org.apache.axis2/axis2-kernel

AxisService axisService) throws AxisFault {
Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS,
    implClass, false);
parameter.setParameterElement(paraElement);
    Java2WSDLConstants.URI_2001_SCHEMA_XSD);
axisService.setNamespaceMap(map);
Utils.processBeanPropertyExclude(axisService);
axisService.setElementFormDefault(false);
try {
if ((endpointName == null || endpointName.length() == 0)
    && axisService.getAxisConfiguration() != null) {
  Utils.addEndpointsToService(axisService, axisService.getAxisConfiguration());

代码示例来源:origin: org.apache.axis2/axis2-kernel

public static ClassLoader getClassLoader(ClassLoader parent, String path, boolean isChildFirstClassLoading)
    throws DeploymentException {
  return getClassLoader(parent, new File(path), isChildFirstClassLoading);
}

代码示例来源:origin: org.wso2.carbon.data/org.wso2.carbon.dataservices.core

/**
 * Retrieve the service name from the deployment path.
 * @param deploymentFilePath Deployment file path
 * @return The service name
 */
public static String getServiceNameFromPath(String repoDir, File deploymentFile) {
  String heirarchy = Utils.getServiceHierarchy(deploymentFile.getAbsolutePath(), repoDir);
  String name = deploymentFile.getName();
  int index = name.lastIndexOf("." + DBConstants.DBS_FILE_EXTENSION);
  if (index == -1) {
    return null;
  }
  name = name.substring(0, index);
  return heirarchy + name;
}

代码示例来源:origin: org.apache.axis2/axis2-kernel

public void undeploy(String fileName) throws DeploymentException {
  try {
    String serviceHierarchy = Utils.getServiceHierarchy(fileName, this.directory);
    fileName = Utils.getShortFileName(fileName);
    fileName = DeploymentEngine.getAxisServiceName(fileName);

代码示例来源:origin: org.apache.axis2/axis2-kernel

Utils.addExcludeMethods(excludeOpeartion);
  schemaGenerator.setExcludeMethods(excludeOpeartion);
} catch (Exception e) {

代码示例来源:origin: apache/axis2-java

public void deploy(DeploymentFileData deploymentFileData) {
  ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();
  String serviceHierarchy = Utils.getServiceHierarchy(deploymentFileData.getAbsolutePath(), 
      this.directory);
      File parentFile = file.getParentFile();
      ClassLoader classLoader =
          Utils.getClassLoader(configCtx.getAxisConfiguration().
              getSystemClassLoader(), parentFile,
              configCtx.getAxisConfiguration().isChildFirstClassLoading());
      String className = Utils.getClassNameFromResourceName(file.getName());
      log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_POJO,
          serviceHierarchy + className,
      List<String> classList = Utils.getListOfClasses(deploymentFileData);
      ArrayList<AxisService> axisServiceList = new ArrayList<AxisService>();
      for (String className : classList) {
          extraUrls.add(new File(webLocation).toURI().toURL());
        ClassLoader classLoader = Utils.createClassLoader(
            deploymentFileData.getFile().toURI().toURL(),
            extraUrls.toArray(new URL[extraUrls.size()]),

代码示例来源:origin: org.apache.axis2/axis2-java2wsdl

private void setServiceEPR(AxisService axisService, String urlString) throws Exception {
  
  // User can pass multiple location URIs, delimited by a comma.
  String[] urls = urlString.split(",");
  for (String url : urls)
  {
    Utils.addSoap11Endpoint(axisService, url);
    Utils.addSoap12Endpoint(axisService, url);
    if ("http".equals(org.apache.axis2.util.Utils.getURIScheme(url))
        || "https".equals(org.apache.axis2.util.Utils.getURIScheme(url)))
    {
      Utils.addHttpEndpoint(axisService, url);
    }
  }
}

代码示例来源:origin: apache/axis2-java

excludeops = new ArrayList<String>();
Utils.addExcludeMethods(excludeops);
Utils.processBeanPropertyExclude(service);
if (!service.isUseUserWSDL()) {
        Utils.fillAxisService(service, axisConfig,
            excludeops, null);
      } else {
        ArrayList nonRpcOperations = getNonRPCMethods(service);
        Utils.fillAxisService(service, axisConfig,
            excludeops, nonRpcOperations);

代码示例来源:origin: org.apache.axis2/axis2-kernel

ClassLoader deploymentClassLoader = Utils.createClassLoader(new URL[] { fileUrl },
    axisConfig.getModuleClassLoader(), true,
    (File) axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),

代码示例来源:origin: apache/axis2-java

serviceGroup.setServiceGroupName(serviceName);
ClassLoader serviceClassLoader = Utils
    .createClassLoader(servicesURL, null, axisConfig
        .getServiceClassLoader(), (File) axisConfig
        .getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
    WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
        wsdlStream, null, null);
    File file = Utils.toFile(servicesURL);
    if (file != null && file.exists()) {
      wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
      WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
          wsdlStream, axisService);
      File file = Utils.toFile(servicesURL);
      if (file != null && file.exists()) {
        wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(

相关文章