Author: mmao
Date: Thu Mar 8 00:17:45 2007
New Revision: 515960
URL: http://svn.apache.org/viewvc?view=rev&rev=515960
Log:
CXF-450
Added test to confirm In the absence of @WebParameter the java2wsdl did correct.
Added:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/HelloWithNoWebParam.java
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHi.java
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHiResponse.java
Modified:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
Added:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/HelloWithNoWebParam.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/HelloWithNoWebParam.java?view=auto&rev=515960
==============================================================================
---
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/HelloWithNoWebParam.java
(added)
+++
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/HelloWithNoWebParam.java
Thu Mar 8 00:17:45 2007
@@ -0,0 +1,37 @@
+/**
+ * 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.fortest.withannotation.doc;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
[EMAIL PROTECTED](targetNamespace = "http://apache.org/", name = "Hello")
+
+public interface HelloWithNoWebParam {
+
+ @ResponseWrapper(className =
"org.apache.cxf.tools.fortest.withannotation.doc.SayHi")
+ @RequestWrapper(className =
"org.apache.cxf.tools.fortest.withannotation.doc.SayHiResponse")
+ @WebMethod(operationName = "sayHi")
+ void sayHi(
+ long l1
+ );
+}
Added:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHi.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHi.java?view=auto&rev=515960
==============================================================================
---
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHi.java
(added)
+++
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHi.java
Thu Mar 8 00:17: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.cxf.tools.fortest.withannotation.doc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
[EMAIL PROTECTED](name = "sayHi", namespace =
"http://doc.withannotation.fortest.tools.cxf.apache.org/")
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "sayHi", namespace =
"http://doc.withannotation.fortest.tools.cxf.apache.org/")
+public class SayHi {
+
+ @XmlElement(name = "arg0", namespace = "")
+ private long arg0;
+
+ /**
+ *
+ * @return
+ * returns long
+ */
+ public long getArg0() {
+ return this.arg0;
+ }
+
+ /**
+ *
+ * @param arg0
+ * the value for the arg0 property
+ */
+ public void setArg0(long arg0) {
+ this.arg0 = arg0;
+ }
+}
Added:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHiResponse.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHiResponse.java?view=auto&rev=515960
==============================================================================
---
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHiResponse.java
(added)
+++
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/withannotation/doc/SayHiResponse.java
Thu Mar 8 00:17:45 2007
@@ -0,0 +1,32 @@
+/**
+ * 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.fortest.withannotation.doc;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
[EMAIL PROTECTED](name = "sayHiResponse", namespace =
"http://doc.withannotation.fortest.tools.cxf.apache.org/")
[EMAIL PROTECTED](XmlAccessType.FIELD)
[EMAIL PROTECTED](name = "sayHiResponse", namespace =
"http://doc.withannotation.fortest.tools.cxf.apache.org/")
+public class SayHiResponse {
+}
Modified:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?view=diff&rev=515960&r1=515959&r2=515960
==============================================================================
---
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Thu Mar 8 00:17:45 2007
@@ -35,6 +35,7 @@
private WSDLHelper wsdlHelper = new WSDLHelper();
public void tearDown() {
+ super.tearDown();
}
public void testGetWSDLVersion() {
Modified:
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java?view=diff&rev=515960&r1=515959&r2=515960
==============================================================================
---
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
(original)
+++
incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessorTest.java
Thu Mar 8 00:17:45 2007
@@ -348,6 +348,29 @@
}
}
+ public void testDocWrappedNoWebParam() {
+ Map<String, String> ns = new HashMap<String, String>();
+ ns.put("xsd", "http://www.w3.org/2001/XMLSchema");
+
+ env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() +
"/doc_lit_wrapped_webparam.wsdl");
+ env.put(ToolConstants.CFG_CLASSNAME,
+
"org.apache.cxf.tools.fortest.withannotation.doc.HelloWithNoWebParam");
+ env.put(ToolConstants.CFG_SERVICENAME, serviceName);
+ j2wProcessor.setEnvironment(env);
+ try {
+ j2wProcessor.process();
+ File file = new File(output, "schema1.xsd");
+ assertTrue(file.exists());
+ Document root = XMLUtils.parse(new BufferedInputStream(new
FileInputStream(file)));
+ XPathUtils xpather = new XPathUtils(ns);
+ assertNotNull(xpather.getValue("//xsd:[EMAIL
PROTECTED]'sayHi']//xsd:[EMAIL PROTECTED]'arg0']",
+ root,
+ XPathConstants.NODE));
+ } catch (Exception e) {
+ fail("Should not happen other exception " + e.getMessage());
+ }
+ }
+
private String getLocation(String wsdlFile) {
return JavaToWSDLProcessorTest.class.getResource(wsdlFile).getFile();
}