org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition.setLocation()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(145)

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

WSDLDefinition.setLocation介绍

[英]Set the location of the WSDL file
[中]设置WSDL文件的位置

代码示例

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

/**
 * Resolve a reference to a WSDL, given by a namespace and a location
 * @param wsdlLocation - a string containing the WSDL location
 * @param wsdlNamespace - a string containing the WSDL namespace
 * @param resolver - a model resolver
 * @param context 
 * @return - a WSDLDefinition object for the referenced WSDL, or null if the WSDL cannot be resolved
 */
private WSDLDefinition resolveWSDLDefinition( String wsdlLocation, String wsdlNamespace, ModelResolver resolver, ProcessorContext context ) {
  
  // Resolve the WSDL definition
  WSDLDefinition proxy = wsdlFactory.createWSDLDefinition();
  proxy.setUnresolved(true);
  proxy.setNamespace(wsdlNamespace);
  if (wsdlLocation != null) {
    proxy.setLocation(URI.create(wsdlLocation));
  }
  WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context);
  if (resolved != null && !resolved.isUnresolved()) {
    return resolved;
  } else {
    error(context.getMonitor(), "CannotResolveWSDLReference", resolver, wsdlLocation, wsdlNamespace);
    return null;
  } // end if
} // end resolveWSDLDefinition

代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-bpel

/**
 * Resolve a reference to a WSDL, given by a namespace and a location
 * @param wsdlLocation - a string containing the WSDL location
 * @param wsdlNamespace - a string containing the WSDL namespace
 * @param resolver - a model resolver
 * @param context 
 * @return - a WSDLDefinition object for the referenced WSDL, or null if the WSDL cannot be resolved
 */
private WSDLDefinition resolveWSDLDefinition( String wsdlLocation, String wsdlNamespace, ModelResolver resolver, ProcessorContext context ) {
  
  // Resolve the WSDL definition
  WSDLDefinition proxy = wsdlFactory.createWSDLDefinition();
  proxy.setUnresolved(true);
  proxy.setNamespace(wsdlNamespace);
  if (wsdlLocation != null) {
    proxy.setLocation(URI.create(wsdlLocation));
  }
  WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context);
  if (resolved != null && !resolved.isUnresolved()) {
    return resolved;
  } else {
    error(context.getMonitor(), "CannotResolveWSDLReference", resolver, wsdlLocation, wsdlNamespace);
    return null;
  } // end if
} // end resolveWSDLDefinition

代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-bpel

private void resolveBPELImports(BPELProcessDefinition processDefinition, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
  for (BPELImportElement bpelImport : processDefinition.getImports()) {
    String namespace = bpelImport.getNamespace();
    String location = bpelImport.getLocation();
    
    WSDLDefinition wsdl = bpelImport.getWSDLDefinition();
    if (wsdl == null) {
        try {
          wsdl = wsdlFactory.createWSDLDefinition();
          wsdl.setUnresolved(true);
          wsdl.setNamespace(bpelImport.getNamespace());
          wsdl.setLocation(new URI(null, bpelImport.getLocation(), null));
          wsdl = resolver.resolveModel(WSDLDefinition.class, wsdl, context);
          
          if(! wsdl.isUnresolved()) {
            bpelImport.setWSDLDefinition(wsdl);
          } else {
            //error("BPELProcessNotFound", implementation, processDefinition.getName());
          }
        } catch (URISyntaxException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
    }
    
  }
}

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

private void resolveBPELImports(BPELProcessDefinition processDefinition, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
  for (BPELImportElement bpelImport : processDefinition.getImports()) {
    String namespace = bpelImport.getNamespace();
    String location = bpelImport.getLocation();
    
    WSDLDefinition wsdl = bpelImport.getWSDLDefinition();
    if (wsdl == null) {
        try {
          wsdl = wsdlFactory.createWSDLDefinition();
          wsdl.setUnresolved(true);
          wsdl.setNamespace(bpelImport.getNamespace());
          wsdl.setLocation(new URI(null, bpelImport.getLocation(), null));
          wsdl = resolver.resolveModel(WSDLDefinition.class, wsdl, context);
          
          if(! wsdl.isUnresolved()) {
            bpelImport.setWSDLDefinition(wsdl);
          } else {
            //error("BPELProcessNotFound", implementation, processDefinition.getName());
          }
        } catch (URISyntaxException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
    }
    
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

if (!resolved.isUnresolved()) {
  wsdlDefinition.setDefinition(resolved.getDefinition());
  wsdlDefinition.setLocation(resolved.getLocation());
  wsdlDefinition.setURI(resolved.getURI());
  wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

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

if (!resolved.isUnresolved()) {
  wsdlDefinition.setDefinition(resolved.getDefinition());
  wsdlDefinition.setLocation(resolved.getLocation());
  wsdlDefinition.setURI(resolved.getURI());
  wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

WSDLDefinition wsdlDefinition = factory.createWSDLDefinition();
wsdlDefinition.setUnresolved(true);
wsdlDefinition.setLocation(doc.toURI());

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

WSDLDefinition wsdlDefinition = factory.createWSDLDefinition();
wsdlDefinition.setUnresolved(true);
wsdlDefinition.setLocation(doc.toURI());

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

wsdlDefinition.setLocation(new URI(xmlString.getBaseURI()));

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

wsdlDefinition.setLocation(new URI(imp.getDefinition().getDocumentBaseURI()));

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

wsdlDefinition.setNamespace("nonamespace"); 
  wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation());
  wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation()));
} else {
      wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(), 
                          artifact.getLocation());
      wsdlDefinition.setLocation(new URI(artifact.getLocation()));
      break;

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

wsdlDefinition.setNamespace("nonamespace"); 
  wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation());
  wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation()));
} else {
      wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(), 
                          artifact.getLocation());
      wsdlDefinition.setLocation(new URI(artifact.getLocation()));
      break;

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

wsdlDefinition.setLocation(new URI(imp.getDefinition().getDocumentBaseURI()));

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

wsdlDefinition.setLocation(resolved.getLocation());
wsdlDefinition.setURI(resolved.getURI());
wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

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

wsdlDefinition.setLocation(resolved.getLocation());
wsdlDefinition.setURI(resolved.getURI());
wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

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

wsdlDefinition.setLocation(resolved.getLocation());
wsdlDefinition.setURI(resolved.getURI());
wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

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

wsdlDefinition.setLocation(resolved.getLocation());
wsdlDefinition.setURI(resolved.getURI());
wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

相关文章