cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Fixing a long time issue related to the use of inherited params and adding anyURI mapping - thanks to Alexey M
Date Thu, 14 Aug 2014 17:36:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 93a4380ec -> d3780ee75


Fixing a long time issue related to the use of inherited params and adding anyURI mapping
- thanks to Alexey M


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

Branch: refs/heads/master
Commit: d3780ee75cf1da51bf2149a1fda9b4674f248a9b
Parents: 93a4380
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Aug 14 18:35:51 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Aug 14 18:35:51 2014 +0100

----------------------------------------------------------------------
 .../cxf/tools/wadlto/jaxrs/SourceGenerator.java  |  3 ++-
 .../jaxrs/src/test/resources/wadl/test.xml       | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d3780ee7/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
index 1706053..194e25e 100644
--- a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
+++ b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
@@ -178,6 +178,7 @@ public class SourceGenerator {
         XSD_SPECIFIC_TYPE_MAP.put("dateTime", "java.util.Date");
         XSD_SPECIFIC_TYPE_MAP.put("time", "java.util.Date");
         XSD_SPECIFIC_TYPE_MAP.put("anyType", "String");
+        XSD_SPECIFIC_TYPE_MAP.put("anyURI", "java.net.URI");
     }
 
     private Comparator<String> importsComparator;
@@ -909,7 +910,7 @@ public class SourceGenerator {
         }
         if (!suspendedAsync && !responseRequired && responseEls.size() ==
1 && generateResponseIfHeadersSet) {
             List<Element> outResponseParamElements = 
-                getParameters(responseEls.get(0), info.getInheritedParams(), false);
+                getParameters(responseEls.get(0), Collections.<Element>emptyList(),
false);
             if (outResponseParamElements.size() > 0) {
                 writeJaxrResponse(sbCode, imports);
                 return true;

http://git-wip-us.apache.org/repos/asf/cxf/blob/d3780ee7/tools/wadlto/jaxrs/src/test/resources/wadl/test.xml
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/test/resources/wadl/test.xml b/tools/wadlto/jaxrs/src/test/resources/wadl/test.xml
index ef37ba1..1d62211 100644
--- a/tools/wadlto/jaxrs/src/test/resources/wadl/test.xml
+++ b/tools/wadlto/jaxrs/src/test/resources/wadl/test.xml
@@ -19,7 +19,24 @@
 				</method>
 				<method name="DELETE" id="deleteRepository">
 				</method>
-
+                <method name="GET" id="getName">
+	                <request>
+	                    <param name="a" style="query" type="xs:int"/>
+	                    <param name="c.a" style="query" type="xs:int"/>
+	                    <param name="c.b" style="query" type="xs:int"/>
+	                    <param name="c.d.a" style="query" type="xs:dateTime"/>
+	                    <param name="option" default="A" style="query" required="true">
+	                        <option value="A"/>
+	                        <option value="B"/>
+	                    </param>
+	                    <param name="If-Modified-Since" style="header" type="xsd:date"/>
+	                </request>
+	                <response>
+	                    <representation mediaType="text/plain">
+	                        <param name="result" style="plain" type="xs:string"/>
+	                    </representation>
+	                </response>
+	            </method>
 			</resource>
 		</resource>
 	</resources>


Mime
View raw message