WebService Client Generation Error with JDK8

后端 未结 23 2645
既然无缘
既然无缘 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条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 09:53

    I was also getting similar type of error in Eclipse during testing a webservice program on glassfish 4.0 web server: java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: bundle://158.0:1/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document 'xjc.xsd', because 'bundle' access is not allowed due to restriction set by the accessExternalSchema property.

    I have added javax.xml.accessExternalSchema = All in jaxp.properties, but doesnot work for me.

    However I found a solution here below which work for me: For GlassFish Server, I need to modify the domain.xml of the GlassFish, path :/glassfish/domains/domain1 or domain2/config/domain.xml) and add, -Djavax.xml.accessExternalSchema=allunder the tag

    ....
    

    ... -Djavax.xml.accessExternalSchema=all ...and then restart the GlassFish server

提交回复
热议问题