org.apache.axis2.util.Utils.getURIScheme()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(175)

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

Utils.getURIScheme介绍

[英]Get the scheme part from a URI (or URL).
[中]从URI(或URL)获取方案部分。

代码示例

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

String returnIP = null;
if (epr != null) {
  String existingProtocol = org.apache.axis2.util.Utils.getURIScheme(epr);
  if (existingProtocol != null) {
    for (int i = 0; i < eprs.length; i++) {
      if (existingProtocol.equals(org.apache.axis2.util.Utils.getURIScheme(eprs[i]))) {
        returnIP = eprs[i];
        break;

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

String returnIP = null;
if (epr != null) {
  String existingProtocol = org.apache.axis2.util.Utils.getURIScheme(epr);
  if (existingProtocol != null) {
    for (int i = 0; i < eprs.length; i++) {
      if (existingProtocol.equals(org.apache.axis2.util.Utils.getURIScheme(eprs[i]))) {
        returnIP = eprs[i];
        break;

代码示例来源: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

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 static void addHttpEndpoint(AxisService axisService, String url) {
  String protocol = org.apache.axis2.util.Utils.getURIScheme(url);
  String httpEndpointName = getEndpointName(axisService, protocol, null);
  
  AxisEndpoint httpEndpoint = new AxisEndpoint();
  httpEndpoint.setName(httpEndpointName);
  httpEndpoint.setParent(axisService);
  httpEndpoint.setEndpointURL(url.toString());
  httpEndpoint.setTransportInDescription(protocol);
  populateHttpEndpoint(axisService, httpEndpoint, null);
  axisService.addEndpoint(httpEndpoint.getName(), httpEndpoint);
}

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

String transportURI = (String) msgctx.getProperty(Constants.Configuration.TRANSPORT_URL);
if (transportURI != null && !"".equals(transportURI)) {
  String transport = Utils.getURIScheme(transportURI);
  if (transport != null) {
    TransportOutDescription transportOut = ac.getTransportOut(transport);
  String transport = Utils.getURIScheme(uri);
  if (transport != null && ac.getTransportOut(transport) != null) {
    return ac.getTransportOut(transport);

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

public static void addSoap12Endpoint(AxisService axisService, String url)
    throws Exception {
  String protocol = org.apache.axis2.util.Utils.getURIScheme(url);
  String soap12EndpointName = getEndpointName(axisService, protocol, "Soap12");
  AxisEndpoint httpSoap12Endpoint = new AxisEndpoint();
  httpSoap12Endpoint.setName(soap12EndpointName);
  httpSoap12Endpoint.setParent(axisService);
  httpSoap12Endpoint.setEndpointURL(url.toString());
  httpSoap12Endpoint.setTransportInDescription(protocol);
  populateSoap12Endpoint(axisService, httpSoap12Endpoint, null);
  axisService.addEndpoint(httpSoap12Endpoint.getName(),
              httpSoap12Endpoint);
}

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

String transportURI = (String) msgctx.getProperty(Constants.Configuration.TRANSPORT_URL);
if (transportURI != null && !"".equals(transportURI)) {
  String transport = Utils.getURIScheme(transportURI);
  if (transport != null) {
    TransportOutDescription transportOut = ac.getTransportOut(transport);
  String transport = Utils.getURIScheme(uri);
  if (transport != null && ac.getTransportOut(transport) != null) {
    return ac.getTransportOut(transport);

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

public static void addHttpEndpoint(AxisService axisService, String url) {
  String protocol = org.apache.axis2.util.Utils.getURIScheme(url);
  String httpEndpointName = getEndpointName(axisService, protocol, null);
  
  AxisEndpoint httpEndpoint = new AxisEndpoint();
  httpEndpoint.setName(httpEndpointName);
  httpEndpoint.setParent(axisService);
  httpEndpoint.setEndpointURL(url.toString());
  httpEndpoint.setTransportInDescription(protocol);
  populateHttpEndpoint(axisService, httpEndpoint, null);
  axisService.addEndpoint(httpEndpoint.getName(), httpEndpoint);
}

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

public static void addSoap12Endpoint(AxisService axisService, String url)
    throws Exception {
  String protocol = org.apache.axis2.util.Utils.getURIScheme(url);
  String soap12EndpointName = getEndpointName(axisService, protocol, "Soap12");
  AxisEndpoint httpSoap12Endpoint = new AxisEndpoint();
  httpSoap12Endpoint.setName(soap12EndpointName);
  httpSoap12Endpoint.setParent(axisService);
  httpSoap12Endpoint.setEndpointURL(url.toString());
  httpSoap12Endpoint.setTransportInDescription(protocol);
  populateSoap12Endpoint(axisService, httpSoap12Endpoint, null);
  axisService.addEndpoint(httpSoap12Endpoint.getName(),
              httpSoap12Endpoint);
}

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

public static void addSoap11Endpoint(AxisService axisService, String url)
    throws Exception {
  String protocol = org.apache.axis2.util.Utils.getURIScheme(url);
  String soap11EndpointName = getEndpointName(axisService, protocol, "Soap11");
  AxisEndpoint httpSoap11Endpoint = new AxisEndpoint();
  httpSoap11Endpoint.setName(soap11EndpointName);
  httpSoap11Endpoint.setParent(axisService);
  httpSoap11Endpoint.setEndpointURL(url.toString());
  httpSoap11Endpoint.setTransportInDescription(protocol);
  populateSoap11Endpoint(axisService, httpSoap11Endpoint, null);
  axisService.addEndpoint(httpSoap11Endpoint.getName(),
              httpSoap11Endpoint);
  // setting soap11 endpoint as the default endpoint
  axisService.setEndpointName(soap11EndpointName);
}

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

public static void addSoap11Endpoint(AxisService axisService, String url)
    throws Exception {
  String protocol = org.apache.axis2.util.Utils.getURIScheme(url);
  String soap11EndpointName = getEndpointName(axisService, protocol, "Soap11");
  AxisEndpoint httpSoap11Endpoint = new AxisEndpoint();
  httpSoap11Endpoint.setName(soap11EndpointName);
  httpSoap11Endpoint.setParent(axisService);
  httpSoap11Endpoint.setEndpointURL(url.toString());
  httpSoap11Endpoint.setTransportInDescription(protocol);
  populateSoap11Endpoint(axisService, httpSoap11Endpoint, null);
  axisService.addEndpoint(httpSoap11Endpoint.getName(),
              httpSoap11Endpoint);
  // setting soap11 endpoint as the default endpoint
  axisService.setEndpointName(soap11EndpointName);
}

相关文章