Hi all,

I'm in the process of testing a MapDataSource I created (based on
OMDataSourceExtBase). I discovered that other similar classes,
CharArrayDataSource and ByteArrayDataSource are being tested in
OMSourcedElementTest. Can someone explain the purpose of having:
    String localName = "myPayload";
What I mean here is why should localName be "myPayload" instead of being
something else (ex:- "dummy").

Out of curiosity, I changed this to "dummy" and discovered that it causes
the test to fail. And the reason is an error during the forceExpand():
    SEVERE: forceExpand: expected element name dummy, found myPayload
Also I discovered that if I were testing a CharArrayDataSource only,
forceExpand() does not come into play and the test passes.

Also, by the way, when I create a OMSourcedElement out of a
CharArrayDataSource in this test, as:
    OMSourcedElement omse = factory.createOMElement(cads, localName, ns);
The localName and namspace I give here makes no sense as they get replaced
by whatever text that was there in the character string I used to create the
CharArrayDataSource. Why is this? and If this is correct, why can't I create
the OMSourcedElement as:
    OMSourcedElement omse = factory.createOMElement(cads, null, null);
When I do that I get:
    org.apache.axiom.om.OMException: localname can not be null or empty

Please pardon me if I have got something wrong here.

Many Thanks,
Senaka

Reply via email to