public class SourcedOMElementTest extends TestCase {
public void testSerialization() throws Exception {
SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
SOAPEnvelope envelope = factory.createSOAPEnvelope();
SOAPBody body = factory.createSOAPBody();
envelope.addChild(body);
OMNamespace ns = factory.createOMNamespace("http://ns1", "d");
OMElement payload = factory.createOMElement(new DummySource(), "dummy", ns);
payload.setNamespace(ns); // This line will cause NoSuchElementException
body.addChild(payload);