File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes dtd include in wsdl? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "dtd include in wsdl?" Watch "dtd include in wsdl?" New topic

dtd include in wsdl?

rich farrell

Joined: May 05, 2006
Posts: 4
I'm trying to figure out the best way to validate the wsdl I'm producing for axis. Having tried schema, I now wanted to try dtd. Eclipse doesn't seem to support creating a wsdl from dtd. If I changed the wsdl in Eclipse to use the doctype tag to include a dtd, eclipse marks it with an error. Should I be able to have a dtd based wsdl?
Peer Reynders

Joined: Aug 19, 2005
Posts: 2933
By default, no.

WSDL recognizes the need for rich type systems for describing message formats, and supports the XML Schemas specification (XSD) [11] as its canonical type system. However, since it is unreasonable to expect a single type system grammar to be used to describe all message formats present and future, WSDL allows using other type definition languages via extensibility.

Web Services Description Language (WSDL) 1.1

And the Basic Profile doesn't like DTDs in general.

4.1.8 SOAP's use of XML
XML DTDs and PIs may introduce security vulnerabilities, processing overhead and ambiguity in message semantics when used in SOAP messages. As a result, these XML constructs are disallowed by section 3 of SOAP 1.1.
R1008 A MESSAGE MUST NOT contain a Document Type Declaration. C
R1009 A MESSAGE MUST NOT contain Processing Instructions.

If furthermore states that the use of DTD for validation of WSDL is out of scope of the profile:

These mechanisms are out of the scope of the Profile; their use may affect interoperability, and may require private agreement between the parties to a Web service.

Basic Profile Version 1.0a
I agree. Here's the link:
subject: dtd include in wsdl?
It's not a secret anymore!