I'd like to bring the topic of fragids back up from this discussion,
http://mail-archives.apache.org/mod_mbox/ws-woden-dev/200603.mbox/browser,
back in March last year.

I stared work on Woden-32 <http://issues.apache.org/jira/browse/Woden-32>to
implement the toString() method for the WSDL 2.0 Component model and found,
to do this properly using fragids as Arthur suggested, that I would need to
implement fragid support in Woden. I've started to do this and I'll explain
below how I'm doing this so we can check that this model will allow us to do
everything we need with fragment identifiers. I will try and add the code to
the jira tomorrow once Johns committed a change I need for it to work.

There are three main parts an XPointer model, an WSDL pointer part model,
and a WSDL fragment id class to allow the models to be used in woden easily.

The XPointer model is loosely based upon code I found at the Apache cocoon
project<http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/xpointer/>,
but I think their code was for a parser only so its slightly different but
their code may still be useful if we can share the common XPointer code.

The WSDL Pointer Part model is just a representation of each components
pointer part as a class extending the XPointer PointerPart class, storing
the data for it and providing the serialising/deserialising methods.
Extensions will have to provide their own classes for this as they will have
their own defined pointer parts too.

the WSDL fragid class extends the XPointer class and adds a few methods and
constructors to easily create the fragment id's and look up component
objects from a fragment id.

My implementation doesn't support any other pointer parts ,mainly xpointer()
and element(), yet if we have support for embedding WSDL inside other xml
documents but that can easily be added. Also it deals with namespaces
directly in the XPointer class to make sure the prefixes are consistent and
in the right order!

Finally this is used inside Woden by adding a getFragmentIdentifier() method
to each wdsl component object which constructs then returns a wsdl
FragmentIdentifier. The toString() method of each object then simply calls
the toString method on its own fragment identifier, so Woden-32 is actually
a few line...

I think we will need to create another jira for adding the fragment
identifier framework which is separate to the toString() method
implementation.

Any comments on this would be great, I've learnt a lot about XPointers in
the past few days and hope this is along the right lines!

Thanks,
Dan

Reply via email to