WebService Client Generation Error with JDK8

后端 未结 23 2663
既然无缘
既然无缘 2020-11-27 08:50

I need to consume a web service in my project. I use NetBeans so I right-clicked on my project and tried to add a new \"Web Service Client\". Last time I checked, this was t

23条回答
  •  Happy的楠姐
    2020-11-27 09:31

    Enabling Access to External Schema

    You need to enable the IDE and the GlassFish Server to access external schema to parse the WSDL file of the web service. To enable access you need to modify the configuration files of the IDE and the GlassFish Server. For more details, see the FAQ How to enable parsing of WSDL with an external schema? Configuring 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 netbeans_default_options.

    -J-Djavax.xml.accessExternalSchema=all
    

    For more about locating and modifying the netbeans.conf configuration file, see Netbeans Conf FAQ. Configuring the GlassFish Server

    If you are deploying to the GlassFish Server you need to modify the configuration file of the GlassFish Server (domain.xml) to enable the server to access external schemas to parse the wsdl file and generate the test client. To enable access to external schemas, open the GlassFish configuration file (GLASSFISH_INSTALL/glassfish/domains/domain1/config/domain.xml) and add the following JVM option element (in bold). You will need to restart the server for the change to take effect.

    
      ...
      -Djavax.xml.accessExternalSchema=all
    
    

提交回复
热议问题