This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL validation using XSD

 
Shailendra Suryawanshi
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone tried or implemented a solution that would validate incoming request using schema types defined in a WSDL doc ?

For e.g. Let's assume following method is exposed as a service and takes in a "partNumber" as an input string. Its simple type is defined with restriction.
public org.w3c.dom.Element getPartDetails(String partNumber);

Would proxy or server-side skeleton make sure that partNumber string can be of max 20 char and it can have one of two values specified ?

I wish to validate incoming SOAP request using XSD. or is there any alternate available?
 
Peer Reynders
Bartender
Posts: 2934
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shailendra Suryawanshi wrote:Would proxy or server-side skeleton make sure that partNumber string can be of max 20 char and it can have one of two values specified?

Typically not because of performance reasons. The generated code parses "just enough" to make the translation to the implementation platform. So errors of that parsing process will be caught but fullblown validation or enforcements of constraints isn't implemented.

I wish to validate incoming SOAP request using XSD. or is there any alternate available?

You would typically implement that in a handler in the SOAP message chain. The handler can be deployed and removed independently from the service logic. If the validation fails the handler would generate a SOAP Fault and the service logic would never see the request. Validating document/literal messages would be slightly easier than rpc/literal; for document/literal messages the entire payload in the SOAP body can be validated via XML Schema, for rpc/literal you would have to isolate each parameter in the operation payload and validate them separately.
Which style of WSDL should I use?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic