cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r524998 - in /incubator/cxf/trunk: testutils/src/main/resources/wsdl/ tools/common/src/main/java/org/apache/cxf/tools/common/ tools/common/src/main/java/org/apache/cxf/tools/common/model/ tools/wsdlto/core/src/main/java/org/apache/cxf/tools...
Date Tue, 03 Apr 2007 02:13:42 GMT
Author: dkulp
Date: Mon Apr  2 19:13:40 2007
New Revision: 524998

URL: http://svn.apache.org/viewvc?view=rev&rev=524998
Log:
JAX-WS WSDl -> Java customization updates

* Support classname on more elements
* Support packagename on more elements
* Support ports with different portTypes in same service
* Fix issues if schema has elements and types with same name, it always uses he element mapping.
* Support for jaxws custom method names
* Properly map/mangle Type names if conflict with SEI



Added:
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java   (with props)
Modified:
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaModel.java
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/DataBindingProfile.java
    incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ClassNameAllocatorImpl.java
    incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/DummyDataBinding.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/swa-mime.wsdl

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/swa-mime.wsdl Mon Apr  2 19:13:40 2007
@@ -55,8 +55,8 @@
   </wsdl:message>
 
   <wsdl:message name="echoDataResponse">
-    <wsdl:part name="text" type="types:DataStruct" />
-    <wsdl:part name="data" element="xsd:base64Binary" />
+    <wsdl:part name="text" element="types:DataStruct" />
+    <wsdl:part name="data" type="xsd:base64Binary" />
   </wsdl:message>
 
   <wsdl:portType name="SwAServiceInterface">
@@ -75,20 +75,20 @@
       <soap:operation soapAction="" style="literal" />
       <wsdl:input>
         <mime:multipartRelated>
-          <mime:part name="body">
+          <mime:part>
             <soap:body parts="text" use="literal" />
           </mime:part>
-          <mime:part name="data">
+          <mime:part>
             <mime:content part="data" type="application/octet-stream" />
           </mime:part>
         </mime:multipartRelated>
       </wsdl:input>
       <wsdl:output>
         <mime:multipartRelated>
-          <mime:part name="body">
+          <mime:part>
             <soap:body parts="text" use="literal" />
           </mime:part>
-          <mime:part name="data">
+          <mime:part>
             <mime:content part="data" type="application/octet-stream" />
           </mime:part>
         </mime:multipartRelated>

Added: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java?view=auto&rev=524998
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java (added)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java Mon Apr  2 19:13:40 2007
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.tools.common;
+
+public interface ClassNameProcessor extends Processor {
+
+    void processClassNames();
+}

Propchange: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ClassNameProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaModel.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaModel.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaModel.java (original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaModel.java Mon Apr  2 19:13:40 2007
@@ -30,9 +30,9 @@
     private String location;
 
     public JavaModel() {
-        interfaces = new HashMap<String, JavaInterface>();
-        exceptionClasses = new HashMap<String, JavaExceptionClass>();
-        serviceClasses = new HashMap<String, JavaServiceClass>();
+        interfaces = new LinkedHashMap<String, JavaInterface>();
+        exceptionClasses = new LinkedHashMap<String, JavaExceptionClass>();
+        serviceClasses = new LinkedHashMap<String, JavaServiceClass>();
     }
 
     public void addInterface(String name, JavaInterface i) {

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Mon Apr  2 19:13:40 2007
@@ -43,6 +43,7 @@
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.AbstractCXFToolContainer;
+import org.apache.cxf.tools.common.ClassNameProcessor;
 import org.apache.cxf.tools.common.ClassUtils;
 import org.apache.cxf.tools.common.FrontEndGenerator;
 import org.apache.cxf.tools.common.Processor;
@@ -65,6 +66,7 @@
 
 
 public class WSDLToJavaContainer extends AbstractCXFToolContainer {
+    
     protected static final Logger LOG = LogUtils.getL7dLogger(WSDLToJavaContainer.class);
     private static final String DEFAULT_NS2PACKAGE = "http://www.w3.org/2005/08/addressing";
     String toolName;
@@ -144,22 +146,28 @@
                 } else  {
                     serviceList = serviceBuilder.buildMockServices(definition);
                 }
-
                 context.put(ClassCollector.class, new ClassCollector());
             } else {
                 // TODO: wsdl2.0 support
             }
             Map<String, InterfaceInfo> interfaces = new HashMap<String, InterfaceInfo>();
-            for (ServiceInfo service : serviceList) {
-                if (service.getInterface() != null
-                    && !interfaces.containsKey(service.getInterface().getName().toString())) {
-                    interfaces.put(service.getInterface().getName().toString(), service.getInterface());
-                }
-            }
+
             Map<String, Element> schemas = (Map<String, Element>)serviceList.get(0)
                 .getProperty(WSDLServiceBuilder.WSDL_SCHEMA_ELEMENT_LIST);
             context.put(ToolConstants.SCHEMA_MAP, schemas);
             context.put(ToolConstants.PORTTYPE_MAP, interfaces);
+            Processor processor = frontend.getProcessor();
+            if (processor instanceof ClassNameProcessor) {
+                processor.setEnvironment(context);
+                for (ServiceInfo service : serviceList) {
+
+                    context.put(ServiceInfo.class, service);
+                    
+                    ((ClassNameProcessor)processor).processClassNames();
+                    
+                    context.put(ServiceInfo.class, null);
+                }
+            }
             generateTypes();
 
             for (ServiceInfo service : serviceList) {
@@ -170,7 +178,6 @@
                 }
 
                 // Build the JavaModel from the ServiceModel
-                Processor processor = frontend.getProcessor();
                 processor.setEnvironment(context);
                 processor.process();
 

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/DataBindingProfile.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/DataBindingProfile.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/DataBindingProfile.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/DataBindingProfile.java Mon Apr  2 19:13:40 2007
@@ -28,6 +28,6 @@
 public interface DataBindingProfile {
     
     void generate(ToolContext context) throws ToolException;
-    String getType(QName qn);
+    String getType(QName qn, boolean element);
     String getWrappedElementType(QName wrapperElement, QName item);
 }

Modified: incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ClassNameAllocatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ClassNameAllocatorImpl.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ClassNameAllocatorImpl.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ClassNameAllocatorImpl.java Mon Apr  2 19:13:40 2007
@@ -19,14 +19,9 @@
 
 package org.apache.cxf.tools.wsdlto.databinding.jaxb;
 
-import javax.xml.namespace.QName;
-
 import com.sun.tools.xjc.api.ClassNameAllocator;
 
-import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.tools.util.ClassCollector;
-import org.apache.cxf.tools.util.NameUtil;
-import org.apache.cxf.tools.util.URIParserUtil;
 
 public class ClassNameAllocatorImpl implements ClassNameAllocator {
     private static final String TYPE_SUFFIX = "_Type";
@@ -49,20 +44,5 @@
         collector.addTypesClassName(packageName, className, packageName + "." + fullClzName);
         return fullClzName;
     }
-
-    public void setInterface(InterfaceInfo seiInfo, String packageName) {
-        QName portType = seiInfo.getName();
-        String ns = portType.getNamespaceURI();
-        String type = portType.getLocalPart();
-        String pkgName = URIParserUtil.parsePackageName(ns, packageName);
-        String className = NameUtil.mangleNameToClassName(type);
-        String fullClassName = pkgName + "." + className;
-        if (packageName == null) {
-            packageName = pkgName;
-        }
-        collector.addSeiClassName(packageName, className, fullClassName);
-        
-    }
-
    
 }

Modified: incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java Mon Apr  2 19:13:40 2007
@@ -27,7 +27,6 @@
 import java.util.Set;
 import java.util.logging.Logger;
 
-import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.DOMException;
@@ -52,7 +51,6 @@
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.FileUtils;
-import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.ToolException;
@@ -65,23 +63,15 @@
 
     private S2JJAXBModel rawJaxbModelGenCode;
     private ToolContext env;
-    private Definition def;
 
     @SuppressWarnings("unchecked")
     private void initialize(ToolContext penv) throws ToolException {
         env = penv;
-        def = (Definition)env.get(Definition.class);
 
         SchemaCompilerImpl schemaCompiler = (SchemaCompilerImpl)XJC.createSchemaCompiler();
         ClassCollector classCollector = env.get(ClassCollector.class);
         ClassNameAllocatorImpl allocator = new ClassNameAllocatorImpl(classCollector);
 
-        Map<String, InterfaceInfo> interfaces = (Map<String, InterfaceInfo>)env
-            .get(ToolConstants.PORTTYPE_MAP);
-        for (String str : interfaces.keySet()) {
-            InterfaceInfo inf = interfaces.get(str);
-            allocator.setInterface(inf, env.mapPackageName(def.getTargetNamespace()));
-        }
         schemaCompiler.setClassNameAllocator(allocator);
 
         JAXBBindErrorListener listener = new JAXBBindErrorListener(env);
@@ -194,17 +184,15 @@
         }
     }
 
-    public String getType(QName qname) {
-        Mapping mapping = rawJaxbModelGenCode.get(qname);
-
-        TypeAndAnnotation typeAnno = null;
-
-        if (mapping != null) {
-            typeAnno = mapping.getType();
-        } else {
-            typeAnno = rawJaxbModelGenCode.getJavaType(qname);
+    public String getType(QName qname, boolean element) {
+        TypeAndAnnotation typeAnno = rawJaxbModelGenCode.getJavaType(qname);
+        if (element) {
+            Mapping mapping = rawJaxbModelGenCode.get(qname);
+            if (mapping != null) {
+                typeAnno = mapping.getType();
+            }
         }
-
+                
         if (typeAnno != null && typeAnno.getTypeClass() != null) {
             return typeAnno.getTypeClass().fullName();
         }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java Mon Apr  2 19:13:40 2007
@@ -30,6 +30,10 @@
 import org.w3c.dom.*;
 
 public class JAXWSBindingDeserializer implements ExtensionDeserializer, Serializable {
+    
+    public JAXWSBindingDeserializer() {
+        
+    }
 
     public ExtensibilityElement unmarshall(Class parentType,
                                            QName elementType,

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java Mon Apr  2 19:13:40 2007
@@ -55,11 +55,13 @@
         jaxwsBinding.setElementType(ToolConstants.JAXWS_BINDINGS);
         jaxwsBinding.setElement(element);
         jaxwsBinding.setDocumentBaseURI(namespace);
+
         parseElement(jaxwsBinding, element);
+        
         return jaxwsBinding;
     }
 
-    public void parseElement(JAXWSBinding jaxwsBinding, Element element) {
+    void parseElement(JAXWSBinding jaxwsBinding, Element element) {
         NodeList children = element.getChildNodes();
         if (children != null && children.getLength() == 0) {
             // global binding
@@ -126,7 +128,8 @@
                     String clzName = childElement.getAttribute("name");
                     String javadoc = "";
                     Node docChild = DOMUtils.getChild(child, Element.ELEMENT_NODE);
-                    if (this.isJAXWSClassDoc(docChild)) {
+                    
+                    if (docChild != null && this.isJAXWSClassDoc(docChild)) {
                         javadoc  = DOMUtils.getContent(docChild);
                     }
 
@@ -182,7 +185,6 @@
     private Boolean isAsyncElement(Node node) {
         return "enableAsyncMapping".equals(node.getLocalName())
                && ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI());
-
     }
     
     private Boolean isWrapperStyle(Node node) {

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/HandlerConfigGenerator.java Mon Apr  2 19:13:40 2007
@@ -55,7 +55,7 @@
     }
 
     public void setJavaInterface(JavaInterface javaInterface) {
-        this.intf = javaInterface;
+        this.intf = javaInterface; 
     }
 
     public void generate(ToolContext penv) throws ToolException {

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/SEIGenerator.java Mon Apr  2 19:13:40 2007
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.tools.wsdlto.frontend.jaxws.generators;
 
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.cxf.common.i18n.Message;
@@ -77,9 +76,7 @@
             }
             return;
         }
-        for (Iterator iter = interfaces.keySet().iterator(); iter.hasNext();) {
-            String interfaceName = (String)iter.next();
-            JavaInterface intf = interfaces.get(interfaceName);
+        for (JavaInterface intf : interfaces.values()) {
 
             if (hasHandlerConfig(intf)) {
                 HandlerConfigGenerator handlerGen = new HandlerConfigGenerator();
@@ -88,8 +85,10 @@
                 handlerGen.setJavaInterface(intf);
                 handlerGen.generate(getEnvironment());
 
-                if (handlerGen.getHandlerAnnotation() != null) {
-                    intf.addAnnotation(handlerGen.getHandlerAnnotation().toString());
+                String annot = handlerGen.getHandlerAnnotation().toString();
+                if (handlerGen.getHandlerAnnotation() != null
+                    && !intf.getAnnotations().contains(annot)) {
+                    intf.addAnnotation(annot);
                     intf.addImport("javax.jws.HandlerChain");
                 }
             }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/generators/ServiceGenerator.java Mon Apr  2 19:13:40 2007
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.tools.wsdlto.frontend.jaxws.generators;
 
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.cxf.common.i18n.Message;
@@ -63,7 +62,7 @@
         }
 
         Map<String, JavaServiceClass> serviceClasses = javaModel.getServiceClasses();
-
+        
         if (serviceClasses.size() == 0) {
             ServiceInfo serviceInfo = (ServiceInfo)env.get(ServiceInfo.class);
             String wsdl = serviceInfo.getDescription().getBaseURI();
@@ -74,12 +73,7 @@
             return;
         }
         
-        Iterator ite = serviceClasses.values().iterator();
-
-        while (ite.hasNext()) {
-
-            JavaServiceClass js = (JavaServiceClass)ite.next();
-
+        for (JavaServiceClass js : serviceClasses.values()) {
             String location = (String)env.get(ToolConstants.CFG_WSDLURL);
             
             clearAttributes();
@@ -88,7 +82,8 @@
             setAttributes("wsdlLocation", location);
             setCommonAttributes();
 
-            doWrite(SERVICE_TEMPLATE, parseOutputName(js.getPackageName(), js.getName()));
+            doWrite(SERVICE_TEMPLATE, parseOutputName(js.getPackageName(), 
+                                                      js.getName()));
         }
     }
 }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/WSDLToJavaProcessor.java Mon Apr  2 19:13:40 2007
@@ -20,8 +20,17 @@
 package org.apache.cxf.tools.wsdlto.frontend.jaxws.processor;
 
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
 import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.cxf.tools.common.ClassNameProcessor;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.common.model.JavaInterface;
 import org.apache.cxf.tools.common.model.JavaModel;
@@ -31,8 +40,19 @@
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.annotator.BindingAnnotator;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.annotator.WebServiceAnnotator;
 
-public class WSDLToJavaProcessor extends WSDLToProcessor {
+public class WSDLToJavaProcessor extends WSDLToProcessor implements ClassNameProcessor {
+    private static final String MODEL_MAP = WSDLToProcessor.class.getName() 
+        + ".MODEL_MAP";
+    
+    
+    public void processClassNames() {
+        ServiceInfo serviceInfo = context.get(ServiceInfo.class);
+
+        PortTypeProcessor portTypeProcessor = new PortTypeProcessor(context);
+        portTypeProcessor.processClassNames(serviceInfo);
+    }
 
+    
     public void process() throws ToolException {
         super.process();
 
@@ -46,21 +66,38 @@
     }
 
     private JavaModel wsdlDefinitionToJavaModel(ServiceInfo serviceInfo) throws ToolException {
-        JavaModel javaModel = new JavaModel();
+        JavaModel javaModel = null;
+        Map<QName, JavaModel> map = CastUtils.cast((Map)context.get(MODEL_MAP));
+        if (map == null) {
+            map = new HashMap<QName, JavaModel>();
+            context.put(MODEL_MAP, map);
+        }
+        if (map.containsKey(serviceInfo.getName())) {
+            javaModel = map.get(serviceInfo.getName());
+        } else {
+            javaModel = new JavaModel();
+            map.put(serviceInfo.getName(), javaModel);
+        }
         context.put(JavaModel.class, javaModel);
 
+        List<JavaInterface> interfaces = new ArrayList<JavaInterface>();
+        interfaces.addAll(javaModel.getInterfaces().values());
+        
         PortTypeProcessor portTypeProcessor = new PortTypeProcessor(context);
         portTypeProcessor.process(serviceInfo);
 
         ServiceProcessor serviceProcessor = new ServiceProcessor(context);
         serviceProcessor.process(serviceInfo);
-        if (javaModel.getInterfaces().values().iterator().hasNext()) {
-            JavaInterface intf = javaModel.getInterfaces().values().iterator().next();
-            intf.annotate(new WebServiceAnnotator());
-            if (serviceInfo.getBindings().size() > 0) {
-                intf.annotate(new BindingAnnotator());
+        
+        for (JavaInterface intf : javaModel.getInterfaces().values()) {
+            if (!interfaces.contains(intf)) {
+                intf.annotate(new WebServiceAnnotator());
+                if (serviceInfo.getBindings().size() > 0) {
+                    intf.annotate(new BindingAnnotator());
+                }
             }
         }
         return javaModel;
     }
+
 }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/FaultProcessor.java Mon Apr  2 19:13:40 2007
@@ -35,6 +35,7 @@
 import org.apache.cxf.tools.common.model.JavaModel;
 import org.apache.cxf.tools.util.ClassCollector;
 import org.apache.cxf.tools.util.NameUtil;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.JAXWSBinding;
 
 public class FaultProcessor extends AbstractProcessor {
     private ClassCollector  collector;
@@ -66,11 +67,25 @@
     @SuppressWarnings("unchecked")
     private void processFault(JavaMethod method, FaultInfo faultMessage) throws ToolException {
         JavaModel model = method.getInterface().getJavaModel();
-        String name = NameUtil.mangleNameToClassName(faultMessage.getName().getLocalPart());
-        //Fix issue 305770
 
+        String name = NameUtil.mangleNameToClassName(faultMessage.getName().getLocalPart());
         String namespace = faultMessage.getName().getNamespaceURI();
         String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
+        if (namespace.equals(method.getInterface().getNamespace())) {
+            packageName = method.getInterface().getPackageName();
+        }
+        
+        
+        JAXWSBinding jaxwsBinding = faultMessage.getExtensor(JAXWSBinding.class);
+        if (jaxwsBinding != null) {
+            if (jaxwsBinding.getPackage() != null) {
+                packageName = jaxwsBinding.getPackage();
+            }
+            if (jaxwsBinding.getJaxwsClass() != null
+                && jaxwsBinding.getJaxwsClass().getClassName() != null) {
+                name = jaxwsBinding.getJaxwsClass().getClassName();
+            }
+        }
 
         while (isNameCollision(packageName, name)) {
             name = name + "_Exception";
@@ -107,9 +122,9 @@
             }
 
             String fType = ProcessorUtil.getType(part, context, false);
-            String fPackageName = ProcessorUtil.parsePackageName(fNamespace,
-                                                                 context.mapPackageName(fNamespace));
-
+            
+            //REVISIT - custom JAXB package names
+            String fPackageName = method.getInterface().getPackageName();
 
 
             JavaField fField = new JavaField(fName, fType, fNamespace);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/PortTypeProcessor.java Mon Apr  2 19:13:40 2007
@@ -36,6 +36,7 @@
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.common.model.JavaInterface;
 import org.apache.cxf.tools.common.model.JavaModel;
+import org.apache.cxf.tools.util.ClassCollector;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.JAXWSBinding;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.mapper.InterfaceMapper;
 
@@ -46,6 +47,36 @@
         super(c);
     }
     
+    public void processClassNames(ServiceInfo serviceInfo) throws ToolException {
+        InterfaceInfo interfaceInfo = serviceInfo.getInterface();
+        if (interfaceInfo == null) {
+            return;
+        }
+        
+        JavaInterface intf = new InterfaceMapper(context).map(interfaceInfo);
+
+        JAXWSBinding jaxwsBinding = serviceInfo.getDescription().getExtensor(JAXWSBinding.class);
+        JAXWSBinding infBinding = interfaceInfo.getExtensor(JAXWSBinding.class);
+        if (infBinding != null && infBinding.getPackage() != null) { 
+            intf.setPackageName(infBinding.getPackage());
+        } else if (jaxwsBinding != null && jaxwsBinding.getPackage() != null) {
+            intf.setPackageName(jaxwsBinding.getPackage());            
+        }
+        
+        String name = intf.getName();
+        if (infBinding != null 
+            && infBinding.getJaxwsClass() != null
+            && infBinding.getJaxwsClass().getClassName() != null) {
+            name = infBinding.getJaxwsClass().getClassName();
+        }
+        intf.setName(name);
+
+        ClassCollector collector = context.get(ClassCollector.class);
+        collector.addSeiClassName(intf.getPackageName(), 
+                                  intf.getName(),
+                                  intf.getPackageName() + "." + intf.getName());
+    }
+    
     public void process(ServiceInfo serviceInfo) throws ToolException {
         operationMap.clear();
         JavaModel jmodel = context.get(JavaModel.class);
@@ -61,12 +92,20 @@
         intf.setJavaModel(jmodel);
 
         JAXWSBinding jaxwsBinding = serviceInfo.getDescription().getExtensor(JAXWSBinding.class);
-        JAXWSBinding infBinding = interfaceInfo.getDescription().getExtensor(JAXWSBinding.class);
+        JAXWSBinding infBinding = interfaceInfo.getExtensor(JAXWSBinding.class);
         if (infBinding != null && infBinding.getPackage() != null) { 
             intf.setPackageName(infBinding.getPackage());
         } else if (jaxwsBinding != null && jaxwsBinding.getPackage() != null) {
             intf.setPackageName(jaxwsBinding.getPackage());            
         }
+        
+        String name = intf.getName();
+        if (infBinding != null 
+            && infBinding.getJaxwsClass() != null
+            && infBinding.getJaxwsClass().getClassName() != null) {
+            name = infBinding.getJaxwsClass().getClassName();
+        }
+        intf.setName(name);
         
         Element handler = (Element)context.get(ToolConstants.HANDLER_CHAIN);
         intf.setHandlerChains(handler);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java Mon Apr  2 19:13:40 2007
@@ -73,9 +73,9 @@
         String type = "";
         DataBindingProfile dataBinding = context.get(DataBindingProfile.class);
         if (part.isElement()) {
-            type = dataBinding.getType(getElementName(part));
+            type = dataBinding.getType(getElementName(part), true);
         } else {
-            type = dataBinding.getType(part.getTypeQName());
+            type = dataBinding.getType(part.getTypeQName(), false);
         }
         if (type == null) {
             type = resolvePartType(part);
@@ -122,9 +122,9 @@
         }
         String name = "";
         if (part.isElement()) {
-            name = dataBinding.getType(getElementName(part));
+            name = dataBinding.getType(getElementName(part), true);
         } else {
-            name = dataBinding.getType(part.getTypeQName());
+            name = dataBinding.getType(part.getTypeQName(), false);
         }
         return name;       
     }
@@ -197,7 +197,7 @@
        
             
         if (!primitiveType && dataBinding != null) {
-            jtype = dataBinding.getType(xmlTypeName);
+            jtype = dataBinding.getType(xmlTypeName, true);
         } 
         
         if (!primitiveType && dataBinding == null) {

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java Mon Apr  2 19:13:40 2007
@@ -110,12 +110,10 @@
         String namespace = service.getName().getNamespaceURI();
         String packageName = ProcessorUtil.parsePackageName(namespace, context.mapPackageName(namespace));
 
-        while (isNameCollision(packageName, name)) {
-            name = name + "_Service";
-        }
         
         //customizing
         JAXWSBinding serviceBinding = service.getDescription().getExtensor(JAXWSBinding.class);
+        JAXWSBinding serviceBinding2 = service.getExtensor(JAXWSBinding.class);
         
         //TODO : Handle service customized class
         if (serviceBinding != null) {
@@ -134,18 +132,52 @@
             if (serviceBinding.isEnableWrapperStyle()) {
                 jaxwsBinding.setEnableWrapperStyle(true);
             }
+            if (serviceBinding.getJaxwsClass() != null
+                && serviceBinding.getJaxwsClass().getClassName() != null) {
+                name = serviceBinding.getJaxwsClass().getClassName();
+            }
+        }
+        if (serviceBinding2 != null) {
+            if (serviceBinding2.getPackage() != null) {
+                jaxwsBinding.setPackage(serviceBinding2.getPackage());
+            }
+            
+            if (serviceBinding2.isEnableAsyncMapping()) {
+                jaxwsBinding.setEnableAsyncMapping(true);
+            }
+            
+            if (serviceBinding2.isEnableMime()) {
+                jaxwsBinding.setEnableMime(true);
+            }
+            
+            if (serviceBinding2.isEnableWrapperStyle()) {
+                jaxwsBinding.setEnableWrapperStyle(true);
+            }
+            if (serviceBinding2.getJaxwsClass() != null
+                && serviceBinding2.getJaxwsClass().getClassName() != null) {
+                name = serviceBinding2.getJaxwsClass().getClassName();
+            }
         }
         
-        sclz.setName(name);
         sclz.setServiceName(service.getName().getLocalPart());
         sclz.setNamespace(namespace);
         
         if (jaxwsBinding.getPackage() != null) {
-            sclz.setPackageName(jaxwsBinding.getPackage());
-        } else {
-            sclz.setPackageName(packageName);
+            packageName = jaxwsBinding.getPackage();
+        }
+        sclz.setPackageName(packageName);
+        
+        while (isNameCollision(packageName, name)) {
+            name = name + "_Service";
         }
+        sclz.setName(name);
+        
 
+        if (model.getServiceClasses().containsKey(name)) {
+            sclz = model.getServiceClasses().get(name);
+        }
+        
+        
         Collection<EndpointInfo> ports = service.getEndpoints();
 
         for (EndpointInfo port : ports) {
@@ -239,11 +271,13 @@
                 jaxwsBinding.setJaxwsPara(bopBinding.getJaxwsPara());
             }
         }
-             
-        String portType = NameUtil.mangleNameToClassName(binding.getInterface().getName().getLocalPart());
-        
-        JavaInterface jf = model.getInterfaces().get(portType);
-       
+        JavaInterface jf = null;
+        for (JavaInterface jf2 : model.getInterfaces().values()) {
+            if (binding.getInterface().getName().getLocalPart()
+                    .equals(jf2.getWebServiceName())) {
+                jf = jf2;
+            }
+        }
         if (isSoapBinding()) {
             SoapBinding soapBinding = (SoapBinding)bindingObj;
             if (SOAPBindingUtil.getSoapStyle(soapBinding.getStyle()) == null) {

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/MethodMapper.java Mon Apr  2 19:13:40 2007
@@ -23,6 +23,7 @@
 
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.tools.common.model.JavaMethod;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.JAXWSBinding;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.ProcessorUtil;
 
 public final class MethodMapper {
@@ -36,6 +37,13 @@
 
         method.setName(ProcessorUtil.mangleNameToVariableName(operationName));
         method.setOperationName(operationName);
+        
+        JAXWSBinding opBinding = operation.getExtensor(JAXWSBinding.class);
+        if (opBinding != null
+            && opBinding.getMethodName() != null) {
+            method.setName(opBinding.getMethodName());
+        }
+
 
         if (operation.isOneWay()) {
             method.setStyle(OperationType.ONE_WAY);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java Mon Apr  2 19:13:40 2007
@@ -33,8 +33,10 @@
 import javax.wsdl.Binding;
 import javax.wsdl.BindingOperation;
 import javax.wsdl.Definition;
+import javax.wsdl.Fault;
 import javax.wsdl.Operation;
 import javax.wsdl.PortType;
+import javax.wsdl.Service;
 import javax.wsdl.extensions.ExtensionRegistry;
 import javax.wsdl.xml.WSDLReader;
 
@@ -92,6 +94,8 @@
 
     private void registerJaxwsExtension(ExtensionRegistry registry) {
         registerJAXWSBinding(registry, Definition.class);
+        registerJAXWSBinding(registry, Service.class);
+        registerJAXWSBinding(registry, Fault.class);
         registerJAXWSBinding(registry, PortType.class);
         registerJAXWSBinding(registry, Operation.class);
         registerJAXWSBinding(registry, Binding.class);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/DummyDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/DummyDataBinding.java?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/DummyDataBinding.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/DummyDataBinding.java Mon Apr  2 19:13:40 2007
@@ -28,7 +28,7 @@
     public void generate(ToolContext context) throws ToolException {
     }
     
-    public String getType(QName qn) {
+    public String getType(QName qn, boolean element) {
         return null;
     }
     

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/swa-mime.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/swa-mime.wsdl?view=diff&rev=524998&r1=524997&r2=524998
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/swa-mime.wsdl (original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/swa-mime.wsdl Mon Apr  2 19:13:40 2007
@@ -27,6 +27,13 @@
   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
 
   <wsdl:types>
+    <xsd:schema targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd"
+      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+      <xsd:simpleType name="swaRef">
+        <xsd:restriction base="xsd:anyURI" />
+      </xsd:simpleType>
+    </xsd:schema>
+  
     <xsd:schema xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
       targetNamespace="http://cxf.apache.org/swa/types">
       <xsd:import namespace="http://ws-i.org/profiles/basic/1.1/xsd"/>
@@ -41,12 +48,6 @@
       
     </xsd:schema>
 
-    <xsd:schema targetNamespace="http://ws-i.org/profiles/basic/1.1/xsd"
-      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-      <xsd:simpleType name="swaRef">
-        <xsd:restriction base="xsd:anyURI" />
-      </xsd:simpleType>
-    </xsd:schema>
   </wsdl:types>
 
   <wsdl:message name="echoDataRequest">
@@ -55,8 +56,8 @@
   </wsdl:message>
 
   <wsdl:message name="echoDataResponse">
-    <wsdl:part name="text" type="types:DataStruct" />
-    <wsdl:part name="data" element="xsd:base64Binary" />
+    <wsdl:part name="text" element="types:DataStruct" />
+    <wsdl:part name="data" type="xsd:base64Binary" />
   </wsdl:message>
 
   <wsdl:portType name="SwAServiceInterface">
@@ -72,23 +73,23 @@
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
 
     <wsdl:operation name="echoData">
-      <soap:operation soapAction="" style="literal" />
+      <soap:operation soapAction=""/>
       <wsdl:input>
         <mime:multipartRelated>
-          <mime:part name="body">
+          <mime:part>
             <soap:body parts="text" use="literal" />
           </mime:part>
-          <mime:part name="data">
+          <mime:part>
             <mime:content part="data" type="application/octet-stream" />
           </mime:part>
         </mime:multipartRelated>
       </wsdl:input>
       <wsdl:output>
         <mime:multipartRelated>
-          <mime:part name="body">
+          <mime:part>
             <soap:body parts="text" use="literal" />
           </mime:part>
-          <mime:part name="data">
+          <mime:part>
             <mime:content part="data" type="application/octet-stream" />
           </mime:part>
         </mime:multipartRelated>



Mime
View raw message