Bug 243486

Summary: Enable access to external schema to parse wsdl file in web app
Product: webservices Reporter: Kenneth Ganfield <kganfield>
Component: ClientAssignee: Milan Kuchtiak <mkuchtiak>
Status: NEW --- QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: dmitrybashkin, rjdkolb
Version: 8.0   
Target Milestone: TBD   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Issue Type: ENHANCEMENT Exception Report:

Description Kenneth Ganfield 2014-04-02 16:22:20 UTC
Product Version: NetBeans IDE 8.0 (Build 201403101706)
Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b70
Runtime: Java(TM) SE Runtime Environment 1.8.0-b132
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)

This issues can be reproduced when trying to complete the following tutorials using JDK8:
https://netbeans.org/kb/docs/websvc/client.html
https://netbeans.org/kb/docs/websvc/jax-ws.html

The following issues look to be related:
#241456 and #243086

Seems like the IDE is unable to parse the wsdl file when creating a web service client or using the wizard to test a web service in a web application.

However, the IDE seems to work fine when creating a client in a Java application, for example here: 
https://netbeans.org/kb/docs/websvc/client.html#asynch 

The following output is written to the Output window:

java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: jar:file:/Applications/NetBeans/glassfish-4.0/glassfish/modules/jaxb-osgi.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.
Comment 1 Kenneth Ganfield 2014-04-03 15:10:09 UTC
The default behavior in the IDE is to restrict access to an external schema.
The restriction breaks the functionality for some web service client wizards.

I created an FAQ that describes how to enable access so that the wizards work.
http://wiki.netbeans.org/FaqWSDLExternalSchema

It would be nice if there was someway to make the default enabled in the IDE or to enable it without manually modifying the conf file.
Changing this issue to an enhancement request.
Comment 2 Milan Kuchtiak 2014-05-12 08:47:02 UTC
*** Bug 244379 has been marked as a duplicate of this bug. ***
Comment 3 phansson 2014-06-30 15:01:06 UTC
While I appreciate someone taking the time to make a FAQ for this (well done!) it should be noted that the solution described in the FAQ will only work for those that use Ant-based projects.

As far as I know Maven doesn't inherit system properties from the IDE so it doesn't help setting this property in the IDE's config file.

For Maven I see two alternative solutions:

Either set the relevant system property in Tools --> Options --> Java --> Maven --> Execution --> "Global Execution Options" or do it project-by-project in your pom.xml as described in https://netbeans.org/bugzilla/show_bug.cgi?id=241570#c2.

Additional info: The problem is not related to JDK8 per se but to JAXP 1.5 which started being included with JDK7u40.
Comment 4 Kenneth Ganfield 2014-07-01 08:53:15 UTC
Thanks for the update for Maven.
I updated the FAQ to incorporate your comments and add some information regarding Maven.
Comment 5 rjdkolb 2015-02-26 10:48:01 UTC
Is it possible to have Netbeans insert these vmArgs when it includes this plugin ?

If I use the "Webservice from WSDL..." wizard in Java 8, it breaks the process mid way and the webservice impl class is left empty. Updating the POM makes maven build successfully, but the impl class is still left empty.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo