cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r798348 - in /cxf/branches/2.2.x-fixes: ./ api/src/main/java/org/apache/cxf/tools/common/ maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/ rt/core/src/main/java/org/apache/cxf/wsdl11/ tools/wsdlto/core/src/main/java/o...
Date Tue, 28 Jul 2009 01:10:19 GMT
Author: dkulp
Date: Tue Jul 28 01:10:19 2009
New Revision: 798348

URL: http://svn.apache.org/viewvc?rev=798348&view=rev
Log:
Merged revisions 798344 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r798344 | dkulp | 2009-07-27 21:07:11 -0400 (Mon, 27 Jul 2009) | 2 lines
  
  [CXF-1079] Add option to allow element refs when checking for ability to
  unwrap.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
    cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jul 28 01:10:19 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160,795583,795907,796022-796023,796352,796593,796741,796780,796994-796997,797117,797159,797192,797194,797231-797233,797442,797505,797517,797534,797581-797583,797587,797640,797651,797699,797882-797883
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,794892,795044,795104,795160,795583,795907,796022-796023,796352,796593,796741,796780,796994-796997,797117,797159,797192,797194,797231-797233,797442,797505,797517,797534,797581-797583,797587,797640,797651,797699,797882-797883,798344

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=798348&r1=798347&r2=798348&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
(original)
+++ cxf/branches/2.2.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Tue Jul 28 01:10:19 2009
@@ -89,6 +89,7 @@
     public static final String CFG_LIB_REF = "library.references";
     public static final String CFG_ANT_PROP = "ant.prop";
     public static final String CFG_NO_ADDRESS_BINDING = "noAddressBinding";
+    public static final String CFG_ALLOW_ELEMENT_REFS = "allowElementReferences";
 
 
 
@@ -107,7 +108,6 @@
     public static final String CFG_GEN_NEW_ONLY = "newonly";
 
     // Java2WSDL Constants
-
     public static final String CFG_CLASSPATH = "classpath";
     public static final String CFG_TNS = "tns";
     public static final String CFG_SERVICENAME = "servicename";

Modified: cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java?rev=798348&r1=798347&r2=798348&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
(original)
+++ cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/Option.java
Tue Jul 28 01:10:19 2009
@@ -140,6 +140,11 @@
      * Disable generation of service address binding in the generated Java classes
      */
     boolean noAddressBinding;
+    
+    /**
+     * Allow element references when determining if an operation can be unwrapped or not

+     */
+    boolean allowElementRefs;
 
 
     public Option() {
@@ -315,6 +320,14 @@
         this.noAddressBinding = noAddressBinding;
     }
 
+    public boolean isAllowElementRefs() {
+        return allowElementRefs;
+    }
+
+    public void setAllowElementRefs(boolean allowElementRefs) {
+        this.allowElementRefs = allowElementRefs;
+    }
+
     public void copyOptions(Option destination) {
         destination.setAutoNameResolution(isAutoNameResolution());
         destination.setBindingFiles(getBindingFiles());
@@ -333,6 +346,7 @@
         destination.setPackagenames(getPackagenames());
         destination.setServiceName(getServiceName());
         destination.setValidateWsdl(isValidateWsdl());
+        destination.setAllowElementRefs(isAllowElementRefs());
         if (isSetWsdlLocation()) {
             destination.setWsdlLocation(getWsdlLocation());
         }

Modified: cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java?rev=798348&r1=798347&r2=798348&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
(original)
+++ cxf/branches/2.2.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WSDL2JavaMojo.java
Tue Jul 28 01:10:19 2009
@@ -422,6 +422,10 @@
         }
         if (wsdlOption.isExtendedSoapHeaders()) {
             list.add("-exsh");
+            list.add("true");
+        }
+        if (wsdlOption.isAllowElementRefs()) {
+            list.add("-allowElementRefs");
         }
         if (wsdlOption.isValidateWsdl()) {
             list.add("-validate");

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=798348&r1=798347&r2=798348&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
Tue Jul 28 01:10:19 2009
@@ -104,6 +104,7 @@
     private Bus bus;
     private Map<String, Element> schemaList = new HashMap<String, Element>();
     private boolean recordOriginal = true;
+    private boolean allowRefs;
     private boolean ignoreUnknownBindings;
 
     public WSDLServiceBuilder(Bus bus) {
@@ -117,6 +118,9 @@
     public void setIgnoreUnknownBindings(boolean b) {
         ignoreUnknownBindings = b;
     }
+    public void setAllowElementRefs(boolean b) {
+        allowRefs = b;
+    }
     
     private void copyExtensors(AbstractPropertiesHolder info, List<?> extList) {
         if (info != null) {
@@ -599,10 +603,13 @@
             copyExtensors(finfo, entry.getValue().getExtensibilityElements());
             copyExtensionAttributes(finfo, entry.getValue());
         }
-        checkForWrapped(opInfo, false);
+        checkForWrapped(opInfo, allowRefs, false);
     }
 
     public static void checkForWrapped(OperationInfo opInfo, boolean relaxed) {
+        checkForWrapped(opInfo, relaxed, relaxed);
+    }
+    public static void checkForWrapped(OperationInfo opInfo, boolean allowRefs, boolean relaxed)
{
         MessageInfo inputMessage = opInfo.getInput();
         MessageInfo outputMessage = opInfo.getOutput();
         boolean passedRule = true;
@@ -676,7 +683,7 @@
             if (hasAttributes(xsct)
                 || (inputEl.isNillable() && !relaxed)
                 || !isWrappableSequence(xsct, inputEl.getQName().getNamespaceURI(),
-                                        unwrappedInput, relaxed)) {
+                                        unwrappedInput, allowRefs)) {
                 passedRule = false;
             }
         } else {
@@ -698,7 +705,7 @@
                 if (hasAttributes(xsct)
                     || (outputEl.isNillable() && !relaxed)
                     || !isWrappableSequence(xsct, outputEl.getQName().getNamespaceURI(),
unwrappedOutput,
-                                            relaxed)) {
+                                            allowRefs)) {
                     passedRule = false;
                 }
             } else {

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?rev=798348&r1=798347&r2=798348&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Tue Jul 28 01:10:19 2009
@@ -167,6 +167,17 @@
 
                 WSDLServiceBuilder serviceBuilder = new WSDLServiceBuilder(getBus());
                 serviceBuilder.setIgnoreUnknownBindings(true);
+                String allowRefs = (String)context.get(ToolConstants.CFG_ALLOW_ELEMENT_REFS);
+                if (!StringUtils.isEmpty(allowRefs) 
+                    || context.optionSet(ToolConstants.CFG_ALLOW_ELEMENT_REFS)) {
+                    if (allowRefs.length() > 0 && allowRefs.charAt(0) == '=')
{
+                        allowRefs = allowRefs.substring(1);
+                    }
+                    if (StringUtils.isEmpty(allowRefs)) {
+                        allowRefs = "true";
+                    }
+                    serviceBuilder.setAllowElementRefs(Boolean.valueOf(allowRefs));
+                }
                 String serviceName = (String)context.get(ToolConstants.CFG_SERVICENAME);
 
                 if (serviceName != null) {

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml?rev=798348&r1=798347&r2=798348&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/jaxws-toolspec.xml
Tue Jul 28 01:10:19 2009
@@ -171,6 +171,17 @@
                 </annotation>
                 <switch>autoNameResolution</switch>
             </option>
+            
+            <option id="allowElementReferences" maxOccurs="1">
+            	<annotaion>
+            	</annotaion>
+            	<associatedArgument placement="immediate">
+                    <annotation>=true</annotation>
+                    <valueenum>true|false</valueenum>
+                </associatedArgument>
+            	<switch>allowElementReferences</switch>
+            	<switch>aer</switch>
+            </option>
 
 	        <option id="defaultValues" maxOccurs="1">
                 <annotation>



Mime
View raw message