You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/03/21 03:28:50 UTC
svn commit: r639519 [1/3] - in /incubator/cxf/trunk: ./
api/src/main/java/org/apache/cxf/wsdl/
common/common/src/main/java/org/apache/cxf/common/classloader/
common/common/src/main/java/org/apache/cxf/common/xmlschema/
distribution/src/main/release/bin...
Author: dkulp
Date: Thu Mar 20 19:28:42 2008
New Revision: 639519
URL: http://svn.apache.org/viewvc?rev=639519&view=rev
Log:
[CXF-1441] Start adding type_tests for CORBA
Add command line tools for corba stuff
Update all the unix scripts to work in a src checkout directly from distribution/src/main/release/bin
Update corba tools to use wsdlmanager for wsdl retrieval (first step of getting catalog support)
Added:
incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl (with props)
incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl.bat (with props)
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba (with props)
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba.bat (with props)
incubator/cxf/trunk/maven-plugins/pom.xml (with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitClientTypeTest.java (with props)
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/corba/CORBADocLitServerImpl.java (with props)
incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/
incubator/cxf/trunk/systests/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl (with props)
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java
incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
incubator/cxf/trunk/distribution/src/main/release/bin/java2js (contents, props changed)
incubator/cxf/trunk/distribution/src/main/release/bin/java2ws (contents, props changed)
incubator/cxf/trunk/distribution/src/main/release/bin/mc
incubator/cxf/trunk/distribution/src/main/release/bin/mc.bat (props changed)
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2js
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap
incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml
incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator
incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl
incubator/cxf/trunk/maven-plugins/corba/ (props changed)
incubator/cxf/trunk/maven-plugins/corba/pom.xml
incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLOption.java
incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLPlugin.java
incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLOption.java
incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLPlugin.java
incubator/cxf/trunk/pom.xml
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
incubator/cxf/trunk/systests/pom.xml
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/WSDLUtils.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/common/toolspec/toolspecs/wsdl2idl.xml
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaBinding.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaProcessor.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToIDLAction.java
incubator/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToProcessor.java
Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLManager.java Thu Mar 20 19:28:42 2008
@@ -106,4 +106,11 @@
*/
void putSchemasForDefinition(Definition wsdl, ServiceSchemaInfo schemas);
+
+ /**
+ * If the definition is cached, remove it from the cache
+ * @param wsdl
+ */
+ void removeDefinition(Definition wsdl);
+
}
Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/classloader/ClassLoaderUtils.java Thu Mar 20 19:28:42 2008
@@ -48,9 +48,19 @@
*/
public static URL getResource(String resourceName, Class callingClass) {
URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
+ if (url == null && resourceName.startsWith("/")) {
+ //certain classloaders need it without the leading /
+ url = Thread.currentThread().getContextClassLoader()
+ .getResource(resourceName.substring(1));
+ }
if (url == null) {
url = ClassLoaderUtils.class.getClassLoader().getResource(resourceName);
+ }
+ if (url == null && resourceName.startsWith("/")) {
+ //certain classloaders need it without the leading /
+ url = ClassLoaderUtils.class.getClassLoader()
+ .getResource(resourceName.substring(1));
}
if (url == null) {
Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/xmlschema/SchemaCollection.java Thu Mar 20 19:28:42 2008
@@ -73,6 +73,10 @@
}
}
+ public XmlSchemaCollection getXmlSchemaCollection() {
+ return schemaCollection;
+ }
+
public boolean equals(Object obj) {
return schemaCollection.equals(obj);
}
Added: incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl (added)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl Thu Mar 20 19:28:42 2008
@@ -0,0 +1,75 @@
+#
+#
+# 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.
+#
+#
+#!/bin/sh
+# run the Apache CXF wsdl2corba tool
+#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
+
+me=`basename $0`
+cxf_home=$CXF_HOME
+if [ ! -f $cxf_home/lib/cxf-manifest-incubator.jar ]; then
+ cxf_home=`dirname $0`/..
+fi
+
+cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
+
+if [ ! -f $cxf_jar ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
+ echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
+ exit 1
+ else
+ . ${cxf_home}/../../../target/srcbuild_env
+ cxf_jar=${CXF_CLASSPATH}
+ fi
+fi
+
+log_config=$cxf_home/etc/logging.properties
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}
+fi
+
+$JAVA_HOME/bin/java -cp "${cxf_classpath}" -Djava.util.logging.config.file=$log_config org.apache.cxf.tools.corba.IDLToWSDL "$@"
+
+
+
+
+
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl.bat
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl.bat?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl.bat (added)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl.bat Thu Mar 20 19:28:42 2008
@@ -0,0 +1,57 @@
+@echo off
+rem
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied. See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+rem
+rem
+
+rem
+rem invoke the CXF java2js tool
+rem
+@setlocal
+
+if not defined CXF_HOME goto set_cxf_home
+
+:cont
+if not defined JAVA_HOME goto no_java_home
+
+set SUN_TOOL_PATH=%JAVA_HOME%\lib\tools.jar;
+
+if not exist "%CXF_HOME%\lib\cxf-manifest-incubator.jar" goto no_cxf_jar
+
+set CXF_JAR=%CXF_HOME%\lib\cxf-manifest-incubator.jar
+
+"%JAVA_HOME%\bin\java" -cp "%CXF_JAR%;%SUN_TOOL_PATH%;%CLASSPATH%" -Djava.util.logging.config.file="%CXF_HOME%\etc\logging.properties" org.apache.cxf.tools.corba.IDLToWSDL %*
+
+@endlocal
+
+goto end
+
+:no_cxf_jar
+echo ERROR: Unable to find cxf-manifest-incubator.jar in %cxf_home/lib
+goto end
+
+:no_java_home
+echo ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is installed
+goto end
+
+:set_cxf_home
+set CXF_HOME=%~dp0..
+goto cont
+
+:end
\ No newline at end of file
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/idl2wsdl.bat
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/java2js
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/java2js?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/java2js (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/java2js Thu Mar 20 19:28:42 2008
@@ -45,11 +45,11 @@
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/java2js
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/java2ws
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/java2ws?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/java2ws (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/java2ws Thu Mar 20 19:28:42 2008
@@ -45,11 +45,11 @@
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/java2ws
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/mc
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/mc?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/mc (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/mc Thu Mar 20 19:28:42 2008
@@ -43,11 +43,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/mc.bat
('svn:executable' removed)
Added: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba (added)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba Thu Mar 20 19:28:42 2008
@@ -0,0 +1,75 @@
+#
+#
+# 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.
+#
+#
+#!/bin/sh
+# run the Apache CXF wsdl2corba tool
+#
+# Check for irritating 'operating systems'.
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
+
+me=`basename $0`
+cxf_home=$CXF_HOME
+if [ ! -f $cxf_home/lib/cxf-manifest-incubator.jar ]; then
+ cxf_home=`dirname $0`/..
+fi
+
+cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
+
+if [ ! -f $cxf_jar ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
+ echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
+ exit 1
+ else
+ . ${cxf_home}/../../../target/srcbuild_env
+ cxf_jar=${CXF_CLASSPATH}
+ fi
+fi
+
+log_config=$cxf_home/etc/logging.properties
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ cxf_classpath=`cygpath --$format "${cxf_jar}"`
+ if [ ! -z "${CLASSPATH}" ]; then
+ cxf_classpath=${cxf_classpath}\;`cygpath --$format --path "${CLASSPATH}"`
+ fi
+ log_config=`cygpath --$format "$log_config"`
+else
+ cxf_classpath=${cxf_jar}:${CLASSPATH}
+fi
+
+$JAVA_HOME/bin/java -cp "${cxf_classpath}" -Djava.util.logging.config.file=$log_config org.apache.cxf.tools.corba.WSDLToIDL "$@"
+
+
+
+
+
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba.bat
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba.bat?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba.bat (added)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba.bat Thu Mar 20 19:28:42 2008
@@ -0,0 +1,58 @@
+@echo off
+rem
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements. See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership. The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied. See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+rem
+rem
+
+rem
+rem invoke the Apache CXF wsdl2java tool
+rem
+@setlocal
+
+if not defined CXF_HOME goto set_cxf_home
+
+:cont
+if not defined JAVA_HOME goto no_java_home
+
+set SUN_TOOL_PATH=%JAVA_HOME%\lib\tools.jar;
+
+if not exist "%CXF_HOME%\lib\cxf-manifest-incubator.jar" goto no_cxf_jar
+
+set CXF_JAR=%CXF_HOME%\lib\cxf-manifest-incubator.jar
+
+
+"%JAVA_HOME%\bin\java" -cp "%CXF_JAR%;%SUN_TOOL_PATH%;%CLASSPATH%" -Djava.util.logging.config.file="%CXF_HOME%\etc\logging.properties" org.apache.cxf.tools.corba.WSDLToIDL %*
+
+@endlocal
+
+goto end
+
+:no_cxf_jar
+echo ERROR: Unable to find cxf-manifest-incubator.jar in %cxf_home/lib
+goto end
+
+:no_java_home
+echo ERROR: Set JAVA_HOME to the path where the J2SE 5.0 (JDK5.0) is installed
+goto end
+
+:set_cxf_home
+set CXF_HOME=%~dp0..
+goto cont
+
+:end
Propchange: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2corba.bat
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2java Thu Mar 20 19:28:42 2008
@@ -42,11 +42,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2js
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2js?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2js (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2js Thu Mar 20 19:28:42 2008
@@ -42,11 +42,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2service Thu Mar 20 19:28:42 2008
@@ -43,11 +43,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2soap Thu Mar 20 19:28:42 2008
@@ -41,11 +41,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdl2xml Thu Mar 20 19:28:42 2008
@@ -41,11 +41,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/wsdlvalidator Thu Mar 20 19:28:42 2008
@@ -42,11 +42,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Modified: incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl (original)
+++ incubator/cxf/trunk/distribution/src/main/release/bin/xsd2wsdl Thu Mar 20 19:28:42 2008
@@ -42,11 +42,11 @@
cxf_jar=$cxf_home/lib/cxf-manifest-incubator.jar
if [ ! -f $cxf_jar ]; then
- if [ ! -f ${cxf_home}/../../target/srcbuild_env ]; then
+ if [ ! -f ${cxf_home}/../../../target/srcbuild_env ]; then
echo "ERROR: Unable to find cxf-manifest-incubator.jar in $cxf_home/lib"
exit 1
else
- . ${cxf_home}/../../target/srcbuild_env
+ . ${cxf_home}/../../../target/srcbuild_env
cxf_jar=${CXF_CLASSPATH}
fi
fi
Propchange: incubator/cxf/trunk/maven-plugins/corba/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Mar 20 19:28:42 2008
@@ -0,0 +1,10 @@
+.pmd
+.checkstyle
+.ruleset
+target
+eclipse-classes
+.settings
+.classpath
+.project
+.wtpmodules
+
Modified: incubator/cxf/trunk/maven-plugins/corba/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/corba/pom.xml?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/corba/pom.xml (original)
+++ incubator/cxf/trunk/maven-plugins/corba/pom.xml Thu Mar 20 19:28:42 2008
@@ -17,92 +17,58 @@
* specific language governing permissions and limitations
* under the License.
-->
-<project>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>yoko-maven-plugins</artifactId>
- <name>Apache Yoko Maven plugins</name>
- <packaging>maven-plugin</packaging>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-corbatools-maven-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>2.1-incubator-SNAPSHOT</version>
+ <name>Apache CXF CORBA Tools Maven2 Plugins</name>
+ <url>http://cwiki.apache.org/CXF</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-parent</artifactId>
+ <version>2.1-incubator-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-tools-corba</artifactId>
+ <version>${project.version}</version>
+ </dependency>
- <parent>
- <groupId>org.apache.yoko</groupId>
- <artifactId>yoko</artifactId>
- <version>1.0-incubating-SNAPSHOT</version>
- </parent>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.yoko</groupId>
- <artifactId>yoko-tools</artifactId>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </dependency>
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-clover-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-pmd-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
-
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/yoko/trunk/maven-plugins</connection>
- <developerConnection>scm:svn:https://${maven.username}@svn.apache.org/repos/asf/incubator/yoko/trunk/maven-plugins</developerConnection>
- <url>http://svn.apache.org/viewvc/incubator/yoko/trunk/maven-plugins</url>
- </scm>
+ </dependencies>
</project>
Modified: incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLOption.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLOption.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLOption.java (original)
+++ incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLOption.java Thu Mar 20 19:28:42 2008
@@ -1,19 +1,20 @@
/**
+ * 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
*
- * 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
*
- * 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.
+ * 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.yoko.maven.plugins;
Modified: incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLPlugin.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLPlugin.java (original)
+++ incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/IDLToWSDLPlugin.java Thu Mar 20 19:28:42 2008
@@ -1,19 +1,20 @@
/**
+ * 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
*
- * 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
*
- * 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.
+ * 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.yoko.maven.plugins;
@@ -22,16 +23,15 @@
import java.util.ArrayList;
import java.util.List;
+import org.apache.cxf.tools.corba.IDLToWSDL;
+
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.tools.ant.ExitException;
-import org.apache.tools.ant.util.optional.NoExitSecurityManager;
-import org.apache.yoko.tools.IDLToWSDL;
/**
- * @goal idltowsdl
- * @description Yoko IDL To WSDL Tool
+ * @goal idl2wsdl
+ * @description CXF IDL To WSDL Tool
*/
public class IDLToWSDLPlugin extends AbstractMojo {
@@ -51,8 +51,6 @@
File outputDirFile = new File(outputDir);
outputDirFile.mkdirs();
- boolean result = true;
-
if (idltowsdlOptions == null) {
throw new MojoExecutionException("Please specify the idltowsdl options");
}
@@ -74,26 +72,13 @@
list.add(outputDir);
list.addAll(idltowsdlOptions[x].getExtraargs());
list.add(idltowsdlOptions[x].getIDL());
- SecurityManager oldSm = System.getSecurityManager();
try {
- try {
- System.setSecurityManager(new NoExitSecurityManager());
- IDLToWSDL.main((String[])list.toArray(new String[list.size()]));
- doneFile.delete();
- doneFile.createNewFile();
- } catch (ExitException e) {
- if (e.getStatus() == 0) {
- doneFile.delete();
- doneFile.createNewFile();
- } else {
- throw e;
- }
- }
+ IDLToWSDL.run((String[])list.toArray(new String[list.size()]));
+ doneFile.delete();
+ doneFile.createNewFile();
} catch (Throwable e) {
e.printStackTrace();
throw new MojoExecutionException(e.getMessage(), e);
- } finally {
- System.setSecurityManager(oldSm);
}
}
}
Modified: incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLOption.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLOption.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLOption.java (original)
+++ incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLOption.java Thu Mar 20 19:28:42 2008
@@ -1,19 +1,20 @@
/**
+ * 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
*
- * 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
*
- * 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.
+ * 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.yoko.maven.plugins;
Modified: incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLPlugin.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLPlugin.java (original)
+++ incubator/cxf/trunk/maven-plugins/corba/src/main/java/org/apache/yoko/maven/plugins/WSDLToIDLPlugin.java Thu Mar 20 19:28:42 2008
@@ -1,37 +1,47 @@
/**
+ * 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
*
- * 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
*
- * 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.
+ * 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.yoko.maven.plugins;
import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.tools.corba.WSDLToIDL;
+import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.tools.ant.ExitException;
-import org.apache.tools.ant.util.optional.NoExitSecurityManager;
+import org.apache.maven.project.MavenProject;
-import org.apache.yoko.tools.WSDLToIDL;
/**
- * @goal wsdltoidl
- * @description Yoko WSDL To IDL Tool
+ * @goal wsdl2idl
+ * @requiresDependencyResolution test
+ * @description CXF WSDL To IDL Tool
*/
public class WSDLToIDLPlugin extends AbstractMojo {
@@ -39,72 +49,132 @@
* @parameter expression="${project.build.directory}/generated/src/main/java"
* @required
*/
- String outputDir;
+ File outputDir;
/**
* @parameter
*/
WSDLToIDLOption wsdltoidlOptions[];
-
+
+ /**
+ * @parameter expression="${project}"
+ * @required
+ */
+ MavenProject project;
+
+ /**
+ * Use the compile classpath rather than the test classpath for execution
+ * useful if the test dependencies clash with those of wsdl2java
+ * @parameter expression="${cxf.useCompileClasspath}" default-value="false"
+ */
+ boolean useCompileClasspath;
public void execute() throws MojoExecutionException {
- File outputDirFile = new File(outputDir);
- outputDirFile.mkdirs();
-
- boolean result = true;
+ outputDir.mkdirs();
if (wsdltoidlOptions == null) {
throw new MojoExecutionException("Please specify the wsdltoidl options");
}
- for (int x = 0; x < wsdltoidlOptions.length; x++) {
- File file = new File(wsdltoidlOptions[x].getWSDL());
- File doneFile = new File(outputDirFile, "." + file.getName() + ".DONE");
-
- boolean doWork = file.lastModified() > doneFile.lastModified();
- if (!doneFile.exists()) {
- doWork = true;
- } else if (file.lastModified() > doneFile.lastModified()) {
- doWork = true;
- }
+
+ List<URL> urlList = new ArrayList<URL>();
+ StringBuffer buf = new StringBuffer();
- if (doWork) {
- List<Object> list = new ArrayList<Object>();
- list.add("-d");
- list.add(outputDir);
- if (wsdltoidlOptions[x].isCorbaEnabled()) {
- list.add("-corba");
- }
- if (wsdltoidlOptions[x].isIdlEnabled()) {
- list.add("-idl");
+ try {
+ urlList.add(outputDir.toURI().toURL());
+ } catch (MalformedURLException e) {
+ //ignore
+ }
+
+ buf.append(outputDir.getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+
+
+ List artifacts = useCompileClasspath ? project.getCompileArtifacts() : project.getTestArtifacts();
+ for (Artifact a : CastUtils.cast(artifacts, Artifact.class)) {
+ try {
+ if (a.getFile() != null
+ && a.getFile().exists()) {
+ urlList.add(a.getFile().toURI().toURL());
+ buf.append(a.getFile().getAbsolutePath());
+ buf.append(File.pathSeparatorChar);
+ //System.out.println(" " + a.getFile().getAbsolutePath());
}
- if (wsdltoidlOptions[x].getExtraargs() != null) {
- list.addAll(wsdltoidlOptions[x].getExtraargs());
+ } catch (MalformedURLException e) {
+ //ignore
+ }
+ }
+
+ ClassLoader origContext = Thread.currentThread().getContextClassLoader();
+ URLClassLoader loader = new URLClassLoader(urlList.toArray(new URL[urlList.size()]),
+ origContext);
+ String newCp = buf.toString();
+
+ //with some VM's, creating an XML parser (which we will do to parse wsdls)
+ //will set some system properties that then interferes with mavens
+ //dependency resolution. (OSX is the major culprit here)
+ //We'll save the props and then set them back later.
+ Map<Object, Object> origProps = new HashMap<Object, Object>(System.getProperties());
+
+ String cp = System.getProperty("java.class.path");
+
+ try {
+ Thread.currentThread().setContextClassLoader(loader);
+ System.setProperty("java.class.path", newCp);
+
+ for (int x = 0; x < wsdltoidlOptions.length; x++) {
+ File file = new File(wsdltoidlOptions[x].getWSDL());
+ File doneFile = new File(outputDir, "." + file.getName() + ".DONE");
+
+ boolean doWork = file.lastModified() > doneFile.lastModified();
+ if (!doneFile.exists()) {
+ doWork = true;
+ } else if (file.lastModified() > doneFile.lastModified()) {
+ doWork = true;
}
- list.add(wsdltoidlOptions[x].getWSDL());
- SecurityManager oldSm = System.getSecurityManager();
- try {
+
+ if (doWork) {
+ List<String> list = new ArrayList<String>();
+ list.add("-d");
+ list.add(outputDir.getAbsolutePath());
+ if (wsdltoidlOptions[x].isCorbaEnabled()) {
+ list.add("-corba");
+ }
+ if (wsdltoidlOptions[x].isIdlEnabled()) {
+ list.add("-idl");
+ }
+ if (wsdltoidlOptions[x].getExtraargs() != null) {
+ list.addAll(wsdltoidlOptions[x].getExtraargs());
+ }
+ list.add(wsdltoidlOptions[x].getWSDL());
try {
- System.setSecurityManager(new NoExitSecurityManager());
- WSDLToIDL.main((String[])list.toArray(new String[list.size()]));
+ WSDLToIDL.run((String[])list.toArray(new String[list.size()]));
doneFile.delete();
doneFile.createNewFile();
- } catch (ExitException e) {
- if (e.getStatus() == 0) {
- doneFile.delete();
- doneFile.createNewFile();
- } else {
- throw e;
- }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ throw new MojoExecutionException(e.getMessage(), e);
}
- } catch (Throwable e) {
- e.printStackTrace();
- throw new MojoExecutionException(e.getMessage(), e);
- } finally {
- System.setSecurityManager(oldSm);
}
}
+ } finally {
+ //cleanup as much as we can.
+ Bus bus = BusFactory.getDefaultBus(false);
+ if (bus != null) {
+ bus.shutdown(true);
+ }
+ Thread.currentThread().setContextClassLoader(origContext);
+ System.setProperty("java.class.path", cp);
+
+ Map<Object, Object> newProps = new HashMap<Object, Object>(System.getProperties());
+ for (Object o : newProps.keySet()) {
+ if (!origProps.containsKey(o)) {
+ System.clearProperty(o.toString());
+ }
+ }
+ System.getProperties().putAll(origProps);
}
+
}
}
Added: incubator/cxf/trunk/maven-plugins/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/maven-plugins/pom.xml?rev=639519&view=auto
==============================================================================
--- incubator/cxf/trunk/maven-plugins/pom.xml (added)
+++ incubator/cxf/trunk/maven-plugins/pom.xml Thu Mar 20 19:28:42 2008
@@ -0,0 +1,42 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-maven-plugins</artifactId>
+ <packaging>pom</packaging>
+ <version>2.1-incubator-SNAPSHOT</version>
+ <name>Apache CXF Maven Plugins</name>
+ <url>http://cwiki.apache.org/CXF</url>
+
+ <parent>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf</artifactId>
+ <version>2.1-incubator-SNAPSHOT</version>
+ </parent>
+
+ <modules>
+ <module>codegen-plugin</module>
+ <module>java2ws-plugin</module>
+ <module>corba</module>
+ <module>archetypes</module>
+ <module>eclipse-plugin-generator</module>
+ </modules>
+
+</project>
Propchange: incubator/cxf/trunk/maven-plugins/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/maven-plugins/pom.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/maven-plugins/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: incubator/cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/pom.xml?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/pom.xml (original)
+++ incubator/cxf/trunk/pom.xml Thu Mar 20 19:28:42 2008
@@ -134,12 +134,8 @@
<module>testutils</module>
<module>rt</module>
<module>integration</module>
+ <module>maven-plugins</module>
<module>systests</module>
- <module>maven-plugins/codegen-plugin</module>
- <module>maven-plugins/java2ws-plugin</module>
- <module>maven-plugins/archetypes</module>
- <module>maven-plugins/eclipse-plugin-generator</module>
-
</modules>
Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Thu Mar 20 19:28:42 2008
@@ -21,8 +21,10 @@
import java.io.IOException;
import java.net.URL;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.StringTokenizer;
@@ -266,6 +268,23 @@
*/
public void setDisableSchemaCache(boolean disableSchemaCache) {
this.disableSchemaCache = disableSchemaCache;
+ }
+
+ public void removeDefinition(Definition wsdl) {
+ synchronized (definitionsMap) {
+ List<Object> keys = new ArrayList<Object>();
+ for (Map.Entry<Object, Definition> e : definitionsMap.entrySet()) {
+ if (e.getValue() == wsdl) {
+ keys.add(e.getKey());
+ }
+ }
+ for (Object o : keys) {
+ definitionsMap.remove(o);
+ }
+ }
+ synchronized (schemaCacheMap) {
+ schemaCacheMap.remove(wsdl);
+ }
}
}
Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Thu Mar 20 19:28:42 2008
@@ -158,6 +158,7 @@
List<Definition> defList = new ArrayList<Definition>();
defList.add(d);
parseImports(d, defList);
+ WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);
for (Definition def : defList) {
for (Iterator ite = def.getPortTypes().entrySet().iterator(); ite.hasNext();) {
@@ -180,6 +181,12 @@
service.setDescription(description);
service.setProperty(WSDL_DEFINITION, def);
getSchemas(def, service);
+ if (wsdlManager != null) {
+ ServiceSchemaInfo serviceSchemaInfo = new ServiceSchemaInfo();
+ serviceSchemaInfo.setSchemaCollection(service.getXmlSchemaCollection());
+ serviceSchemaInfo.setSchemaInfoList(service.getSchemas());
+ wsdlManager.putSchemasForDefinition(def, serviceSchemaInfo);
+ }
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
serviceList.add(service);
@@ -204,6 +211,15 @@
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
buildInterface(service, p);
+
+ getSchemas(def, service);
+ WSDLManager wsdlManager = bus.getExtension(WSDLManager.class);
+ if (wsdlManager != null) {
+ ServiceSchemaInfo serviceSchemaInfo = new ServiceSchemaInfo();
+ serviceSchemaInfo.setSchemaCollection(service.getXmlSchemaCollection());
+ serviceSchemaInfo.setSchemaInfoList(service.getSchemas());
+ wsdlManager.putSchemasForDefinition(def, serviceSchemaInfo);
+ }
return service;
}
Modified: incubator/cxf/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/pom.xml?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/pom.xml (original)
+++ incubator/cxf/trunk/systests/pom.xml Thu Mar 20 19:28:42 2008
@@ -74,7 +74,29 @@
</execution>
</executions>
</plugin>
-
+ <plugin>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-corbatools-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <executions>
+ <execution>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <outputDir>${basedir}/target/generated/src/test/resources/wsdl/type_test_corba/</outputDir>
+ <wsdltoidlOptions>
+ <wsdltoidlOption>
+ <wsdl>${basedir}/src/test/resources/wsdl/type_test_corba/type_test_corba.wsdl</wsdl>
+ <corbabinding>true</corbabinding>
+ </wsdltoidlOption>
+ </wsdltoidlOptions>
+ </configuration>
+ <goals>
+ <goal>wsdl2idl</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
@@ -105,63 +127,6 @@
</dependency>
</dependencies>
</profile>
- <profile>
- <id>test.remoteresources</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-remote-resources-plugin</artifactId>
- <version>1.0-alpha-2-SNAPSHOT</version>
- <executions>
- <execution>
- <id>do-apache-stuff</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <resourceBundles>
- <resourceBundle>org.apache:apache-jar-resource-bundle:1.1-SNAPSHOT</resourceBundle>
- <resourceBundle>org.apache:apache-incubator-disclaimer-resource-bundle:1.0</resourceBundle>
- </resourceBundles>
- <properties>
- <addLicense>true</addLicense>
- </properties>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-jar-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <repositories>
- <repository>
- <id>apache.snapshots</id>
- <name>Apache SNAPSHOT repository</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots />
- <id>apache.snapshots</id>
- <name>Apache Maven Snapshot Repository</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
- </pluginRepository>
- </pluginRepositories>
- </profile>
</profiles>
<dependencies>
<dependency>
@@ -216,6 +181,11 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-soap</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-bindings-corba</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java?rev=639519&r1=639518&r2=639519&view=diff
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java Thu Mar 20 19:28:42 2008
@@ -56,11 +56,15 @@
perfTestOnly = true;
}
+ public boolean shouldRunTest(String name) {
+ return true;
+ }
+
public static void initClient(Class clz, QName serviceName, QName portName, String wsdlPath)
throws Exception {
URL wsdlLocation = clz.getResource(wsdlPath);
assertNotNull("Could not load wsdl " + wsdlPath, wsdlLocation);
- testDocLiteral = wsdlPath.contains("doclit");
+ testDocLiteral = wsdlPath.contains("doclit") || wsdlPath.contains("-corba");
testXMLBinding = wsdlPath.contains("_xml");
if (testXMLBinding) {
org.apache.type_test.xml.XMLService xmlService
@@ -121,6 +125,9 @@
@Test
public void testVoid() throws Exception {
+ if (!shouldRunTest("Void")) {
+ return;
+ }
if (testDocLiteral) {
docClient.testVoid();
} else if (testXMLBinding) {
@@ -132,6 +139,9 @@
@Test
public void testOneway() throws Exception {
+ if (!shouldRunTest("Oneway")) {
+ return;
+ }
String x = "hello";
String y = "oneway";
if (testDocLiteral) {
@@ -145,6 +155,9 @@
@Test
public void testByte() throws Exception {
+ if (!shouldRunTest("Byte")) {
+ return;
+ }
byte valueSets[][] = {{0, 1}, {-1, 0}, {Byte.MIN_VALUE, Byte.MAX_VALUE}};
for (int i = 0; i < valueSets.length; i++) {
@@ -171,6 +184,9 @@
@Test
public void testShort() throws Exception {
+ if (!shouldRunTest("Short")) {
+ return;
+ }
short valueSets[][] = {{0, 1}, {-1, 0}, {Short.MIN_VALUE, Short.MAX_VALUE}};
for (int i = 0; i < valueSets.length; i++) {
@@ -197,6 +213,9 @@
@Test
public void testUnsignedShort() throws Exception {
+ if (!shouldRunTest("UnsignedShort")) {
+ return;
+ }
int valueSets[][] = {{0, 1}, {1, 0}, {0, Short.MAX_VALUE * 2 + 1}};
for (int i = 0; i < valueSets.length; i++) {
@@ -224,6 +243,9 @@
@Test
public void testInt() throws Exception {
+ if (!shouldRunTest("Int")) {
+ return;
+ }
int valueSets[][] = {{5, 10}, {-10, 50}, {Integer.MIN_VALUE, Integer.MAX_VALUE}};
for (int i = 0; i < valueSets.length; i++) {
@@ -250,6 +272,9 @@
@Test
public void testUnsignedInt() throws Exception {
+ if (!shouldRunTest("UnsignedInt")) {
+ return;
+ }
long valueSets[][] = {{11, 20}, {1, 0}, {0, ((long)Integer.MAX_VALUE) * 2 + 1}};
for (int i = 0; i < valueSets.length; i++) {
@@ -277,6 +302,9 @@
@Test
public void testLong() throws Exception {
+ if (!shouldRunTest("Long")) {
+ return;
+ }
long valueSets[][] = {{0, 1}, {-1, 0}, {Long.MIN_VALUE, Long.MAX_VALUE}};
for (int i = 0; i < valueSets.length; i++) {
@@ -303,6 +331,9 @@
@Test
public void testUnsignedLong() throws Exception {
+ if (!shouldRunTest("UnsignedLong")) {
+ return;
+ }
BigInteger valueSets[][] = {{new BigInteger("0"), new BigInteger("1")},
{new BigInteger("1"), new BigInteger("0")},
{new BigInteger("0"),
@@ -332,6 +363,9 @@
@Test
public void testFloat() throws Exception {
+ if (!shouldRunTest("Float")) {
+ return;
+ }
float delta = 0.0f;
float valueSets[][] = {{0.0f, 1.0f}, {-1.0f, (float)java.lang.Math.PI}, {-100.0f, 100.0f},
{Float.NEGATIVE_INFINITY, Float.POSITIVE_INFINITY}, };
@@ -378,6 +412,9 @@
@Test
public void testDouble() throws Exception {
+ if (!shouldRunTest("Double")) {
+ return;
+ }
double delta = 0.0d;
double valueSets[][] = {{0.0f, 1.0f}, {-1, java.lang.Math.PI}, {-100.0, 100.0},
{Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY},
@@ -426,6 +463,9 @@
@Test
public void testUnsignedByte() throws Exception {
+ if (!shouldRunTest("UnsignedByte")) {
+ return;
+ }
short valueSets[][] = {{0, 1}, {1, 0}, {0, Byte.MAX_VALUE * 2 + 1}};
for (int i = 0; i < valueSets.length; i++) {
@@ -453,6 +493,9 @@
@Test
public void testBoolean() throws Exception {
+ if (!shouldRunTest("Boolean")) {
+ return;
+ }
boolean valueSets[][] = {{true, false}, {true, true}, {false, true}, {false, false}};
for (int i = 0; i < valueSets.length; i++) {
@@ -479,6 +522,9 @@
@Test
public void testString() throws Exception {
+ if (!shouldRunTest("String")) {
+ return;
+ }
int bufferSize = 1000;
StringBuffer buffer = new StringBuffer(bufferSize);
StringBuffer buffer2 = new StringBuffer(bufferSize);
@@ -514,6 +560,9 @@
@Test
public void testStringI18N() throws Exception {
+ if (!shouldRunTest("StringI18N")) {
+ return;
+ }
String valueSets[][] = {{"hello", I18NStrings.CHINESE_COMPLEX_STRING},
{"hello", I18NStrings.JAP_SIMPLE_STRING}, };
@@ -541,6 +590,9 @@
@Test
public void testQName() throws Exception {
+ if (!shouldRunTest("QName")) {
+ return;
+ }
String valueSets[][] = {{"NoNamespaceService", ""},
{"HelloWorldService", "http://www.iona.com/services"},
{I18NStrings.JAP_SIMPLE_STRING, "http://www.iona.com/iona"},
@@ -571,6 +623,9 @@
// Revisit When client Fault is ready. Comment should be removed
@Test
public void testDate() throws Exception {
+ if (!shouldRunTest("Date")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar();
@@ -621,6 +676,9 @@
@Test
public void testDateTime() throws Exception {
+ if (!shouldRunTest("DateTime")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar();
@@ -658,6 +716,9 @@
@Test
public void testTime() throws Exception {
+ if (!shouldRunTest("Time")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar();
@@ -693,6 +754,9 @@
@Test
public void testGYear() throws Exception {
+ if (!shouldRunTest("GYear")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar("2004");
@@ -716,6 +780,9 @@
@Test
public void testGYearMonth() throws Exception {
+ if (!shouldRunTest("GYearMonth")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar("2004-08");
@@ -739,6 +806,9 @@
@Test
public void testGMonth() throws Exception {
+ if (!shouldRunTest("GMonth")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x;
@@ -771,6 +841,9 @@
@Test
public void testGMonthDay() throws Exception {
+ if (!shouldRunTest("GMonthDay")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar("--08-21");
@@ -794,6 +867,9 @@
@Test
public void testGDay() throws Exception {
+ if (!shouldRunTest("GDay")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
XMLGregorianCalendar x = datatypeFactory.newXMLGregorianCalendar("---21");
@@ -817,6 +893,9 @@
@Test
public void testDuration() throws Exception {
+ if (!shouldRunTest("Duration")) {
+ return;
+ }
javax.xml.datatype.DatatypeFactory datatypeFactory = javax.xml.datatype.DatatypeFactory.newInstance();
Duration x = datatypeFactory.newDuration("P1Y35DT60M60.500S");
@@ -840,6 +919,9 @@
@Test
public void testNormalizedString() throws Exception {
+ if (!shouldRunTest("NormalizedString")) {
+ return;
+ }
String x = " normalized string ";
String yOrig = " another normalized string ";
@@ -861,6 +943,9 @@
@Test
public void testToken() throws Exception {
+ if (!shouldRunTest("Token")) {
+ return;
+ }
String x = "token";
String yOrig = "another token";
@@ -882,6 +967,9 @@
@Test
public void testLanguage() throws Exception {
+ if (!shouldRunTest("Language")) {
+ return;
+ }
String x = "abc";
String yOrig = "abc-def";
@@ -903,6 +991,9 @@
@Test
public void testNMTOKEN() throws Exception {
+ if (!shouldRunTest("NMTOKEN")) {
+ return;
+ }
String x = "123:abc";
String yOrig = "abc.-_:";
@@ -924,6 +1015,9 @@
@Test
public void testNMTOKENS() throws Exception {
+ if (!shouldRunTest("NMTOKENS")) {
+ return;
+ }
//
// XXX - The jaxb ri code generation produces different method
// signatures for the NMTOKENS type between using rpc literal
@@ -966,6 +1060,9 @@
@Test
public void testName() throws Exception {
+ if (!shouldRunTest("Name")) {
+ return;
+ }
String x = "abc:123";
String yOrig = "abc.-_";
@@ -987,6 +1084,9 @@
@Test
public void testNCName() throws Exception {
+ if (!shouldRunTest("NCName")) {
+ return;
+ }
String x = "abc-123";
String yOrig = "abc.-";
@@ -1008,6 +1108,9 @@
@Test
public void testID() throws Exception {
+ if (!shouldRunTest("ID")) {
+ return;
+ }
// n.b. to be valid, elements with an ID in the response message
// must have a unique ID, so this test does not return x as the
// return value (like the other tests).
@@ -1036,6 +1139,9 @@
@Test
public void testDecimal() throws Exception {
+ if (!shouldRunTest("Decimal")) {
+ return;
+ }
BigDecimal valueSets[][] = {{new BigDecimal("-1234567890.000000"),
new BigDecimal("1234567890.000000")},
{new BigDecimal("-" + String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE)
@@ -1067,6 +1173,9 @@
@Test
public void testInteger() throws Exception {
+ if (!shouldRunTest("Integer")) {
+ return;
+ }
BigInteger valueSets[][] = {{new BigInteger("-1234567890"), new BigInteger("1234567890")},
{new BigInteger("-" + String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE)),
new BigInteger(String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE))}};
@@ -1095,6 +1204,9 @@
@Test
public void testPositiveInteger() throws Exception {
+ if (!shouldRunTest("PositiveInteger")) {
+ return;
+ }
BigInteger valueSets[][] = {{new BigInteger("1"), new BigInteger("1234567890")},
{new BigInteger(String.valueOf(Integer.MAX_VALUE * Integer.MAX_VALUE)),
new BigInteger(String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE))}};
@@ -1123,6 +1235,9 @@
@Test
public void testNonPositiveInteger() throws Exception {
+ if (!shouldRunTest("NonPositiveInteger")) {
+ return;
+ }
BigInteger valueSets[][] = {{new BigInteger("0"), new BigInteger("-1234567890")},
{new BigInteger("-"
+ String.valueOf(Integer.MAX_VALUE * Integer.MAX_VALUE)),
@@ -1152,6 +1267,9 @@
@Test
public void testNegativeInteger() throws Exception {
+ if (!shouldRunTest("NegativeInteger")) {
+ return;
+ }
BigInteger valueSets[][] = {{new BigInteger("-1"), new BigInteger("-1234567890")},
{new BigInteger("-"
+ String.valueOf(Integer.MAX_VALUE * Integer.MAX_VALUE)),
@@ -1181,6 +1299,9 @@
@Test
public void testNonNegativeInteger() throws Exception {
+ if (!shouldRunTest("NonNegativeInteger")) {
+ return;
+ }
BigInteger valueSets[][] = {{new BigInteger("0"),
new BigInteger("1234567890")},
{new BigInteger(String.valueOf(Integer.MAX_VALUE
@@ -1212,6 +1333,9 @@
@Test
public void testHexBinary() throws Exception {
+ if (!shouldRunTest("HexBinary")) {
+ return;
+ }
byte[] x = "hello".getBytes();
Holder<byte[]> y = new Holder<byte[]>("goodbye".getBytes());
Holder<byte[]> yOriginal = new Holder<byte[]>("goodbye".getBytes());
@@ -1234,6 +1358,9 @@
@Test
public void testBase64Binary() throws Exception {
+ if (!shouldRunTest("Base64Binary")) {
+ return;
+ }
byte[] x = "hello".getBytes();
Holder<byte[]> y = new Holder<byte[]>("goodbye".getBytes());
Holder<byte[]> yOriginal = new Holder<byte[]>("goodbye".getBytes());
@@ -1272,6 +1399,9 @@
@Test
public void testAnyURI() throws Exception {
+ if (!shouldRunTest("AnyURI")) {
+ return;
+ }
String valueSets[][] = {{"file:///root%20%20/-;?&+",
"file:///w:/test!artix~java*"},
{"http://iona.com/",
@@ -1302,6 +1432,9 @@
@Test
public void testColourEnum() throws Exception {
+ if (!shouldRunTest("ColourEnum")) {
+ return;
+ }
String[] xx = {"RED", "GREEN", "BLUE"};
String[] yy = {"GREEN", "BLUE", "RED"};
@@ -1331,6 +1464,9 @@
@Test
public void testNumberEnum() throws Exception {
+ if (!shouldRunTest("NumberEnum")) {
+ return;
+ }
int[] xx = {1, 2, 3};
int[] yy = {3, 1, 2};
@@ -1360,6 +1496,9 @@
@Test
public void testStringEnum() throws Exception {
+ if (!shouldRunTest("StringEnum")) {
+ return;
+ }
String[] xx = {"a b c", "d e f", "g h i"};
String[] yy = {"g h i", "a b c", "d e f"};
@@ -1388,6 +1527,9 @@
@Test
public void testDecimalEnum() throws Exception {
+ if (!shouldRunTest("DecimalEnum")) {
+ return;
+ }
BigDecimal[] xx = {new BigDecimal("-10.34"), new BigDecimal("11.22"), new BigDecimal("14.55")};
BigDecimal[] yy = {new BigDecimal("14.55"), new BigDecimal("-10.34"), new BigDecimal("11.22")};
@@ -1418,6 +1560,9 @@
@Test
public void testNMTokenEnum() throws Exception {
+ if (!shouldRunTest("NMTokenEnum")) {
+ return;
+ }
String[] xx = {"hello", "there"};
String[] yy = {"there", "hello"};
@@ -1448,6 +1593,9 @@
@Test
public void testAnyURIEnum() throws Exception {
+ if (!shouldRunTest("AnyURIEnum")) {
+ return;
+ }
String[] xx = {"http://www.iona.com", "http://www.google.com"};
String[] yy = {"http://www.google.com", "http://www.iona.com"};
@@ -1476,6 +1624,9 @@
@Test
public void testSimpleRestriction() throws Exception {
+ if (!shouldRunTest("SimpleRestriction")) {
+ return;
+ }
// normal case, maxLength=10
String x = "string_x";
String yOrig = "string_y";
@@ -1525,6 +1676,9 @@
@Test
public void testSimpleRestriction2() throws Exception {
+ if (!shouldRunTest("SimpleRestriction2")) {
+ return;
+ }
// normal case, minLength=5
String x = "str_x";
String yOrig = "string_yyy";
@@ -1563,6 +1717,9 @@
@Test
public void testSimpleRestriction3() throws Exception {
+ if (!shouldRunTest("SimpleRestriction3")) {
+ return;
+ }
// normal case, maxLength=10 && minLength=5
String x = "str_x";
String yOrig = "string_yyy";
@@ -1613,6 +1770,9 @@
@Test
public void testSimpleRestriction4() throws Exception {
+ if (!shouldRunTest("SimpleRestriction4")) {
+ return;
+ }
// normal case, length=1
String x = "x";
String yOrig = "y";
@@ -1651,6 +1811,9 @@
@Test
public void testSimpleRestriction5() throws Exception {
+ if (!shouldRunTest("SimpleRestriction5")) {
+ return;
+ }
// normal case, maxLength=10 for SimpleRestrction
// && minLength=5 for SimpleRestriction5
String x = "str_x";
@@ -1702,6 +1865,9 @@
@Test
public void testSimpleRestriction6() throws Exception {
+ if (!shouldRunTest("SimpleRestriction6")) {
+ return;
+ }
String x = "str_x";
String yOrig = "y";
Holder<String> y = new Holder<String>(yOrig);
@@ -1740,6 +1906,9 @@
@Test
public void testHexBinaryRestriction() throws Exception {
+ if (!shouldRunTest("HexBinaryRestriction")) {
+ return;
+ }
// normal case, maxLength=10 && minLength=1
byte[] x = "x".getBytes();
byte[] yOrig = "string_yyy".getBytes();
@@ -1796,6 +1965,9 @@
@Test
public void testBase64BinaryRestriction() throws Exception {
+ if (!shouldRunTest("Base64BinaryRestriction")) {
+ return;
+ }
byte[] x = "string_xxx".getBytes();
byte[] yOrig = "string_yyy".getBytes();
Holder<byte[]> y = new Holder<byte[]>(yOrig);
@@ -1833,6 +2005,9 @@
@Test
public void testSimpleListRestriction2() throws Exception {
+ if (!shouldRunTest("SimpleListRestriction2")) {
+ return;
+ }
if (testDocLiteral || testXMLBinding) {
List<String> x = Arrays.asList("I", "am", "SimpleList");
List<String> yOrig = Arrays.asList("Does", "SimpleList", "Work");
@@ -1879,6 +2054,9 @@
@Test
public void testStringList() throws Exception {
+ if (!shouldRunTest("StringList")) {
+ return;
+ }
if (testDocLiteral || testXMLBinding) {
List<String> x = Arrays.asList("I", "am", "SimpleList");
List<String> yOrig = Arrays.asList("Does", "SimpleList", "Work");
@@ -1915,6 +2093,9 @@
@Test
public void testNumberList() throws Exception {
+ if (!shouldRunTest("NumberList")) {
+ return;
+ }
if (testDocLiteral || testXMLBinding) {
List<Integer> x = Arrays.asList(1, 2, 3);
List<Integer> yOrig = Arrays.asList(10, 100, 1000);
@@ -1951,6 +2132,9 @@
@Test
public void testQNameList() throws Exception {
+ if (!shouldRunTest("QNameList")) {
+ return;
+ }
if (testDocLiteral || testXMLBinding) {
List<QName> x = Arrays.asList(new QName("http://schemas.iona.com/type_test", "testqname1"),
new QName("http://schemas.iona.com/type_test", "testqname2"),
@@ -1996,6 +2180,9 @@
@Test
public void testSimpleUnionList() throws Exception {
+ if (!shouldRunTest("SimpleUnionList")) {
+ return;
+ }
if (testDocLiteral || testXMLBinding) {
List<String> x = Arrays.asList("5", "-7");
List<String> yOrig = Arrays.asList("-9", "7");
@@ -2033,64 +2220,4 @@
}
}
- @Test
- public void testAnonEnumList() throws Exception {
- if (testDocLiteral || testXMLBinding) {
- List<Short> x = Arrays.asList((short)10, (short)100);
- List<Short> yOrig = Arrays.asList((short)1000, (short)10);
-
- Holder<List<Short>> y = new Holder<List<Short>>(yOrig);
- Holder<List<Short>> z = new Holder<List<Short>>();
-
- List<Short> ret = testDocLiteral ? docClient.testAnonEnumList(x, y, z) : xmlClient
- .testAnonEnumList(x, y, z);
- if (!perfTestOnly) {
- assertTrue("testAnonEnumList(): Incorrect value for inout param", x.equals(y.value));
- assertTrue("testAnonEnumList(): Incorrect value for out param", yOrig.equals(z.value));
- assertTrue("testAnonEnumList(): Incorrect return value", x.equals(ret));
- }
- } else {
- Short[] x = {(short)10, (short)100};
- Short[] yOrig = {(short)1000, (short)10};
-
- Holder<Short[]> y = new Holder<Short[]>(yOrig);
- Holder<Short[]> z = new Holder<Short[]>();
-
- Short[] ret = rpcClient.testAnonEnumList(x, y, z);
-
- assertTrue(y.value.length == 2);
- assertTrue(z.value.length == 2);
- assertTrue(ret.length == 2);
- if (!perfTestOnly) {
- for (int i = 0; i < 2; i++) {
- assertEquals("testAnonEnumList(): Incorrect value for inout param", x[i].shortValue(),
- y.value[i].shortValue());
- assertEquals("testAnonEnumList(): Incorrect value for out param", yOrig[i].shortValue(),
- z.value[i].shortValue());
- assertEquals("testAnonEnumList(): Incorrect return value", x[i].shortValue(), ret[i]
- .shortValue());
- }
- }
- }
- }
-
- @Test
- public void testUnionWithAnonEnum() throws Exception {
- String x = "5";
- String yOrig = "n/a";
-
- Holder<String> y = new Holder<String>(yOrig);
- Holder<String> z = new Holder<String>();
- String ret;
- if (testDocLiteral) {
- ret = docClient.testUnionWithAnonEnum(x, y, z);
- } else if (testXMLBinding) {
- ret = xmlClient.testUnionWithAnonEnum(x, y, z);
- } else {
- ret = rpcClient.testUnionWithAnonEnum(x, y, z);
- }
- assertEquals("testUnionWithAnonEnum(): Incorrect value for inout param", x, y.value);
- assertEquals("testUnionWithAnonEnum(): Incorrect value for out param", yOrig, z.value);
- assertEquals("testUnionWithAnonEnum(): Incorrect return value", x, ret);
- }
}