cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1488383 - in /cxf/branches/dkulp-nowsdl4j/rt: bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/ wsdl/src/main/java/org/apache/cxf/wsdl/ wsdl/src/main/java/org/apache/cxf/wsdl11/
Date Fri, 31 May 2013 20:24:51 GMT
Author: dkulp
Date: Fri May 31 20:24:51 2013
New Revision: 1488383

URL: http://svn.apache.org/r1488383
Log:
More tests passing

Modified:
    cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java
    cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java
    cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
    cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java

Modified: cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java
URL: http://svn.apache.org/viewvc/cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java?rev=1488383&r1=1488382&r2=1488383&view=diff
==============================================================================
--- cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java
(original)
+++ cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java
Fri May 31 20:24:51 2013
@@ -24,19 +24,12 @@ import javax.wsdl.Binding;
 import javax.wsdl.WSDLException;
 import javax.wsdl.extensions.ExtensibilityElement;
 
-import org.apache.cxf.bindings.xformat.XMLFormatBinding;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.wsdl.AbstractWSDLPlugin;
 
 public final class XmlBindingPlugin extends AbstractWSDLPlugin {
 
     public ExtensibilityElement createExtension(final Map<String, Object> args) throws
WSDLException {
-        XMLFormatBinding xmlBinding = null;
-
-        xmlBinding = (XMLFormatBinding)registry.createExtension(Binding.class,
-                                                                ToolConstants.XML_BINDING_FORMAT);
-
-        //return xmlBinding;
-        return null;
+        return registry.createExtension(Binding.class, ToolConstants.XML_BINDING_FORMAT);
     }
 }

Modified: cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java
URL: http://svn.apache.org/viewvc/cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java?rev=1488383&r1=1488382&r2=1488383&view=diff
==============================================================================
--- cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java
(original)
+++ cxf/branches/dkulp-nowsdl4j/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java
Fri May 31 20:24:51 2013
@@ -27,6 +27,7 @@ import javax.xml.namespace.QName;
 import org.apache.cxf.bindings.xformat.XMLBindingMessageFormat;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.wsdl.AbstractWSDLPlugin;
+import org.apache.cxf.wsdl.JAXBExtensibilityElement;
 
 public final class XmlIoPlugin extends AbstractWSDLPlugin {
 
@@ -36,9 +37,9 @@ public final class XmlIoPlugin extends A
         Class<?> clz = getOption(args, Class.class);
         QName qname = getOption(args, QName.class);
 
-        xmlFormat = (XMLBindingMessageFormat)registry.createExtension(clz, ToolConstants.XML_FORMAT);
+        ExtensibilityElement ext = registry.createExtension(clz, ToolConstants.XML_FORMAT);
+        xmlFormat = (XMLBindingMessageFormat)((JAXBExtensibilityElement)ext).getValue();
         xmlFormat.setRootNode(qname);
-        //return new xmlFormat;
-        return null;
+        return ext;
     }
 }

Modified: cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java?rev=1488383&r1=1488382&r2=1488383&view=diff
==============================================================================
--- cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
(original)
+++ cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl/JAXBExtensionHelper.java
Fri May 31 20:24:51 2013
@@ -292,10 +292,9 @@ public class JAXBExtensionHelper impleme
                 o = el.getValue();
             }
             
-            ExtensibilityElement el = o instanceof ExtensibilityElement ? (ExtensibilityElement)o
: null;
-            if (null != el) {
-                el.setElementType(qname);
-            }
+            ExtensibilityElement el = o instanceof ExtensibilityElement ? (ExtensibilityElement)o

+                : new JAXBExtensibilityElement(o);
+            el.setElementType(qname);
             return el;
         } catch (Exception ex) {
             throw new WSDLException(WSDLException.PARSER_ERROR,
@@ -306,9 +305,6 @@ public class JAXBExtensionHelper impleme
         }
     }
     
-    
-
-
     class MappingReaderDelegate extends StreamReaderDelegate {
         MappingReaderDelegate(XMLStreamReader reader) {
             super(reader);

Modified: cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=1488383&r1=1488382&r2=1488383&view=diff
==============================================================================
--- cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
(original)
+++ cxf/branches/dkulp-nowsdl4j/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
Fri May 31 20:24:51 2013
@@ -79,6 +79,7 @@ import org.apache.cxf.service.model.Serv
 import org.apache.cxf.service.model.UnwrappedOperationInfo;
 import org.apache.cxf.transport.DestinationFactory;
 import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.wsdl.JAXBExtensibilityElement;
 import org.apache.cxf.wsdl.WSDLManager;
 import org.apache.cxf.wsdl.binding.WSDLBindingFactory;
 import org.apache.ws.commons.schema.XmlSchemaComplexContentExtension;
@@ -133,8 +134,12 @@ public class WSDLServiceBuilder {
     private void copyExtensors(AbstractPropertiesHolder info, List<?> extList) {
         if (info != null) {
             for (ExtensibilityElement ext : cast(extList, ExtensibilityElement.class)) {
-                if (!info.containsExtensor(ext)) {
-                    info.addExtensor(ext);
+                Object o = ext;
+                if (ext instanceof JAXBExtensibilityElement) {
+                    o = ((JAXBExtensibilityElement)ext).getValue();
+                }
+                if (!info.containsExtensor(o)) {
+                    info.addExtensor(o);
                 }
             }
         }
@@ -594,6 +599,7 @@ public class WSDLServiceBuilder {
             opInfo.setInput(input.getName(), minfo);
             buildMessage(minfo, input.getMessage());
             copyExtensors(minfo, input.getExtensibilityElements());
+            copyExtensors(minfo, input.getMessage().getExtensibilityElements());
             copyExtensionAttributes(minfo, input);
         }
         Output output = op.getOutput();
@@ -605,6 +611,7 @@ public class WSDLServiceBuilder {
             opInfo.setOutput(output.getName(), minfo);
             buildMessage(minfo, output.getMessage());
             copyExtensors(minfo, output.getExtensibilityElements());
+            copyExtensors(minfo, output.getMessage().getExtensibilityElements());
             copyExtensionAttributes(minfo, output);
         }
         Map<?, ?> m = op.getFaults();



Mime
View raw message