You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by aj...@apache.org on 2006/07/19 06:01:24 UTC
svn commit: r423359 - in /webservices/axis2/trunk/java/modules:
codegen/src/org/apache/axis2/wsdl/codegen/extension/
codegen/src/org/apache/axis2/wsdl/template/java/
xmlbeans/test/org/apache/axis2/xmlbeans/
Author: ajith
Date: Tue Jul 18 21:01:23 2006
New Revision: 423359
URL: http://svn.apache.org/viewvc?rev=423359&view=rev
Log:
1. Removed the "document" and "rpc" checks from the InterfaceImplementationTemplate.xsl
2. Fixed a minor problem with the MessageReceiverTemplate.xsl
3. Removed the comments from SkeletonInterfaceTemplate.xsl
4. Fixed the compiling issue of the WSDL2Java test and exploded the tests over 13 test classes
Added:
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java10Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java11Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java12Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java13Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java1Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java2Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java3Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java4Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java5Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java6Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java7Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java8Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java9Test.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaFailureTestBase.java
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java
- copied, changed from r423041, webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaTest.java
Removed:
webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaTest.java
Modified:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JiBXExtension.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JiBXExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JiBXExtension.java?rev=423359&r1=423358&r2=423359&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JiBXExtension.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JiBXExtension.java Tue Jul 18 21:01:23 2006
@@ -84,7 +84,7 @@
Method method = clazz.getMethod(BINDING_MAP_METHOD,
new Class[] { String.class, HashMap.class, boolean.class });
TypeMapper mapper = (TypeMapper)method.invoke(null,
- new Object[] { path, defsmap, new Boolean(unwrap) });
+ new Object[] { path, defsmap, Boolean.valueOf(unwrap) });
// set the type mapper to the config
configuration.setTypeMapper(mapper);
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=423359&r1=423358&r2=423359&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Tue Jul 18 21:01:23 2006
@@ -361,7 +361,7 @@
<xsl:choose>
<xsl:when test="$style='document' or $style='rpc'">
java.lang.Object object = fromOM(
- getElement(_returnEnv,"<xsl:value-of select="$style"/>"),
+ _returnEnv.getBody().getFirstElement() ,
<xsl:value-of select="$outputtype"/>.class,
getEnvelopeNamespaces(_returnEnv));
_messageContext.getTransportOut().getSender().cleanup(_messageContext);
@@ -559,8 +559,7 @@
_operationClient.setCallback(new org.apache.axis2.client.async.Callback() {
public void onComplete(
org.apache.axis2.client.async.AsyncResult result) {
- java.lang.Object object = fromOM(getElement(
- result.getResponseEnvelope(), "document"),
+ java.lang.Object object = fromOM(result.getResponseEnvelope().getBody().getFirstElement(),
<xsl:value-of select="$outputtype"/>.class,
getEnvelopeNamespaces(result.getResponseEnvelope())
);
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl?rev=423359&r1=423358&r2=423359&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl Tue Jul 18 21:01:23 2006
@@ -82,16 +82,17 @@
<xsl:variable name="inputtype" select="input/param[@location='body' and @type!='']/@type"/>
- <xsl:value-of select="$inputtype"/> wrappedParam =
+
+
+ <xsl:choose>
+ <xsl:when test="$inputcount=1">
+ <xsl:value-of select="$inputtype"/> wrappedParam =
(<xsl:value-of select="$inputtype"/>)fromOM(
msgContext.getEnvelope().getBody().getFirstElement(),
<xsl:value-of select="$inputtype"/>.class,
getEnvelopeNamespaces(msgContext.getEnvelope()));
-
- <xsl:choose>
- <xsl:when test="$inputcount=1">
<!-- Even when the parameters are 1 we have to see whether we have the
- wrapped parameters -->
+ wrapped parameters -->
<xsl:variable name="inputWrappedCount" select="count(input/param[@location='body' and @type!='']/param)"/>
<xsl:choose>
<xsl:when test="$inputWrappedCount > 0">
@@ -198,7 +199,7 @@
<!-- end of template for in-out message receiver -->
<!-- start of in-only -->
- <xsl:template match="interface[@basereceiver='org.apache.axis2.receivers.AbstractInMessageReceiver']">
+ <xsl:template match="/interface[@basereceiver='org.apache.axis2.receivers.AbstractInMessageReceiver']">
<xsl:variable name="skeletonname"><xsl:value-of select="@skeletonname"/></xsl:variable>
<xsl:variable name="dbsupportpackage"><xsl:value-of select="@dbsupportpackage"/></xsl:variable>
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl?rev=423359&r1=423358&r2=423359&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/SkeletonInterfaceTemplate.xsl Tue Jul 18 21:01:23 2006
@@ -19,10 +19,6 @@
java method -->
/**
* Auto generated method signature
- <!-- select only the body parameters -->
- <xsl:for-each select="input/param[@location='body']">
- <xsl:if test="@type!=''">* @param <xsl:value-of select="@name"></xsl:value-of><xsl:text>
- </xsl:text></xsl:if></xsl:for-each>
*/
public <xsl:if test="$count=0 or $outputtype=''">void</xsl:if><xsl:if test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:if><xsl:text> </xsl:text><xsl:value-of select="@name"/>
(
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java10Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java10Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java10Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java10Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java10Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "mtomecho.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java11Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java11Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java11Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java11Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java11Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "mtomecho.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java12Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java12Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java12Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java12Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,31 @@
+package org.apache.axis2.xmlbeans;
+
+import org.apache.axis2.wsdl.codegen.CodeGenerationException;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Test for the WSDL that's unreferenced type
+ */
+public class WSDL2Java12Test extends WSDL2JavaFailureTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "unreferenced.wsdl";
+ super.setUp();
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java13Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java13Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java13Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java13Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,34 @@
+package org.apache.axis2.xmlbeans;
+
+import org.apache.axis2.wsdl.codegen.CodeGenerationException;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Test for the modified ping-unboond wsdl.
+ * The binding is removed in this wsdl.Codegen should fail for this
+ * WSDL by saying no binding!
+ *
+ */
+public class WSDL2Java13Test extends WSDL2JavaFailureTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "ping-unbound.wsdl";
+ super.setUp();
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java1Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java1Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java1Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java1Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,26 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java1Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "wsat.wsdl";
+ super.setUp();
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java2Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java2Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java2Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java2Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,33 @@
+package org.apache.axis2.xmlbeans;
+
+import org.apache.axis2.wsdl.codegen.CodeGenerationException;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Test for the WSDL that's missing a service
+ * Since we do not permit the clients to be generated when
+ * service is missing, we should get an error
+ */
+public class WSDL2Java2Test extends WSDL2JavaFailureTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "no-service.wsdl";
+ super.setUp();
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java3Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java3Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java3Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java3Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java3Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "headers.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java4Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java4Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java4Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java4Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java4Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "ping.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java5Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java5Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java5Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java5Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java5Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "interoptestdoclitparameters.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java6Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java6Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java6Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java6Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java6Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "mime-doc.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java7Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java7Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java7Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java7Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java7Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "interoptestdoclit.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java8Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java8Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java8Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java8Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java8Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "simple-doc-literal.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java9Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java9Test.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java9Test.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2Java9Test.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,25 @@
+package org.apache.axis2.xmlbeans;
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class WSDL2Java9Test extends WSDL2JavaSuccessTestBase {
+
+ protected void setUp() throws Exception {
+ this.wsdlFileName = "complex-doc-literal.wsdl";
+ super.setUp();
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaFailureTestBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaFailureTestBase.java?rev=423359&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaFailureTestBase.java (added)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaFailureTestBase.java Tue Jul 18 21:01:23 2006
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.xmlbeans;
+
+import junit.framework.TestCase;
+import org.apache.axis2.wsdl.codegen.CodeGenerationEngine;
+import org.apache.axis2.wsdl.codegen.CodeGenerationException;
+import org.apache.axis2.wsdl.util.CommandLineOption;
+import org.apache.axis2.wsdl.util.CommandLineOptionConstants;
+import org.apache.axis2.wsdl.util.CommandLineOptionParser;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.taskdefs.Javac;
+import org.apache.tools.ant.types.Path;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+public abstract class WSDL2JavaFailureTestBase extends WSDL2JavaSuccessTestBase{
+
+ public void testWSDLFile() {
+ try {
+ generateAndCompile(wsdlFileName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
+ fail("Undesired behavior while code generating!");
+ } catch (CodeGenerationException e) {
+ //we are ok here
+ }
+ }
+
+
+
+}
Copied: webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java (from r423041, webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaTest.java)
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java?p2=webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java&p1=webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaTest.java&r1=423041&r2=423359&rev=423359&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaTest.java (original)
+++ webservices/axis2/trunk/java/modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java Tue Jul 18 21:01:23 2006
@@ -32,11 +32,11 @@
import java.util.HashMap;
import java.util.Map;
-public class WSDL2JavaTest extends TestCase{
+public abstract class WSDL2JavaSuccessTestBase extends TestCase{
public static final String OUTPUT_LOCATION_BASE = "./out_put_classes";
public static final String OUTPUT_LOCATION_PREFIX = "/test";
- private static int folderCount = 0;
+ protected static int folderCount = 0;
// public static final String OUTPUT_LOCATION_BASE = "C:\\GeneratedCode\\test4\\src";
public static final String WSDL_BASE_DIR = "test-resources/";
public static final String CLASSES_DIR = "/target/classes/";
@@ -44,6 +44,7 @@
private static final String MODULE_PATH_PREFIX = "../modules/";
private static final String COMPILE_TARGET_NAME = "compile";
+ protected String wsdlFileName;
/**
* Make the root output directory
@@ -90,76 +91,19 @@
return dir.delete();
}
- /**
- * Test for the WSAT wsdl
- */
- public void testCodeGenerationWSAT(){
- String wsdlName = "wsat.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- e.printStackTrace();
- fail("Exception while code generation test! " + wsdlName + e.getMessage());
- }
- }
- /**
- * Test for the WSDL that's missing a service
- * Since we do noit permit the clients to be generated when
- * service is missing, we should get an error
- */
- public void testCodeGenerationNoService(){
-
- try {
- String wsdlName = "no-service.wsdl";
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- fail("Undesired behavior while code generating!");
+ public void testWSDLFile(){
+ try {
+ generateAndCompile(wsdlFileName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
} catch (CodeGenerationException e) {
- //done - we are good if we reach here
+ fail("Exception while code generation test! " + wsdlFileName + e.getMessage());
}
- }
- /**
- * Test for the Headers
- */
- public void testCodeGenerationHeaders(){
- String wsdlName = "headers.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! "+ wsdlName + e.getMessage());
- }
}
- /**
- * Test for the ping WSDL
- */
- public void testCodeGenerationPing(){
- String wsdlName = "ping.wsdl";
- try {
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! "+wsdlName+ e.getMessage());
- }
- }
- /**
- * Test for the interoptestdoclitparameters
- */
- public void testCodeGenerationInteropTestDocLitParams(){
- String wsdlName = "interoptestdoclitparameters.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! "+wsdlName+ e.getMessage());
- }
- }
-
// /**
// * Test for the sales rank and price!
// */
@@ -171,31 +115,6 @@
// }
// }
- /**
- * Test for the mime doc
- */
- public void testCodeGenerationMimeDoc(){
- String wsdlName = "mime-doc.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! "+ wsdlName + e.getMessage());
- }
- }
-
- /**
- * Test for the mime doc
- */
- public void testCodeGenerationUnreferenced(){
- String wsdlName = "unreferenced.wsdl";
- try {
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- fail("Code generation should fail with "+ wsdlName);
- } catch (CodeGenerationException e) {
-
- }
- }
// /**
// * Test for the dime doc
@@ -208,18 +127,6 @@
// fail("Exception while code generation test!"+ e.getMessage());
// }
// }
- /**
- * Test for the wscoor.wsdl
- */
- public void testCodeGenerationWSCOOR(){
- String wsdlName = "interoptestdoclit.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! " + wsdlName + e.getMessage());
- }
- }
/**
* Test for the modified ping wsdl. it will be the test for the detached schema with only an import
@@ -234,63 +141,6 @@
// }
// }
- /**
- * Test for the modified ping-unboond wsdl.
- * The binding is removed in this wsdl.Codegen should fail for this
- * WSDL by saying no binding!
- *
- */
- public void testCodeGenerationPingUnbound(){
-
- try {
- generateAndCompile("ping-unbound.wsdl", OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- fail("Undesired behavior while code generating!");
- } catch (CodeGenerationException e) {
- //we are good
- }
- }
-
- /**
- * Test for the simple doc lit from Axis 1
- *
- */
- public void testCodeGenerationSimpleDocLiteral(){
- String wsdlName = "simple-doc-literal.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test !" + wsdlName + e.getMessage());
- }
- }
-
- /**
- * Test for the simple doc lit from Axis 1
- *
- */
- public void testCodeGenerationComplexDocLiteral(){
- String wsdlName = "complex-doc-literal.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! "+wsdlName+ e.getMessage());
- }
- }
- /**
- * Test for the mtom echo wsdl. This wsdl contains a restriction based on xmime and a
- * SOAP 1.2 binding
- *
- */
- public void testCodeGenerationMTOMEcho(){
- String wsdlName = "mtomecho.wsdl";
- try {
-
- generateAndCompile(wsdlName, OUTPUT_LOCATION_BASE+OUTPUT_LOCATION_PREFIX+folderCount++);
- } catch (CodeGenerationException e) {
- fail("Exception while code generation test! "+wsdlName+ e.getMessage());
- }
- }
/**
*
@@ -298,12 +148,9 @@
* @param outputLocation
* @throws CodeGenerationException
*/
- private void generateAndCompile(String wsdlName, String outputLocation) throws CodeGenerationException {
+ protected void generateAndCompile(String wsdlName, String outputLocation) throws CodeGenerationException {
codeGenerate(WSDL_BASE_DIR + wsdlName,outputLocation);
- //todo - Still the compilation fails (the original problem of the java.home was settled by setting fork
- //todo - to true). Now the compiler fails for some unknown reason (inside maven! works fine in the IDE though)
-
- //compile(outputLocation);
+ compile(outputLocation);
}
/**
@@ -363,11 +210,7 @@
//output the classes into the output dir as well
javaCompiler.setDestdir(outputLocationFile);
javaCompiler.setVerbose(true);
- try {
- codeGenProject.executeTarget(COMPILE_TARGET_NAME);
- } catch (BuildException e) {
- fail();
- }
+ javaCompiler.execute();
}
@@ -413,6 +256,7 @@
CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_ALL_OPTION,
new CommandLineOption(CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_ALL_OPTION,
new String[0]));
+
//todo Make this work
//test case option is on
// optionMap.put(
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org