Question

I'm attempting to create a web services project using eclipse with the Oracle Enterprise Pack. When generating the web services from a WSDL document using the wsdlc Ant task, all the restrictions/constraints in the WSDL are completely ignored.

Is there a way to generate POJO's with built-in constraints such as minoccurs=1 or forcing the use of enumerations? Any insight would be appreciated!

Thanks in advance,

Kal

Was it helpful?

Solution

Unfortunately, I wasn't able to find this answer here, but I did eventually find the answer. I'm posting it now because it may help someone else in the future that stumbles upon this post.

There isn't a way to add validation within the POJO's, but there is a way to turn on schema validation to ensure that when a web service message is received that it conforms to the constraints set by the WSDL. You can do this by adding the "@SchemaValidation" annotation above your service class definition. This works for WebLogic, but I'm not sure if it's a standard for other types of application servers as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top