Quantcast

cxf git commit: Adding WadlGenerator jaxbContextProperties, patch from Vjacheslav Borisov applied with minor updates, This closes #238

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cxf git commit: Adding WadlGenerator jaxbContextProperties, patch from Vjacheslav Borisov applied with minor updates, This closes #238

sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes ed2b69ec9 -> 99f6606d7


Adding WadlGenerator jaxbContextProperties, patch from Vjacheslav Borisov applied with minor updates, This closes #238


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/99f6606d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/99f6606d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/99f6606d

Branch: refs/heads/3.1.x-fixes
Commit: 99f6606d79fb64313152cdbd00c02ae5659e6df1
Parents: ed2b69e
Author: Sergey Beryozkin <[hidden email]>
Authored: Fri Feb 17 14:27:34 2017 +0000
Committer: Sergey Beryozkin <[hidden email]>
Committed: Fri Feb 17 14:38:15 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/99f6606d/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index d2070ee..1b71601 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -195,7 +195,8 @@ public class WadlGenerator implements ContainerRequestFilter {
     private Bus bus;
     private final List<DocumentationProvider> docProviders = new LinkedList<DocumentationProvider>();
     private ResourceIdGenerator idGenerator;            
-    
+    private Map<String, Object> jaxbContextProperties;
+
     public WadlGenerator() {
     }
     
@@ -301,7 +302,7 @@ public class WadlGenerator implements ContainerRequestFilter {
         
         JAXBContext jaxbContext = null;
         if (useJaxbContextForQnames && !allTypes.isEmpty()) {
-            jaxbContext = ResourceUtils.createJaxbContext(new HashSet<>(allTypes), null, null);
+            jaxbContext = ResourceUtils.createJaxbContext(new HashSet<>(allTypes), null, jaxbContextProperties);
             if (jaxbContext == null) {
                 LOG.warning("JAXB Context is null: possibly due to one of input classes being not accepted");
             }
@@ -2252,6 +2253,10 @@ public class WadlGenerator implements ContainerRequestFilter {
     public void setIncrementNamespacePrefix(boolean incrementNamespacePrefix) {
         this.incrementNamespacePrefix = incrementNamespacePrefix;
     }
+    public void setJaxbContextProperties(Map<String, Object> jaxbContextProperties) {
+        this.jaxbContextProperties = jaxbContextProperties;
+    }
+
 
     private static class SchemaConverter extends DelegatingXMLStreamWriter {
         private static final String SCHEMA_LOCATION = "schemaLocation";

Loading...