{"id":15019324,"url":"https://github.com/codecentric/cxf-spring-boot-starter","last_synced_at":"2025-05-16T11:03:51.279Z","repository":{"id":8236642,"uuid":"57193626","full_name":"codecentric/cxf-spring-boot-starter","owner":"codecentric","description":"Enterprise \u0026 production ready SOAP webservices powered by Spring Boot \u0026 Apache CXF","archived":false,"fork":false,"pushed_at":"2025-04-05T17:16:18.000Z","size":898,"stargazers_count":149,"open_issues_count":26,"forks_count":78,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-09T06:07:15.822Z","etag":null,"topics":["apache-cxf","custom-soap-fault","cxf","cxf-boot","java-configuration","jax-ws","jdk11","jdk8","sei","soap","soap-services","soap-web-services","spring-boot","spring-boot-starter","webservice","wsdl","xml-schema"],"latest_commit_sha":null,"homepage":"https://blog.codecentric.de/en/2016/10/spring-boot-apache-cxf-spring-boot-starter/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codecentric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-27T07:37:30.000Z","updated_at":"2025-03-17T01:46:25.000Z","dependencies_parsed_at":"2023-12-04T00:19:59.656Z","dependency_job_id":"9d14564c-bcad-4017-8318-1b9c326bc089","html_url":"https://github.com/codecentric/cxf-spring-boot-starter","commit_stats":{"total_commits":437,"total_committers":10,"mean_commits":43.7,"dds":"0.38672768878718533","last_synced_commit":"6b4edbc5a801dbcdeca2d284781341a84fe81e4b"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fcxf-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fcxf-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fcxf-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecentric%2Fcxf-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecentric","download_url":"https://codeload.github.com/codecentric/cxf-spring-boot-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-cxf","custom-soap-fault","cxf","cxf-boot","java-configuration","jax-ws","jdk11","jdk8","sei","soap","soap-services","soap-web-services","spring-boot","spring-boot-starter","webservice","wsdl","xml-schema"],"created_at":"2024-09-24T19:53:20.180Z","updated_at":"2025-05-16T11:03:51.251Z","avatar_url":"https://github.com/codecentric.png","language":"Java","readme":"Enterprise \u0026 production ready SOAP webservices powered by Spring Boot \u0026 Apache CXF\n======================================================================================\n[![Build Status](https://github.com/codecentric/cxf-spring-boot-starter/workflows/build/badge.svg)](https://github.com/codecentric/cxf-spring-boot-starter/actions)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.codecentric/cxf-spring-boot-starter/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.codecentric/cxf-spring-boot-starter/)\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n[![renovateenabled](https://img.shields.io/badge/renovate-enabled-yellow)](https://renovatebot.com)\n[![codecov](https://codecov.io/gh/codecentric/cxf-spring-boot-starter/branch/master/graph/badge.svg?token=Ntc7Kn0qXz)](https://codecov.io/gh/codecentric/cxf-spring-boot-starter)\n[![versionspringboot](https://img.shields.io/badge/dynamic/xml?color=brightgreen\u0026url=https://raw.githubusercontent.com/codecentric/cxf-spring-boot-starter/master/cxf-spring-boot-starter/pom.xml\u0026query=%2F%2A%5Blocal-name%28%29%3D%27project%27%5D%2F%2A%5Blocal-name%28%29%3D%27properties%27%5D%2F%2A%5Blocal-name%28%29%3D%27spring.boot.version%27%5D\u0026label=springboot)](https://github.com/spring-projects/spring-boot)\n[![versionjava](https://img.shields.io/badge/jdk-8,_11,_15-brightgreen.svg?logo=java)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)\n[![versionapachecxf](https://img.shields.io/badge/dynamic/xml?color=brightgreen\u0026url=https://raw.githubusercontent.com/codecentric/cxf-spring-boot-starter/master/cxf-spring-boot-starter/pom.xml\u0026query=%2F%2A%5Blocal-name%28%29%3D%27project%27%5D%2F%2A%5Blocal-name%28%29%3D%27properties%27%5D%2F%2A%5Blocal-name%28%29%3D%27cxf.version%27%5D\u0026label=apache.cxf\u0026logo=apache)](http://cxf.apache.org/)\n[![versionspringcloudsleuth](https://img.shields.io/badge/dynamic/xml?color=brightgreen\u0026url=https://raw.githubusercontent.com/codecentric/cxf-spring-boot-starter/master/cxf-spring-boot-starter/pom.xml\u0026query=%2F%2A%5Blocal-name%28%29%3D%27project%27%5D%2F%2A%5Blocal-name%28%29%3D%27properties%27%5D%2F%2A%5Blocal-name%28%29%3D%27spring.cloud.sleuth.version%27%5D\u0026label=spring.cloud.sleuth)](https://spring.io/projects/spring-cloud-sleuth)\n[![versionlogstashlogbackencoder](https://img.shields.io/badge/dynamic/xml?color=brightgreen\u0026url=https://raw.githubusercontent.com/codecentric/cxf-spring-boot-starter/master/cxf-spring-boot-starter/pom.xml\u0026query=%2F%2A%5Blocal-name%28%29%3D%27project%27%5D%2F%2A%5Blocal-name%28%29%3D%27properties%27%5D%2F%2A%5Blocal-name%28%29%3D%27logstash-logback-encoder.version%27%5D\u0026label=logstash.logback.encoder)](https://github.com/logstash/logstash-logback-encoder)\n[![Deployed on Heroku](https://img.shields.io/badge/heroku-deployed-blueviolet.svg?logo=heroku\u0026)](https://cxf-boot-simple.herokuapp.com/my-foo-api)\n\n![spring-boot-starter-cxf-logo](spring-boot-starter-cxf-logo.png)\n\n# Features include:\n\n* __Generating all necessary Java-Classes__ using JAX-B from your WSDL/XSDs (using the complementing Maven plugin [cxf-spring-boot-starter-maven-plugin]\n* Booting up Apache CXF within Spring Context with __100% pure Java-Configuration__\n* __Complete automation of Endpoint initialization__ - no need to configure Apache CXF Endpoints, that´s all done for you automatically based upon the WSDL and the generated Java-Classes (bringing up a nice [Spring Boot 1.4.x Failure Message](http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-spring-application.html#_startup_failure) if you missed something :) )\n* Customize SOAP service URL and the title of the CXF generated Service site\n* __Configures CXF to use slf4j__ and serve Logging-Interceptors, to log only the SOAP-Messages onto console\n* __Extract the SoapMessages__ for processing in __Elastic-Stack (ELK)__, like [docker-elk](https://github.com/jonashackt/docker-elk)\n* Tailor your own __custom SOAP faults__, that comply with the exceptions defined inside your XML schema\n* SOAP Testing-Framework: With __XmlUtils__ to easy your work with JAX-B class handling \u0026 a __SOAP Raw Client__ to Test malformed XML against your Endpoints\n* Works with JDK 8, 9 \u0026 11ff\n\n\n# Documentation\n\nThis starter is part of the __Community Contributions__ list of the official Spring Boot Starters: https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-starters (see `SOAP Web Services support with Apache CXF`)\n\nThere´s also an blog post describing this project: [Spring Boot \u0026 Apache CXF – SOAP on steroids fueled by cxf-spring-boot-starter](https://blog.codecentric.de/en/2016/10/spring-boot-apache-cxf-spring-boot-starter/)\n\nThe following documentation tries to get you started fast. There are also sample projects, if you'd like to see some code instead:\n\n* [cxf-boot-simple](cxf-spring-boot-starter-samples/cxf-boot-simple): Full example incl. Endpoint implementation, Tests, WSDL files with XSD includes, Custom Faults etc. This sample project is also live-deployed on Heroku: https://cxf-boot-simple.herokuapp.com/my-foo-api\n* [cxf-boot-simple-client](cxf-spring-boot-starter-samples/cxf-boot-simple-client): Client example, using the cxf-spring-boot-starter in Client only mode\n\n### Initial Setup\n\n* Create a Spring Boot maven project. Use the __spring-boot-starter-parent__ as a parent and the __spring-boot-maven-plugin__ as a build plugin (you could speed that up, if you use the [Spring Initializr](https://start.spring.io/)).\n* Then append cxf-spring-boot-starter as dependency and the [cxf-spring-boot-starter-maven-plugin] as build-plugin (see the example [cxf-boot-simple]):\n\n```\n\u003cdependencies\u003e\n\t\u003cdependency\u003e\n\t    \u003cgroupId\u003ede.codecentric\u003c/groupId\u003e\n\t    \u003cartifactId\u003ecxf-spring-boot-starter\u003c/artifactId\u003e\n\t    \u003cversion\u003e2.4.1\u003c/version\u003e\n\t\u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n\n```\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003ede.codecentric\u003c/groupId\u003e\n            \u003cartifactId\u003ecxf-spring-boot-starter-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e2.3.0.RELEASE\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003egenerate\u003c/goal\u003e\n                    \u003c/goals\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n* place your .wsdl-File (and all the imported XSDs) into a folder somewhere under __src/main/resources__ (see [cxf-spring-boot-starter-maven-plugin] for details)\n* run __mvn generate-sources__ to generate all necessary Java-Classes from your WSDL/XSD \n* Implement the [javax.jws.WebService](http://docs.oracle.com/javaee/7/api/javax/jws/WebService.html) annotated Interface (your generated __Service Endpoint Interface (SEI)__ ) - it is the starting point for your development and is needed to autoconfigure your Endpoints. See the [WeatherServiceEndpoint](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/cxf-spring-boot-starter-samples/cxf-boot-simple/src/main/java/de/codecentric/soap/endpoint/WeatherServiceEndpoint.java) class inside the [cxf-boot-simple] project. \n* That´s it\n\n\n# Additional Configuration Options\n\n### Customize URL, where your SOAP services are published\n\n* create a application.properties and set the BaseURL of your Webservices via __soap.service.base.url=/yourUrlHere__\n\n\n### Customize title of generated CXF-site\n\n* place a __cxf.servicelist.title=Your custom title here__ in application.properties\n\n\n### SOAP-Message-Logging\n\nActivate SOAP-Message-Logging just via Property __soap.messages.logging=true__ in application.properties (no more configuration on the Endpoint needed) \n\nSOAP-Messages will be logged only and printed onto STDOUT/Console for fast analysis in development.\n\n### Extract the SoapMessages for processing in ELK-Stack\n\nThe cxf-spring-boot-starter brings some nice features, you can use with an ELK-Stack to monitor your SOAP-Service-Calls:\n\n* Extract SOAP-Service-Method for Loganalysis (based on WSDL 1.1 spec, 1.2 not supported for now - because this is read from the HTTP-Header field SoapAction, which isn´ mandatory in 1.2 any more)\n* Dead simple Calltime-Logging\n* Correlate all Log-Messages (Selfmade + ApacheCXFs SOAP-Messages) within the Scope of one Service-Consumer`s Call in Kibana via logback´s [MDC], placed in a Servlet-Filter\n\n##### HowTo use\n\n* Activate via Property __soap.messages.extract=true__ in application.properties\n* Add a __logback-spring.xml__ file to __src/main/resources__ (otherwise the feature will not be activated) and configure the [logstash-logback-encoder] (which is delivered with this spring-boot-starter), like:\n\n```\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cconfiguration\u003e\n    \u003cinclude resource=\"org/springframework/boot/logging/logback/base.xml\"/\u003e\n    \u003clogger name=\"org.springframework\" level=\"WARN\"/\u003e\n    \u003c!-- more logging config here --\u003e\n    \n    \n    \u003c!-- Logstash-Configuration --\u003e\n\t\u003c!-- For details see https://github.com/logstash/logstash-logback-encoder/tree/logstash-logback-encoder-4.5 --\u003e\n\t\u003cappender name=\"logstash\" class=\"net.logstash.logback.appender.LogstashTcpSocketAppender\"\u003e\n\t\t\u003c!-- You may want to configure a default instance, this could be done like\n\t\t\u003cdestination\u003e${LOGANALYSIS_HOST:-192.168.99.100}:5000\u003c/destination\u003e as discribed here:\n\t\thttp://logback.qos.ch/manual/configuration.html#defaultValuesForVariables\n\t\tSet the SystemProperty with\n\t\tenv LOGANALYSIS_HOST={{ loganalysis.host }}\n\t\te.g. in a service.upstart.conf.j2, when using Ansible and deploying to Ubuntu --\u003e\n\t\t\u003cdestination\u003e192.168.99.100:5000\u003c/destination\u003e\n\t\t\u003c!-- encoder is required --\u003e\n\t    \u003cencoder class=\"net.logstash.logback.encoder.LogstashEncoder\"\u003e\n\t\t   \t\u003cincludeCallerData\u003etrue\u003c/includeCallerData\u003e\n\t\t   \t\u003ccustomFields\u003e{\"service_name\":\"WeatherService_1.0\"}\u003c/customFields\u003e\n\t\t   \t\u003cfieldNames\u003e\n\t\t   \t\t\u003cmessage\u003elog-msg\u003c/message\u003e\n\t\t   \t\u003c/fieldNames\u003e\n\t   \t\u003c/encoder\u003e\n\t   \t\u003ckeepAliveDuration\u003e5 minutes\u003c/keepAliveDuration\u003e\n\t\u003c/appender\u003e\n\t\n\t\u003croot level=\"INFO\"\u003e\n\t    \u003cappender-ref ref=\"logstash\" /\u003e\n\t\u003c/root\u003e\n\u003c/configuration\u003e\n```\n\n* Now some fields will become available in your kibana dashboard (in other words in your elasticsearch index), e.g. soap-message-inbound contains the Inbound Message\n* see all of them here [ElasticsearchField.java](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/src/main/java/de/codecentric/cxf/logging/ElasticsearchField.java)\n* Additionally [Spring Cloud Sleuth](http://cloud.spring.io/spring-cloud-sleuth/) will provide detailed tracing information of your services. Sleuth will populate the Logback MDC automatically with the tracing information. You can for example retrieve the Trace-Id of the current call via `MDC.get(\"X-B3-TraceId\")`.\n* The default is to use the ELK stack for log analysis. With further configuration you can even extend the tracing infrastructure to use more tailored tracing tools like [Zipkin](http://zipkin.io/).\n\n### Custom SOAP faults for XML Schema Validation Errors\n\nThe standard behavior of Apache CXF with XML validation errors (non schema compliant XML or incorrect XML itself) is to return a SOAP fault including the corresponding exception in CXF:\n```\n\u003csoap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"\u003e\n   \u003csoap:Body\u003e\n      \u003csoap:Fault\u003e\n         \u003cfaultcode\u003esoap:Server\u003c/faultcode\u003e\n         \u003cfaultstring\u003ewrong number of arguments while invoking public de.codecentric.namespace.weatherservice.general.ForecastRequest de.codecentric.cxf.WeatherServiceEndpoint.getCityForecastByZIP(de.codecentric.namespace.weatherservice.general.ForecastRequest) throws net.bipro.namespace.BiproException with params null.\u003c/faultstring\u003e\n      \u003c/soap:Fault\u003e\n   \u003c/soap:Body\u003e\n\u003c/soap:Envelope\u003e\n```\nMany SOAP based standards demand a custom SOAP-Fault, that should be delivered in case of XML validation errors. To Implement that behavior, you have to:\n* Implement the Interface [CustomFaultBuilder](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/src/main/java/de/codecentric/cxf/xmlvalidation/CustomFaultBuilder.java) as Spring\n[@Component](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/stereotype/Component.html)\n* Override Method createCustomFaultMessage(FaultType faultContent) an give back appropriate Messages you want to see in faultstring: \u003csoap:Fault\u003e\u003cfaultstring\u003eYOUR CUSTOM MESSAGE HERE\u003c/faultstring\u003e\n* Override Method createCustomFaultDetail(String originalFaultMessage, FaultType faultContent) and return the JAX-B generated Object, that represents your WebService´ Fault-Details (be really careful to take the right one!!, often the term 'Exception' is used twice... - e.g. with the [BiPro]-Services)\n* Configure your Implementation as @Bean - only then, XML Schema Validation will be activated\n\n\n\n### Apache CXF \u0026 JAX-WS with JDK11+ together with the JavaEE/JakartaEE chaos\n\nSince JDK8 isn't the way to go anymore, the underlying cxf-spring-boot-starter-maven-plugin had to be rebuild to support JDK11+ (but also 8, 9, 10, ...) - have a look at [JDK 11 support](https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin#jdk-11-support) in the docs there.\n\nAlso the JavaEE libraries were mostly deprecated in the JDK - and also moved from Oracle to JakartaEE projects on GitHub/MavenCentral. This has also already been adressed in [Moved from \"OLD\" jaxb to \"NEW\" jaxb](https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin#moved-from-old-jaxb-to-new-jaxb).\n\nBut there's a third point so far: Apache CXF isn't going to work fully without another dependency. I stumbled upon it, while completing the [cxf-boot-simple](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/cxf-spring-boot-starter-samples/cxf-boot-simple-client) - a sample project, which should show the usage of this cxf-spring-boot-starter in client-only mode much much better than before (see [#8](https://github.com/codecentric/cxf-spring-boot-starter/issues/8)).\n\nThe problem is, ApacheCXF uses classes from `com.sun.activation` package (see [new Jakarta sources on GitHub here](https://github.com/eclipse-ee4j/jaf) or on [Maven Central](https://mvnrepository.com/artifact/com.sun.activation/jakarta.activation)), which lead to errors when the dependecy isn't provided (see [stackoverflow](https://stackoverflow.com/questions/55476331/tomcat8-5-and-openjdk11-noclassdeffounderror-could-not-initialize-class-org-apa)):\n\n```\nCaused by: java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport\n\tat javax.activation.MailcapCommandMap.\u003cinit\u003e(MailcapCommandMap.java:179) ~[javax.activation-api-1.2.0.jar:1.2.0]\n\tat javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:85) ~[javax.activation-api-1.2.0.jar:1.2.0]\n\tat org.apache.cxf.attachment.AttachmentUtil.\u003cclinit\u003e(AttachmentUtil.java:70) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:53) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) ~[cxf-core-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) ~[cxf-rt-frontend-simple-3.3.2.jar:3.3.2]\n\tat org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) ~[cxf-rt-frontend-jaxws-3.3.2.jar:3.3.2]\n\tat com.sun.proxy.$Proxy155.getCityForecastByZIP(Unknown Source) ~[na:na]\n\tat de.codecentric.soap.endpoint.WeatherServiceSoapClient.getCityForecastByZIP(WeatherServiceSoapClient.java:36) ~[classes/:na]\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]\n\tat org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\tat org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]\n\t... 58 common frames omitted\nCaused by: java.lang.ClassNotFoundException: com.sun.activation.registries.LogSupport\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) ~[na:na]\n\tat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]\n\t... 82 common frames omitted\n```\n\nAs we provide the correct dependency with this starter here, you don't need to bother about that:\n\n```\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.sun.activation\u003c/groupId\u003e\n        \u003cartifactId\u003ejakarta.activation\u003c/artifactId\u003e\n        \u003cversion\u003e${jakarta.activation.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\n### Testing SOAP web services\n\n##### Create a WebService Client\n\n* If you instantiate a JaxWsProxyFactoryBean, you need to set an Address containing your configured (or the standard) soap.service.base.url. To get the correct path, just autowire the CxfAutoConfiguration like:\n\n``` \n@Autowired\nprivate CxfAutoConfiguration cxfAutoConfiguration;\n```\n\nand obtain the __base.url__ and the __serviceUrlEnding__ (this one is derived from the wsdl:service name attribute of your WSDL) by calling\n\n```\ncxfAutoConfiguration.getBaseAndServiceEndingUrl()\n```\n\n##### Integrate real XML test files into your Unit-, Integration- or SingleSystemIntegrationTests\n\nAs described [in this blogpost](https://blog.codecentric.de/en/2016/06/spring-boot-apache-cxf-testing-soap-webservices/) the best gut feeling one could get while writing SOAP Tests, is the usage of real XML test files. To easily marshall these into your Java classes with JAX-B, this starter brings a utility class [de.codecentric.cxf.common.XmlUtils](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/src/main/java/de/codecentric/cxf/common/XmlUtils.java) with lots of useful methods like __readSoapMessageFromStreamAndUnmarshallBody2Object(java.io.InputStream fileStream, Class\u003cT\u003e jaxbClass)__. Then you could do things inside your testcases like:\n\n```\n@Value(value=\"classpath:requests/GetCityForecastByZIPTest.xml\")\nprivate org.springframework.core.io.Resource GetCityForecastByZIPTestXml;\n    \n@Test\npublic void getCityForecastByZIP() throws WeatherException, BootStarterCxfException, IOException {\n    GetCityForecastByZIP getCityForecastByZIP = XmlUtils.readSoapMessageFromStreamAndUnmarshallBody2Object(GetCityForecastByZIPTestXml.getInputStream(), GetCityForecastByZIP.class);\n...\n}\n```\n\n##### SOAP Raw client\n\nEnables automatic testing of malformed XML Requests (e.g. for Testing your Custom SOAP faults) with the [de.codecentric.cxf.soaprawclient.SoapRawClient](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/src/main/java/de/codecentric/cxf/soaprawclient/SoapRawClient.java). To use it in your Testcases, initialize the SoapRawClient inside a @Configuration annotated Class like this:\n\n```\n@Bean\npublic SoapRawClient soapRawClient() throws BootStarterCxfException {\n    return new SoapRawClient(buildUrl(), YourServiceInterface.class);\n}\n\npublic String buildUrl() {\n    // return something like http://localhost:8084/soap-api/WeatherSoapService\n    return \"http://localhost:8084\" + cxfAutoConfiguration.getBaseAndServiceEndingUrl();\n}\n\n@Autowired\nprivate CxfAutoConfiguration cxfAutoConfiguration;\n```\n\n### Running Client-only mode\n\nIf you´d like to run Apache CXF only to call other SOAP web services but don´t want to provide one for yourself, than booting up a complete server is a bit to much for you. Therefore you´re also able to deactivate the Complete automation of Endpoint initialization feature, which only makes sense if you have an Endpoint to fire up. You can deactivate it with the following propery in your application.propteries:\n\n```\nendpoint.autoinit=false\n```\n\n\n# Concepts\n\n### Complete automation of Endpoint initialization\n\n###### 100% contract first approach\n\nTaking into account a __100% contract first development approach__ there shouldn´t be a single reason, why one has to manually configure Endpoints in Apache CXF - because pretty much every piece of information that is necessary to configure them should be available through the WSDL. Since the start of this spring-boot-starter project, this was a thought that didn´t let me go.\n\nTo understand, how the complete automation of Endpoint initialization is implemented in the cxf-spring-boot-starter, let´s first have a look on how the initialization works without the help of the starter. To instantiate \u0026 publish a `org.apache.cxf.jaxws.EndpointImpl`, we need the SEI implementing class and the generated WebServiceClient annotated class. In a non-automated way to use Apache CXF to fire up JAX-WS endpoints, this is done with code like this:\n\n```\n\t@Bean\n\tpublic WeatherService weatherService() {\n\t    return new WeatherServiceEndpoint();\n\t}\n\n    @Bean\n    public Endpoint endpoint() {\n        EndpointImpl endpoint = new EndpointImpl(springBus(), weatherService());\n        endpoint.setServiceName(weather().getServiceName());\n        endpoint.setWsdlLocation(weather().getWSDLDocumentLocation().toString());\n        endpoint.publish(serviceUrlEnding());\n        return endpoint;\n    }\n\n\t@Bean\n\tpublic Weather weather() {\n\t    // Needed for correct ServiceName \u0026 WSDLLocation to publish contract first incl. original WSDL\n\t    return new Weather();\n\t}\n```\n\nThe easier parts are the SpringBus, which we already have instantiated in our [CxfAutoConfiguration](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/src/main/java/de/codecentric/cxf/configuration/CxfAutoConfiguration.java), and the serviceUrlEnding, which is constructed from the configurable base url and the WSDL tag´s `service name` content. To instantiate the EndpointImpl, set the service name and the WSDL location correctly, we need the __SEI implementing class__ (which you have to write yourself, because it´s the starting point for your implementation) and the generated __WebServiceClient annotated class__.\n\n###### Scanning...\n\nBecause a spring-boot-starter is a generic thing everybody can use just via including it in the pom, these two classes are not fixed - they are always generated or derived from generated classes. Therefore we have to search for them - according to some things we know. The search is done with the help of Spring´s [ClassPathScanningCandidateComponentProvider](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.html) (instead of using the really nice [fast-classpath-scanner](http://stackoverflow.com/questions/259140/scanning-java-annotations-at-runtime/1415338#comment70214187_1415338), which didn´t work well in this use case).\n\nEither scanning framework you use, self written or library - any of them will be much faster, if you have the package names of the searched classes. In some scenarios -escpecially with the ClassPathScanningCandidateComponentProvider used here - you __have to know__ the packages, otherwise scanning will fail (because it tries to double-scan [the package org.springframework itself](https://github.com/spring-projects/spring-boot/issues/3850)). So to search for the WebServiceClient annotated class and the SEI itself (which we need to scan for the SEI implementation, which is only characterized due to the fact of implementing the SEI), we need to somehow know their package beforehand.\n\nHere [cxf-spring-boot-starter-maven-plugin](https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin) comes to our rescue. With the new 1.0.8´s feature [Extract the targetNamespace from the WSDL, generate the SEI and WebServiceClient annotated classes´ package names from it \u0026 write it together with the project´s package name into a cxf-spring-boot-maven.properties](https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin/issues/6) the package names are extracted into a __cxf-spring-boot-maven.properties__ file inside your `project.buildpath while a `mvn generate-sources` is ran. The package name of the WebServiceClient annotated class and the SEI are derived from the WSDL:\n\n\u003e To get this 100% right, we need to use the same mechanism as the [jaxws-maven-plugin](https://github.com/mojohaus/jaxws-maven-plugin), which itself uses [WSimportTool](https://github.com/gf-metro/jaxws/blob/master/jaxws-ri/tools/wscompile/src/main/java/com/sun/tools/ws/wscompile/WsimportTool.java) of the [JAXWS-RI implementation](https://github.com/gf-metro/jaxws), to obtain the package-Name from the WSDL file, where the classes are generated to. The __WSDL´s targetNamespace__ is used to generate the package name. If you have targetNamespace=\"http://www.codecentric.de/namespace/weatherservice/\" for example, your package will be de.codecentric.namespace.weatherservice. One can find the code used to generate the package name in the [WSDLModeler](https://github.com/gf-metro/jaxws/blob/master/jaxws-ri/tools/wscompile/src/main/java/com/sun/tools/ws/processor/modeler/wsdl/WSDLModeler.java) at line 2312 (This algorithm is specified in the JAXB spec. So we rely onto it):\n\n        String wsdlUri = document.getDefinitions().getTargetNamespaceURI();\n        return XJC.getDefaultPackageName(wsdlUri);\n\nThe package name of the SEI implementing class is a bit more of a guesswork, because this class could literally reside everywhere. BUT: If you start a project to use a spring-boot-starter, the 99,9% case will be to start with a Maven pom - and even faster through the usage of the [Spring initializr](http://start.spring.io/). It should be safe to rely on that and just guess the package name from your project´s pom. This will in 99,9% of all cases contain your SEI implementing class, which is you´re entry point to develop a SOAP web service with this starter and CXF. \n\n\n###### Auto initialize the Endpoint!\n\n![Complete automation of endpoint initialization](https://github.com/codecentric/cxf-spring-boot-starter/blob/master/completeAutomationOfEndpointInitialization.png)\n\nNow having the package names of every needed class residing in the __cxf-spring-boot-maven.properties__ file after a run of `mvn generate-sources`, using Spring´s [ClassPathScanningCandidateComponentProvider](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.html) to scan for the WebServiceClient annotated class is easy - just adding a new [AnnotationTypeFilter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/type/filter/AnnotationTypeFilter.html) and voila we´ve got the class. Obtaining the class of an interface which has some annotation isn´t possible with the Spring scanner at first sight (and therefore we had a [long experimenting phase with the fast-classpath-scanner](https://github.com/codecentric/cxf-spring-boot-starter/issues/6)). But looking a bit deeper, this is also possible - just via a [really small hack :) ](http://stackoverflow.com/questions/17477255/component-scan-for-custom-annotation-on-interface/41504372#41504372), which only means to override the [ClassPathScanningCandidateComponentProvider](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.html):\n\n```\nClassPathScanningCandidateComponentProvider scanningProvider = new ClassPathScanningCandidateComponentProvider(false) {\n    @Override\n    protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {\n        return true;\n    }\n};  \n```\n\nNow we´re able to scan for the SEI. And with that and adding the [AssignableTypeFilter](http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/core/type/filter/AssignableTypeFilter.html) we also get the needed SEI implementing class.\n\nHaving all the three necessary classes at hand, we can easiely and automatically fire up a `org.apache.cxf.jaxws.EndpointImpl`! \n\nIf you start your Spring Boot application and everything went fine, then you should see some of those log messages inside your console:\n\n```\n[...] INFO 83684 --- [ost-startStop-1] d.c.c.a.WebServiceAutoDetector           : Found WebServiceClient class: 'de.codecentric.namespace.weatherservice.Weather'\n[...] INFO 83684 --- [  restartedMain] d.c.c.a.WebServiceAutoDetector           : Found Service Endpoint Interface (SEI): 'de.codecentric.namespace.weatherservice.WeatherService'\n[...] INFO 83684 --- [  restartedMain] d.c.c.a.WebServiceAutoDetector           : Found SEI implementing class: 'WeatherServiceEndpoint'\n```\n\n###### Deactivate autoinitialization\n\nAlthough it should be a great feature to be able to work 100% contract first, there might be situations, where one wants to deactivate it. E.g. while running in [client-only mode](https://github.com/codecentric/cxf-spring-boot-starter#running-client-only-mode). \n\nBecause there is (\u0026 sadly will be) [no @ConditionalOnMissingProperty in Spring Boot](https://github.com/spring-projects/spring-boot/issues/4938), we need to use a workaround:\n\n```\n     @Bean\n     @ConditionalOnProperty(name = \"endpoint.autoinit\", matchIfMissing = true)\n     public Endpoint endpoint() throws BootStarterCxfException ...\n```\n\nTo get the desired deactivation flag nevertheless, we need to use the [@ConditionalOnProperty](http://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/autoconfigure/condition/ConditionalOnProperty.html) in an interesting way :) With the usage of `matchIfMissing = true` and `name = \"endpoint.autoinit\"` the autoinitialization feature is activated in situations, where the property is missing or is set to `true`. Only, if `endpoint.autoinit=false` the feature is disabled (which is quite ok in our use-case).\n\n###### Setting the URL of the endpoint\n\nYou can manually specify the url of the Service Endpoint using the spring property: `soap.service.publishedEndpointUrl`. This can be handy if your application is behind a reverse proxy and the resulting WSDLs don't reflect that.\n\n# Known limitations\n\n### Using devtools with mvn spring-boot:run\n\nIf you want to use the well known [Spring Boot Developer Tools (devtools)](http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html) - no problem. As long as you don´t want to use `mvn spring-boot:run`. Because of the devtools make usage of the [2 separate classloaders](http://docs.spring.io/spring-boot/docs/1.4.2.RELEASE/reference/htmlsingle/#using-boot-devtools-restart) the scanned, found and instantiated classes aren´t valid inside the other classloader and you could get into [trouble](https://github.com/codecentric/cxf-spring-boot-starter/issues/6). This is only in combination with the [Complete automation of Endpoint initialization feature](https://github.com/codecentric/cxf-spring-boot-starter#complete-automation-of-endpoint-initialization) and the starting method `mvn spring-boot:run`. All the other starting mechanisms of Spring Boot will work as expected (`java -jar service.jar`, Starting inside the IDE via `Run as...` or in `mvn test`).\n\n\n# Sample projects\n\nFor better documentation and usability overview of the cxf-spring-boot-starter, this project now also provides sample projects.\n\n* [cxf-boot-simple](cxf-spring-boot-starter-samples/cxf-boot-simple): Full example incl. Endpoint implementation, Tests, WSDL files with XSD includes, Custom Faults etc. \n* [cxf-boot-simple-client](cxf-spring-boot-starter-samples/cxf-boot-simple-client): Client example, using the cxf-spring-boot-starter in Client only mode\n\nThat we are able to test the second project in client-only mode, we should somehow run the first sample project on a Cloud provider like Heroku. \n\n### Deploying cxf-boot-simple on Heroku\n\nOn Heroku the current Java environment supports JDKs newer than JDK8, which is needed to successfully build our cxf-spring-boot-starter (which now has [build in JDK8, 9, 11 \u0026 12 support](https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin#jdk-11-support)).\n\nThe default JDK in Heroku is currently version 8, [according to the docs](https://devcenter.heroku.com/articles/java-support#specifying-a-java-version) we have to create a `system.properties` file inside the root of our application to configure this:\n\n```\n# Heroku configuration file\n# by default, Heroku uses JDK8, which isn't able to build our cxf-spring-boot-starter (although it can be used with JDK8)\n# see https://devcenter.heroku.com/articles/java-support#specifying-a-java-version\njava.runtime.version=12\n# we also need to specify the Maven version (see https://github.com/codecentric/cxf-spring-boot-starter/issues/48)\n# maven.version=3.6.0\n# but as there is no support for Maven \u003e3.3.9 on Heroku, we need to switch to https://github.com/takari/maven-wrapper\n# which is also the recommended way to use Maven on Heroku https://devcenter.heroku.com/articles/java-support#specifying-a-maven-version\n```\n\nBut then we'll soon find ourselfs in the hell of an old Maven version! [Currently Heroku only supports Maven \u003c=3.3.9](https://devcenter.heroku.com/articles/java-support#specifying-a-maven-version), which leads to the following build exception on Heroku (see https://github.com/codecentric/cxf-spring-boot-starter/issues/48 also):\n\n```\nError injecting: org.jvnet.jax_ws_commons.jaxws.MainWsImportMojocom.google.inject.ProvisionException: Unable to provision\n```\n\nChanging the Maven version inside the `system.properties` file doesn't help much, since Heroku doesn't support newer versions. Also a provided mvnw maven-wrapper configuration isn't picked up successfully (which should have helped us get out of this help):\n\n```\n-----\u003e Java app detected\n\n-----\u003e Installing JDK 12... done\n\n-----\u003e Installing Maven 3.3.9... done\n\n-----\u003e Executing: mvn -DskipTests clean dependency:list install\n\n       [INFO] Scanning for projects...\n```\n\n\n### Deploying cxf-boot-simple on Heroku with Docker\n\nNow that we don't have a current Maven version, we need to have a look for alternatives. But hey, there's also this alternative way of deploying to Heroku: Docker!\n\n[According to the docs](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml), we only need a `Dockerfile` inside our sample project:\n\n```\n# Docker multi-stage build\n\n# 1. Building the App with Maven\nFROM maven:3-jdk-11\n\nADD . /cxfbootsimple\nWORKDIR /cxfbootsimple\n\n# Just echo so we can see, if everything is there :)\nRUN ls -l\n\n# Run Maven build\nRUN mvn clean install\n\n\n# Just using the build artifact and then removing the build-container\nFROM openjdk:11-jdk\n\nMAINTAINER Jonas Hecht\n\nVOLUME /tmp\n\n# Add Spring Boot app.jar to Container\nCOPY --from=0 \"/cxfbootsimple/target/cxf-boot-simple-*-SNAPSHOT.jar\" app.jar\n\n# Fire up our Spring Boot app by default\nCMD [ \"sh\", \"-c\", \"java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar\" ]\n``` \n \nAnd we need a [heroku.yml](heroku.yml) inside the root of our project:\n\n```\nbuild:\n  docker:\n    web: /cxf-spring-boot-starter-samples/cxf-boot-simple/Dockerfile\n```\n\nNow we need to set the Heroku stack to `container` (we should do that maybe better inside a app.yml?!):\n\n```\nheroku stack:set container\n```\n\nThe next push should start our sample app inside a Docker container running on Heroku :)\n\n\n##### Error R14 (Memory quota exceeded)\n\nTo prevent a Memory quota exceeded error:\n\n```\n2019-07-24T02:58:48.253177+00:00 heroku[web.1]: Process running mem=836M(163.4%)\n2019-07-24T02:58:48.253243+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)\n2019-07-24T02:58:55.236933+00:00 heroku[web.1]: State changed from starting to crashed\n2019-07-24T02:58:55.111947+00:00 heroku[web.1]: Error R10 (Boot timeout) -\u003e Web process failed to bind to $PORT within 60 seconds of launch\n2019-07-24T02:58:55.111947+00:00 heroku[web.1]: Stopping process with SIGKILL\n2019-07-24T02:58:55.217642+00:00 heroku[web.1]: Process exited with status 137\n```\n\nwe should configure our JVM running inside the Docker container to not base it's memory allocation on the OS reports, since we do run inside a container now! See https://devcenter.heroku.com/articles/java-memory-issues#configuring-java-to-run-in-a-container\n\nBut as https://aboullaite.me/docker-java-10/ points out, the Java 9 configuration with `-XX:+UseContainerSupport` is now defaulting to true. \n\nIf we would run on Java 9 on, we would have to tweak our `java -jar` command:\n\n```\n# Fire up our Spring Boot app by default\nCMD [ \"sh\", \"-c\", \"java $JAVA_OPTS -XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom -jar /app.jar\" ]\n``` \n\nAs I like explicitely setting things we rely on, let's also leave this option set for JDK 10+.\n\n\nBut hey, we switched our Heroku environment from web! The web stack type automatically detects Java apps - and provides the correct Xms `JAVA_OPTS` configuration - see https://devcenter.heroku.com/articles/java-memory-issues#heroku-memory-limits:\n\n\u003e The default support for most JVM-based languages sets -Xss512k and sets Xmx dynamically based on dyno type. These defaults enable most applications to avoid R14 errors.\n\nBut as we are using Heroku stack type `container` now, these options might not be provided anymore?!\n\nLet's double check the configuration of our Heroku container dyno! Execute `heroku run printenv` to see all environment variables inside:\n\n```\n$ heroku run printenv\nRunning printenv on ⬢ cxf-boot-simple... up, run.7988 (Free)\nJAVA_URL_VERSION=11.0.4_11\nHEROKU_EXEC_URL=https://exec-manager.heroku.com/a3ea58e6-d7b3-4fa8-8148-5567be41e46f\nPORT=13303\nJAVA_BASE_URL=https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_\nHOME=/\nPS1=\\[\\033[01;34m\\]\\w\\[\\033[00m\\] \\[\\033[01;32m\\]$ \\[\\033[00m\\]\nJAVA_VERSION=11.0.4\nTERM=xterm-256color\nCOLUMNS=160\nPATH=/usr/local/openjdk-11/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\nJAVA_OPTS=\nLANG=C.UTF-8\nJAVA_HOME=/usr/local/openjdk-11\nPWD=/\nLINES=32\nDYNO=run.7988\n```\n\nAnd THERE WE ARE: `JAVA_OPTS` is empty! \n\nIf you have a look at the default `web` stack configuration on Heroku, this variable should have the following configuration:\n\n```\nJAVA_OPTS=-Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8\n```\n\nSo let's tweak our cxf-boot-simple [Dockerfile](cxf-spring-boot-starter-samples/cxf-boot-simple/Dockerfile):\n\n```\n# Fire up our Spring Boot app by default\nCMD [ \"sh\", \"-c\", \"java -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 -XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom -jar /app.jar\" ]\n```\n\nNow we should have configured our Java app running inside Docker according to the standard `web` Heroku stack (see https://devcenter.heroku.com/articles/java-memory-issues#heroku-memory-limits).\n\n\n##### Error R10 (Boot timeout) -\u003e Web process failed to bind to $PORT within 60 seconds of launch\n\nOur original Heroku `Procfile` did contain the setting of the `$PORT` variable so that Spring Boot is able to launch it's internal Tomcat accordingly:\n\n```\nweb: java -Dserver.port=$PORT -jar cxf-spring-boot-starter-samples/cxf-boot-simple/target/cxf-boot-simple-*-SNAPSHOT.jar\n```\n\nAnd this configuration is also needed inside our Dockerfile! Because https://devcenter.heroku.com/articles/container-registry-and-runtime#dockerfile-commands-and-runtime states:\n                                                             \n\u003e The web process must listen for HTTP traffic on $PORT, which is set by Heroku. EXPOSE in Dockerfile is not respected, but can be used for local testing. Only HTTP requests are supported.\n\nSo let's tweak our cxf-boot-simple [Dockerfile](cxf-spring-boot-starter-samples/cxf-boot-simple/Dockerfile) again:\n\n```\n# Fire up our Spring Boot app by default\nCMD [ \"sh\", \"-c\", \"java -Dserver.port=$PORT -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8 -XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom -jar /app.jar\" ]\n```\n\nNow the `$PORT` environment variable should be used to fire up our Spring Boot app. To verify this, execute the Docker container locally:\n\n```\ndocker build . --tag cxfbootsimple\ndocker run -e \"PORT=8095\" cxfbootsimple\n# look for container id\ndocker ps \ndocker exec -it containerId bash\ncurl localhost:8095/my-foo-api -v\n```\n\nFinally our cxf-boot-simple app is accessible at https://cxf-boot-simple.herokuapp.com/my-foo-api\n\n\n# Contribution\n\nIf you want to know more or even contribute to this Spring Boot Starter, maybe you need some information like:\n* [SpringBoot Docs - Creating your own auto-configuration](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-auto-configuration.html)\n* [The Missing piece - how @Conditional is also needed for your own custom spring boot starter](https://www.packtpub.com/books/content/writing-custom-spring-boot-starters)\n* [Boot your own Infrastructure - JavaMagazin](https://public.centerdevice.de/a10fb484-49a8-4a70-ada9-5eeda8c69465)\n\n\n\n[cxf-spring-boot-starter-maven-plugin: set wsdl directory]:(https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin#set-wsdl-directory-optional)\n[cxf-spring-boot-starter-maven-plugin]:https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin\n[BiPro]:https://bipro.net\n[logstash-logback-encoder]:https://github.com/logstash/logstash-logback-encoder\n[MDC]:http://logback.qos.ch/manual/mdc.html\n[cxf-boot-simple]:https://github.com/codecentric/spring-samples/tree/master/cxf-boot-simple\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecentric%2Fcxf-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecentric%2Fcxf-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecentric%2Fcxf-spring-boot-starter/lists"}