Giter Club home page Giter Club logo

cxf-spring-boot-starter's Issues

Maven Enforcer Plugin

I always use maven-enforcer-plugin in my spring-boot apps, but I seem to get some dependency mismatches:
The plugin:

<build>
        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

The result:

Dependency convergence error for com.sun.xml.fastinfoset:FastInfoset:1.2.15 paths to dependency are:
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.glassfish.jaxb:jaxb-runtime:2.3.1
        +-com.sun.xml.fastinfoset:FastInfoset:1.2.15
and
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-com.sun.xml.ws:jaxws-rt:2.3.2
        +-com.sun.xml.fastinfoset:FastInfoset:1.2.16
Dependency convergence error for org.apache.maven:maven-artifact:3.6.0 paths to dependency are:
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.apache.maven:maven-plugin-api:3.6.0
        +-org.apache.maven:maven-artifact:3.6.0
and
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.twdata.maven:mojo-executor:2.3.0
        +-org.apache.maven:maven-core:3.0.5
          +-org.apache.maven:maven-artifact:3.0.5
Dependency convergence error for org.apache.maven:maven-artifact:3.6.0 paths to dependency are:
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.apache.maven:maven-plugin-api:3.6.0
        +-org.apache.maven:maven-artifact:3.6.0
and
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.twdata.maven:mojo-executor:2.3.0
        +-org.apache.maven:maven-core:3.0.5
          +-org.apache.maven:maven-artifact:3.0.5

These are not all of them.

inconsistent results from jaxws version 3.3.3, earlier versions have the same issue

From a soap call hitting our implementation method after going through jaxws, the issue is with our bean that is using big int. The problem is when input of + and - values. We are getting inconsistent results causing issues with our venerability scans since the calculations are performed before our validations on the field values

test data results
9 returns in int value of 9 set - correct
9+9 returns consistent result eliminating the +
9-9 returns - consistent result making negative after concatenation
0+0+0+9 returns 9 as expected
12345-12345+9 -returns 539778429 not sure what is happening here ***** ISSUE
12345-1234-9 returns -1234512349 seems to be consistent with earlier results
289 -289 +9 returns -2892899 again consistent with earlier results

Client only mode and soap logging properties does not recognoise by spring boot?

Hello.
I have project based on application.yml, when I trying to use:
soap:
messages:
extract: true

and
endpoint:
autoinit: false

spring boot do not understand this properties, how to fix this options? spring boot 2.1.6 version of cxf plugin and dep 2.1.7 and 2.1.6 releses

Also may be some one can take me a link to client only soap service with this plugins and dependencies?

SoapRawClient fails with MTOM

When the CXF server enables MTOM, the SoapRawClient will fail to parse the xml.

@WebService
@MTOM(threshold = 2 * 1024 * 1024)
public class XXXEndpoint implements XXXServicePortType {

Reason:
CXF always sends multipart http request. That means that the xml parser will fail.

Outbound Message:

--uuid:052ebfc6-8d20-4545-8d26-93fa4573631c
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: binary
Content-ID: <[email protected]>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Message part {http://www.codecentric.de/namespace/weatherservice/general}GetCityForecastByZIP was not recognized.  (Does it exist in service WSDL?)</faultstring></soap:Fault></soap:Body></soap:Envelope>
--uuid:052ebfc6-8d20-4545-8d26-93fa4573631c--

Any idea what to do here? We could parse the message, but maybe you have experience how to it?

Autowired constructor not working

I can't use a constructor with the @Autowired annotation.

@Autowired
public endpointImpl(Service service){...}

The parameters are null.
It is only possible with @Autowired fields.
This solves my problem but our team internal convention says that the use of @Autowired constructors is prefered because it makes unit testing easier.

Is it possible to use Autowired constructors ?
Its strange that the @Autowired annotation works on fields but not on the constructor and kinda not the way spring works.

Complete Automation of Endpoint Initialization

Autodetect everything needed to initialize javax.xml.ws.Endpoint completely based upon generated Class files.

Background: The cxf-spring-boot-starter-maven-plugin generates two Class files among others:
One representing your Service Endpoint Interface (SEI) - annotated with javax.jws.WebService - and another WebServiceClient class - which implements javax.xml.ws.Service. Both are needed to initialize the javax.xml.ws.Endpoint for publishing it with Apache CXF. In traditional way with Spring Boot, but without the cxf-spring-boot-starter, this is done like that:

@Bean
public WeatherService weatherService() {
    return new WeatherServiceEndpoint();
}

@Bean
public Endpoint endpoint() {
    EndpointImpl endpoint = new EndpointImpl(springBus, weatherService());        
    // CXF JAX-WS implementation relies on the correct ServiceName as QName-Object with
    // the name-Attribute´s text <wsdl:service name="Weather"> and the targetNamespace
    // "http://www.codecentric.de/namespace/weatherservice/"
    // Also the WSDLLocation must be set
    endpoint.setServiceName(weather().getServiceName());
    endpoint.setWsdlLocation(weather().getWSDLDocumentLocation().toString());
    endpoint.publish(PUBLISH_URL_ENDING);
    return endpoint;
}

@Bean
public Weather weather() {
    // Needed for correct ServiceName & WSDLLocation to publish contract first incl. original WSDL
    return new Weather();
}

Now the idea is, that this is all boilerplate - if you like to run your SOAP web services in a contract first manner. Because then, everything is quite clear from your starting point - the WSDL and XSD files. There you have already the Name of your Service and all it´s methods. It should be possible to initialize the CXF endpoint from that information. Prerequisites remain the generation of the Java classes via the cxf-spring-boot-starter-maven-plugin and a manual implementation of the Service Endpoint Interface (SEI), because that´s the place where you´re service coding starts - we shouldn´t generate that one for you.

With this feature, you dont´t have to do a lot any more - the hole Endpoint initialization (including the definition of a WebService URL) is done for you.

Better support for more than one WebService instance (Service Registry, Proxy, Edge-Service - e.g. w/ Spring Cloud Netflix)

As mentioned in #10 it is a common scenario to use the cxf-spring-boot-starter with more than one service instance (= more than one WSDL). Although we don´t want to support more than one WSDL inside the same Spring Boot service instance, we want to better support the scenario where one uses one WSDL per instance but in many instances and want to have a single entry-point into the WebServices landscape.

Handling of reverse proxies

Currently it is not possible to publish the CXF Services behind a reverse proxy and return the correct adresses in the WSDL when querying the live service.

Nginx as a reverse proxy with the following location:

nginx config with this location:

`location /service-location {

rewrite ^/service-location/(.*)$ real-endpoint/$1 break;
  
proxy_pass  http://some-container:8080;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}`

Our CXF Service is running in the docker container some-container on port 8a080.

When calling nginx/service-location/Service?wsdl the wsdl will not reflect the correct location of the client (WSDL contains real-endpoint instead of service-location). This makes the WSDL useless for a web service client generation process.

Running cxf-boot-simple on Heroku (using Docker)

See https://dashboard.heroku.com/apps/cxf-boot-simple/activity/builds/6c9fd9e9-d27f-459a-b43a-7a77baf71338

       [INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/resolver/maven-resolver-util/1.1.1/maven-resolver-util-1.1.1.jar (156 KB at 471.7 KB/sec)

       [INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar (469 KB at 1291.0 KB/sec)

       [INFO] Downloaded: https://repo.maven.apache.org/maven2/com/google/guava/guava/20.0/guava-20.0.jar (2386 KB at 6008.5 KB/sec)

       [WARNING] Error injecting: org.jvnet.jax_ws_commons.jaxws.MainWsImportMojo

       com.google.inject.ProvisionException: Unable to provision, see the following errors:

       

       1) Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger

         while locating org.apache.maven.repository.internal.DefaultVersionRangeResolver

         while locating java.lang.Object annotated with *

         at org.eclipse.sisu.wire.LocatorWiring

         while locating org.eclipse.aether.impl.VersionRangeResolver

           for parameter 1 at org.eclipse.aether.internal.impl.DefaultRepositorySystem.<init>(Unknown Source)

         while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem

         while locating java.lang.Object annotated with *

         while locating org.jvnet.jax_ws_commons.jaxws.MainWsImportMojo

       Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory

       	at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)

       	at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)

       	at java.base/jdk.internal.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:81)

       	at java.base/java.lang.reflect.Field.set(Field.java:780)

       	at org.eclipse.sisu.bean.BeanPropertyField.set(BeanPropertyField.java:72)

       	at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(ProvidedPropertyBinding.java:48)

       	at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52)

       	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:140)

       	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)

       	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)

       	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)

       	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)

       	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)

       	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)

       	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)

       	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)

       	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)

       	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)

       	at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)

       	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)

       	at org.eclipse.sisu.wire.BeanProviders.firstOf(BeanProviders.java:179)

       	at org.eclipse.sisu.wire.BeanProviders$7.get(BeanProviders.java:160)

       	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)

       	at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)

       	at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)

       	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)

       	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)

       	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)

       	at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)

       	at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)

       	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:104)

       	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)

       	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)

       	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)

       	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)

       	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)

       	at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)

       	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)

       	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)

       	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)

       	at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)

       	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)

       	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)

       	at org.eclipse.sisu.plexus.PlexusRequirements$RequirementProvider.get(PlexusRequirements.java:250)

       	at org.eclipse.sisu.plexus.ProvidedPropertyBinding.injectProperty(ProvidedPropertyBinding.java:48)

       	at org.eclipse.sisu.bean.BeanInjector.injectMembers(BeanInjector.java:52)

       	at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:140)

       	at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)

       	at com.google.inject.internal.ConstructorInjector.access$000(ConstructorInjector.java:32)

       	at com.google.inject.internal.ConstructorInjector$1.call(ConstructorInjector.java:89)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:133)

       	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)

       	at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)

       	at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)

       	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)

       	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)

       	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)

       	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)

       	at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)

       	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)

       	at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)

       	at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)

       	at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)

       	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)

       	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)

       	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)

       	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)

       	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)

       	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)

       	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)

       	at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)

       	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)

       	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)

       	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)

       	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)

       	at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:517)

       	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)

       	at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo(MojoExecutor.java:119)

       	at de.codecentric.cxf.BootCxfMojo.generateJaxbClassFiles(BootCxfMojo.java:88)

       	at de.codecentric.cxf.BootCxfMojo.execute(BootCxfMojo.java:69)

       	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

       	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

       	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

       	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)

       	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)

       	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)

       	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

       	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

       	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)

       	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)

       	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)

       	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)

       	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)

       	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)

       	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

       	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

       	at java.base/java.lang.reflect.Method.invoke(Method.java:566)

       	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

       	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

       	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

       	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
...
       [ERROR] 

       [ERROR] 8 errors

       [ERROR] role: org.apache.maven.plugin.Mojo

       [ERROR] roleHint: com.sun.xml.ws:jaxws-maven-plugin:2.3.2:wsimport

       [ERROR] -> [Help 1]

       [ERROR] 

       [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

       [ERROR] Re-run Maven using the -X switch to enable full debug logging.

       [ERROR] 

       [ERROR] For more information about the errors and possible solutions, please read the following articles:

       [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 !     ERROR: Failed to build app with Maven

       We're sorry this build is failing! If you can't find the issue in application code,

       please submit a ticket so we can help: https://help.heroku.com/

 !     Push rejected, failed to compile Java app.

 !     Push failed

Seems, that we need to use a newer Maven version on Heroku (see spotify/dockerfile-maven#252).

Upgrade base cxf version from 3.2.1 to latest 3.2.5 to get important fix in cxf and wss4j and also provide support for Spring boot 2 :)

Hi,

Current CXF version used by your starter is quite old (3.2.1 where latest released version is 3.2.5).

Since 3.2.2, CXF references org.apache.wss4j in version 2.2.1 in which there is support to load security properties file from filepath instead of classpath which is very interesting feature when we deploy cxf application where security properties could be different according to destination infrastructure (DevOps context see related fixed issue in wss4j https://issues.apache.org/jira/browse/WSS-540).

In such scenario we couldn't embed such file in JAR file that could be resolved through the classPath.

For instance I have explicitly excluded cxf dependencies targeting cxf 3.2.1 from your very useful starter to load 3.2.2 instead.

Regards.

Spring Boot 2: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration] from ClassLoader [java.net.URLClassLoader]

2017-12-22 16:35:26.093 INFO 8336 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-12-22 16:35:26.094 INFO 8336 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2017-12-22 16:35:26.110 INFO 8336 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/jagapathiraju/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
2017-12-22 16:35:26.188 INFO 8336 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-12-22 16:35:26.189 INFO 8336 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1549 ms
2017-12-22 16:35:26.270 ERROR 8336 --- [ost-startStop-1] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration] from ClassLoader [java.net.URLClassLoader@227fcef5]
2017-12-22 16:35:26.293 WARN 8336 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:138)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:751)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:387)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233)
at com.raju.tech.SpringWeb.main(SpringWeb.java:12)
... 6 more
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:117)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:84)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:413)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:176)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:177)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:150)
... 14 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration] from ClassLoader [java.net.URLClassLoader@227fcef5]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:205)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:228)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:215)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addServletContextInitializerBeans(ServletContextInitializerBeans.java:91)
at org.springframework.boot.web.servlet.ServletContextInitializerBeans.(ServletContextInitializerBeans.java:79)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:248)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:235)
at org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:54)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
... 1 more
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration] from ClassLoader [java.net.URLClassLoader@227fcef5]
at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:759)
at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:691)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.buildResourceMetadata(CommonAnnotationBeanPostProcessor.java:355)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.findResourceMetadata(CommonAnnotationBeanPostProcessor.java:339)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:298)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1016)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
... 29 more
Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/boot/autoconfigure/web/servlet/error/ErrorController;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.springframework.util.ReflectionUtils.getDeclaredFields(ReflectionUtils.java:754)
... 35 more
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.autoconfigure.web.servlet.error.ErrorController
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 39 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.190 s
[INFO] Finished at: 2017-12-22T16:35:26+05:30
[INFO] Final Memory: 58M/402M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.M7:run (default-cli) on project spring-web: An exception occurred while running. null: InvocationTargetException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat: Error creating bean with name 'org.springframework.cloud.netflix.zuul.ZuulProxyAutoConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.netflix.zuul.ZuulServerAutoConfiguration] from ClassLoader [java.net.URLClassLoader@227fcef5]: Lorg/springframework/boot/autoconfigure/web/servlet/error/ErrorController;: org.springframework.boot.autoconfigure.web.servlet.error.ErrorController -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

Make Calltime-Logging optional

If you start with a fresh new project, it´s irritating that you get Console Outputs like

2016-09-30 09:16:59.837 INFO 28878 --- [nio-8080-exec-5] d.c.cxf.logging.LogCorrelationFilter : 009 >>> Calltime: 122

Allthough it´s a feature for Elasticsearch Field extraction, this should be configurable (maybe via the soap.messages.extract property)

wsimport jvm arguments

It looks like you are already passing in wsimpot jvm argument "-Djavax.xml.accessExternalSchema=all". I also want to pass in "-Djavax.xml.accessExternalDTD=all".

Is this possible ?

FailureAnalyzer for missing cxf-spring-boot-maven.properties

The new Complete Automation of Endpoint Initialization is working great. It is 100% dependent of a pre-runned cxf-spring-boot-maven-plugin mvn clean generate-sources, which produces the cxf-spring-boot-maven.properties with the needed package names.

A Spring Boot Failure Analyzer would be great for that - also accompanied with the SystemOutRule to grab the Logoutput (see https://github.com/codecentric/cxf-spring-boot-starter/blob/master/src/test/java/de/codecentric/cxf/logging/SleuthLogMessagesTest.java).

Support both SOAP 1.1 and 1.2 at the same time (handling two wsdl:port)

Greetings, thanks for the tutorial, is very detailed.
On the tutorial, you removed the additional ports to reduce the complexity.

I'm looking for a way to handle multiple versions of soap (1.1 and 1.2) as ports on the same service.

Something like that:

<wsdl:service name="someService">
	<wsdl:port name="SomeServicePort11" binding="ns0:SomeServicePortBinding">
		<soap11:address location="https://localhost:443/someService"/>
	</wsdl:port>
	<wsdl:port name="SomeServicePort12" binding="ns2:SomeServicePortBinding">
		<soap12:address location="https://localhost:443/someService"/>
	</wsdl:port>
</wsdl:service>

When I used wsimport on wsdl address, it just created one service interface.
I din't find any like that using jax ws, just using the SpringWS implementation.

Thank's in advance.

java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport JDK11 Apache CXF in client-only mode

With JDK11 and Apache CXF in client-only mode, I get the following ClassNotFound exceptions:

Caused by: java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
	at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:179) ~[javax.activation-api-1.2.0.jar:1.2.0]
	at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:85) ~[javax.activation-api-1.2.0.jar:1.2.0]
	at org.apache.cxf.attachment.AttachmentUtil.<clinit>(AttachmentUtil.java:70) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.interceptor.AttachmentOutInterceptor.handleMessage(AttachmentOutInterceptor.java:53) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:531) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:355) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) ~[cxf-core-3.3.2.jar:3.3.2]
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) ~[cxf-rt-frontend-simple-3.3.2.jar:3.3.2]
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) ~[cxf-rt-frontend-jaxws-3.3.2.jar:3.3.2]
	at com.sun.proxy.$Proxy155.getCityForecastByZIP(Unknown Source) ~[na:na]
	at de.codecentric.soap.endpoint.WeatherServiceSoapClient.getCityForecastByZIP(WeatherServiceSoapClient.java:36) ~[classes/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:567) ~[na:na]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) ~[spring-web-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039) ~[spring-webmvc-5.1.8.RELEASE.jar:5.1.8.RELEASE]
	... 58 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.sun.activation.registries.LogSupport
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ~[na:na]
	... 82 common frames omitted

CxfAutoConfiguration.baseAndServiceEndingUrl() just concatenates the strings, should it do more?

The CxfAutoConfiguration.baseAndServiceEndingUrl() method returns a concatenation of the baseUrl and serviceUrlEnding which might lead to unexpected addresses.

If we have the following configuration:

soap.service.base.url=/root/

The baseAndServiceEndingUrl will be "/root//YourService", which isn't exactly expected in my opinion. Shouldn't the baseAndServiceEndingUrl() strip trailing/leading/double-slashes from the address?

Show the base package from the scan

We were debugging a problem were the implementation was in another package that wasn't considered by the scanner. I would like to add the base packager of the scanner to the output of the failure analyzer:

Action:

Build a Class that implements your Service Endpoint Interface (SEI): >'de.codecentric.namespace.weatherservice.WeatherService' and is present in a scanned sub-package of: >'de.codecentric'.

REST-Healthstatus-Endpoints, that check whether the soap-Services (dynamic?!) are available (e.g. something like Swagger/Springfox)

The great (http://springfox.github.io/springfox/) for automatic documentation of REST-APIs should be used to either have an Healthstatus-REST-Endpoint (which calls the SOAP service itself and check´s, if it´s working) or (harder, but cooler) supports a springfox like web UI, that shows all SOAP web service methods including the possibility to try them inside the browser.

More than one wsdl?

Would it be possible to use more than one wsdl? I followed your tutorial over at codecentric. I added 2, not 1 wsdl, changed SimpleBootCxfConfiguration to have 2 Endpoints and Clients, created the 2 Endpoint classes, etc.

The Java classes for both wsdl's are generated properly, but when I run spring-boot:run I get this error:

Could not find service named {http://RegistrationServices}Transactions in wsdl file:/.../RetrieveMessages.wsdl

it's looking for services defined in the 2nd wsdl (transactions.wsdl) in the 1st wsdl (retrieveMessages.wsdl).

Is there any way to get this to work, or do I have to run 2 separate Spring Boot apps, one for each wsdl?

Thanks!

CxfAutoConfiguration is not extendable.

The CxfAutoConfiguration class is neither extendable nor easily modifiable. For example creating a custom serviceUrlEnding on the fly based on the WebServiceClient is not possible because the member is declared private and the methods inside the class do not use the serviceUrlEnding() method.

Either the members should all be made protected or the endpoint() method should be using the getters to retrieve the values. That would allow extending classes to override these values with dynamic ones. Additionally, the creation (without the publish() call) of the EndpointImpl should be moved to a protected method to give the possibility to modify the created instance before it is being published.

WSDL path in cxf-boot-simple Heroku deployment wrong

The example app cxf-boot-simple is deployed and running successfully on Heroku: https://cxf-boot-simple.herokuapp.com/my-foo-api

But the WSDL path has wrong curl braces inside it's URL and therefore isn't accessible:

{http://www.codecentric.de/namespace/weatherservice/}Weather, but the URL itself shows the following link: https://cxf-boot-simple.herokuapp.com/Weather?wsdl

If you access it, it shows a

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Aug 05 12:56:39 CEST 2019
There was an unexpected error (type=Not Found, status=404).
No message available

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.