public Object getChildren(Object o, MarshallingContext ctx, String namespaceURI, String localName) { Object children = null; if(!writeAsValue(o.getClass())) { children = getJavaValue(namespaceURI, localName, null, o, true, ignoreNotFoundField); } return children; }
mapFieldToElement(mapping); if(fieldInfo != null && (!forComplexType || forComplexType && !writeAsValue(fieldInfo.getType())))
public Object getAttributeValue(Object o, MarshallingContext ctx, String namespaceURI, String localName) { boolean optional = ctx == null ? ignoreNotFoundField : !ctx.isAttributeRequired() || ignoreNotFoundField; return getJavaValue(namespaceURI, localName, null, o, false, optional); }
public void mapFieldToElement(Class cls, String field, String namespaceURI, String localName, TypeBinding converter) { FieldToElementMapping mapping = new FieldToElementMapping(cls, field, namespaceURI, localName, converter); mapFieldToElement(mapping); }
public Object getElementValue(Object o, MarshallingContext ctx, String namespaceURI, String localName) { Object value; if(writeAsValue(o.getClass())) { value = o; } else { String fieldName = null; if(ctx != null && ctx.isTypeComplex()) { // this is how it should be fieldName = ctx.getSimpleContentProperty(); } // this is a hack for soap enc try { value = getJavaValue(namespaceURI, localName, fieldName, o, false, false); } catch(JBossXBRuntimeException e) { value = getJavaValue(namespaceURI, localName, null, o, false, ignoreNotFoundField); } } return value; }