Vincent Zurczak wrote:
Luciano Resende a écrit :
As you mentioned, the Tuscany runtime will validate the composites
when processing the contribution. I don' t recall of a specific tool
that would just parse and validate the composite, but a tool like this
should be very simple to do, or  you could try Eclipse STP SCA Tools
and see if they have something like this.
There is indeed something in progress about validation in the SCA Tools project.

The validation relies on the SCA meta-model (which was recently updated to support Tuscany 1.4 - see [0]) and extra-validation rules.

It works like the Java validation in Eclipse.
Every time a composite file is changed in an SCA project, it goes through a validation step. When errors are found, error markers are added on the file and described in the "problem" view.

There is still work to do on it, mainly to link error markers with editors.
And we are also working to run validation when SCA annotated java code is modified.

For the moment, I did not find time to write documentation about this mechanism in the wiki [1]. It's only available in the trunk and in the recent builds for Eclipse Galileo, but if you want to test it, I can help you. It's quite simple.
And if you want to help, you're welcome. :)


Hello Vincent,

Be aware that the validation done in the Eclipse STP tools is based on the Tuscany SCA schemas. It validates according to the rules defined in the schema. Additionally, there is also model information behind the syntax that can be validated.

Simon mentions 3 steps to loading a composite. Each one of these steps is a candidate for validation:

>> - Read the composite xml - create a internal model of the XML from the composite file

This is the step where schema validation is important. Are there the correct number of attributes and elements? Are they in the correct order? Are restricted fields populated with valid alternatives?

>> - resolve the composite - find all the things that the composite refers to such as Java component implementation files and WSDL interface definitions.

In this step some of the model information can be validated. Does the component implementation exist and do the methods match in name, parameters, and return values? Does the WSDL interface match the composite service interfaces?

>> - build the composite - fix up the internal model to ensure that it is valid and ready to be activated as an SCA composite application.

Has everything been loaded? Are all pieces of the composite available.

As Simon states, the assembly-xml module is a good place to see the read and resolve validations. The NodeImpl module is a good starting place to see all of the read/resolve/build validation. You might find that a stand alone validation tool can make use of NodeImpl to validate.

--
Thanks, Dan Becker

Reply via email to