I have the following test program that makes use of the
org.apache.axis.MessageElement class:
import org.apache.axis.message.*;
import org.w3c.dom.*;
public class TestAxisApi {
public TestAxisApi() {}
public void run() {
MessageElement parent = new MessageElement();
parent.setName("PARENT");
System.out.println("BEFORE adding child: parent: " +
parent.toString());
MessageElement child = new MessageElement();
child.setName("CHILD");
parent.addChild(child);
System.out.println(" AFTER adding child: parent: " +
parent.toString());
try {
Element element = parent.getAsDOM();
System.out.println(" As an Element: " + element.toString());
}
catch (Exception ex) { System.out.println("Exception in getAsDOM: "
+ ex); }
return;
}
public static void main(String args[]) {
TestAxisApi api = new TestAxisApi();
api.run();
}
}
When I execute this program, the output shows:
BEFORE adding child: parent: <PARENT/>
AFTER adding child: parent: <PARENT/>
As an Element: [PARENT: null]
Thus, I can't seem to create a MessageElement structure on the fly. I
don't
know whether something like this is intended to work, or if I'm just not
using
the API correctly. I realize that AXIS is being developed as I speak, so
maybe
this functionality simply hasn't been implemented yet? Does anyone have
any idea what the case may be?
Thanks in advance.
Steve Pannier
Jacada, Inc.
(763) 268-6382
[EMAIL PROTECTED]
http://www.jacada.com