javaee / metro-jaxws-commons

Metro has been contributed to Eclipse Foundation. This repository is for legacy review only. Please refer to the Eclipse EE4J Metro project for the very latest
https://eclipse-ee4j.github.io/metro-wsit/
Other
10 stars 9 forks source link

jaxws-maven-plugin wsgen fails if wsdl generation is set to true #91

Closed glassfishrobot closed 11 years ago

glassfishrobot commented 11 years ago

I have a simple project that has a single stateless bean marked as webservice. There is a single method that throws two custom faults.

The is that everything works fine if I set **false** in pom.xml in "jaxws-maven-plugin" configuration (line 102). But if I set **true** in pom.xml in "jaxws-maven-plugin" configuration then maven throws an error: "Failed to execute wsgen" - "Embedded error: javax.xml.ws.WebFault.messageName()Ljava/lang/String;".

I've attached the test project. Steps to reproduce: 1. unpack the project into the empty directory. 2. make sure that pom.xml contains **false**. 3. run mvn clean 4. run mvn install 5. the result is BUILD SUCCESSFUL 6. now set **true** 7. run mvn clean 8. run mvn install 9. the result is BUILD ERROR - [INFO] Failed to execute wsgen - Embedded error: javax.xml.ws.WebFault.messageName()Ljava/lang/String;

Please, make some clarifications whether this is a bug or not and if there is any workaround.

Environment

OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows", Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300), Java version: 1.6.0_35, Java(TM) SE Runtime Environment (build 1.6.0_35-b10), Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode).

Affected Versions

[2.2]

glassfishrobot commented 11 years ago

Reported by rwi

glassfishrobot commented 11 years ago

@lukasj said: reproduced, looking at this

glassfishrobot commented 11 years ago

@lukasj said: @WebFault(name = "CustomFault") is causing trouble here - or causing a bug. The problem is that 2.1 APIs are being loaded from the plugin instead of 2.2 APIs, workaround for now is to put jaxws-api.jar, jaxb-api.jar and saaj-api.jar into JDK's endorsed folder.

glassfishrobot commented 11 years ago

rwi said: Tried this workaround on the originally attached project. I've copied

javax.xml.bind:jaxb-api:2.2.7:jar, javax.xml.ws:jaxws-api:2.2.7:jar, javax.xml.soap:saaj-api:1.3.4:jar

using the "dependency"-plugin under the "validate"-phase into the endorsed directory that is specified in the compiler-plugin configuration, but it didn't work out - the same error is shown.

glassfishrobot commented 11 years ago

@lukasj said: By endorsed I meant $JAVA_HOME/jre/lib/endorsed, see http://jax-ws.java.net/2.2.7/docs/ch02.html#running-on-top-of-jdk-6

Another option would be to run the build on JDK 7

glassfishrobot commented 11 years ago

@lukasj said: http://java.net/projects/jax-ws-commons/sources/svn/revision/1012

glassfishrobot commented 11 years ago

@lukasj said: closing issues after 2.2.1 release

glassfishrobot commented 11 years ago

File: Test-Project.zip Attached By: rwi

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAX_WS_COMMONS-91

glassfishrobot commented 11 years ago

Marked as fixed on Monday, February 25th 2013, 5:44:10 am