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?
– adelmo00
Yes, @adelmo00.
– Eduardo Silva
I’ve had exactly the same problem. Which version of JDK you are using?
– Alexandre Strevenski
JDK8, @Alexandrestrevenski.
– Eduardo Silva
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).
– Alexandre Strevenski
I detected that the project is using the
jaxws-api 2.1
which is included injaxws-rt 2.2.10
, I’ll test make a<exclude>
.– Eduardo Silva
@Eduardosilva warns if it worked, but I believe it’s version of JDK.
– Alexandre Strevenski
Let’s go continue this discussion in chat.
– Alexandre Strevenski