Question

I'm facing with this problem:

The method getPort(QName, Class<T>) in the type Service is not applicable for the arguments (QName, Class<AcessoDadosGeolocalizacao>, WebServiceFeature[])

I used wsimport to generate my clients, but now my maven application is using the class javax.xml.ws.Service from

<dependency>
   <groupId>javaee</groupId>
   <artifactId>javaee-api</artifactId>
   <version>5</version>
   <scope>provided</scope>
</dependency>

How can I use the javax.xml.ws.Service from the JDK 6?

Was it helpful?

Solution

I've added the webservices-api to my pom.xml and the problem is gone.

    <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>webservices-api</artifactId>
        <version>2.1-b14</version>
    </dependency>

OTHER TIPS

If I am adding this entry(webservices-api) ;it is giving run time error while accessing JAXB-API.I found that the JDK6 should be the first in the order of classpath and then maven library.I moved up the JDK6 above the Maven library.Then it worked.

I ran into a similar issue with Eclipse and a Dynamic Web Application. Its not Maven related however googling for that error gets you all of about 7 results in Google as of today's date with about three or more of them being relisting at other websites of the same stack exchange question - so I thought in case others had a similar issue I'd add what helped me. The WAR was set to use JBoss AS5, the VM was set to use Java 6. Because its eclipse and I had already consumed the web service - the error was not occurring on import as the stubs had already been created. I ensured the Java facet was set to use 1.6 (it had been 1.5), I cleaned and built but the error persisted. I then noticed I had a reference on my build path to Java EE 1.5. I removed this, cleaned and built and the error went away.

Hope this helps anyone else faced with the same issue!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top