Well, I can state a bit more about the problem....
First, I forgot the key part of the stack trace:
OMSourcedElementImpl.forceExpand() line: 158
OMSourcedElementImpl.setNamespace(OMNamespace) line: 454
OMElementWrapperHandler.setChild(OMElement, int, ElementInfo, Object) line:
57
OMElementWrapperHandler.setChild(Object, int, ElementInfo, Object) line:
39
Output2OutputTransformer.transform(Object, TransformationContext) line:
148
In building org.apache.tuscany.databinding.sdo2om.SDODataSource we do this:
public SDODataSource(DataObject obj, HelperContext helperContext) {
this.helperContext = helperContext;
this.sourceDocument =
helperContext.getXMLHelper().createDocument(obj,
ROOT_ELEMENT.getNamespaceURI(),
ROOT_ELEMENT.getLocalPart());
}
So XMLStreamReader getReader() returns a reader then built from this
ROOT_ELEMENT, with QName {commonj.sdo}/DataObject
However, the OMElementWrapperHandler code in the stack trace above makes an
Axiom call with checks this QName against the QName of the specific output
element I'm working with.
This does not match {commonj.sdo}/DataObject hence my error message.
I'm not sure why something like this doesn't happen in the databinding
itests.... Is there an issue in the construction of SDODataSource perhaps
or should OMElementWrapperHandler be making a slightly different Axiom call?
Scott