Dan Diephouse wrote:

Sanjiva Weerawarana wrote:

On Tue, 2005-11-08 at 10:42 -0500, Dan Diephouse wrote:
There is some schema parsing stuff here in the webservices commons:

http://svn.apache.org/viewcvs.cgi/webservices/commons/trunk/XmlSchema/

It sounds like you might be going a step beyond just parsing things into a schema oject model though?


Since we're already using the commons schema (above) in Axis2 (for the
Axis2 data binding stuff), Tom would you guys be able to contribute to
that and help drive that to ultimate success? It doesn't seem to make
sense to create a parallel universe.
Where should contributions and questions be directed for the XmlSchema stuff?

A couple ideas from the few hours that I've spent with the XmlSchema project that are probably related to what Tom was suggesting...

Wrking with the XmlSchema model is a real PITA. It'd be very nice if we could use the schema model to drive a more workable form that is easier to use. For instance, right now to find all the elements allowed in a schema type you have to drill through all the sequences and substitution groups, etc.

Maybe we could do something like this:

XmlTypeModel model = new XmlTypeModel(xmlSchemaElement);
List elements = model.getElements();
for (XmlElement element : elements)
{
  element.getQName();
  List elements = element.getElements();
  List attributes = element.getAttributes();

  boolean allowAnyElement = element.isAnyElementAllowed();
}

List attributes = model.getAttributes();

One of the criteria for a wsdl operation to be "wrapped" is that it doesn't have an attributes. This type of pseudo model would make it easier to determine such a thing. Kinda like XmlBeans schema stuff, but simpler and not tied to xmlbeans. Is this reinventing the wheel? I figure there has to be something like this already...

Another idea idea is that we could have a wsdl package, with a class like:

public interface WSDLTypesHelper
{
XmlSchemaCollection getSchemas(Types types);

boolean isWrapped(BindingOperation bindingOp);
}

Just some thoughts... Cheers,
- Dan

--
Dan Diephouse
Envoi Solutions LLC
http://netzooid.com

Reply via email to