Reputation: 6181
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?
Upvotes: 8
Views: 1125
Reputation: 9028
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.
Upvotes: 1