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

Java ServiceInfo类代码示例

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

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



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

示例1: importService

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
protected WSService importService(ServiceInfo service) {
    String name = service.getName().getLocalPart();
    String location = "";

    for (EndpointInfo endpoint : service.getEndpoints()) {
        location = endpoint.getAddress();
    }

    WSService wsService = new WSService(this.namespace + name, location, this.wsdlLocation);
    for (OperationInfo operation : service.getInterface().getOperations()) {
        WSOperation wsOperation = this.importOperation(operation, wsService);
        wsService.addOperation(wsOperation);

        this.wsOperations.put(this.namespace + operation.getName().getLocalPart(), wsOperation);
    }
    return wsService;
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:18,代码来源:CxfWSDLImporter.java


示例2: isExistsPolicy

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
private boolean isExistsPolicy(ServiceInfo service, String uri)
{
   Object exts[] = service.getDescription().getExtensors().get();
   exts = exts == null ? new Object[0] : exts;
   for (Object o : exts)
   {
      if (o instanceof UnknownExtensibilityElement)
      {
         UnknownExtensibilityElement uee = (UnknownExtensibilityElement) o;
         String uri2 = getPolicyId(uee.getElement());
         if (uri.equals(uri2))
         {
            return true;
         }
      }
   }
   return false;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:19,代码来源:PolicySetsAnnotationListener.java


示例3: updateSoapAddress

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
/**
 * For both code-first and wsdl-first scenarios, reset the endpoint address
 * so that it is written to the generated wsdl file.
 */
private void updateSoapAddress() {
   final SOAPAddressRewriteMetadata metadata = getSOAPAddressRewriteMetadata();
   if (metadata.isModifySOAPAddress()) {
      //- code-first handling
      List<ServiceInfo> sevInfos = getServer().getEndpoint().getService().getServiceInfos();
      for (ServiceInfo si: sevInfos){
         Collection<EndpointInfo > epInfos = si.getEndpoints();
         for(EndpointInfo ei: epInfos){
            String publishedEndpointUrl = (String)ei.getProperty(WSDLGetUtils.PUBLISHED_ENDPOINT_URL);
            if (publishedEndpointUrl != null){
               ei.setAddress(publishedEndpointUrl);
            } else {
               //- wsdl-first handling
               if (ei.getAddress().contains(ServerConfig.UNDEFINED_HOSTNAME)) {
                  String epurl = SoapAddressRewriteHelper.getRewrittenPublishedEndpointUrl(ei.getAddress(), metadata);
                  ei.setAddress(epurl);
               }
            }
         }
      }
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:27,代码来源:EndpointImpl.java


示例4: importFrom

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的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


示例5: importService

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
private WSService importService(ServiceInfo service) {
  String name = service.getName().getLocalPart();
  String location = "";
  
  for (EndpointInfo endpoint : service.getEndpoints()) {
    location = endpoint.getAddress();
  }
  
  WSService wsService = new WSService(this.namespace + name, location, this.wsdlLocation);
  for (OperationInfo operation : service.getInterface().getOperations()) {
    WSOperation wsOperation = this.importOperation(operation, wsService);
    wsService.addOperation(wsOperation);

    this.wsOperations.put(this.namespace + operation.getName().getLocalPart(), wsOperation);
  }
  return wsService;
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:18,代码来源:CxfWSDLImporter.java


示例6: importFrom

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的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


示例7: createEndpoint

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
private EndPoint createEndpoint(Class<?> clz) {
    List<PhpService> services;ServiceBuilder builder = getServiceBuilder(clz);
    ServiceInfo serviceInfo = builder.createService();

    NameManager nameManager = NameManager.newNameManager(serviceInfo, null);
    NamespacePrefixAccumulator prefixManager = new NamespacePrefixAccumulator(serviceInfo.getXmlSchemaCollection());
    Collection<SchemaInfo> schemata = serviceInfo.getSchemas();


    TypesPHPBuilder jsBuilder = new TypesPHPBuilder(serviceInfo.getXmlSchemaCollection(), prefixManager, nameManager);

    List<PhpType> phpTypes = new ArrayList<>();
    for (SchemaInfo schema : schemata) {
        phpTypes.addAll(jsBuilder.gatherTypes(schema.getSchema()));
    }

    ServicePHPBuilder serviceBuilder = new ServicePHPBuilder(serviceInfo, prefixManager, nameManager);
    serviceBuilder.walk();

    services = serviceBuilder.getServices();
    return new EndPoint(services, phpTypes);
}
 
开发者ID:selckin,项目名称:cxf-php-soap-codegen,代码行数:23,代码来源:JavaToPHP.java


示例8: begin

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
@Override
public void begin(ServiceInfo service) {
    BindingInfo xml = null;
    for (BindingInfo bindingInfo : service.getBindings()) {
        if (SoapBindingConstants.SOAP11_BINDING_ID.equals(bindingInfo.getBindingId())
                || SoapBindingConstants.SOAP12_BINDING_ID.equals(bindingInfo.getBindingId())
                || SoapBindingFactory.SOAP_11_BINDING.equals(bindingInfo.getBindingId())
                || SoapBindingFactory.SOAP_12_BINDING.equals(bindingInfo.getBindingId())
                ) {
            SoapBindingInfo sbi = (SoapBindingInfo) bindingInfo;
            if (WSDLConstants.NS_SOAP11_HTTP_TRANSPORT.equals(sbi.getTransportURI())
                    || WSDLConstants.NS_SOAP12_HTTP_BINDING.equals(sbi.getTransportURI())
                    || "http://cxf.apache.org/transports/local".equals(sbi.getTransportURI())) {
                soapBindingInfo = sbi;
                break;
            }
        } else if (WSDLConstants.NS_BINDING_XML.equals(bindingInfo.getBindingId())) {
            xml = bindingInfo;
        }
    }

    // For now, we use soap if its available, and XML if it isn't.\
    if (soapBindingInfo == null && xml == null) {
        throw new UnsupportedConstruct("NO_USABLE_BINDING");
    }
}
 
开发者ID:selckin,项目名称:cxf-php-soap-codegen,代码行数:27,代码来源:ServicePHPBuilder.java


示例9: setExchangeProperties

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
protected void setExchangeProperties(Exchange exchange, Endpoint ep) {
    if (ep != null) {
        exchange.put(Endpoint.class, ep);
        exchange.put(Service.class, ep.getService());
        if (ep.getEndpointInfo().getService() != null) {
            exchange.put(ServiceInfo.class, ep.getEndpointInfo()
                    .getService());
            exchange.put(InterfaceInfo.class, ep.getEndpointInfo()
                    .getService().getInterface());
        }
        exchange.put(Binding.class, ep.getBinding());
        exchange.put(BindingInfo.class, ep.getEndpointInfo().getBinding());
    }

    exchange.put(MessageObserver.class, this);
    exchange.put(Bus.class, getBus());
}
 
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:18,代码来源:ProtobufClient.java


示例10: addPolicy

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
private void addPolicy(AbstractPropertiesHolder place, ServiceInfo service, PolicyAttachment pa, Class<?> cls, String defName)
{
   Element el = addPolicy(service, pa, cls, defName);
   UnknownExtensibilityElement uee = new UnknownExtensibilityElement();
   uee.setElement(el);
   uee.setRequired(true);
   uee.setElementType(DOMUtils.getElementQName(el));
   place.addExtensor(uee);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:10,代码来源:PolicySetsAnnotationListener.java


示例11: setMessage

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
private MessageInfo setMessage(Message message, BindingOperationInfo operation,
                               boolean requestor, ServiceInfo si) {
    MessageInfo msgInfo = getMessageInfo(message, operation, requestor);
    message.put(MessageInfo.class, msgInfo);

    Exchange ex = message.getExchange();
    ex.put(BindingOperationInfo.class, operation);
    ex.put(OperationInfo.class, operation.getOperationInfo());
    ex.setOneWay(operation.getOperationInfo().isOneWay());

    //Set standard MessageContext properties required by JAX_WS, but not specific to JAX_WS.
    message.put(Message.WSDL_OPERATION, operation.getName());

    QName serviceQName = si.getName();
    message.put(Message.WSDL_SERVICE, serviceQName);

    QName interfaceQName = si.getInterface().getName();
    message.put(Message.WSDL_INTERFACE, interfaceQName);

    EndpointInfo endpointInfo = ex.get(Endpoint.class).getEndpointInfo();
    QName portQName = endpointInfo.getName();
    message.put(Message.WSDL_PORT, portQName);

    
    URI wsdlDescription = endpointInfo.getProperty("URI", URI.class);
    if (wsdlDescription == null) {
        String address = endpointInfo.getAddress();
        try {
            wsdlDescription = new URI(address + "?wsdl");
        } catch (URISyntaxException e) {
            //do nothing
        }
        endpointInfo.setProperty("URI", wsdlDescription);
    }
    message.put(Message.WSDL_DESCRIPTION, wsdlDescription);

    return msgInfo;
}
 
开发者ID:mprins,项目名称:muleebmsadapter,代码行数:39,代码来源:DocLiteralInInterceptor.java


示例12: JAXBContextInitializer

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
public JAXBContextInitializer(ServiceInfo serviceInfo,
                              Set<Type> classes,
                              Collection<Object> typeReferences) {
    super(serviceInfo);
    this.classes = classes;
    this.typeReferences = typeReferences;
}
 
开发者ID:GeeQuery,项目名称:cxf-plus,代码行数:8,代码来源:JAXBContextInitializer.java


示例13: JAXBSchemaInitializer

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
public JAXBSchemaInitializer(ServiceInfo serviceInfo,
                             SchemaCollection col,
                             JAXBContext context,
                             boolean q) {
    super(serviceInfo);
    schemas = col;
    this.context = ReflectionInvokationHandler.createProxyWrapper(context, JAXBContextProxy.class);
    this.qualifiedSchemas = q;
}
 
开发者ID:GeeQuery,项目名称:cxf-plus,代码行数:10,代码来源:JAXBSchemaInitializer.java


示例14: generatedWrapperBeanClass

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
private Set<Class<?>> generatedWrapperBeanClass() {
    DataBinding b = getDataBinding();
    if (b.getClass().getName().endsWith("JAXBDataBinding")
        && schemaLocations == null) {
        ServiceInfo serviceInfo = getService().getServiceInfos().get(0);
        PlusWrapperClassGenerator wrapperGen = new PlusWrapperClassGenerator(this,
                                                                     serviceInfo.getInterface(),
                                                                     getQualifyWrapperSchema());
        return wrapperGen.generate();
    }
    return Collections.emptySet();
}
 
开发者ID:GeeQuery,项目名称:cxf-plus,代码行数:13,代码来源:CXFPlusServiceFactoryBean.java


示例15: AegisSchemaValidationInInterceptor

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
public AegisSchemaValidationInInterceptor(Bus bus, ServiceInfo service) {
    super(Phase.READ);
    this.bus = bus;
    this.service = service;
    addBefore(StartBodyInterceptor.class.getName());
    addAfter(ReadHeadersInterceptor.class.getName());
}
 
开发者ID:claudemamo,项目名称:jruby-cxf,代码行数:8,代码来源:AegisSchemaValidationInInterceptor.java


示例16: createServiceModel

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
public static Service createServiceModel() {
    ServiceInfo serviceInfo = new ServiceInfo();
    // does not make sense for protobuf services
    serviceInfo.setName(new QName("", "protobuf_service_"
            + System.identityHashCode(serviceInfo)));

    InterfaceInfo interfaceInfo = new InterfaceInfo(serviceInfo,
            serviceInfo.getName());
    serviceInfo.setInterface(interfaceInfo);

    Service service = new ServiceImpl(serviceInfo);

    return service;
}
 
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:15,代码来源:ServiceUtils.java


示例17: createEndpointInfo

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
public static EndpointInfo createEndpointInfo(Bus bus, ServiceInfo serviceInfo,
                                              BindingInfo bindingInfo, String address) {
    String transportURI = getTransportId(bus, address);
    EndpointInfo endpointInfo = new EndpointInfo(serviceInfo, transportURI);

    if (address != null) {
        endpointInfo.setName(new QName(address));
        endpointInfo.setAddress(address);
    }

    System.out.println("seting binding info:" + bindingInfo);
    endpointInfo.setBinding(bindingInfo);

    return endpointInfo;
}
 
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:16,代码来源:ServiceUtils.java


示例18: createBindingInfo

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
public BindingInfo createBindingInfo(Service service, String namespace,
                                     Object obj) {

    ServiceInfo si = new ServiceInfo();
    si.setTargetNamespace(ProtobufBindingFactory.PROTOBUF_BINDING_ID);

    BindingInfo info = new BindingInfo(si,
            ProtobufBindingFactory.PROTOBUF_BINDING_ID);

    return info;
}
 
开发者ID:ow2-chameleon,项目名称:fuchsia,代码行数:12,代码来源:ProtobufBindingFactory.java


示例19: publishWsdlFiles

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
/** Publish the deployed wsdl file to the data directory
 */
public void publishWsdlFiles(QName serviceName, String wsdlLocation, Bus bus, List<ServiceInfo> serviceInfos) throws IOException
{
   String deploymentName = dep.getCanonicalName();
   File wsdlFile = getPublishLocation(serviceName.getLocalPart(), deploymentName, wsdlLocation);
   if (wsdlFile == null) return;
   createParentDir(wsdlFile);
   try
   {
      // Write the wsdl def to file
      ServiceWSDLBuilder builder = new ServiceWSDLBuilder(bus, serviceInfos);
      Definition def = builder.build();

      Document doc = getWsdlDocument(bus, def);
      writeDocument(doc, wsdlFile);

      URL wsdlPublishURL = new URL(URLDecoder.decode(wsdlFile.toURI().toURL().toExternalForm(), "UTF-8"));
      Loggers.DEPLOYMENT_LOGGER.wsdlFilePublished(wsdlPublishURL);

      // Process the wsdl imports
      if (def != null)
      {
         List<String> published = new LinkedList<String>();
         String expLocation = getExpLocation(wsdlLocation);
         publishWsdlImports(wsdlPublishURL, def, published, expLocation);

         // Publish XMLSchema imports
         publishSchemaImports(wsdlPublishURL, doc.getDocumentElement(), published, expLocation);

         dep.addAttachment(WSDLFilePublisher.class, this);
      }
      else
      {
         throw Messages.MESSAGES.wsdl20NotSupported();
      }
   }
   catch (RuntimeException rte)
   {
      throw rte;
   }
   catch (Exception e)
   {
      throw Messages.MESSAGES.cannotPublishWSDLTo(serviceName, wsdlFile, e);
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:47,代码来源:WSDLFilePublisher.java


示例20: newNameManager

import org.apache.cxf.service.model.ServiceInfo; //导入依赖的package包/类
/**
 * @param service
 * @param endpoint
 * @return
 */
public static NameManager newNameManager(ServiceInfo service, Endpoint endpoint) {
    NameManager nameManager = new NameManager();
    nameManager.initialize(service);
    return nameManager;
}
 
开发者ID:selckin,项目名称:cxf-php-soap-codegen,代码行数:11,代码来源:NameManager.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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