Ice09
Ice09

Reputation: 9101

Validate XML instance document against WSDL

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 Schema from the WSDL?

Best

Upvotes: 13

Views: 18064

Answers (2)

Fundhor
Fundhor

Reputation: 3587

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

Upvotes: 12

Petru Gardea
Petru Gardea

Reputation: 21658

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).

QTAssistant Externalize XSDs from WSDL

The prompt is pretty straightforward to follow, and provides a lot of flexibility in referencing offline WSDLs (local disk) or remote (HTTP/S).

QTAssistant Externalize XSDs from WSDL prompt

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.

Strip SOAP envelope for validation

Upvotes: 4

Related Questions