This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 199723 - Generating web service with custom JAXB bindings file fails with spaces in path
Summary: Generating web service with custom JAXB bindings file fails with spaces in path
Status: RESOLVED WONTFIX
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords: SPACE_IN_PATH
Depends on:
Blocks:
 
Reported: 2011-06-27 09:44 UTC by mkavanagh
Modified: 2011-06-27 10:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example schemas and bindings (1.52 KB, application/zip)
2011-06-27 09:44 UTC, mkavanagh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mkavanagh 2011-06-27 09:44:08 UTC
Created attachment 109123 [details]
Example schemas and bindings

In Netbeans 7.0, generating a web service from a WSDL with a custom JAXB bindings file fails when the project path contains spaces, generating the following error in build output:

[ERROR] "file:/C:/Documents%2520and%2520Settings/mkavanag/My%2520Documents/NetBeansProjects/WSTestCase/src/conf/xml-resources/web-services/TestWS/wsdl/testcase.xsd" is not a part of this compilation. Is this a mistake for "file:/C:/Documents%20and%20Settings/mkavanag/My%20Documents/NetBeansProjects/WSTestCase/src/conf/xml-resources/web-services/TestWS/wsdl/testcase.xsd"?
  line 9 of file:/C:/Documents%20and%20Settings/mkavanag/My%20Documents/NetBeansProjects/WSTestCase/src/conf/xml-resources/web-services/TestWS/bindings/testcase.xjb

When the project path does not contain spaces the web service is properly generated - additionally, generating a JAXB binding independent of a web service is successful even when there are spaces in the path.

Steps to reproduce:

1) Create a new "Web Application" project in a directory containing spaces in its path
2) Add a new "Web Service from WSDL" to the project (example WSDL with corresponding XML Schema attached) - at this stage the web service should build successfully
3) Right click on the web service in the project browser -> "Edit Web Service Attributes" -> tab "WSDL Customization". Scroll to the bottom and expand "External Binding Files". Add a JAXB binding file corresponding to the XML schema used with the WSDL (example attached). The schemaLocation in the binding file should be e.g. "../wsdl/testcase.xsd" to refer to the schema copied into the web service's configuration directory.
4) Error occurs - web service is not generated.

If the steps are repeated with a directory that does not contain spaces in its path (or the project is moved to such a directory), the web service can be generated.
Comment 1 mkavanagh 2011-06-27 10:06:42 UTC
After encountering the same issue in Maven ( http://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-39 ) I found a reference to http://java.net/jira/browse/JAXB-835 as the underlying cause in Maven's case - probably the same for NB?
Comment 2 Denis Anisimov 2011-06-27 10:14:08 UTC
After encountering the same issue in Maven (
http://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-39 ) I found a reference to
http://java.net/jira/browse/JAXB-835 as the underlying cause in Maven's case -
probably the same for NB?(In reply to comment #1)
> After encountering the same issue in Maven (
> http://java.net/jira/browse/MAVEN_JAXB2_PLUGIN-39 ) I found a reference to
> http://java.net/jira/browse/JAXB-835 as the underlying cause in Maven's case -
> probably the same for NB?

XJC is either Ant task or maven plugin.
I'm not an expert in Maven so I cannot compare functionality of Ant and Maven
features.
What I know is only : NB uses existed Ant XJC task to generate beans by 
schema file. It is not NB functionality but external WS dependency.
So the issue is in the external XJC tool not in NB.