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

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

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

WSDLDefinition.setNamespace介绍

[英]Sets the namespace of this WSDL definition.
[中]设置此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-interface-wsdl

proxy.setNamespace(imp.getNamespaceURI());
WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context);
if (resolved != null && !resolved.isUnresolved()) {

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

resolved.setNamespace(resolved.getDefinition().getTargetNamespace());
resolved.setUnresolved(false);
resolved.setURI(unresolved.getURI());

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

resolved.setNamespace(resolved.getDefinition().getTargetNamespace());
resolved.setUnresolved(false);
resolved.setURI(unresolved.getURI());

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

proxy.setNamespace(imp.getNamespaceURI());
WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context);
if (resolved != null && !resolved.isUnresolved()) {

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

wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition, context);
if (!resolved.isUnresolved()) {

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

wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition, context);
if (!resolved.isUnresolved()) {

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

Attribute[] attrs = helper.readAttributes(doc, attr1, attr2);
wsdlDefinition.setNamespace(attr1.getValues().get(0));

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

Attribute[] attrs = helper.readAttributes(doc, attr1, attr2);
wsdlDefinition.setNamespace(attr1.getValues().get(0));

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

wsdlDefinition.setNamespace("nonamespace"); 
wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation());
wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation()));
    wsdlDefinition = wsdlFactory.createWSDLDefinition();
    wsdlDefinition.setUnresolved(true);
    wsdlDefinition.setNamespace(artifactWSDLDefinition.getNamespace()); 
    wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(), 
                        artifact.getLocation());

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

wsdlDefinition.setNamespace(entry.getKey());
WSDLDefinition resolved = null;
for (javax.wsdl.Import imp : entry.getValue()) {

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

wsdlDefinition.setNamespace("nonamespace"); 
wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation());
wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation()));
    wsdlDefinition = wsdlFactory.createWSDLDefinition();
    wsdlDefinition.setUnresolved(true);
    wsdlDefinition.setNamespace(artifactWSDLDefinition.getNamespace()); 
    wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(), 
                        artifact.getLocation());

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

wsdlDefinition.setNamespace(entry.getKey());
WSDLDefinition resolved = null;
for (javax.wsdl.Import imp : entry.getValue()) {

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

wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
wsdlDefinition.setNameOfPortTypeToResolve(wsdlInterface.getName());
WSDLDefinition resolved = null;

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

wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
wsdlDefinition.setNameOfPortTypeToResolve(wsdlInterface.getName());
WSDLDefinition resolved = null;

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

WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
wsdlDefinition.setUnresolved(true);
wsdlDefinition.setNamespace(model.getNamespace());
wsdlDefinition.setNameOfBindingToResolve(model.getBindingName());
wsdlDefinition.setNameOfServiceToResolve(model.getServiceName());

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

WSDLDefinition wsdlDefinition = wsdlFactory.createWSDLDefinition();
wsdlDefinition.setUnresolved(true);
wsdlDefinition.setNamespace(model.getNamespace());
wsdlDefinition.setNameOfBindingToResolve(model.getBindingName());
wsdlDefinition.setNameOfServiceToResolve(model.getServiceName());

相关文章