All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.enunciate.modules.cxf.cxf-servlet.xml.fmt Maven / Gradle / Ivy

The newest version!
[#ftl]
[#-- @ftlvariable name="endpointInterface" type="org.codehaus.enunciate.contract.jaxws.EndpointInterface" --]
[#if provideJaxws!false]
  [@file name="cxf-jaxws-servlet.xml" charset="utf-8"]
<?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">

    [@forEachWsdl]
      [@forEachEndpointInterface wsdl=wsdl]
        [#list endpointInterface.endpointImplementations as impl]
          [#if impl.bindingType.soap11 || impl.bindingType.soap12]

          [#--todo: what about eis with the same name, different namespace?--]
  <jaxws:endpoint id="cxf-${endpointInterface.serviceName}" implementor="#${impl.serviceEndpointId}" address="${endpointInterface.metaData.soapPath}" implementorClass="${endpointInterface.qualifiedName}">
    <jaxws:properties>
    [#if ((impl??) && (impl.annotations["javax.xml.ws.soap.MTOM"]??))]
      <entry key="mtom-enabled" value="true"/>
    [/#if]
    [#if jaxwsProperties??]
      [#list jaxwsProperties?keys as prop]
      <entry key="${prop}" value="${jaxwsProperties[prop]}"/>
      [/#list]
    [/#if]
    </jaxws:properties>
    [#if ((impl??) && (impl.annotations["javax.xml.ws.soap.Addressing"]??))]
    <jaxws:features>
      <wsa:addressing xmlns:wsa="http://cxf.apache.org/ws/addressing"/>
    </jaxws:features>
    [/#if]
  </jaxws:endpoint>
          [/#if]
        [/#list]
      [/@forEachEndpointInterface]
    [/@forEachWsdl]
</beans>
  [/@file]
[/#if]
[#if provideJaxrs!false]
  [@file name="cxf-jaxrs-servlet.xml" charset="utf-8"]
<?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:jaxrs="http://cxf.apache.org/jaxrs"
    [#if loggingFeatureEnabled!false]
       xmlns:cxf="http://cxf.apache.org/core"
    [/#if]
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    [#if loggingFeatureEnabled!false]
                           http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
    [/#if]
                           http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
    [#if rootResources?? && rootResources?size > 0]

  <jaxrs:server id="jaxrs">
    [#if loggingFeatureEnabled!false ]
    <jaxrs:features>
    	<cxf:logging/>
    </jaxrs:features>
    [/#if]
    <jaxrs:serviceBeans>
      [#list rootResources as rootResource]
      <bean class="org.codehaus.enunciate.modules.spring_app.ServiceEndpointFactoryBean">
        <constructor-arg value="${rootResource.qualifiedName}"/>
        <property name="defaultImplementationBeanName" value="${rootResource.simpleName}EndpointBean"/>
        [#if !(rootResource.interface!true)]
        <property name="defaultImplementationClass" value="${rootResource.qualifiedName}"/>
        [/#if]
        <property name="interceptors" ref="service-bean-interceptors"/>
      </bean>
      [/#list]
    </jaxrs:serviceBeans>
    <jaxrs:providers>
      <bean class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"/>
      [#if jacksonAvailable!false]
      <bean class="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider"/>
      [/#if]
      [#if amfEnabled!false]
      <bean class="org.codehaus.enunciate.modules.amf.JAXRSProvider"/>
      [/#if]
      [#list jaxrsProviders as provider]
      <bean class="${provider.qualifiedName}"/>
      [/#list]
    </jaxrs:providers>
    [#if useExtensionMappings!false ]
    <jaxrs:extensionMappings>
      [#list contentTypes2Ids?keys as contentType]
        <entry key="${contentTypes2Ids[contentType]}" value="${contentType}"/>
      [/#list]
    </jaxrs:extensionMappings>
    [/#if]
  </jaxrs:server>
    [/#if]
</beans>
  [/@file]
[/#if]




© 2015 - 2025 Weber Informatics LLC | Privacy Policy