On Thu, May 19, 2011 at 2:29 PM, Simon Laws <[email protected]>wrote:
> > > > Note also that the current code doesn't seem to work perfectly yet as its > > not including the xmlns=" > http://docs.oasis-open.org/ns/opencsa/sca/200912" > > attribute, I've not debugged it so not sure it thats a problem in the > > getDomainComposite method or Utils.modelToXML. > > > > An example is: > > > > <composite autowire="false" name="DomainCompositeTestCase" > > targetNamespace="http://tuscany.apache.org/xmlns/sca/1.1"> > > <include name="ns1:helloworld" xmlns:ns1="http://sample"/> > > </composite> > > > > ...ant > > > > Ok, not actually sure how useful this version with includes in it is > but I know it's what the spec suggests. > > > Mmm. There is the getQNameDefinition method on the Node interface which is supposed to help with that. The spec section says: * 4695 10.7.4 get QName Definition * 4696 In order to make sense of the domain-level composite (as returned by get Domain-Level Composite), it * 4697 needs to be possible to get the definitions for named artifacts in the included composites. This * 4698 functionality takes the supplied URI of an installed contribution (which provides the context), a supplied * 4699 qualified name of a definition to look up, and a supplied symbol space (as a QName, e.g. * 4700 wsdl:PortTypeportType). The result is a single definition, in whatever form is appropriate for that * 4701 definition type. I've not yet implemented getQNameDefinition but did intend to, using the above domain Composite i guess it would be something like the following to get at the helloworld Composite: getQNameDefinition("helloworld", new QName("http://sample", "helloworld"), "composite") Or are you thinking of doing something else? ...ant
