当前位置: 首页>>代码示例>>Java>>正文


Java ServiceInfo类代码示例

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


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


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