gpt4 book ai didi

org.apache.axis2.description.WSDL11ToAxisServiceBuilder类的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 10:21:05 26 4
gpt4 key购买 nike

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

WSDL11ToAxisServiceBuilder介绍

暂无

代码示例

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

public static AxisService createClientSideAxisService(
    Definition wsdlDefinition, QName wsdlServiceName, String portName,
    Options options) throws AxisFault {
  WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(
      wsdlDefinition, wsdlServiceName, portName);
  serviceBuilder.setServerSide(false);
  AxisService axisService = serviceBuilder.populateService();
  AxisEndpoint axisEndpoint = (AxisEndpoint) axisService.getEndpoints()
      .get(axisService.getEndpointName());
  if (axisEndpoint != null) {
    options.setTo(new EndpointReference(axisEndpoint.getEndpointURL()));
    options.setSoapVersionURI((String) axisEndpoint.getBinding()
        .getProperty(WSDL2Constants.ATTR_WSOAP_VERSION));
  }
  return axisService;
}

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

/**
 * Reads the WSDL Object Model from the given location.
 *
 * @param wsdlURI the filesystem location (full path) of the WSDL file to read in.
 * @return the WSDLDescription object containing the WSDL Object Model of the given WSDL file
 * @throws IOException on errors reading the WSDL file
 */
public AxisService getAxisService(String wsdlURI) throws Exception {
  URL url;
  if (wsdlURI.indexOf("://") == -1) {
    url = new URL("file", "", wsdlURI);
  } else {
    url = new URL(wsdlURI);
  }
  WSDL11ToAxisServiceBuilder builder =
      new WSDL11ToAxisServiceBuilder(url.openConnection().getInputStream());
  builder.setDocumentBaseUri(url.toString());
  builder.setBaseUri(getBaseUri(wsdlURI));
  builder.setCodegen(true);
  return builder.populateService();
}

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

/**
 * Populates and returns an AxisService from a WSDL.
 * @param wsdlContent The WSDL content
 * @return AxisService which represents the given WSDL
 * @throws DataServiceFault
 */
private static AxisService getAxisServiceFromWSDL(byte[] wsdlContent) throws DataServiceFault {
  try {
    AxisService axisService;
    ByteArrayInputStream byteIn = new ByteArrayInputStream(wsdlContent);
    if (isWSDL20(wsdlContent)) {
      axisService = new WSDL20ToAxisServiceBuilder(byteIn, null, null).populateService();
    } else { // Must be WSDL11
      axisService = new WSDL11ToAxisServiceBuilder(byteIn, null, null).populateService();
    }
    return axisService;
  } catch (AxisFault e) {
    String message = "Error in getting AxisService from WSDL";
    throw new DataServiceFault(e, message);
  }
}

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

new WSDL11ToAxisServiceBuilder(def,
        getServiceDescription().getServiceQName(),
        getPortQName().getLocalPart());
serviceBuilder.setCustomResolver(uriResolver);
  serviceBuilder.setServerSide(true);
else
  serviceBuilder.setServerSide(false);
  ac = composite.getConfigurationContext().getAxisConfiguration();
  if (ac != null) {
    serviceBuilder.useAxisConfiguration(ac);
axisService = serviceBuilder.populateService();

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

WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
    wsdlStream, null, null);
File file = Utils.toFile(servicesURL);
if (file != null && file.exists()) {
  wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
      wsdlLocation, file, wsdlStream));
  wsdl2AxisServiceBuilder
      .setCustomResolver(new AARFileBasedURIResolver(file));
  wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString());
axisService = wsdl2AxisServiceBuilder.populateService();
axisService.setWsdlFound(true);
axisService.setCustomWsdl(true);
  WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
      wsdlStream, axisService);
  File file = Utils.toFile(servicesURL);
  if (file != null && file.exists()) {
    wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
        wsdlLocation, file, wsdlStream));
    wsdl2AxisServiceBuilder.setCustomResolver(new AARFileBasedURIResolver(
        file));
    wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString());
  axisService = wsdl2AxisServiceBuilder.populateService();
  axisService.setWsdlFound(true);
  axisService.setCustomWsdl(true);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

Options options) throws AxisFault {
Definition def = getDefinition(definition, serviceName);
final WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(def, serviceName, portName);
serviceBuilder.setServerSide(false);
serviceBuilder.setCustomResolver(new URIResolverImpl(def));
serviceBuilder.setBaseUri(def.getDocumentBaseURI());

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

builder = new WSDL11ToAxisServiceBuilder(
      wsdl4jDef,
      serviceQname,
      getPortName(),
      isAllPorts());
  builder.setCodegen(true);
  addAxisService(builder.populateService());
} else {
  builder = new WSDL11ToAllAxisServicesBuilder(wsdl4jDef, getPortName());
  builder.setCodegen(true);
  builder.setAllPorts(isAllPorts());
  setAxisServices(
      ((WSDL11ToAllAxisServicesBuilder)builder).populateAllServices());

代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel

serviceName,
    portName);
serviceBuilder.setBaseUri(wsdlBaseURI.toString());
serviceBuilder.setCustomResolver(new Axis2UriResolver());
try {
  serviceBuilder.setCustomWSDLResolver(new Axis2WSDLLocator(wsdlBaseURI));
} catch (URISyntaxException e) {
  String errorMessage = "URI syntax invalid.";
  handleException(pid, errorMessage, e);
serviceBuilder.setServerSide(true);

代码示例来源:origin: wso2/wso2-synapse

equals(wsdlNamespace.getNamespaceURI())) {
  wsdlToAxisServiceBuilder =
      new WSDL11ToAxisServiceBuilder(wsdlInputStream);
} else {
  handleException("Unknown WSDL format.. not WSDL 1.1 or WSDL 2.0");
          wsdlToAxisServiceBuilder).setCustomWSDLResolver(
          new CustomWSDLLocator(new InputSource(wsdlInputStream),
              wsdlURI != null ? wsdlURI.toString() : "",
          wsdlToAxisServiceBuilder).setCustomWSDLResolver(
          new CustomWSDLLocator(new InputSource(wsdlInputStream),
              wsdlURI != null ? wsdlURI.toString() : ""));

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

public AxisService run() throws AxisFault {
    return serviceBuilder.populateService();
  }
});

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

final WSDLToAxisServiceBuilder builder;
try {
  builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName());
} finally {
  if (oldTCCL != null) {

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

/**
 * sets a custom WSDL locator
 *
 * @param customResolver
 */
public void setCustomWSDLResolver(WSDLLocator customResolver) {
  this.customWSDLResolver = customResolver;
  setDocumentBaseUri(this.customWSDLResolver.getBaseURI());
}

代码示例来源:origin: org.apache.synapse/synapse-core

wsdlKey);
((WSDL11ToAxisServiceBuilder) wsdlToAxisServiceBuilder).
    setCustomWSDLResolver(userDefWSDLLocator);

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

new WSDL11ToAxisServiceBuilder(def,
        getServiceDescription().getServiceQName(),
        getPortQName().getLocalPart());
serviceBuilder.setCustomResolver(uriResolver);
  serviceBuilder.setServerSide(true);
else
  serviceBuilder.setServerSide(false);
  ac = composite.getConfigurationContext().getAxisConfiguration();
  if (ac != null) {
    serviceBuilder.useAxisConfiguration(ac);
axisService = serviceBuilder.populateService();

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

WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
    wsdlStream, null, null);
File file = Utils.toFile(servicesURL);
if (file != null && file.exists()) {
  wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
      wsdlLocation, file, wsdlStream));
  wsdl2AxisServiceBuilder
      .setCustomResolver(new AARFileBasedURIResolver(file));
  wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString());
axisService = wsdl2AxisServiceBuilder.populateService();
axisService.setWsdlFound(true);
axisService.setCustomWsdl(true);
  WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
      wsdlStream, axisService);
  File file = Utils.toFile(servicesURL);
  if (file != null && file.exists()) {
    wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
        wsdlLocation, file, wsdlStream));
    wsdl2AxisServiceBuilder.setCustomResolver(new AARFileBasedURIResolver(
        file));
    wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString());
  axisService = wsdl2AxisServiceBuilder.populateService();
  axisService.setWsdlFound(true);
  axisService.setCustomWsdl(true);

代码示例来源:origin: org.apache.synapse/synapse-core

equals(wsdlNamespace.getNamespaceURI())) {
  wsdlToAxisServiceBuilder =
      new WSDL11ToAxisServiceBuilder(wsdlInputStream);
} else {
  handleException("Unknown WSDL format.. not WSDL 1.1 or WSDL 2.0");
          wsdlToAxisServiceBuilder).setCustomWSDLResolver(
          new CustomWSDLLocator(new InputSource(wsdlInputStream),
              baseURI.toString(), resourceMap, synCfg));
          wsdlToAxisServiceBuilder).setCustomWSDLResolver(
          new CustomWSDLLocator(new InputSource(wsdlInputStream),
              baseURI.toString()));

代码示例来源:origin: org.wso2.carbon.business-process/org.wso2.carbon.bpel

throws AxisFault {
ProcessConf pConf = processProxy.getProcessConfiguration();
AxisService axisService = serviceBuilder.populateService();
axisService.setParent(axisConfiguration);
axisService.setWsdlFound(true);

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

/**
 * sets a custom WSDL locator
 *
 * @param customResolver
 */
public void setCustomWSDLResolver(WSDLLocator customResolver) {
  this.customWSDLResolver = customResolver;
  setDocumentBaseUri(this.customWSDLResolver.getBaseURI());
}

代码示例来源:origin: wso2/wso2-synapse

resourceMap, synCfg, wsdlKey);
((WSDL11ToAxisServiceBuilder) wsdlToAxisServiceBuilder).
    setCustomWSDLResolver(userDefWSDLLocator);

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

public static AxisService createClientSideAxisService(
    Definition wsdlDefinition, QName wsdlServiceName, String portName,
    Options options) throws AxisFault {
  WSDL11ToAxisServiceBuilder serviceBuilder = new WSDL11ToAxisServiceBuilder(
      wsdlDefinition, wsdlServiceName, portName);
  serviceBuilder.setServerSide(false);
  AxisService axisService = serviceBuilder.populateService();
  AxisEndpoint axisEndpoint = (AxisEndpoint) axisService.getEndpoints()
      .get(axisService.getEndpointName());
  if (axisEndpoint != null) {
    options.setTo(new EndpointReference(axisEndpoint.getEndpointURL()));
    options.setSoapVersionURI((String) axisEndpoint.getBinding()
        .getProperty(WSDL2Constants.ATTR_WSOAP_VERSION));
  }
  return axisService;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com