The constructor Service(URL, Qname, Webservicefeature[]) is Undefined

Asked

Viewed 393 times

0

I am 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 I’m using the JAX-WS 2.2 which, according to the documentation, has the manufacturer in question.

Including addiction in my pom.xml:

<dependency>
    <groupId>javax.xml.ws</groupId>
    <artifactId>jaxws-api</artifactId>
    <version>2.2</version>
</dependency>
  • its class extends the class javax.xml.Ws.Service?

  • Yes, @adelmo00.

  • I’ve had exactly the same problem. Which version of JDK you are using?

  • JDK8, @Alexandrestrevenski.

  • Check in java build path if the project is using JDK 8, because I had this problem when I was using JDK 1.6_15 and switched to 1.7, generated the stubs again and worked, then searched the internet and found that the cause of the problem is the version of JAX-WS, was using 2.0 but the stubs needed classes that exist in 2.1 (which was not implemented in the JDK that I used).

  • I detected that the project is using the jaxws-api 2.1 which is included in jaxws-rt 2.2.10, I’ll test make a <exclude>.

  • @Eduardosilva warns if it worked, but I believe it’s version of JDK.

Show 3 more comments

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.