• jaxws.xsd


    示例:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
    
        <import resource="classpath:META-INF/cxf/cxf.xml" />
        <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
        <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
    
        <bean id="serviceBean" class="cn.zno.HelloWorldImpl"></bean>
        <bean id="inInterceptors" class="org.apache.cxf.interceptor.LoggingInInterceptor"></bean>
        <bean id="outInterceptors" class="org.apache.cxf.interceptor.LoggingOutInterceptor"></bean>
    
        <jaxws:server id="helloWorld" address="/HelloWorld"
            serviceClass="cn.zno.HelloWorld">
            <jaxws:serviceBean>
                <ref bean="serviceBean" />
            </jaxws:serviceBean>
            <jaxws:inInterceptors>
                <ref bean="inInterceptors" />
            </jaxws:inInterceptors>
            <jaxws:outInterceptors>
                <ref bean="outInterceptors" />
            </jaxws:outInterceptors>
        </jaxws:server>
    
    </beans>
    http://cxf.apache.org/schemas/jaxws.xsd
    <xsd:all>
    <xsd:element name="binding" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="dataBinding" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="executor" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="features" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="handlers" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="invoker" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="outFaultInterceptors" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="properties" type="beans:mapType" minOccurs="0">...</xsd:element>
    <xsd:element name="schemaLocations" type="schemasType" minOccurs="0"/>
    <xsd:element name="serviceBean" type="xsd:anyType" minOccurs="0">...</xsd:element>
    <xsd:element name="serviceFactory" type="xsd:anyType" minOccurs="0"/>
    </xsd:all>
    <xsd:attributeGroup ref="cxf-beans:beanAttributes"/>
    <xsd:attribute name="address" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="bindingId" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="bus" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="serviceClass" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="serviceBean" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="start" type="xsd:boolean" default="true">...</xsd:attribute>
    <xsd:attribute name="transportId" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="wsdlLocation" type="xsd:string">...</xsd:attribute>
    <xsd:attribute name="endpointName" type="xsd:QName">...</xsd:attribute>
    <xsd:attribute name="serviceName" type="xsd:QName">...</xsd:attribute>

    <jaxws:server  [属性这这里]>[元素在这里]</jaxws:server>

    1. address

    Specifies the HTTP address of the endpoint. This value will override the value specified in the services contract.

    2.bingdingId

    Specifies the ID of the data binding the service will use. For SOAP bindings the IDs are defined in the JAX-WS specification. For other data bindings, the ID is the namespace of the WSDL extensions used to configure the binding.

    3.bus

    Specifies the ID of the Spring bean configuring the bus managing the endpoint.

    4.serviceClass

    Specifies the name of the class implementing the service. This attribute is useful when you specify the implementor with the ref bean which is wrapped by using Spring AOP.

    5.serviceBean

    Specifies the class implementing the service. You can specify the implementation class using either the class name or an ID reference to a Spring bean configuring the implementation class. This class needs to be on the classpath.

    需先定义spring bean ,假如id为somebean然后,serviceBean="#somebean" 即可。

    推荐使用 element serviceBean

    6.start

    Specifies if the service should be automatically published. 默认true

    7.transportId

    Specifies the transportId that endpoint will use, it will override the transport which is defined in the wsdl.

    8.wsdlLocation

    Specifies the location of the endpoint's WSDL contract. The WSDL contract's location is relative to the folder from which the service is deployed.

    9.endpointName

    Specifies the value of the service's WSDL port element's name attribute.

    10.serviceName

    Specifies the value of the service's WSDL service element's name attribute.

    Ⅰ.binding

    Configures the message binding used by the endpoint. Message bindings are configured using implementations of the org.apache.cxf.binding.BindingFactory interface. The SOAP binding is configured using the soap:soapBinding bean.

    Ⅱ.dataBinding

    Configures the data binding used by the endpoint. The class implementing the JAXB data binding is org.apache.cxf.jaxb.JAXBDataBinding.

    Ⅲ.executor

    Configures a Java executor to handle the service.

    Ⅳ.features

    Specifies a list of beans that configure advanced features like WS-RM.

    Ⅴ.handlers

    Specifies a list of JAX-WS handlers to add to the endpoint's processing chain.

    Ⅵ.inInterceptors

    Specifies a list of interceptors to process incoming requests.

    Ⅶ.inFaultInterceptors

    Specifies a list of interceptors to process incoming fault messages.

    Ⅷ.invoker

    Specifies an implementation of the org.apache.cxf.service.Invoker interface to be used by the service. The Invoker implementation controls how a service is invoked. For example, it controls if each request is handled by a new instance of the service implementation or if state is preserved across invocations.

    Ⅸ.outInterceptors

    Specifies a list of interceptors to process outgoing responses.

    Ⅹ.outFaultInterceptors

    Specifies a list of interceptors to process outgoing fault messages.

    Ⅺ.properties

    Specifies a map of properties that are passed to the endpoint.

    Ⅻ.schemaLocations

    XⅢ.serviceBean

    Configures the bean implementing the service. If this child is used you should not use the serviceBean attribute.

    XⅣ.serviceFactory

  • 相关阅读:
    前端开发笔记(2)css基础(上)
    前端开发笔记(1)html基础
    <Android 基础(三 十)> Fragment (3) ~ PreferenceFragment
    MyEclipse中搭建Struts2开发环境
    Android 投射工具和录屏工具
    似是而非的k=sqrt(n)
    算法:求比指定数大且最小的“不重复数”问题的高效实现
    巧用“异或”
    12个滑稽的C语言面试问答——《12个有趣的C语言问答》评析(5)
    12个滑稽的C语言面试问答——《12个有趣的C语言问答》评析(4)
  • 原文地址:https://www.cnblogs.com/zno2/p/4688757.html
Copyright © 2020-2023  润新知