• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WSDLManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.cxf.wsdl.WSDLManager的典型用法代码示例。如果您正苦于以下问题:Java WSDLManager类的具体用法?Java WSDLManager怎么用?Java WSDLManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WSDLManager类属于org.apache.cxf.wsdl包,在下文中一共展示了WSDLManager类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getServiceName

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public QName getServiceName() {
    if (serviceName == null && serviceNameString != null) {
        serviceName = QName.valueOf(resolvePropertyPlaceholders(serviceNameString));
    }
    //if not specify the service name and if the wsdlUrl is available,
    //parse the wsdl to see if only one service in it, if so set the only service
    //from wsdl to avoid ambiguity
    if (serviceName == null && getWsdlURL() != null) {
        // use wsdl manager to parse wsdl or get cached
        // definition
        try {
            Definition definition = getBus().getExtension(WSDLManager.class)
                    .getDefinition(getWsdlURL());
            if (definition.getServices().size() == 1) {
                serviceName = (QName) definition.getServices().keySet()
                    .iterator().next();
                
            }
        } catch (WSDLException e) {
            throw new RuntimeException(e);
        }
    }
    return serviceName;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:25,代码来源:CxfEndpoint.java


示例2: importFrom

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public void importFrom(String url) {
  this.wsServices.clear();
  this.wsOperations.clear();
  this.structures.clear();

  this.wsdlLocation = url;

  try {
    Bus bus = BusFactory.getDefaultBus();
    WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);
    Definition def = wsdlManager.getDefinition(url);
    WSDLServiceBuilder builder = new WSDLServiceBuilder(bus);
    List<ServiceInfo> services = builder.buildServices(def);
    
    for (ServiceInfo service : services) {
      WSService wsService = this.importService(service);
      this.wsServices.put(this.namespace + wsService.getName(), wsService);
    }
    
    this.importTypes(def.getTypes());
  } catch (WSDLException e) {
    e.printStackTrace();
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:25,代码来源:CxfWSDLImporter.java


示例3: importFrom

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public void importFrom(String url) {
  this.wsServices.clear();
  this.wsOperations.clear();
  this.structures.clear();

  this.wsdlLocation = url;

  try {
    Bus bus = BusFactory.getDefaultBus();
    WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);
    Definition def = wsdlManager.getDefinition(url);
    
    WSDLServiceBuilder builder = new WSDLServiceBuilder(bus);
    List<ServiceInfo> services = builder.buildServices(def);
    
    for (ServiceInfo service : services) {
      WSService wsService = this.importService(service);
      this.wsServices.put(this.namespace + wsService.getName(), wsService);
    }
    
    this.importTypes(def.getTypes());
  } catch (WSDLException e) {
    e.printStackTrace();
  }
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:26,代码来源:CxfWSDLImporter.java


示例4: getDefinition

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
protected Definition getDefinition(String url) {
    if (definition == null) {
        try {
            definition = getBus().getExtension(WSDLManager.class).getDefinition(url);
        } catch (Exception ex) {
            throw new RuntimeCamelException(ex);
        }
    } 
    
    if (this.getServiceQName(false) == null) {
        Map<QName, ?> services = CastUtils.cast(definition.getServices());
        if (services.size() == 0) {
            throw new IllegalArgumentException("There is no service in the WSDL" + url);
        }
        if (services.size() > 1) {
            throw new IllegalArgumentException("service name must be specified, there is more than one service in the WSDL" + url);
        }
        QName serviceQName = services.keySet().iterator().next();
        this.setServiceName(serviceQName);
    }

    if (this.getEndpointName(false) == null) {
        Service service = definition.getService(getServiceQName(false));
        Map<String, ?> ports = CastUtils.cast(service.getPorts());
        if (ports.size() == 0) {
            throw new IllegalArgumentException("There is no port/endpoint in the service "
                                               + getServiceQName() + "of WSDL"
                                               + url);
        }
        if (ports.size() > 1) {
            throw new IllegalArgumentException("Port/endpoint name must be specified, There is more than one port in the service"
                                               + service.getQName()
                                               + " of the WSDL" + url);
        }
        QName endpointQName = new QName(service.getQName().getNamespaceURI(), ports.keySet().iterator().next());
        setEndpointName(endpointQName);
    }
    return definition;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:40,代码来源:WSDLServiceFactoryBean.java


示例5: setWSDLManagerStreamWrapper

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
private static void setWSDLManagerStreamWrapper(Bus bus)
{
   ((WSDLManagerImpl) bus.getExtension(WSDLManager.class)).setXMLStreamReaderWrapper(new XMLStreamReaderWrapper()
   {
      @Override
      public XMLStreamReader wrap(XMLStreamReader reader)
      {
         return new SysPropExpandingStreamReader(reader);
      }
   });
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:12,代码来源:BusHolder.java


示例6: ZMQWSDLExtensionLoader

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public ZMQWSDLExtensionLoader(Bus b) {
    WSDLManager manager = b.getExtension(WSDLManager.class);

    createExtensor(manager, javax.wsdl.Port.class,
            org.apache.cxf.transport.zmq.AddressType.class);
    createExtensor(manager, javax.wsdl.Port.class,
            org.apache.cxf.transport.zmq.ServiceConfig.class);
    createExtensor(manager, javax.wsdl.Port.class,
            org.apache.cxf.transport.zmq.ClientConfig.class);
}
 
开发者ID:claudemamo,项目名称:cxf-rt-transports-zeromq,代码行数:11,代码来源:ZMQWSDLExtensionLoader.java


示例7: createExtensor

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public void createExtensor(WSDLManager manager,
                           Class<?> parentType,
                           Class<? extends ExtensibilityElement> elementType) {
    try {
        JAXBExtensionHelper.addExtensions(manager.getExtensionRegistry(),
                parentType,
                elementType);
    } catch (JAXBException e) {
        //ignore, won't support XML
    }
}
 
开发者ID:claudemamo,项目名称:cxf-rt-transports-zeromq,代码行数:12,代码来源:ZMQWSDLExtensionLoader.java


示例8: getWsdlManager

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public static WSDLManager getWsdlManager() {
    return wsdlManager;
}
 
开发者ID:kantega,项目名称:respiro,代码行数:4,代码来源:WSDLManagerDefinitionCacheCleaner.java


示例9: setDisableCacheSchema

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
private void setDisableCacheSchema(Bus bus) {
    if (bus.getExtension(WSDLManager.class) instanceof WSDLManagerImpl) {
            WSDLManagerImpl wsdlManangerImpl = (WSDLManagerImpl)bus.getExtension(WSDLManager.class);
            wsdlManangerImpl.setDisableSchemaCache(SecurityActions.getBoolean(JBWS_CXF_DISABLE_SCHEMA_CACHE, true));
    }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:7,代码来源:ProviderImpl.java


示例10: getWsdlDocument

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
private static Document getWsdlDocument(Bus bus, Definition def) throws WSDLException
{
   WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter();
   def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
   return wsdlWriter.getDocument(def);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:7,代码来源:WSDLFilePublisher.java


示例11: WSDLManagerDefinitionCacheCleaner

import org.apache.cxf.wsdl.WSDLManager; //导入依赖的package包/类
public WSDLManagerDefinitionCacheCleaner(Bus bus) {


        wsdlManager = bus.getExtension(WSDLManager.class);
    }
 
开发者ID:kantega,项目名称:respiro,代码行数:6,代码来源:WSDLManagerDefinitionCacheCleaner.java



注:本文中的org.apache.cxf.wsdl.WSDLManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HCatFieldSchema类代码示例发布时间:2022-05-23
下一篇:
Java ExpressionEvaluatorImpl类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap