squash! Changes visibility of internal methods in JAXBDataBinding to permit extensions as necessary
Checks the built in schemas via method rather than directly
@@ -249,6 +249,10 @@ public class JAXBDataBinding extends AbstractInterceptorProvidingDataBinding
setContext(context);
}
+ protected boolean getQualifiedSchemas() {
+ return qualifiedSchemas;
+ }
+
public JAXBContext getContext() {
return context;
}
@@ -386,7 +390,7 @@ public class JAXBDataBinding extends AbstractInterceptorProvidingDataBinding
try {
for (DOMResult r : generateJaxbSchemas()) {
DOMSource src = new DOMSource(r.getNode(), r.getSystemId());
- if (BUILT_IN_SCHEMAS.containsValue(r)) {
+ if (isInBuiltInSchemas(r)) {
bi.add(src);
} else {
schemas.add(src);
@@ -423,7 +427,7 @@ public class JAXBDataBinding extends AbstractInterceptorProvidingDataBinding
}
}
- private void justCheckForJAXBAnnotations(ServiceInfo serviceInfo) {
+ protected void justCheckForJAXBAnnotations(ServiceInfo serviceInfo) {
for (MessageInfo mi: serviceInfo.getMessages().values()) {
for (MessagePartInfo mpi : mi.getMessageParts()) {
checkForJAXBAnnotations(mpi, serviceInfo.getXmlSchemaCollection(), serviceInfo.getTargetNamespace());
@@ -444,7 +448,7 @@ public class JAXBDataBinding extends AbstractInterceptorProvidingDataBinding
}
}
- private String getNamespaceToUse(Service service) {
+ protected String getNamespaceToUse(Service service) {
if ("true".equals(service.get("org.apache.cxf.databinding.namespace"))) {
return null;
}
@@ -812,6 +816,10 @@ public class JAXBDataBinding extends AbstractInterceptorProvidingDataBinding
objectFactory);
}
+ public static boolean isInBuiltInSchemas(DOMResult schema) {
+ return BUILT_IN_SCHEMAS.containsValue(schema);
+ }
+
private static Field getElField(String partName, final Class<?> wrapperType) {
String fieldName = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.VARIABLE);
Field[] fields = ReflectionUtil.getDeclaredFields(wrapperType);
