@Test public void bindingTemplate_XML2JAVA() { try { String instanceDetailsStr = "<instanceDetails xmlns=\"urn:uddi-org:api_v3\">" + "<instanceParms><![CDATA[ " + "<initialContextInfo>" + "<contextProperty value=\"value1\" name=\"name1\"/>" + "<contextProperty value=\"value2\" name=\"name2\"/>" + "</initialContextInfo> ]]>" + "</instanceParms>" + "</instanceDetails>"; InstanceDetails details = (InstanceDetails) JAXBMarshaller.unmarshallFromString(instanceDetailsStr,JAXBMarshaller.PACKAGE_UDDIAPI); String instanceParmsStr = details.getInstanceParms(); if (instanceParmsStr!=null) { InitialContextInfo icInfo = (InitialContextInfo) JAXBMarshaller.unmarshallFromString(instanceParmsStr, JAXBMarshaller.PACKAGE_JUDDI); assertEquals("name1" , icInfo.getContextProperty().get(0).getName()); assertEquals("name2" , icInfo.getContextProperty().get(1).getName()); assertEquals("value2", icInfo.getContextProperty().get(1).getValue()); } else { fail("We should have data in instanceParmsStr."); } } catch (JAXBException jaxbe) { jaxbe.printStackTrace(); fail("No exception should be thrown"); } }
public List<Property> getContextProperty() { if (contextProperty==null) { contextProperty = new ArrayList<Property>(); } return contextProperty; }
InitialContextInfo implements Serializable { public List<Property> getContextProperty() { if (contextProperty==null) { contextProperty = new ArrayList<Property>(); } return contextProperty; } }
InitialContextInfo implements Serializable { public List<Property> getContextProperty() { if (contextProperty==null) { contextProperty = new ArrayList<Property>(); } return contextProperty; } InitialContextInfo(); }
InitialContextInfo implements Serializable { public List<Property> getContextProperty() { if (contextProperty==null) { contextProperty = new ArrayList<Property>(); } return contextProperty; } InitialContextInfo(); List<Property> getContextProperty(); void setProperty(List<Property> contextProperty); }
InitialContextInfo implements Serializable { public List<Property> getContextProperty() { if (contextProperty==null) { contextProperty = new ArrayList<Property>(); } return contextProperty; } InitialContextInfo(); List<Property> getContextProperty(); void setProperty(List<Property> contextProperty);  }