Newbie Question about wsconsume and javax.xml.ws.Service
stevecoh4 Oct 5, 2011 7:07 PMMy project is somehow set up wrong. What is getting me is that there are apparently two versions of the class javax.xml.ws.Service.
One version has a single two-parameter constructor:
http://download.oracle.com/javase/6/docs/api/javax/xml/ws/Service.html
This version ships with the javase 1.6 JDK I am using.
has two constructors, adding an additioanal three-parameter constructor
http://java.sun.com/javaee/6/docs/api/index.html?javax/xml/ws/Service.html
I am trying to develop a web service that will run on jboss-as 5.1.
I am finding that wsconsume is generating code with the three-parameter constructor, which the compiler will then not compile because it is using the class with the two-parameter constructor.
Why are there two incompatible versions of the same class and how do I resolve this mess?
Here is my pom.xml
{code:xml}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>whatever</groupId>
<artifactId>however</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>relayws</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-client</artifactId>
<version>5.1.0.GA</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
<artifactId>maven-jaxws-tools-plugin</artifactId>
<version>1.0.0.GA</version>
<configuration>
<targetPackage>com.att.relay.ws</targetPackage>
<wsdls>
<wsdl>http://localhost:8080//wsdl/LoginService.wsdl</wsdl>
</wsdls>
</configuration>
<executions>
<execution>
<goals>
<goal>wsconsume</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-spi</artifactId>
<version>1.4.1.GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-runtime</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-client</artifactId>
<version>3.4.0.GA</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
{code}