The constructor Service (URL, QName, WebServiceFeature []) is undefined

0

I'm consuming a WebService in my Java application and am encountering the following error:

  The constructor Service (URL, QName, WebServiceFeature []) is undefined

public AnaliseCredito(URL wsdlLocation, WebServiceFeature ... features) {
    super(wsdlLocation, SERVICE, features);
}

The problem is that I'm using JAX-WS 2.2 , according to documentation , has the constructor in question.

Include dependency in my pom.xml :

<dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.2</version>
</dependency>
    
asked by anonymous 28.10.2015 / 13:38

1 answer

0

The problem was that I'm using Apache CXF , which registers itself as the JAX-WS provider in the JVM, in that same way that I have jaxws-rt : 2.2 in my classpath / pom it will not be used, the fix was to create the file

/src/main/resources/META-INF/services/javax.xml.ws.spi.Provider

with the following content

org.apache.cxf.jaxws.spi.ProviderImpl

See also: link

    
30.10.2015 / 13:23