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

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

本文整理了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

  1. /**
  2. * Resolve a reference to a WSDL, given by a namespace and a location
  3. * @param wsdlLocation - a string containing the WSDL location
  4. * @param wsdlNamespace - a string containing the WSDL namespace
  5. * @param resolver - a model resolver
  6. * @param context
  7. * @return - a WSDLDefinition object for the referenced WSDL, or null if the WSDL cannot be resolved
  8. */
  9. private WSDLDefinition resolveWSDLDefinition( String wsdlLocation, String wsdlNamespace, ModelResolver resolver, ProcessorContext context ) {
  10. // Resolve the WSDL definition
  11. WSDLDefinition proxy = wsdlFactory.createWSDLDefinition();
  12. proxy.setUnresolved(true);
  13. proxy.setNamespace(wsdlNamespace);
  14. if (wsdlLocation != null) {
  15. proxy.setLocation(URI.create(wsdlLocation));
  16. }
  17. WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context);
  18. if (resolved != null && !resolved.isUnresolved()) {
  19. return resolved;
  20. } else {
  21. error(context.getMonitor(), "CannotResolveWSDLReference", resolver, wsdlLocation, wsdlNamespace);
  22. return null;
  23. } // end if
  24. } // end resolveWSDLDefinition

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

  1. /**
  2. * Resolve a reference to a WSDL, given by a namespace and a location
  3. * @param wsdlLocation - a string containing the WSDL location
  4. * @param wsdlNamespace - a string containing the WSDL namespace
  5. * @param resolver - a model resolver
  6. * @param context
  7. * @return - a WSDLDefinition object for the referenced WSDL, or null if the WSDL cannot be resolved
  8. */
  9. private WSDLDefinition resolveWSDLDefinition( String wsdlLocation, String wsdlNamespace, ModelResolver resolver, ProcessorContext context ) {
  10. // Resolve the WSDL definition
  11. WSDLDefinition proxy = wsdlFactory.createWSDLDefinition();
  12. proxy.setUnresolved(true);
  13. proxy.setNamespace(wsdlNamespace);
  14. if (wsdlLocation != null) {
  15. proxy.setLocation(URI.create(wsdlLocation));
  16. }
  17. WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, proxy, context);
  18. if (resolved != null && !resolved.isUnresolved()) {
  19. return resolved;
  20. } else {
  21. error(context.getMonitor(), "CannotResolveWSDLReference", resolver, wsdlLocation, wsdlNamespace);
  22. return null;
  23. } // end if
  24. } // end resolveWSDLDefinition

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

  1. private void resolveBPELImports(BPELProcessDefinition processDefinition, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
  2. for (BPELImportElement bpelImport : processDefinition.getImports()) {
  3. String namespace = bpelImport.getNamespace();
  4. String location = bpelImport.getLocation();
  5. WSDLDefinition wsdl = bpelImport.getWSDLDefinition();
  6. if (wsdl == null) {
  7. try {
  8. wsdl = wsdlFactory.createWSDLDefinition();
  9. wsdl.setUnresolved(true);
  10. wsdl.setNamespace(bpelImport.getNamespace());
  11. wsdl.setLocation(new URI(null, bpelImport.getLocation(), null));
  12. wsdl = resolver.resolveModel(WSDLDefinition.class, wsdl, context);
  13. if(! wsdl.isUnresolved()) {
  14. bpelImport.setWSDLDefinition(wsdl);
  15. } else {
  16. //error("BPELProcessNotFound", implementation, processDefinition.getName());
  17. }
  18. } catch (URISyntaxException e) {
  19. // TODO Auto-generated catch block
  20. e.printStackTrace();
  21. }
  22. }
  23. }
  24. }

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

  1. private void resolveBPELImports(BPELProcessDefinition processDefinition, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException {
  2. for (BPELImportElement bpelImport : processDefinition.getImports()) {
  3. String namespace = bpelImport.getNamespace();
  4. String location = bpelImport.getLocation();
  5. WSDLDefinition wsdl = bpelImport.getWSDLDefinition();
  6. if (wsdl == null) {
  7. try {
  8. wsdl = wsdlFactory.createWSDLDefinition();
  9. wsdl.setUnresolved(true);
  10. wsdl.setNamespace(bpelImport.getNamespace());
  11. wsdl.setLocation(new URI(null, bpelImport.getLocation(), null));
  12. wsdl = resolver.resolveModel(WSDLDefinition.class, wsdl, context);
  13. if(! wsdl.isUnresolved()) {
  14. bpelImport.setWSDLDefinition(wsdl);
  15. } else {
  16. //error("BPELProcessNotFound", implementation, processDefinition.getName());
  17. }
  18. } catch (URISyntaxException e) {
  19. // TODO Auto-generated catch block
  20. e.printStackTrace();
  21. }
  22. }
  23. }
  24. }

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

  1. if (!resolved.isUnresolved()) {
  2. wsdlDefinition.setDefinition(resolved.getDefinition());
  3. wsdlDefinition.setLocation(resolved.getLocation());
  4. wsdlDefinition.setURI(resolved.getURI());
  5. wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

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

  1. if (!resolved.isUnresolved()) {
  2. wsdlDefinition.setDefinition(resolved.getDefinition());
  3. wsdlDefinition.setLocation(resolved.getLocation());
  4. wsdlDefinition.setURI(resolved.getURI());
  5. wsdlDefinition.getImportedDefinitions().addAll(resolved.getImportedDefinitions());

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

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

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

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

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

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

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

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

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

  1. wsdlDefinition.setNamespace("nonamespace");
  2. wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation());
  3. wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation()));
  4. } else {
  5. wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(),
  6. artifact.getLocation());
  7. wsdlDefinition.setLocation(new URI(artifact.getLocation()));
  8. break;

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

  1. wsdlDefinition.setNamespace("nonamespace");
  2. wsdlDefinition.getWsdliLocations().put("nonamespace", wsdlInterfaceContract.getLocation());
  3. wsdlDefinition.setLocation(new URI(wsdlInterfaceContract.getLocation()));
  4. } else {
  5. wsdlDefinition.getWsdliLocations().put(artifactWSDLDefinition.getNamespace(),
  6. artifact.getLocation());
  7. wsdlDefinition.setLocation(new URI(artifact.getLocation()));
  8. break;

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

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

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

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

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

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

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

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

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

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

相关文章