FaqWSDLExternalSchema

(Difference between revisions)
m
m
Line 3: Line 3:
An external schema is used to parse the WSDL file of a web service when you create a web service client or test client. To create a web service client in the IDE or test client on GlassFish you need to enable access to external schema because access is restricted by default. To enable access you need to modify the configuration files of the IDE and the GlassFish Server.
An external schema is used to parse the WSDL file of a web service when you create a web service client or test client. To create a web service client in the IDE or test client on GlassFish you need to enable access to external schema because access is restricted by default. To enable access you need to modify the configuration files of the IDE and the GlassFish Server.
-
When access is not enabled you might see a message similar to the following when attempting to create a web service client.
+
When access is not enabled you might see a message similar to the following when attempting to create a web service client or test client.
<pre class="examplecode">schema_reference: Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.</pre>
<pre class="examplecode">schema_reference: Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.</pre>

Revision as of 14:45, 3 April 2014

How to enable parsing of WSDL with an external schema?

An external schema is used to parse the WSDL file of a web service when you create a web service client or test client. To create a web service client in the IDE or test client on GlassFish you need to enable access to external schema because access is restricted by default. To enable access you need to modify the configuration files of the IDE and the GlassFish Server.

When access is not enabled you might see a message similar to the following when attempting to create a web service client or test client.

schema_reference: Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.

For additional details, see ACCESS_EXTERNAL_SCHEMA

Enabling access in the IDE

To generate a web service client in the IDE from a web service or WSDL file you need to modify the IDE configuration file (netbeans.conf) to add the following switch to the netbeans_default_options.

-J-Djavax.xml.accessExternalSchema=all

For more about locating and modifying the netbeans.conf configuration file, see FaqNetbeansConf.

Enabling access on GlassFish

When deploying to GlassFish you need to enable access to external schema to generate a test client for a web service. To enable access you need to modify the configuration file of the GlassFish Server (GLASSFISH_INSTALL/glassfish/domains/domain1/config/domain.xml) and add the following JVM option element. You will need to restart the server for the change to take effect.

</java-config>
  ...
  <strong><jvm-options>-Djavax.xml.accessExternalSchema=all</jvm-options></strong>
</java-config>
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo