@Test
public void testStructWithAnyXsi() throws Exception {
if (!shouldRunTest("StructWithAnyXsi")) {
return;
}
StructWithAny swa = new StructWithAny();
swa.setName("Name");
swa.setAddress("Some Address");
StructWithAny yOrig = new StructWithAny();
yOrig.setName("Name2");
yOrig.setAddress("Some Other Address");
SOAPFactory sf = SOAPFactory.newInstance();
Name elementName = sf.createName("UKAddress", "", "http://apache.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://apache.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://apache.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://apache.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");
swa.setAny(x);
yOrig.setAny(x2);
Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
Holder<StructWithAny> z = new Holder<StructWithAny>();
StructWithAny ret;
if (testDocLiteral) {
ret = docClient.testStructWithAny(swa, y, z);
} else if (testXMLBinding) {
ret = xmlClient.testStructWithAny(swa, y, z);
} else {