I can easily validate a XML document against a XML Schema, eg. with XMLSpy or programmatically. Is it possible to do this with a WSDL file? It does not seem possible with XMLSpy or any other XML tool I know. For me the only possibility right now is to do it programmatically, eg. by generating Java code from the WSDL and starting a request, which is then marshalled correctly. If there is no tool / easy programmatic approach, is there a tool which can extract XML Schem开发者_如何学Ca from the WSDL?
Best
You could use SoapUI :
- Create new project (you'll need to provide wsdl)
- Double click on the "request" of your new project
- Modify XML if needed
- Right click -> validate
QTAssistant (I am associated with it) provides an easy to use utility to extract XSDs from any-style WSDL (single or multiple file, internalized or externalized XSDs).
The prompt is pretty straightforward to follow, and provides a lot of flexibility in referencing offline WSDLs (local disk) or remote (HTTP/S).
Another feature that works well with the above set is the ability to validate a SOAP envelope against an XSD, also available within QTAssistant; there's a property Strip SOAP for an XML document that'll automatically validate SOAP Body content against assign XSD.
精彩评论