cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r543130 - in /incubator/cxf/trunk/tools: common/src/main/java/org/apache/cxf/tools/common/model/ javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/ javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/i...
Date Thu, 31 May 2007 13:35:46 GMT
Author: ema
Date: Thu May 31 06:35:45 2007
New Revision: 543130

URL: http://svn.apache.org/viewvc?view=rev&rev=543130
Log:
* Enabled java2wsdl tool to generate empty value namespace for WrapperBean
* Fixed the issue with wrong targetnamespce value for wrapped method annotation when the related
schema elementFormDefault is unqualified 

Added:
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_sayHi
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayHi.wsdl
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema1.xsd
    incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema2.xsd
Modified:
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaAnnotation.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotator.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotator.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapper.java
    incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.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/annotator/WebParamAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebResultAnnotator.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaAnnotation.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaAnnotation.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/model/JavaAnnotation.java
Thu May 31 06:35:45 2007
@@ -42,6 +42,12 @@
         }        
     }
     
+    public void addArgIgnoreEmtpy(String key , String value, String quote) {
+        if (value != null) {
+            arguments.put(key, quote + value + quote);
+        }
+    }
+    
     public void addArgument(String key, String value) {
         addArgument(key, value, DEFAULT_QUOTE);
     }
@@ -64,7 +70,11 @@
                     continue;
                 }
                 sb.append(" = ");
-                sb.append(value);
+                if ("".equals(value)) {
+                    sb.append("\"\"");
+                } else {
+                    sb.append(value);
+                }
                 if (i != (keys.length - 1)) {
                     sb.append(", ");
                 }

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotator.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotator.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanAnnotator.java
Thu May 31 06:35:45 2007
@@ -23,7 +23,6 @@
 import org.apache.cxf.tools.common.model.JavaAnnotatable;
 import org.apache.cxf.tools.common.model.JavaAnnotation;
 import org.apache.cxf.tools.java2wsdl.generator.wsdl11.model.WrapperBeanClass;
-
 public class WrapperBeanAnnotator implements Annotator {
 
     public void annotate(final JavaAnnotatable clz) {
@@ -42,9 +41,9 @@
         xmlAccessorType.addArgument("XmlAccessType.FIELD", "null", "");
 
         JavaAnnotation xmlType = new JavaAnnotation("XmlType");
+        //xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
         xmlType.addArgument("name", wrapperBeanClass.getElementName().getLocalPart());
         xmlType.addArgument("namespace", wrapperBeanClass.getElementName().getNamespaceURI());
-
         // Revisit: why annotation is string?
         wrapperBeanClass.addAnnotation(xmlRootElement.toString());
         wrapperBeanClass.addAnnotation(xmlAccessorType.toString());

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotator.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotator.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/generator/wsdl11/annotator/WrapperBeanFieldAnnotator.java
Thu May 31 06:35:45 2007
@@ -37,7 +37,7 @@
         JavaAnnotation xmlElementAnnotation = new JavaAnnotation("XmlElement");
         
         xmlElementAnnotation.addArgument("name", rawName);
-        xmlElementAnnotation.addArgument("namespace", jField.getTargetNamespace());
+        xmlElementAnnotation.addArgIgnoreEmtpy("namespace", jField.getTargetNamespace(),
"\"");
 
         jField.setAnnotation(xmlElementAnnotation);
         jField.getOwner().addImport("javax.xml.bind.annotation.XmlElement");

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapper.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapper.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/RequestWrapper.java
Thu May 31 06:35:45 2007
@@ -44,6 +44,14 @@
         javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class);
         return getClassName() == null && (reqWrapper == null || StringUtils.isEmpty(reqWrapper.className()));
     }
+    
+    public String getWrapperTns(Method method) {
+        javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class);
+        if (reqWrapper != null) {
+            return reqWrapper.targetNamespace();
+        }
+        return null;
+    }
 
     @Override
     protected List<JavaField> buildFields() {
@@ -70,6 +78,7 @@
                 type = clz.getName();
             }
             JavaField field = new JavaField(name, type, "");
+            field.setTargetNamespace("");
             fields.add(field);
             
         }

Modified: incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
(original)
+++ incubator/cxf/trunk/tools/javato/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/jaxws/ResponseWrapper.java
Thu May 31 06:35:45 2007
@@ -47,7 +47,15 @@
         javax.xml.ws.ResponseWrapper resWrapper = method.getAnnotation(javax.xml.ws.ResponseWrapper.class);
         return getClassName() == null && (resWrapper == null || StringUtils.isEmpty(resWrapper.className()));
     }
-
+    
+    public String getWrapperTns(Method method) {
+        javax.xml.ws.RequestWrapper reqWrapper = method.getAnnotation(javax.xml.ws.RequestWrapper.class);
+        if (reqWrapper != null) {
+            return reqWrapper.targetNamespace();
+        }
+        return null;
+    }
+    
     @Override
     protected List<JavaField> buildFields() {
         return buildFields(getMethod(), getOperationInfo().getUnwrappedOperation().getOutput());
@@ -76,7 +84,8 @@
                 type = returnType.getName();
             }
             field.setType(type);
-            //field.setTargetNamespace("");
+            field.setTargetNamespace("");
+            
         }
         fields.add(field);
         
@@ -97,6 +106,7 @@
                     type = clz.getName();
                 }
                 fields.add(new JavaField(name, type, ""));
+               
             }
         }
         

Modified: incubator/cxf/trunk/tools/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/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ParameterProcessor.java
Thu May 31 06:35:45 2007
@@ -109,6 +109,8 @@
         String namespace = part == null ? null : ProcessorUtil.resolvePartNamespace(part);
               
         JavaReturn returnType = new JavaReturn(name, type, namespace);
+        
+        
         returnType.setQName(ProcessorUtil.getElementName(part));
         returnType.setStyle(JavaType.Style.OUT);
         if (namespace != null && type != null && !"void".equals(type)) {
@@ -140,9 +142,15 @@
         if (wrappedElements == null || wrappedElements.size() == 0) {
             return;
         }
+        boolean isSchemaQualified = ProcessorUtil.isSchemaFormQualified(context, part.getElementQName());
         for (QName item : wrappedElements) {
-            addParameter(method, getParameterFromQName(part.getElementQName(), 
-                                                       item, JavaType.Style.IN, part));
+            JavaParameter jp = getParameterFromQName(part.getElementQName(), 
+                                  item, JavaType.Style.IN, part);
+            if (!isSchemaQualified) {
+                jp.setTargetNamespace("");
+            }
+            
+            addParameter(method, jp);
         }
     }
 
@@ -220,13 +228,19 @@
             return;
         }
         method.setReturn(null);
+        boolean qualified = ProcessorUtil.isSchemaFormQualified(context, outputPart.getElementQName());
+        
         if (outputWrapElement.size() == 1 && inputWrapElement != null) {
             QName outElement = outputWrapElement.iterator().next();
             boolean sameWrapperChild = false;
             for (QName inElement : inputWrapElement) {
                 if (isSameWrapperChild(inElement, outElement)) {
-                    addParameter(method, getParameterFromQName(outputPart.getElementQName(),
outElement, 
-                                                               JavaType.Style.INOUT, outputPart));
+                    JavaParameter  jp = getParameterFromQName(outputPart.getElementQName(),
outElement, 
+                                                              JavaType.Style.INOUT, outputPart);
+                    if (!qualified) {
+                        jp.setTargetNamespace("");
+                    }
+                    addParameter(method, jp);
                     sameWrapperChild = true;
                     if (method.getReturn() == null) {
                         addVoidReturn(method);
@@ -235,7 +249,11 @@
                 }
             }
             if (!sameWrapperChild) {
-                method.setReturn(getReturnFromQName(outElement, outputPart));
+                JavaReturn jreturn = getReturnFromQName(outElement, outputPart);
+                if (!qualified) {
+                    jreturn.setTargetNamespace("");
+                }
+                method.setReturn(jreturn);
                 return;
             }
             
@@ -247,23 +265,35 @@
                         new org.apache.cxf.common.i18n.Message("WRAPPER_STYLE_TWO_RETURN_TYPES",
LOG);
                     throw new ToolException(msg);
                 }
-                method.setReturn(getReturnFromQName(outElement, outputPart));
+                JavaReturn jreturn = getReturnFromQName(outElement, outputPart);
+                if (!qualified) {
+                    jreturn.setTargetNamespace("");
+                }
+                method.setReturn(jreturn);
                 continue;
             }
             boolean sameWrapperChild = false;
             if (inputWrapElement != null) {
                 for (QName inElement : inputWrapElement) {
                     if (isSameWrapperChild(inElement, outElement)) {
-                        addParameter(method, getParameterFromQName(outputPart.getElementQName(),
outElement, 
-                                                                   JavaType.Style.INOUT,
outputPart));
+                        JavaParameter  jp = getParameterFromQName(outputPart.getElementQName(),
outElement, 
+                                                                  JavaType.Style.INOUT, outputPart);
+                        if (!qualified) {
+                            jp.setTargetNamespace("");
+                        }
+                        addParameter(method, jp);
                         sameWrapperChild = true;
                         break;
                     }
                 }
             }
             if (!sameWrapperChild) {
-                addParameter(method, getParameterFromQName(outputPart.getElementQName(),
outElement, 
-                                                           JavaType.Style.OUT, outputPart));
+                JavaParameter  jp = getParameterFromQName(outputPart.getElementQName(), outElement,

+                                                          JavaType.Style.OUT, outputPart);
+                if (!qualified) {
+                    jp.setTargetNamespace("");
+                }
+                addParameter(method, jp);
             }
         }
         if (method.getReturn() == null) {

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=543130&r1=543129&r2=543130
==============================================================================
--- 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
Thu May 31 06:35:45 2007
@@ -27,6 +27,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+
 import javax.xml.namespace.QName;
 
 import org.w3c.dom.DOMException;
@@ -45,9 +46,11 @@
 import org.apache.cxf.tools.util.URIParserUtil;
 import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
+import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;
 import org.apache.ws.commons.schema.XmlSchemaComplexType;
 import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaForm;
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.XmlSchemaSequence;
 
@@ -353,5 +356,18 @@
         }
         return qnames;
     }
- 
+    
+    public static boolean isSchemaFormQualified(ToolContext context, QName partElement) {
+        ServiceInfo serviceInfo = (ServiceInfo)context.get(ServiceInfo.class);
+        XmlSchemaCollection schemaCol = (XmlSchemaCollection)serviceInfo
+            .getProperty(WSDLServiceBuilder.WSDL_SCHEMA_LIST);
+        for (int i = 0; i < schemaCol.getXmlSchemas().length; i++) {
+            XmlSchema schema = schemaCol.getXmlSchemas().clone()[i];
+            if (schema.getElementByName(partElement) != null) {
+                return schema.getElementFormDefault().getValue().equals(XmlSchemaForm.QUALIFIED);
+            }
+        }
+        return false;
+    
+    }
 }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.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/annotator/WebParamAnnotator.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebParamAnnotator.java
Thu May 31 06:35:45 2007
@@ -67,7 +67,7 @@
         }
         webParamAnnotation.addArgument("name", name);
         if (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT || parameter.isHeader())
{
-            webParamAnnotation.addArgument("targetNamespace", targetNamespace);
+            webParamAnnotation.addArgIgnoreEmtpy("targetNamespace", targetNamespace, "\"");
         }
 
         parameter.setAnnotation(webParamAnnotation);

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebResultAnnotator.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/annotator/WebResultAnnotator.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebResultAnnotator.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/annotator/WebResultAnnotator.java
Thu May 31 06:35:45 2007
@@ -65,8 +65,10 @@
             targetNamespace = method.getReturn().getTargetNamespace();
         }
 
+        
+        
         resultAnnotation.addArgument("name", name);
-        resultAnnotation.addArgument("targetNamespace", targetNamespace);
+        resultAnnotation.addArgIgnoreEmtpy("targetNamespace", targetNamespace, "\"");
 
         if (method.getSoapStyle() == SOAPBinding.Style.RPC
             || (method.getSoapStyle() == SOAPBinding.Style.DOCUMENT && !method.isWrapperStyle()))
{

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
Thu May 31 06:35:45 2007
@@ -507,6 +507,19 @@
     }
     
     
+    @Test
+    public void testWebResult() throws Exception {
+
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/sayHi.wsdl"));
+        processor.setContext(env);
+        processor.execute();
+        
+        assertFileEquals(getClass().getResource("expected/expected_sayHi").getFile(), 
+                         output.getCanonicalPath() + "/org/apache/sayHi/SayHi.java");
+        
+    }
+    
+    
     
 
 }

Modified: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime?view=diff&rev=543130&r1=543129&r2=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
(original)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_hello_mime
Thu May 31 06:35:45 2007
@@ -28,8 +28,6 @@
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.ResponseWrapper;
 
-
-
 @WebService(targetNamespace = "http://apache.org/hello_world_mime", name = "Hello")
 @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
 
@@ -48,7 +46,7 @@
     public void helloMime(
         @WebParam(targetNamespace = "http://apache.org/hello_world_mime/types", partName
= "body", name = "body")
         java.lang.String body,
-        @WebParam(mode = Mode.INOUT, partName = "mime", name = "mime")
+        @WebParam(targetNamespace = "", mode = Mode.INOUT, partName = "mime", name = "mime")
         javax.xml.ws.Holder<java.awt.Image> mime
     );
 
@@ -57,7 +55,7 @@
     public void hello(
         @WebParam(targetNamespace = "http://apache.org/hello_world_mime/types", partName
= "body", name = "body")
         java.lang.String body,
-        @WebParam(mode = Mode.INOUT, partName = "mime", name = "mime")
+        @WebParam(targetNamespace = "", mode = Mode.INOUT, partName = "mime", name = "mime")
         javax.xml.ws.Holder<byte[]> mime
     );
 }

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_sayHi
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_sayHi?view=auto&rev=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_sayHi
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/expected/expected_sayHi
Thu May 31 06:35:45 2007
@@ -0,0 +1,53 @@
+/**
+ * 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.sayhi;
+
+import javax.jws.WebParam.Mode;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding.Style;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.WebMethod;
+import javax.jws.WebResult;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+@WebService(targetNamespace = "http://apache.org/sayHi", name = "SayHi")
+
+public interface SayHi {
+
+    @ResponseWrapper(targetNamespace = "http://apache.org/sayHi", className = "org.apache.sayhi.SayHiResponse",
localName = "sayHiResponse")
+    @RequestWrapper(targetNamespace = "http://apache.org/sayHi", className = "org.apache.sayhi.SayHi_Type",
localName = "sayHi")
+    @WebResult(targetNamespace = "http://apache.org/sayHi", name = "return")
+    @WebMethod
+    public java.lang.String sayHi(
+        @WebParam(targetNamespace = "http://apache.org/sayHi", name = "arg0")
+        java.lang.String arg0
+    );
+
+    @ResponseWrapper(targetNamespace = "http://apache.org/sayHi", className = "org.apache.sayhi.SayHiArrayResponse",
localName = "sayHiArrayResponse")
+    @RequestWrapper(targetNamespace = "http://apache.org/sayHi", className = "org.apache.sayhi.SayHiArray",
localName = "sayHiArray")
+    @WebResult(targetNamespace = "", name = "return")
+    @WebMethod
+    public java.util.List<java.lang.String> sayHiArray(
+        @WebParam(targetNamespace = "", name = "arg0")
+        java.util.List<java.lang.String> arg0
+    );
+}
\ No newline at end of file

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayHi.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayHi.wsdl?view=auto&rev=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayHi.wsdl (added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayHi.wsdl Thu
May 31 06:35:45 2007
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<definitions targetNamespace="http://apache.org/sayHi" name="SayHiService" xmlns:tns="http://apache.org/sayHi"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
+  <types>
+    <xsd:schema>
+      <xsd:import namespace="http://apache.org/sayHi" schemaLocation="sayhi-schema1.xsd"/>
+      <xsd:import namespace="http://apache.org/sayHi" schemaLocation="sayhi-schema2.xsd"/>
+    </xsd:schema>
+  </types>
+  <message name="sayHi">
+    <part name="parameters" element="tns:sayHi"/>
+  </message>
+  <message name="sayHiResponse">
+    <part name="parameters" element="tns:sayHiResponse"/>
+  </message>
+  <message name="sayHiArray">
+    <part name="parameters" element="tns:sayHiArray"/>
+  </message>
+  <message name="sayHiArrayResponse">
+    <part name="parameters" element="tns:sayHiArrayResponse"/>
+  </message>
+  <portType name="SayHi">
+    <operation name="sayHi">
+      <input message="tns:sayHi"/>
+      <output message="tns:sayHiResponse"/>
+    </operation>
+    <operation name="sayHiArray">
+      <input message="tns:sayHiArray"/>
+      <output message="tns:sayHiArrayResponse"/>
+    </operation>
+  </portType>
+  <binding name="SayHiPortBinding" type="tns:SayHi">
+    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
+    <operation name="sayHi">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+    <operation name="sayHiArray">
+      <soap:operation soapAction=""/>
+      <input>
+        <soap:body use="literal"/>
+      </input>
+      <output>
+        <soap:body use="literal"/>
+      </output>
+    </operation>
+  </binding>
+  <service name="SayHiService">
+    <port name="SayHiPort" binding="tns:SayHiPortBinding">
+      <soap:address location="http://localhost:9090/sayHi"/>
+    </port>
+  </service>
+</definitions>
+

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema1.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema1.xsd?view=auto&rev=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema1.xsd
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema1.xsd
Thu May 31 06:35:45 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<xs:schema version="1.0" targetNamespace="http://apache.org/sayHi" xmlns:x1="http://apache.org/sayHi"
 xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+  <xs:element name="sayHi" type="x1:sayHi"/>
+
+  <xs:complexType name="sayHi">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="sayHiResponse" type="x1:sayHiResponse"/>
+
+  <xs:complexType name="sayHiResponse">
+    <xs:sequence>
+      <xs:element name="return" type="xs:string" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>
+

Added: incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema2.xsd
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema2.xsd?view=auto&rev=543130
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema2.xsd
(added)
+++ incubator/cxf/trunk/tools/wsdlto/test/src/test/resources/wsdl2java_wsdl/sayhi-schema2.xsd
Thu May 31 06:35:45 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+<xs:schema targetNamespace="http://apache.org/sayHi" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="sayHiArray" type="ns1:sayHiArray" xmlns:ns1="http://apache.org/sayHi"/>
+
+  <xs:complexType name="sayHiArray">
+    <xs:sequence>
+      <xs:element name="arg0" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="sayHiArrayResponse" type="ns2:sayHiArrayResponse" xmlns:ns2="http://apache.org/sayHi"/>
+
+  <xs:complexType name="sayHiArrayResponse">
+    <xs:sequence>
+      <xs:element name="return" type="xs:string" maxOccurs="unbounded" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>
\ No newline at end of file



Mime
View raw message