I've got a few JAX-WS services I'm trying to consume, but the XML being returned from the service (of which I cannot change) has an invalid DTD (producing the XMLStreamReaderException as there are no white spaces between publicId
and systemId
). How do I make the clients ignore poorly-formed DTDs?
Open the web service for which you wish to disable the XML Schema validation. Open the corresponding Operation Mapping. Click on the mapping properties->Advanced tab. Update the 'XML Schema Validation' property value to 'No Validation' (As stated below).
JAX-WS is a fundamental technology for developing SOAP (Simple Object Access Protocol) and RESTful (Web services that use representational state transfer, or REST, tools) Java Web services, where JAX-WS is designed to take the place of the JAVA-RPC (Remote Procedure Call) interface in Web services and Web-based ...
Java API for XML Web Services (JAX-WS) is a standardized API for creating and consuming SOAP (Simple Object Access Protocol) web services.
The JAX-WS specification describes the mapping between Web Services Description Language (WSDL) files and the Java language. The supported mappings include WSDL-to-Java mappings and Java-to-WSDL mappings. WSDL 1.1 is required by the JAX-WS 2.0 specification.
Is the invalid DTD
part of a WSDL
? if yes, you could use JAXWS catalog
to read the XML
locally and then just invoke the service.
You need to download the WSDL
, fix it and store it locally. Then, when creating a Service
instance read the WSDL
from your local store. Update the endpoint
property and invoke the service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With