cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r506373 - in /incubator/cxf/trunk/tools2: common/src/main/java/org/apache/cxf/tools/util/ wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/ wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/ wsdlto/fron...
Date Mon, 12 Feb 2007 08:41:54 GMT
Author: ema
Date: Mon Feb 12 00:41:53 2007
New Revision: 506373

URL: http://svn.apache.org/viewvc?view=rev&rev=506373
Log:
[CXF-313]Fixed issues found by running wsdl2java tool with the wsdls under testutils.(will
add test case for these issue)
Fixed the checkstyle error in WSDLToServiceProcessorTest

Modified:
    incubator/cxf/trunk/tools2/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java
    incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/ParameterMapper.java
    incubator/cxf/trunk/tools2/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
    incubator/cxf/trunk/tools2/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
    incubator/cxf/trunk/tools2/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_keywords_operation.wsdl

Modified: incubator/cxf/trunk/tools2/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java
(original)
+++ incubator/cxf/trunk/tools2/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java
Mon Feb 12 00:41:53 2007
@@ -26,31 +26,60 @@
 public final class JAXBUtils {
     private JAXBUtils() {
     }
-    
+
     private static Node innerJaxbBinding(Element schema) {
         String schemaNamespace = schema.getNamespaceURI();
+
         Document doc = schema.getOwnerDocument();
-        
-        Element annotation = doc.createElementNS(schemaNamespace, "annotation");
-        Element appinfo  = doc.createElementNS(schemaNamespace, "appinfo");
-        annotation.appendChild(appinfo);
-        Element jaxbBindings = doc.createElementNS(ToolConstants.NS_JAXB_BINDINGS, "schemaBindings");
-        appinfo.appendChild(jaxbBindings);
+
+        NodeList annoList = doc.getElementsByTagNameNS(schemaNamespace, "annotation");
+        Element annotation = null;
+        if (annoList.getLength() > 0) {
+            annotation = (Element)annoList.item(0);
+        } else {
+            annotation = doc.createElementNS(schemaNamespace, "annotation");
+        }
+
+        NodeList appList = annotation.getElementsByTagNameNS(schemaNamespace, "appinfo");
+        Element appInfo = null;
+        if (appList.getLength() > 0) {
+            appInfo = (Element)appList.item(0);
+        } else {
+            appInfo = doc.createElementNS(schemaNamespace, "appinfo");
+            annotation.appendChild(appInfo);
+        }
+
+        Element jaxbBindings = null;
+        NodeList jaxbList = doc.getElementsByTagNameNS(ToolConstants.NS_JAXB_BINDINGS, "schemaBindings");
+        if (jaxbList.getLength() > 0) {
+            jaxbBindings = (Element)jaxbList.item(0);
+        } else {
+            jaxbBindings = doc.createElementNS(ToolConstants.NS_JAXB_BINDINGS, "schemaBindings");
+            appInfo.appendChild(jaxbBindings);
+        }
         return jaxbBindings;
+
     }
 
     public static Node innerJaxbPackageBinding(Element schema, String packagevalue) {
         Document doc = schema.getOwnerDocument();
-        
+
         if (!XMLUtils.hasAttribute(schema, ToolConstants.NS_JAXB_BINDINGS)) {
             schema.setAttributeNS(ToolConstants.NS_JAXB_BINDINGS, "version", "2.0");
         }
 
         Node schemaBindings = innerJaxbBinding(schema);
-        
-        Element packagename = doc.createElementNS(ToolConstants.NS_JAXB_BINDINGS, "package");
+
+        NodeList pkgList = doc.getElementsByTagNameNS(ToolConstants.NS_JAXB_BINDINGS,
+                                                      "package");
+        Element packagename = null;
+        if (pkgList.getLength() > 0) {
+            packagename = (Element)pkgList.item(0);
+        } else {
+            packagename = doc.createElementNS(ToolConstants.NS_JAXB_BINDINGS, "package");
+        }
         packagename.setAttribute("name", packagevalue);
-        
+
         schemaBindings.appendChild(packagename);
 
         return schemaBindings.getParentNode().getParentNode();

Modified: incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
Mon Feb 12 00:41:53 2007
@@ -39,7 +39,6 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
-import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.AbstractCXFToolContainer;
 import org.apache.cxf.tools.common.ClassUtils;
@@ -203,27 +202,28 @@
 
     @SuppressWarnings("unchecked")
     public QName getServiceQName(Definition definition) {
-        QName qname = context.getQName(ToolConstants.CFG_SERVICENAME);
-        if (qname == null) {
-            if (definition.getServices().size() == 0) {
-                Message msg = new Message("SERVICE_NOT_FOUND", 
-                                          LOG, new Object[] {definition.getDocumentBaseURI()});
-                throw new ToolException(msg);
-            }
-            qname = (QName) definition.getServices().keySet().iterator().next();
-        }
-        if (StringUtils.isEmpty(qname.getNamespaceURI())) {
+        String serviceName = (String)context.get(ToolConstants.CFG_SERVICENAME);
+        QName qname = null;
+        if (serviceName != null) {
             for (Iterator<QName> ite = definition.getServices().keySet().iterator();
ite.hasNext();) {
                 QName qn = ite.next();
-                if (qn.getLocalPart().equals(qname.getLocalPart())) {
+                if (qn.getLocalPart().equalsIgnoreCase(serviceName.toLowerCase())) {
                     return qn;
                 }
             }
-            qname = new QName(definition.getTargetNamespace(), qname.getLocalPart());
+        } else {
+            for (Iterator<QName> ite = definition.getServices().keySet().iterator();
ite.hasNext();) {
+                QName defatultQn = ite.next();
+                return defatultQn;
+            }
+        }
+        if (qname == null) {
+            Message msg = new Message("SERVICE_NOT_FOUND", LOG, new Object[] {serviceName});
+            throw new ToolException(msg);
         }
         return qname;
     }
-
+    
     public void loadDefaultNSPackageMapping(ToolContext env) {
         if (!env.hasExcludeNamespace(DEFAULT_NS2PACKAGE) 
             && env.getBooleanValue(ToolConstants.CFG_DEFAULT_NS, "true")) {

Modified: incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Mon Feb 12 00:41:53 2007
@@ -74,7 +74,8 @@
         def = (Definition)env.get(Definition.class);
 
         SchemaCompilerImpl schemaCompiler = (SchemaCompilerImpl)XJC.createSchemaCompiler();
-              
+        
+        
         ClassCollector classCollector = env.get(ClassCollector.class);
         ClassNameAllocatorImpl allocator = new ClassNameAllocatorImpl(classCollector);
         allocator.setInterface(serviceInfo.getInterface(), env.mapPackageName(def.getTargetNamespace()));
@@ -116,9 +117,11 @@
                       
             if (pkgName != null) {
                 Node pkgNode = JAXBUtils.innerJaxbPackageBinding(ele, pkgName);
-                ele.appendChild(pkgNode);
+                if (pkgNode != null) {
+                    ele.appendChild(pkgNode);
+                }
             }
-
+           
             schemaCompiler.parseSchema(key, ele);
             
         }

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/OperationProcessor.java
Mon Feb 12 00:41:53 2007
@@ -240,7 +240,8 @@
     private boolean isAddedAsyMethod(JavaMethod method) {
         List<JavaMethod> jmethods = method.getInterface().getMethods();
         for (JavaMethod jm : jmethods) {
-            if (!jm.getName().toLowerCase().equals(jm.getOperationName().toLowerCase()))
{
+            if (!jm.getName().toLowerCase().equals(method.getOperationName().toLowerCase())

+                && jm.getOperationName().toLowerCase().equals(method.getOperationName().toLowerCase()))
{
                 return  true;
                 
             }

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Mon Feb 12 00:41:53 2007
@@ -314,24 +314,20 @@
                                                 MessagePartInfo part) {
 
         String fullJavaName = "";
-        //String simpleJavaName = "";
               
         fullJavaName = this.dataBinding.getWrappedElementType(wrapperElement, item);
-        //simpleJavaName = fullJavaName;
         
-        //int index = fullJavaName.lastIndexOf(".");
-        
-        /*if (index > -1) {
-            simpleJavaName = fullJavaName.substring(index);    
-        }*/
         
         String targetNamespace = ProcessorUtil.resolvePartNamespace(part);
         if (targetNamespace == null) {
             targetNamespace = wrapperElement.getNamespaceURI();
         }
-        JavaParameter parameter = new JavaParameter(item.getLocalPart(), fullJavaName, targetNamespace);
+        
+        String jpname = ProcessorUtil.mangleNameToVariableName(item.getLocalPart());
+        JavaParameter parameter = new JavaParameter(jpname, fullJavaName, targetNamespace);
         parameter.setStyle(style);
         parameter.setQName(item);
+        
         if (style == JavaType.Style.OUT || style == JavaType.Style.INOUT) {
             parameter.setHolder(true);
             parameter.setHolderName(javax.xml.ws.Holder.class.getName());
@@ -362,7 +358,8 @@
         if (targetNamespace == null) {
             targetNamespace = element.getNamespaceURI();
         }
-        JavaReturn returnType = new JavaReturn(simpleJavaName, fullJavaName , targetNamespace);
+        String jpname = ProcessorUtil.mangleNameToVariableName(simpleJavaName);
+        JavaReturn returnType = new JavaReturn(jpname, fullJavaName , targetNamespace);
         returnType.setQName(element);
         returnType.setStyle(JavaType.Style.OUT);
         return returnType;
@@ -396,6 +393,7 @@
                                               List<String> parameterList) throws ToolException
{
 
         Map<QName, MessagePartInfo> inputPartsMap = inputMessage.getMessagePartsMap();
+        
         Map<QName, MessagePartInfo> outputPartsMap = outputMessage.getMessagePartsMap();
 
         List<MessagePartInfo> inputParts = inputMessage.getMessageParts();
@@ -412,7 +410,7 @@
 
         if (isRequestResponse(method)) {
             for (MessagePartInfo part : outputParts) {
-                if (!parameterList.contains(part.getName())) {
+                if (!parameterList.contains(part.getName().getLocalPart())) {
                     MessagePartInfo inpart = inputMessage.getMessagePart(part.getName());
                     if (inpart == null || (inpart != null && !isSamePart(inpart,
part))) {
                         outputUnlistedParts.add(part);
@@ -435,13 +433,13 @@
         int size = parameterList.size();
         while (index < size) {
             String partName = parameterList.get(index);
-            MessagePartInfo part = inputPartsMap.get(partName);
+            MessagePartInfo part = inputPartsMap.get(inputMessage.getMessagePartQName(partName));
             JavaType.Style style = JavaType.Style.IN;
             if (part == null) {
-                part = outputPartsMap.get(partName);
+                part = outputPartsMap.get(inputMessage.getMessagePartQName(partName));
                 style = JavaType.Style.OUT;
-            } else if (outputPartsMap.get(partName) != null 
-                && isSamePart(part, outputPartsMap.get(partName))) {
+            } else if (outputPartsMap.get(inputMessage.getMessagePartQName(partName)) !=
null 
+                && isSamePart(part, outputPartsMap.get(inputMessage.getMessagePartQName(partName))))
{
                 style = JavaType.Style.INOUT;
             }
             if (part != null) {

Modified: incubator/cxf/trunk/tools2/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/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java
Mon Feb 12 00:41:53 2007
@@ -343,7 +343,12 @@
 
             while (ite.hasNext()) {
                 XmlSchemaElement subElement = (XmlSchemaElement)ite.next();
-                qnames.add(subElement.getQName());
+
+                if (subElement.getQName() != null) {
+                    qnames.add(subElement.getQName());
+                } else {
+                    qnames.add(subElement.getRefName());
+                }
             }
         }
         return qnames;

Modified: incubator/cxf/trunk/tools2/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/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ServiceProcessor.java
Mon Feb 12 00:41:53 2007
@@ -420,13 +420,24 @@
 
     private Map getSoapOperationProp(BindingOperationInfo bop) {
         Map<String, Object> soapOPProp = new HashMap<String, Object>();
-
-        for (ExtensibilityElement ext : bop.getExtensors(ExtensibilityElement.class)) {
-            if (SOAPBindingUtil.isSOAPOperation(ext)) {
-                SoapOperation soapOP = SOAPBindingUtil.getSoapOperation(ext);
-                soapOPProp.put(this.soapOPAction, soapOP.getSoapActionURI());
-                soapOPProp.put(this.soapOPStyle, soapOP.getStyle());
+        if (bop.getExtensor(ExtensibilityElement.class) != null) {
+            for (ExtensibilityElement ext : bop.getExtensors(ExtensibilityElement.class))
{
+                if (SOAPBindingUtil.isSOAPOperation(ext)) {
+                    SoapOperation soapOP = SOAPBindingUtil.getSoapOperation(ext);
+                    soapOPProp.put(this.soapOPAction, soapOP.getSoapActionURI());
+                    soapOPProp.put(this.soapOPStyle, soapOP.getStyle());
+                }
             }
+        } else {
+            for (ExtensibilityElement ext :  bop.getBinding().getExtensors(ExtensibilityElement.class))
{
+                if (SOAPBindingUtil.isSOAPOperation(ext)) {
+                    SoapOperation soapOP = SOAPBindingUtil.getSoapOperation(ext);
+                    soapOPProp.put(this.soapOPAction, soapOP.getSoapActionURI());
+                    soapOPProp.put(this.soapOPStyle, soapOP.getStyle());
+                }
+            }
+            
+            
         }
         return soapOPProp;
     }

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/ParameterMapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/ParameterMapper.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/ParameterMapper.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/mapper/ParameterMapper.java
Mon Feb 12 00:41:53 2007
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.tools.wsdlto.frontend.jaxws.processor.internal.mapper;
 
+import org.apache.cxf.jaxb.JAXBUtils;
 import org.apache.cxf.service.model.MessagePartInfo;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.model.JavaParameter;
@@ -32,21 +33,25 @@
     }
     
     public static JavaParameter map(MessagePartInfo part, JavaType.Style style, ToolContext
context) {
-        String name = ProcessorUtil.resolvePartName(part);
+        String name = ProcessorUtil.mangleNameToVariableName(part.getName().getLocalPart());
         String namespace = ProcessorUtil.resolvePartNamespace(part);
         String type = ProcessorUtil.resolvePartType(part, context);
         
         JavaParameter parameter = new JavaParameter(name, type, namespace);
         parameter.setPartName(part.getName().getLocalPart());
         parameter.setQName(ProcessorUtil.getElementName(part));
+        String fullJavaName = ProcessorUtil.getFullClzName(part, context, false);
         
-        parameter.setClassName(ProcessorUtil.getFullClzName(part, context, false));
+        parameter.setClassName(fullJavaName);
 
         if (style == JavaType.Style.INOUT || style == JavaType.Style.OUT) {
             parameter.setHolder(true);
             parameter.setHolderName(javax.xml.ws.Holder.class.getName());
-            
-            parameter.setHolderClass(ProcessorUtil.getFullClzName(part, context, true));
+            String holderClass = fullJavaName;
+            if (JAXBUtils.holderClass(fullJavaName) != null) {
+                holderClass = JAXBUtils.holderClass(fullJavaName).getName();
+            }  
+            parameter.setHolderClass(holderClass);
         }
         parameter.setStyle(style);
         return parameter;

Modified: incubator/cxf/trunk/tools2/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
Mon Feb 12 00:41:53 2007
@@ -88,9 +88,9 @@
     }
 
     public void testNewServiceSoap12() throws Exception {
-        String[] args = new String[] {"-soap12", "-transport", "http", 
+        String[] args = new String[] {"-soap12", "-transport", "http",
                                       "-e", "SOAPService", "-p", "SoapPort", "-n",
-                                      "Greeter_SOAPBinding", "-a", 
+                                      "Greeter_SOAPBinding", "-a",
                                       "http://localhost:9000/SOAPService/SoapPort", "-d",
                                       output.getCanonicalPath(),
                                       getLocation("/misctools_wsdl/hello_world_soap12.wsdl")};
@@ -127,7 +127,7 @@
         } catch (ToolException e) {
             fail("Exception Encountered when parsing wsdl, error: " + e.getMessage());
         }
-        
+
     }
 
     public void testDefaultLocation() throws Exception {
@@ -226,14 +226,14 @@
                         System.err.println("jms address break 2");
                         break;
                     }
-//                     if (!(jmsAddress.getJndiProviderURL() != null && jmsAddress.getJndiProviderURL()
+//                 if (!(jmsAddress.getJndiProviderURL() != null && jmsAddress.getJndiProviderURL()
 //                         .equals("tcp://localhost:61616"))) {
 //                         break;
-//                     }
-//                     if (!(jmsAddress.getMessageType() != null && jmsAddress.getMessageType().equals("text")

-//                         && !jmsAddress.isUseMessageIDAsCorrelationID())) {
+//                 }
+//                 if (!(jmsAddress.getMessageType() != null && jmsAddress.getMessageType().equals("text")
+//                     && !jmsAddress.isUseMessageIDAsCorrelationID())) {
 //                         break;
-//                     }
+//                  }
                     found = true;
                     break;
                 }

Modified: incubator/cxf/trunk/tools2/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
Mon Feb 12 00:41:53 2007
@@ -65,7 +65,71 @@
         processor = null;
         env = null;
     }
+    
+/*   
+    public void testRPCLit1() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/type_test/type_test_rpclit_soap.wsdl"));
+        processor.setContext(env);
+        processor.execute();      
 
+    }
+    
+    
+    
+   
+    public void testLocator() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world_xml_bare.wsdl"));
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        processor.setContext(env);
+        processor.execute();      
+
+    }
+    
+   
+    public void testLocator2() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/basic_callback_test.wsdl"));
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        env.put(ToolConstants.CFG_SERVICENAME, "SOAPService");
+        processor.setContext(env);
+        processor.execute();      
+
+    }
+    
+    public void testLocator3() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/basic_callback_test.wsdl"));
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        env.put(ToolConstants.CFG_SERVICENAME, "CallbackService");
+        processor.setContext(env);
+        processor.execute();      
+
+    }
+    
+
+    
+    
+ 
+    public void testLocator_4() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world_multi_service.wsdl"));
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        env.put(ToolConstants.CFG_SERVICENAME, "SOAPProviderService");
+        
+        
+        processor.setContext(env);
+        processor.execute();      
+
+    }
+
+    public void testLocator_3() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/ordered_param_holder.wsdl"));
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        processor.setContext(env);
+        processor.execute();      
+
+    }
+
+    */
+    
+    
     public void testRPCLit() throws Exception {
 
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world_rpc_lit.wsdl"));

Modified: incubator/cxf/trunk/tools2/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_keywords_operation.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_keywords_operation.wsdl?view=diff&rev=506373&r1=506372&r2=506373
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_keywords_operation.wsdl
(original)
+++ incubator/cxf/trunk/tools2/wsdlto/test/src/test/resources/wsdl2java_wsdl/hello_world_with_keywords_operation.wsdl
Mon Feb 12 00:41:53 2007
@@ -131,7 +131,7 @@
         <wsdl:part name="in" element="x1:sayHi"/>
     </wsdl:message>
     <wsdl:message name="sayHiResponse">
-        <wsdl:part name="out" element="x1:sayHiResponse"/>
+        <wsdl:part name="return" element="x1:sayHiResponse"/>
     </wsdl:message>
     <wsdl:message name="greetMeRequest">
         <wsdl:part name="in" element="x1:greetMe"/>
@@ -169,7 +169,7 @@
     <wsdl:portType name="Greeter">
         <wsdl:operation name="do">
             <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
-            <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
+            <wsdl:output name="return" message="tns:sayHiResponse"/>
         </wsdl:operation>
         <wsdl:operation name="greetMe">
             <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/>



Mime
View raw message