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

wsimport execution's configuration is ignored #49

Closed glassfishrobot closed 12 years ago

glassfishrobot commented 14 years ago

Hello,

Using Jaxws maven plugin 1.9 with Maven 2.0.9. RI (com.sun.xml.*) is 2.1.4 (no superior version found at the maven central repo).

Trying to generate Java artefacts for a WSDL with wsimport. If I write the following, it works perfectly:

org.codehaus.mojo jaxws-maven-plugin MyService wsimport $ {project.build.sourceDirectory} true true true ...

Since it reads my WSDL in the default "src/wsdl" directory. But if I move my WSDL to another directory (let's call it "foo") and update the following in my pom.xml, without any other change, no WSDL is found :

MyService wsimport foo/MyService.wsdl

It then seems that the only "configuration" that is taken into account is the one belonging to "plugin", when the one belonging to "execution" is ignored. This really looks like a bug.

This case is the simplest I could think of, but the real problem is about having several wsimport executions in the same build phase, eahc one working on a WSDL coupled to a binding file. Without a configuration slot per execution, all binding files are being parsed at once (from the default src/jaxws) for each one of the WDSLs, resulting in "empty target node" errors (namespaces being different form one WSDL to another).

Environment

Operating System: Windows XP Platform: PC

Affected Versions

[current]

glassfishrobot commented 14 years ago

Reported by pisce@java.net

glassfishrobot commented 14 years ago

pisce@java.net said: According to http://forums.java.net/jive/thread.jspa?messageID=328710, this might occur only when using "wsdlFiles"...

glassfishrobot commented 13 years ago

@lukasj said: current link to the forum: http://www.java.net/node/689069

glassfishrobot commented 12 years ago

@lukasj said: if relative path is used, it is resolved against wsdlDirectory which defaults to "$

{basedir}

/src/wsdl", so in order to get wsimport working in your case you have to change your config to sth like:

<wsdlDirectory>foo</wsdlDirectory>
<wsdlFiles>
  <wsdlFile>MyService.wsdl</wsdlFile>
</wsdlFiles>

or when attached patch gets applied, you'll be able to use absolute path for wsdlFile, so in your case this will work too:

<wsdlFiles>
  <wsdlFile>$\{basedir\}/foo/MyService.wsdl</wsdlFile>
</wsdlFiles>
glassfishrobot commented 12 years ago

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

glassfishrobot commented 11 years ago

@lukasj said: closing old and already fixed issues

glassfishrobot commented 12 years ago

File: jax_ws_commons-49.diff.txt Attached By: @lukasj

glassfishrobot commented 7 years ago

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

glassfishrobot commented 12 years ago

Marked as fixed on Friday, October 14th 2011, 1:07:28 am