#667 Incorrect multiple external bindings files handling for CXF wsdl2java

v1.0 (example)
open
nobody
5
2014-08-25
2014-08-25
mops lesser
No

When generating java classes from wsdl, using multiple bindings files (if we need apply bindings for wsdl file itself (JAX-WS Customizations) and for external schema files (Customizing JAXB Bindings)) SoapUI generates incorrect command line for wsdl2java utility from Apache CXF.

Running Apache CXF wsdl2java for [NotificationManagerTriggeringServiceSoapBinding]
directory: C:\java\apache-cxf-2.7.6\bin
command: [cmd.exe, /C, wsdl2java.bat, -b, C:\doc\doc\projects\NGW\APIs\v2.0\commonDataBinding.xjb C:\doc\doc\projects\NGW\APIs\v2.0\triggeringDataBinding.xjb, -d, C:\temp\history, -exsh, false, -dns, true, -dex, true, -verbose, file:/C:/doc/doc/projects/NGW/APIs/v2.0/amdocs_nm_triggering_2_0.wsdl]
Loading FrontEnd jaxws ...
Loading DataBinding jaxb ...
wsdl2java -b C:\doc\doc\projects\NGW\APIs\v2.0\commonDataBinding.xjb C:\doc\doc\projects\NGW\APIs\v2.0\triggeringDataBinding.xjb -d C:\temp\history -exsh false -dns true -dex true -verbose file:/C:/doc/doc/projects/NGW/APIs/v2.0/amdocs_nm_triggering_2_0.wsdl
wsdl2java - Apache CXF 2.7.6

WSDLToJava Error: java.io.FileNotFoundException: C:\doc\doc\projects\NGW\APIs\v2.0\commonDataBinding.xjb C:\doc\doc\projects\NGW\APIs\v2.0\triggeringDataBinding.xjb (The filename, directory name, or volume label syntax is incorrect)

org.apache.cxf.tools.common.ToolException: java.io.FileNotFoundException: C:\doc\doc\projects\NGW\APIs\v2.0\commonDataBinding.xjb C:\doc\doc\projects\NGW\APIs\v2.0\triggeringDataBinding.xjb (The filename, directory name, or volume label syntax is incorrect)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSContainer.java:63)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:175)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: java.io.FileNotFoundException: C:\doc\doc\projects\NGW\APIs\v2.0\commonDataBinding.xjb C:\doc\doc\projects\NGW\APIs\v2.0\triggeringDataBinding.xjb (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileInputStream.<init>(FileInputStream.java:101)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1037)
at org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:185)
at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:90)
at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:73)
at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:69)
at org.apache.cxf.tools.wsdlto.frontend.jaxws.JAXWSContainer.validate(JAXWSContainer.java:61)
... 7 more

At Apache CXF help it says:

-b binding-name

Specifies JAXWS or JAXB binding files or XMLBeans context files. Use multiple -b flags to specify multiple entries.

But here we have one -b option for both bindings files.

To reproduce:

  1. Create new SOAP project, give it some wsdl file
  2. Right-click on the port type name, Generate code->Apache CXF
  3. On the "Advanced" tab specify two space separated binding files
  4. Press "Generate" button

Reproduced in the Soap UI 4.5.0 and 5.0.0.

C:>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

C:>ver
Microsoft Windows [Version 6.1.7601]

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks