StructWithAny yOrig = new StructWithAny();
yOrig.setName("Name2");
yOrig.setAddress("Some Other Address");
SOAPFactory sf = SOAPFactory.newInstance();
Name elementName = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
SOAPElement x = sf.createElement(elementName);
x.addNamespaceDeclaration("tns", "http://objectweb.org/type_test");
x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
x.addAttribute(xsiAttrName, "tns:UKAddressType11");
x.addTextNode("This is the text of the node for the first struct");
Name elementName2 = sf.createName("UKAddress", "", "http://objectweb.org/type_test");
Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
SOAPElement x2 = sf.createElement(elementName2);
x2.addNamespaceDeclaration("tns", "http://objectweb.org/type_test");
x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
x2.addTextNode("This is the text of the node for the second struct");