Open towi opened 6 years ago
I added a unittest that currently fails:
@Test
public void testRelativePathSufixesIssue65() {
// arrange
final WsImportMojo instance = new WsImportMojoMock();
instance.wsdlFiles = new ArrayList<String>();
instance.wsdlFiles.add("GreatStuff.wsdl");
instance.wsdlFiles.add("EvenMoreGreatStuff.wsdl");
// act
final String result = instance.getRelativePath(new File("EvenMoreGreatStuff.wsdl"));
// assert
Assert.assertEquals(result, "EvenMoreGreatStuff.wsdl");
}
I confirm this issue, I encountered the same problem with version jaxws-maven-plugin 2.6. My two wsdl names are Services.wsdl and CallbackServices.wsdl, and the wsdlLocation="" is only generated correctly if CallbackServices.wsdl is listed first.
I think here is an error in the logic to find out the relative path for the wsdlLocation to generate:
My config is roughly like this:
The
wsdlLocation
forEvenMoreGreatStuff.wsdl
becomes/GreatStuff.wsdl
because "GreatStuff" is a suffix of "EvenMoreGreatStuff":If the order of the
<wsdlFile>
entries is swapped, all is fine. The loopfor ( String s : wsdlFiles )
then finds the correct file first.