JBossWS SVN: r2227 - branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 17:40:49 -0500 (Wed, 31 Jan 2007)
New Revision: 2227
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
Log:
MFT
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2007-01-31 22:36:40 UTC (rev 2226)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2007-01-31 22:40:49 UTC (rev 2227)
@@ -24,6 +24,7 @@
import java.io.StringWriter;
import java.util.Date;
import java.util.GregorianCalendar;
+import java.util.TimeZone;
import javax.xml.namespace.QName;
@@ -83,18 +84,27 @@
public void testMarshallSimpleUserTypeWithDate() throws Exception
{
- GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
- SimpleUserType obj = new SimpleUserType(1, 2, cal.getTime());
+ TimeZone tz = TimeZone.getDefault();
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+ try
+ {
+ GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
+ SimpleUserType obj = new SimpleUserType(1, 2, cal.getTime());
- String exp =
- "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
- " <a>1</a>" +
- " <b>2</b>" +
- " <d>1968-12-15T23:00:00.000Z</d>" +
- "</ns1:SimpleUser>";
+ String exp =
+ "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ " <a>1</a>" +
+ " <b>2</b>" +
+ " <d>1968-12-16T00:00:00.000Z</d>" +
+ "</ns1:SimpleUser>";
- String was = marshalSimpleType(obj);
- assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ String was = marshalSimpleType(obj);
+ assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ }
+ finally
+ {
+ TimeZone.setDefault(tz);
+ }
}
public void testMarshallSimpleUserTypeWithUserDate() throws Exception
@@ -106,21 +116,29 @@
super(date);
}
}
-
- GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
- UserDate userDate = new UserDate(cal.getTime().getTime());
- SimpleUserType obj = new SimpleUserType(1, 2, userDate);
+ TimeZone tz = TimeZone.getDefault();
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+ try
+ {
+ GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
+ UserDate userDate = new UserDate(cal.getTime().getTime());
+ SimpleUserType obj = new SimpleUserType(1, 2, userDate);
- String exp =
- "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
- " <a>1</a>" +
- " <b>2</b>" +
- " <d>1968-12-15T23:00:00.000Z</d>" +
- "</ns1:SimpleUser>";
-
- System.out.println("FIXME: [JBWS-800] ClassCastException when trying to marshal a SybaseTimestamp");
- //String was = marshalSimpleType(obj);
- //assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ String exp =
+ "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ " <a>1</a>" +
+ " <b>2</b>" +
+ " <d>1968-12-16T00:00:00.000Z</d>" +
+ "</ns1:SimpleUser>";
+
+ System.out.println("FIXME: [JBWS-800] ClassCastException when trying to marshal a SybaseTimestamp");
+ //String was = marshalSimpleType(obj);
+ //assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ }
+ finally
+ {
+ TimeZone.setDefault(tz);
+ }
}
private String marshalSimpleType(SimpleUserType obj) throws Exception, MarshalException
17 years, 11 months
JBossWS SVN: r2226 - trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 17:36:40 -0500 (Wed, 31 Jan 2007)
New Revision: 2226
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
Log:
Fix broken date tests
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2007-01-31 22:19:17 UTC (rev 2225)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/common/jbossxb/simple/SimpleUserTypeMarshallerTestCase.java 2007-01-31 22:36:40 UTC (rev 2226)
@@ -24,6 +24,7 @@
import java.io.StringWriter;
import java.util.Date;
import java.util.GregorianCalendar;
+import java.util.TimeZone;
import javax.xml.namespace.QName;
@@ -83,18 +84,27 @@
public void testMarshallSimpleUserTypeWithDate() throws Exception
{
- GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
- SimpleUserType obj = new SimpleUserType(1, 2, cal.getTime());
+ TimeZone tz = TimeZone.getDefault();
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+ try
+ {
+ GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
+ SimpleUserType obj = new SimpleUserType(1, 2, cal.getTime());
- String exp =
- "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
- " <a>1</a>" +
- " <b>2</b>" +
- " <d>1968-12-15T23:00:00.000Z</d>" +
- "</ns1:SimpleUser>";
+ String exp =
+ "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ " <a>1</a>" +
+ " <b>2</b>" +
+ " <d>1968-12-16T00:00:00.000Z</d>" +
+ "</ns1:SimpleUser>";
- String was = marshalSimpleType(obj);
- assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ String was = marshalSimpleType(obj);
+ assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ }
+ finally
+ {
+ TimeZone.setDefault(tz);
+ }
}
public void testMarshallSimpleUserTypeWithUserDate() throws Exception
@@ -106,21 +116,29 @@
super(date);
}
}
-
- GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
- UserDate userDate = new UserDate(cal.getTime().getTime());
- SimpleUserType obj = new SimpleUserType(1, 2, userDate);
+ TimeZone tz = TimeZone.getDefault();
+ TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+ try
+ {
+ GregorianCalendar cal = new GregorianCalendar(1968, 11, 16);
+ UserDate userDate = new UserDate(cal.getTime().getTime());
+ SimpleUserType obj = new SimpleUserType(1, 2, userDate);
- String exp =
- "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
- " <a>1</a>" +
- " <b>2</b>" +
- " <d>1968-12-15T23:00:00.000Z</d>" +
- "</ns1:SimpleUser>";
-
- System.out.println("FIXME: [JBWS-800] ClassCastException when trying to marshal a SybaseTimestamp");
- //String was = marshalSimpleType(obj);
- //assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ String exp =
+ "<ns1:SimpleUser xmlns:ns1='" + TARGET_NAMESPACE + "' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" +
+ " <a>1</a>" +
+ " <b>2</b>" +
+ " <d>1968-12-16T00:00:00.000Z</d>" +
+ "</ns1:SimpleUser>";
+
+ System.out.println("FIXME: [JBWS-800] ClassCastException when trying to marshal a SybaseTimestamp");
+ //String was = marshalSimpleType(obj);
+ //assertEquals(DOMUtils.parse(exp), DOMUtils.parse(was));
+ }
+ finally
+ {
+ TimeZone.setDefault(tz);
+ }
}
private String marshalSimpleType(SimpleUserType obj) throws Exception, MarshalException
17 years, 11 months
JBossWS SVN: r2224 - trunk/jbossws-tests/ant-import.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 15:44:24 -0500 (Wed, 31 Jan 2007)
New Revision: 2224
Modified:
trunk/jbossws-tests/ant-import/jaxws-tools-delegate.xml
Log:
Point delegate to our tools layer
Modified: trunk/jbossws-tests/ant-import/jaxws-tools-delegate.xml
===================================================================
--- trunk/jbossws-tests/ant-import/jaxws-tools-delegate.xml 2007-01-31 20:43:58 UTC (rev 2223)
+++ trunk/jbossws-tests/ant-import/jaxws-tools-delegate.xml 2007-01-31 20:44:24 UTC (rev 2224)
@@ -9,9 +9,8 @@
<!-- $Id: build-interop.xml 1948 2007-01-12 16:47:53Z heiko.braun(a)jboss.com $ -->
<project name="TOOLS-Delegate">
-
+<!--
<property name="ri.home" value="NOT_SET"/>
-
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath>
<pathelement location="${ri.home}/lib/activation.jar"/>
@@ -31,7 +30,18 @@
<pathelement location="${ri.home}/lib/sjsxp.jar"/>
</classpath>
</taskdef>
+-->
+ <taskdef name="wsimport" classname="org.jboss.ws.tools.jaxws.ant.WSImport">
+ <classpath>
+ <pathelement location="${core.output.dir}/lib/jbossws-client.jar"/>
+ <pathelement location="${thirdparty.dir}/jbossws-sun-wsimport.jar"/>
+ <pathelement location="${thirdparty.dir}/wstx.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-xjc.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-api.jar"/>
+ <pathelement location="${thirdparty.dir}/jaxb-impl.jar"/>
+ </classpath>
+ </taskdef>
<macrodef name="callWsimport">
@@ -45,7 +55,9 @@
<echo>-----------------------------------------------</echo>
<echo>Invoking wsimport </echo>
+<!--
<echo>Using RI Home: ${ri.home}</echo>
+-->
<echo>sourceDir: @{sourceDir}</echo>
<echo>wsdlLocation: @{wsdlLocation}</echo>
<echo>-----------------------------------------------</echo>
@@ -64,4 +76,4 @@
</sequential>
</macrodef>
-</project>
\ No newline at end of file
+</project>
17 years, 11 months
JBossWS SVN: r2223 - trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 15:43:58 -0500 (Wed, 31 Jan 2007)
New Revision: 2223
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
Log:
Should be package, not targetPackage
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java 2007-01-31 19:56:50 UTC (rev 2222)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java 2007-01-31 20:43:58 UTC (rev 2223)
@@ -125,7 +125,7 @@
this.sourcedestdir = sourcedestdir;
}
- public void setTargetPackage(String targetPackage)
+ public void setPackage(String targetPackage)
{
this.targetPackage = targetPackage;
}
17 years, 11 months
JBossWS SVN: r2222 - in trunk/build: ant-import and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 14:56:50 -0500 (Wed, 31 Jan 2007)
New Revision: 2222
Modified:
trunk/build/ant-import/build-thirdparty.xml
trunk/build/version.properties
Log:
Add jbossws-sun-wsimport to thirdparty
Modified: trunk/build/ant-import/build-thirdparty.xml
===================================================================
--- trunk/build/ant-import/build-thirdparty.xml 2007-01-31 19:44:24 UTC (rev 2221)
+++ trunk/build/ant-import/build-thirdparty.xml 2007-01-31 19:56:50 UTC (rev 2222)
@@ -72,6 +72,7 @@
<get src="${jboss.repository}/xmlunit-xmlunit/${xmlunit}/lib/xmlunit1.0.jar" dest="${thirdparty.dir}/xmlunit1.0.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/woodstox/${woodstox}/lib/wstx.jar" dest="${thirdparty.dir}/wstx.jar" usetimestamp="true" verbose="true"/>
+ <get src="${jboss.repository}/jboss/jbossws-sun-wsimport/${jbossws-sun-wsimport}/lib/jbossws-sun-wsimport.jar" dest="${thirdparty.dir}/jbossws-sun-wsimport.jar" usetimestamp="true" verbose="true"/>
<mkdir dir="${thirdparty.dir}/jbpm-bpel"/>
<unzip dest="${thirdparty.dir}/jbpm-bpel" src="${thirdparty.dir}/jbpm-bpel.sar"/>
Modified: trunk/build/version.properties
===================================================================
--- trunk/build/version.properties 2007-01-31 19:44:24 UTC (rev 2221)
+++ trunk/build/version.properties 2007-01-31 19:56:50 UTC (rev 2222)
@@ -42,6 +42,7 @@
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.snapshot
jbossas-core-libs=4.0.5.GA
+jbossws-sun-wsimport=2.0.0
jbpm-bpel=1.1.Beta2
junit=3.8.1
oswego-concurrent=1.3.4
@@ -51,6 +52,6 @@
sun-jaf=1.1
sun-javamail=1.4
sun-servlet=2.4
-woodstox=2.0.6
+woodstox=3.1.1
wscommons-policy=1.0
xmlunit=1.0
17 years, 11 months
JBossWS SVN: r2221 - in trunk: jbossws-core/src/main/java/org/jboss/ws/tools/jaxws and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 14:44:24 -0500 (Wed, 31 Jan 2007)
New Revision: 2221
Added:
trunk/build/etc/wsimport.bat
trunk/build/etc/wsimport.sh
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSImport.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceImporter.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceImporterProvider.java
Modified:
trunk/build/etc/wsgen.bat
trunk/build/etc/wsgen.sh
Log:
initial implementation of wsimport
Modified: trunk/build/etc/wsgen.bat
===================================================================
--- trunk/build/etc/wsgen.bat 2007-01-31 19:43:41 UTC (rev 2220)
+++ trunk/build/etc/wsgen.bat 2007-01-31 19:44:24 UTC (rev 2221)
@@ -37,10 +37,7 @@
set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
-set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jbossretro-rt.jar
-set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jboss-backport-concurrent.jar
set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
-set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/jbossws14-client.jar
set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
set WSGEN_CLASSPATH=%WSGEN_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
Modified: trunk/build/etc/wsgen.sh
===================================================================
--- trunk/build/etc/wsgen.sh 2007-01-31 19:43:41 UTC (rev 2220)
+++ trunk/build/etc/wsgen.sh 2007-01-31 19:44:24 UTC (rev 2221)
@@ -54,9 +54,6 @@
WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossretro-rt.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jboss-backport-concurrent.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossws14-client.jar"
WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/mail.jar"
Added: trunk/build/etc/wsimport.bat
===================================================================
--- trunk/build/etc/wsimport.bat (rev 0)
+++ trunk/build/etc/wsimport.bat 2007-01-31 19:44:24 UTC (rev 2221)
@@ -0,0 +1,47 @@
+@echo off
+
+rem $Id: wsgen.bat 2158 2007-01-27 06:20:59Z jason.greene(a)jboss.com $
+
+@if not "%ECHO%" == "" echo %ECHO%
+@if "%OS%" == "Windows_NT" setlocal
+
+set DIRNAME=.\
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+set PROGNAME=run.bat
+if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
+
+rem Read all command line arguments
+
+REM
+REM The %ARGS% env variable commented out in favor of using %* to include
+REM all args in java command line. See bug #840239. [jpl]
+REM
+REM set ARGS=
+REM :loop
+REM if [%1] == [] goto endloop
+REM set ARGS=%ARGS% %1
+REM shift
+REM goto loop
+REM :endloop
+
+set JAVA=%JAVA_HOME%\bin\java
+set JBOSS_HOME=%DIRNAME%\..
+rem Setup the java endorsed dirs
+set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
+
+rem Setup the wstools classpath
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jaxb-xjc.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-sun-wsimport.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSIMPORT_CLASSPATH=%WSIMPORT_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
+
+rem Execute the JVM
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSIMPORT_CLASSPATH%" org.jboss.ws.tools.jaxws.WSImport %*
Added: trunk/build/etc/wsimport.sh
===================================================================
--- trunk/build/etc/wsimport.sh (rev 0)
+++ trunk/build/etc/wsimport.sh 2007-01-31 19:44:24 UTC (rev 2221)
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# $Id: wsgen.sh 2158 2007-01-27 06:20:59Z jason.greene(a)jboss.com $
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+case "`uname`" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$JBOSS_HOME" ] &&
+ JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Setup JBOSS_HOME
+if [ "x$JBOSS_HOME" = "x" ]; then
+ # get the full path (without any relative bits)
+ JBOSS_HOME=`cd $DIRNAME/..; pwd`
+fi
+export JBOSS_HOME
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+ if [ "x$JAVA_HOME" != "x" ]; then
+ JAVA="$JAVA_HOME/bin/java"
+ else
+ JAVA="java"
+ fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+
+# Setup JBoss sepecific properties
+JAVA_OPTS="$JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+# Setup the wstools classpath
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JAVA_HOME/lib/tools.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jbossws-sun-wsimport.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/activation.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jaxb-xjc.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
+WSIMPORT_CLASSPATH="$WSIMPORT_CLASSPATH:$JBOSS_HOME/client/mail.jar"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ WSIMPORT_CLASSPATH=`cygpath --path --windows "$WSIMPORT_CLASSPATH"`
+ JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
+fi
+
+# Execute the JVM
+"$JAVA" $JAVA_OPTS \
+ -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+ -Dlog4j.configuration=wstools-log4j.xml \
+ -classpath "$WSIMPORT_CLASSPATH" \
+ org.jboss.ws.tools.jaxws.WSImport "$@"
Property changes on: trunk/build/etc/wsimport.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSImport.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSImport.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSImport.java 2007-01-31 19:44:24 UTC (rev 2221)
@@ -0,0 +1,235 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws;
+
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.tools.jaxws.api.WebServiceImporter;
+
+/**
+ * WSImport is a command line tool that generates portable JAX-WS artifacts
+ * from a WSDL file.
+ *
+ * <pre>
+ * usage: wsimport [options] <wsdl-urlgt;
+ * options:
+ * -h, --help Show this help message
+ * -b, --binding=<file> One or more JAX-WS or JAXB binding files
+ * -k, --keep Keep/Generate Java source
+ * -c --catalog=<file> Oasis XML Catalog file for entity resolution
+ * -p --package=<name> The target package for generated source
+ * -w --wsdlLocation=<loc> Value to use for @(a)WebService.wsdlLocation
+ * -o, --output=<directory> The directory to put generated artifacts
+ * -s, --source=<directory> The directory to put Java source
+ * -q, --quiet Be somewhat more quiet
+ * -t, --show-traces Show full exception stack traces
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WSImport
+{
+ private List<File> bindingFiles = new ArrayList<File>();
+ private boolean generateSource = false;
+ private File catalog = null;
+ private String targetPackage = null;
+ private String wsdlLocation = null;
+ private boolean quiet = false;
+ private boolean showTraces = false;
+ private File outputDir = new File("output");
+ private File sourceDir = null;
+
+ public static String PROGRAM_NAME = System.getProperty("program.name", "wsimport");
+
+ public static void main(String[] args)
+ {
+ WSImport importer = new WSImport();
+ URL wsdl = importer.parseArguments(args);
+ System.exit(importer.importServices(wsdl));
+ }
+
+ private URL parseArguments(String[] args)
+ {
+ String shortOpts = "hb:kc:p:w:o:s:qt";
+ LongOpt[] longOpts =
+ {
+ new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+ new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
+ new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+ new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+ new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
+ new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
+ new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
+ new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+ new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
+ new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
+ };
+
+ Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
+ int c;
+ while ((c = getopt.getopt()) != -1)
+ {
+ switch (c)
+ {
+ case 'b':
+ bindingFiles.add(new File(getopt.getOptarg()));
+ break;
+ case 'k':
+ generateSource = true;
+ break;
+ case 'c':
+ catalog = new File(getopt.getOptarg());
+ break;
+ case 'p':
+ targetPackage = getopt.getOptarg();
+ break;
+ case 'w':
+ wsdlLocation = getopt.getOptarg();
+ break;
+ case 'o':
+ outputDir = new File(getopt.getOptarg());
+ break;
+ case 's':
+ sourceDir = new File(getopt.getOptarg());
+ break;
+ case 'q':
+ quiet = true;
+ break;
+ case 't':
+ showTraces = true;
+ break;
+ case 'h':
+ printHelp();
+ System.exit(0);
+ case '?':
+ System.exit(1);
+ }
+ }
+
+ int wsdlPos = getopt.getOptind();
+ if (wsdlPos >= args.length)
+ {
+ System.err.println("Error: WSDL URL was not specified!");
+ printHelp();
+ System.exit(1);
+ }
+
+ URL url = null;
+ try
+ {
+ try
+ {
+ url = new URL(args[wsdlPos]);
+ }
+ catch (MalformedURLException e)
+ {
+ File file = new File(args[wsdlPos]);
+ url = file.toURL();
+ }
+ }
+ catch (MalformedURLException e)
+ {
+ System.err.println("Error: Invalid URI: " + args[wsdlPos]);
+ System.exit(1);
+ }
+
+ return url;
+ }
+
+
+ private int importServices(URL wsdl)
+ {
+ WebServiceImporter importer = WebServiceImporter.newInstance();
+ importer.setGenerateSource(generateSource);
+ importer.setOutputDirectory(outputDir);
+ if (sourceDir != null)
+ importer.setSourceDirectory(sourceDir);
+
+ if (! quiet)
+ importer.setMessageStream(System.out);
+
+ if (catalog != null)
+ importer.setCatalog(catalog);
+
+ if (targetPackage != null)
+ importer.setTargetPackage(targetPackage);
+
+ if (wsdlLocation != null)
+ importer.setWsdlLocation(wsdlLocation);
+
+ if (bindingFiles != null && bindingFiles.size() > 0)
+ importer.setBindingFiles(bindingFiles);
+
+ try
+ {
+ importer.importServices(wsdl);
+ return 0;
+ }
+ catch (Throwable t)
+ {
+ System.err.println("Error: Could not import. (use --show-traces to see full traces)");
+ if (!showTraces)
+ {
+ String message = t.getMessage();
+ if (message == null)
+ message = t.getClass().getSimpleName();
+ System.err.println("Error: " + message);
+ }
+ else
+ {
+ t.printStackTrace(System.err);
+ }
+
+ }
+
+ return 1;
+ }
+
+ private static void printHelp()
+ {
+ PrintStream out = System.out;
+ out.println("WSImport is a command line tool that generates portable JAX-WS artifacts from a WSDL file.\n");
+ out.println("usage: " + PROGRAM_NAME + " [options] <wsdl-url>\n");
+ out.println("options: ");
+ out.println(" -h, --help Show this help message");
+ out.println(" -b, --binding=<file> One or more JAX-WS or JAXB binding files ");
+ out.println(" -k, --keep Keep/Generate Java source");
+ out.println(" -c --catalog=<file> Oasis XML Catalog file for entity resolution");
+ out.println(" -p --package=<name> The target package for generated source");
+ out.println(" -w --wsdlLocation=<loc> Value to use for @WebService.wsdlLocation");
+ out.println(" -o, --output=<directory> The directory to put generated artifacts");
+ out.println(" -s, --source=<directory> The directory to put Java source");
+ out.println(" -q, --quiet Be somewhat more quiet");
+ out.println(" -t, --show-traces Show full exception stack traces");
+ out.flush();
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSImport.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java 2007-01-31 19:44:24 UTC (rev 2221)
@@ -0,0 +1,302 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.ant;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.ExecuteJava;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Path;
+import org.jboss.ws.tools.jaxws.api.WebServiceImporter;
+
+/**
+ * Ant task which invokes WebServiceGenerate.
+ *
+ * <table border="1">
+ * <tr align="left" BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
+ * <tr><td>fork</td><td>Whether or not to run the generation task in a separate VM.</td><td>true</td></tr>
+ * <tr><td>keep</td><td>Keep/Enable Java source code generation.</td><td>false</td></tr>
+ * <tr><td>catalog</td><td> Oasis XML Catalog file for entity resolution</td><td>none</td></tr>
+ * <tr><td>package</td><td> The target Java package for generated code.</td><td>generated</td></tr>
+ * <tr><td>binding</td><td>A JAX-WS or JAXB binding file</td><td>none</td></tr>
+ * <tr><td>wsdlLocation</td><td>Value to use for @(a)WebService.wsdlLocation</td><td>generated</td></tr>
+ * <tr><td>destdir</td><td>The output directory for generated artifacts.</td><td>"output"</td></tr>
+ * <tr><td>sourcedir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
+ * <tr><td>verbose</td><td>Enables more informational output about command progress.</td><td>false</td><tr>
+ * <tr><td>wsdl*</td><td>The WSDL file or URL</td><td>n/a</td><tr>
+ * </table>
+ * <b>* = required.</b>
+ *
+ * <p>Example:
+ *
+ * <pre>
+ * <wsimport
+ * fork="true"
+ * verbose="true"
+ * destdir="output"
+ * sourcedestdir="gen-src"
+ * keep="true"
+ * wsdllocation="handEdited.wsdl"
+ * wsdl="foo.wsdl">
+ * <binding dir="binding-files" includes="*.xml" excludes="bad.xml"/>
+ * </wsimport>
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WSImport extends Task
+{
+ private String wsdl = null;
+ private File destdir = null;
+ private File sourcedestdir = null;
+ private List<File> bindingFiles = new ArrayList<File>();
+ private File catalog = null;
+ private String wsdlLocation = null;
+ private String targetPackage = null;
+ private boolean keep = false;
+ private boolean verbose = false;
+ private boolean fork = false;
+ private boolean debug = false;
+
+ // Not actually used right now
+ public void setDebug(boolean debug)
+ {
+ this.debug = debug;
+ }
+
+ public void setBinding(File bindingFile)
+ {
+ bindingFiles.add(bindingFile);
+ }
+
+ public void setCatalog(File catalog)
+ {
+ this.catalog = catalog;
+ }
+
+ public void setDestdir(File destdir)
+ {
+ this.destdir = destdir;
+ }
+
+ public void setFork(boolean fork)
+ {
+ this.fork = fork;
+ }
+
+ public void setKeep(boolean keep)
+ {
+ this.keep = keep;
+ }
+
+ public void setSourcedestdir(File sourcedestdir)
+ {
+ this.sourcedestdir = sourcedestdir;
+ }
+
+ public void setTargetPackage(String targetPackage)
+ {
+ this.targetPackage = targetPackage;
+ }
+
+ public void setVerbose(boolean verbose)
+ {
+ this.verbose = verbose;
+ }
+
+ public void setWsdl(String wsdl)
+ {
+ this.wsdl = wsdl;
+ }
+
+ public void setWsdlLocation(String wsdlLocation)
+ {
+ this.wsdlLocation = wsdlLocation;
+ }
+
+ public void addConfiguredBinding(FileSet fs)
+ {
+ DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+ File baseDir = ds.getBasedir();
+ for (String file : ds.getIncludedFiles())
+ {
+ bindingFiles.add(new File(baseDir, file));
+ }
+ }
+
+ public void executeNonForked()
+ {
+ ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
+ ClassLoader antLoader = this.getClass().getClassLoader();
+ Thread.currentThread().setContextClassLoader(antLoader);
+ try
+ {
+ WebServiceImporter importer = WebServiceImporter.newInstance();
+ importer.setGenerateSource(keep);
+ if (destdir != null)
+ importer.setOutputDirectory(destdir);
+ if (sourcedestdir != null)
+ importer.setSourceDirectory(sourcedestdir);
+ if (targetPackage != null)
+ importer.setTargetPackage(targetPackage);
+ if (wsdlLocation != null)
+ importer.setWsdlLocation(wsdlLocation);
+ if (catalog != null)
+ importer.setCatalog(catalog);
+ if (bindingFiles != null && bindingFiles.size() > 0)
+ importer.setBindingFiles(bindingFiles);
+
+ if (verbose)
+ {
+ importer.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
+ log("Generating from wsdl: " + wsdl, Project.MSG_INFO);
+ }
+
+ try
+ {
+ importer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
+ importer.importServices(wsdl);
+ }
+ catch (MalformedURLException e)
+ {
+ throw new BuildException(e, getLocation());
+ }
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(prevCL);
+ }
+ }
+
+ public void execute() throws BuildException
+ {
+ if (wsdl == null)
+ throw new BuildException("The wsdl attribute must be specified!", getLocation());
+
+ if (fork)
+ executeForked();
+ else
+ executeNonForked();
+ }
+
+ private Path getTaskClassPath()
+ {
+ // Why is everything in the Ant API a big hack???
+ ClassLoader cl = this.getClass().getClassLoader();
+ if (cl instanceof AntClassLoader)
+ {
+ return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
+ }
+
+ return new Path(getProject());
+ }
+
+ private List<String> getTaskClassPathStrings()
+ {
+ // Why is everything in the Ant API a big hack???
+ List<String> strings = new ArrayList<String>();
+ ClassLoader cl = this.getClass().getClassLoader();
+ if (cl instanceof AntClassLoader)
+ {
+ for (String string : ((AntClassLoader)cl).getClasspath().split(File.pathSeparator))
+ strings.add(string);
+ }
+
+ return strings;
+ }
+
+ private void executeForked() throws BuildException
+ {
+ CommandlineJava command = new CommandlineJava();
+ command.setClassname(org.jboss.ws.tools.jaxws.WSImport.class.getName());
+
+ Path path = command.createClasspath(getProject());
+ path.append(getTaskClassPath());
+
+ if (keep)
+ command.createArgument().setValue("-k");
+
+ for (File file : bindingFiles)
+ {
+ command.createArgument().setValue("-b");
+ command.createArgument().setFile(file);
+ }
+
+ if (catalog != null)
+ {
+ command.createArgument().setValue("-c");
+ command.createArgument().setFile(catalog);
+ }
+
+ if (targetPackage != null)
+ {
+ command.createArgument().setValue("-p");
+ command.createArgument().setValue(targetPackage);
+ }
+
+ if (wsdlLocation != null)
+ {
+ command.createArgument().setValue("-w");
+ command.createArgument().setValue(wsdlLocation);
+ }
+
+ if (destdir != null)
+ {
+ command.createArgument().setValue("-o");
+ command.createArgument().setFile(destdir);
+ }
+
+ if (sourcedestdir != null)
+ {
+ command.createArgument().setValue("-s");
+ command.createArgument().setFile(sourcedestdir);
+ }
+
+ if (!verbose)
+ command.createArgument().setValue("-q");
+
+ // Always dump traces
+ command.createArgument().setValue("-t");
+ command.createArgument().setValue(wsdl);
+
+ if (verbose)
+ log("Command invoked: " + command.getJavaCommand().toString());
+
+ ExecuteJava execute = new ExecuteJava();
+ execute.setClasspath(path);
+ execute.setJavaCommand(command.getJavaCommand());
+ if (execute.fork(this) != 0)
+ throw new BuildException("Could not invoke wsimport", getLocation());
+ }
+}
\ No newline at end of file
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceImporter.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceImporter.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceImporter.java 2007-01-31 19:44:24 UTC (rev 2221)
@@ -0,0 +1,178 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.api;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.ws.tools.jaxws.spi.WebServiceImporterProvider;
+
+/**
+ * WebServiceImporter is responsible for generating JAX-WS client and server
+ * artifacts from the specified WSDL file. To implement a client, one would use
+ * the generated ___Service.java file. For a server, one only needs to provide
+ * an implementation class that implements the generated service endpoint
+ * interface.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public abstract class WebServiceImporter
+{
+ private static String DEFAULT_PROVIDER = "org.jboss.com.sun.tools.ws.jbossws.WebServiceImporterProviderImpl";
+ public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.webServiceImporterProvider";
+
+ /**
+ * Obtain a new instance of a WebServiceGenerator. This will use the current
+ * thread's context class loader to locate the WebServiceGeneratorProvider
+ * implementation.
+ *
+ * @return a new WebServiceGenerator
+ */
+ public static WebServiceImporter newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WebServiceImporter. The specified ClassLoader will be used to
+ * locate the WebServiceImporterProvide implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WebServiceImporter
+ */
+ public static WebServiceImporter newInstance(ClassLoader loader)
+ {
+ WebServiceImporterProvider provider = ProviderLocator.locate(WebServiceImporterProvider.class, PROVIDER_PROPERTY, DEFAULT_PROVIDER, loader);
+ return provider.createImporter();
+ }
+
+ /**
+ * Specifies the JAX-WS and JAXB binding files to use on import operations.
+ *
+ * @param bindingFiles list of JAX-WS or JAXB binding files
+ */
+ public abstract void setBindingFiles(List<File> bindingFiles);
+
+ /**
+ * Sets the OASIS XML Catalog file to use for entity resolution.
+ *
+ * @param catalog the OASIS XML Catalog file
+ */
+ public abstract void setCatalog(File catalog);
+
+ /**
+ * Sets the main output directory. If the directory does not exist, it will be created.
+ *
+ * @param directory the root directory for generated files
+ */
+ public abstract void setOutputDirectory(File directory);
+
+ /**
+ * Sets the source directory. This directory will contain any generated Java source.
+ * If the directory does not exist, it will be created. If not specified,
+ * the output directory will be used instead.
+ *
+ * @param directory the root directory for generated source code
+ */
+ public abstract void setSourceDirectory(File directory);
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ * @param generateSource whether or not to generate Java source.
+ */
+ public abstract void setGenerateSource(boolean generateSource);
+
+
+ /**
+ * Sets the target package for generated source. If not specified the default
+ * is based off of the XML namespace.
+ *
+ * @param targetPackage the target package for generated source
+ */
+ public abstract void setTargetPackage(String targetPackage);
+
+ /**
+ * Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes to a custom value.
+ *
+ * @param wsdlLocation the custom WSDL location to use in generated source
+ */
+ public abstract void setWsdlLocation(String wsdlLocation);
+
+ /**
+ * Sets the PrintStream to use for status feedback. The simplest example
+ * would be to use System.out.
+ *
+ * @param messageStream the stream to use for status messages:
+ */
+ public abstract void setMessageStream(PrintStream messageStream);
+
+
+ /**
+ * Sets the additional classpath to use if/when invoking the Java compiler.
+ * Typically an implementation will use the system <code>java.class.path</code>
+ * property. So for most normal applications this method is not needed. However,
+ * if this API is being used from an isolated classloader, then it needs to
+ * be called in order to reference all jars that are required by the
+ * implementation.
+ *
+ * @param classPath a list of strings where each entry references a
+ * single jar or directory
+ */
+ public abstract void setAdditionalCompilerClassPath(List<String> classPath);
+
+ /**
+ * Generate the required artifacts using the specified WSDL URL. This method
+ * may be called more than once, although this is probably not desireable
+ *
+ * @param wsdl the URL of the WSDL
+ */
+ public abstract void importServices(URL wsdl);
+
+ /**
+ * Generate the required artifacts using the specified WSDL. This method
+ * may be called more than once, although this is probably not desireable.
+ * The passed string is expect to either be a valid URL, or a local file path.
+ *
+ * @param wsdl a URL or local file path
+ * @throws MalformedURLException if wsdl is not a legal URL or local file
+ */
+ public void importServices(String wsdl) throws MalformedURLException
+ {
+ URL url = null;
+ try
+ {
+ url = new URL(wsdl);
+ }
+ catch (MalformedURLException e)
+ {
+ File file = new File(wsdl);
+ url = file.toURL();
+ }
+
+ importServices(url);
+ }
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceImporter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceImporterProvider.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceImporterProvider.java (rev 0)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceImporterProvider.java 2007-01-31 19:44:24 UTC (rev 2221)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws.spi;
+
+import org.jboss.ws.tools.jaxws.api.WebServiceImporter;
+
+/**
+ * WebServiceImporterProvider defines the contract for a WebServiceImporter provider.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ */
+public interface WebServiceImporterProvider
+{
+ /**
+ * Create a new WebServiceImporter. There are no restrictions on how this
+ * should be performed.
+ *
+ * @return a new WebServiceImporter
+ */
+ public WebServiceImporter createImporter();
+}
Property changes on: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceImporterProvider.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 11 months
JBossWS SVN: r2220 - trunk/integration-jboss50.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 14:43:41 -0500 (Wed, 31 Jan 2007)
New Revision: 2220
Modified:
trunk/integration-jboss50/.classpath
Log:
Fix broken eclipse build
Modified: trunk/integration-jboss50/.classpath
===================================================================
--- trunk/integration-jboss50/.classpath 2007-01-31 19:43:15 UTC (rev 2219)
+++ trunk/integration-jboss50/.classpath 2007-01-31 19:43:41 UTC (rev 2220)
@@ -3,7 +3,6 @@
<classpathentry excluding="org/jboss/ws/integration/jboss50/ServiceRefHandler.java" kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/jbossws-core"/>
- <classpathentry kind="lib" path="/build/thirdparty/jboss-deployers.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/jboss-vfs.jar" sourcepath="/build/thirdparty/jboss-vfs-sources.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/ant.jar"/>
<classpathentry kind="lib" path="/build/thirdparty/activation.jar"/>
17 years, 11 months
JBossWS SVN: r2219 - trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-01-31 14:43:15 -0500 (Wed, 31 Jan 2007)
New Revision: 2219
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WebServiceGeneratorTestCase.java
Log:
Fix test case broken because of the jsr181 -> samples refactor
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WebServiceGeneratorTestCase.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WebServiceGeneratorTestCase.java 2007-01-31 19:09:09 UTC (rev 2218)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WebServiceGeneratorTestCase.java 2007-01-31 19:43:15 UTC (rev 2219)
@@ -62,8 +62,8 @@
private void checkWrapperSource(File outputDir, boolean shouldExist)
{
- File file1 = new File(outputDir, "org/jboss/test/ws/jaxws/jsr181/soapbinding/jaxws/SubmitPO.java");
- File file2 = new File(outputDir, "org/jboss/test/ws/jaxws/jsr181/soapbinding/jaxws/SubmitPOResponse.java");
+ File file1 = new File(outputDir, "org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java");
+ File file2 = new File(outputDir, "org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java");
assertEquals(shouldExist, file1.exists());
assertEquals(shouldExist, file2.exists());
}
@@ -74,12 +74,12 @@
URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()}, Thread.currentThread().getContextClassLoader());
// Check request wrapper
- Class wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.jaxws.jsr181.soapbinding.jaxws.SubmitPO", classLoader);
+ Class wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.jaxws.samples.soapbinding.jaxws.SubmitPO", classLoader);
wrapper.getMethod("setPurchaseOrder", PurchaseOrder.class);
assertEquals(PurchaseOrder.class.getName(), wrapper.getMethod("getPurchaseOrder").getReturnType().getName());
// Check response wrapper
- wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.jaxws.jsr181.soapbinding.jaxws.SubmitPOResponse", classLoader);
+ wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.jaxws.samples.soapbinding.jaxws.SubmitPOResponse", classLoader);
wrapper.getMethod("setPurchaseOrderAck", PurchaseOrderAck.class);
assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
}
17 years, 11 months
JBossWS SVN: r2217 - in branches/jbossws-1.2.0: integration-jboss42 and 14 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-01-31 10:40:31 -0500 (Wed, 31 Jan 2007)
New Revision: 2217
Modified:
branches/jbossws-1.2.0/integration-jboss40/build.xml
branches/jbossws-1.2.0/integration-jboss42/build.xml
branches/jbossws-1.2.0/integration-jboss50/build.xml
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java
branches/jbossws-1.2.0/jbossws-tests/build.xml
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wsbpel/JbpmBpelTestSetup.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml
Log:
Support <service-ref> call properties for jaxrpc
Deploy bpel.sar a part of the bpel test setup
Enable EJB-2.1 deployments for jboss50
Modified: branches/jbossws-1.2.0/integration-jboss40/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss40/build.xml 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/integration-jboss40/build.xml 2007-01-31 15:40:31 UTC (rev 2217)
@@ -319,8 +319,6 @@
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss40.output.lib.dir}/jbossws40.sar"/>
- <!-- Deploy the BPEL sar -->
- <copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss40.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss40.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
<fileset dir="${core.output.lib.dir}">
@@ -362,8 +360,6 @@
<delete dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
<mkdir dir="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar"/>
<unjar dest="${jboss40.home}/server/${jboss.server.instance}/deploy/jbossws14.sar" src="${jboss40.output.lib.dir}/jbossws40-jdk14.sar"/>
- <!-- Deploy the BPEL sar -->
- <copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss40.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss40.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
<fileset dir="${jboss40.output.lib.dir}">
Modified: branches/jbossws-1.2.0/integration-jboss42/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss42/build.xml 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/integration-jboss42/build.xml 2007-01-31 15:40:31 UTC (rev 2217)
@@ -49,6 +49,7 @@
<javac srcdir="${jboss42.java.dir}" sourcepath="" destdir="${jboss42.output.classes.dir}" encoding="utf-8" debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}" failonerror="${javac.fail.onerror}">
<include name="org/jboss/ws/integration/jboss42/**"/>
+ <exclude name="org/jboss/ws/integration/jboss42/*EJB3.java"/>
<classpath refid="jboss42.integration.classpath"/>
<classpath path="${core.output.classes14.dir}"/>
<classpath path="${core.output.classes.dir}"/>
@@ -153,8 +154,6 @@
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss42.output.lib.dir}/jbossws42.sar"/>
- <!-- Deploy the BPEL sar -->
- <copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss42.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss42.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
<fileset dir="${core.output.lib.dir}">
Modified: branches/jbossws-1.2.0/integration-jboss50/build.xml
===================================================================
--- branches/jbossws-1.2.0/integration-jboss50/build.xml 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/integration-jboss50/build.xml 2007-01-31 15:40:31 UTC (rev 2217)
@@ -162,8 +162,6 @@
<delete dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<mkdir dir="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss50.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="${jboss50.output.lib.dir}/jbossws50.sar"/>
- <!-- deploy the BPEL sar -->
- <copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${jboss50.home}/server/${jboss.server.instance}/deploy"/>
<!-- The JBossAS testsuite references jbosswsfrom thirdparty -->
<copy todir="${jboss50.home}/../../../thirdparty/jboss/jbossws/lib" overwrite="true">
<fileset dir="${core.output.lib.dir}">
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -33,7 +33,6 @@
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBConstants;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshaller;
import org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBMarshallerImpl;
-import org.jboss.ws.core.jaxrpc.binding.jbossxb.XercesXSMarshallerImpl;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.w3c.dom.NamedNodeMap;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -447,10 +447,12 @@
{
if (null == name)
throw new JAXRPCException("Unsupported property: " + name);
+
// CTS: com/sun/ts/tests/jaxrpc/api/javax_xml_rpc/Call/Client.java#SetGetPropertyTest2
if (name.startsWith("javax.xml.rpc") && standardProperties.contains(name) == false)
throw new JAXRPCException("Unsupported property: " + name);
+ log.debug("setProperty: [name=" + name + ",value=" + value + "]");
properties.put(name, value);
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceFactoryImpl.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -106,7 +106,7 @@
*/
public Service createService(QName serviceName) throws ServiceException
{
- return new ServiceImpl(serviceName);
+ return new ServiceImpl(serviceName, null);
}
/**
@@ -154,7 +154,7 @@
*/
public Service createService(URL wsdlURL, QName serviceName, URL mappingURL, URL securityURL) throws ServiceException
{
- ServiceImpl service = new ServiceImpl(serviceName, wsdlURL, mappingURL, securityURL);
+ ServiceImpl service = new ServiceImpl(serviceName, wsdlURL, mappingURL, securityURL, null);
return service;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -27,10 +27,12 @@
import java.net.URL;
import java.rmi.Remote;
import java.util.ArrayList;
+import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Properties;
import java.util.Set;
import javax.xml.namespace.QName;
@@ -45,6 +47,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.StubExt;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder;
+import org.jboss.ws.metadata.j2ee.UnifiedPortComponentRefMetaData;
import org.jboss.ws.metadata.j2ee.UnifiedServiceRefMetaData;
import org.jboss.ws.metadata.jaxrpcmapping.JavaWsdlMapping;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
@@ -77,9 +80,10 @@
// The service meta data that is associated with this JAXRPC Service
private ServiceMetaData serviceMetaData;
-
// The optional WSDL location
private URL wsdlLocation;
+ // The <service-ref> meta data
+ private UnifiedServiceRefMetaData usrMetaData;
// The handler registry
private HandlerRegistryImpl handlerRegistry;
@@ -87,8 +91,9 @@
/**
* Construct a Service without WSDL meta data
*/
- ServiceImpl(QName serviceName)
+ ServiceImpl(QName serviceName, UnifiedServiceRefMetaData usrMetaData)
{
+ this.usrMetaData = usrMetaData;
UnifiedMetaData wsMetaData = new UnifiedMetaData(new ResourceLoaderAdapter());
serviceMetaData = new ServiceMetaData(wsMetaData, serviceName);
handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
@@ -97,9 +102,10 @@
/**
* Construct a Service that has access to some WSDL meta data
*/
- ServiceImpl(QName serviceName, URL wsdlURL, URL mappingURL, URL securityURL)
+ ServiceImpl(QName serviceName, URL wsdlURL, URL mappingURL, URL securityURL, UnifiedServiceRefMetaData usrMetaData)
{
this.wsdlLocation = wsdlURL;
+ this.usrMetaData = usrMetaData;
JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
@@ -111,14 +117,15 @@
/**
* Construct a Service that has access to some WSDL meta data
*/
- ServiceImpl(QName serviceName, URL wsdlURL, JavaWsdlMapping mappingURL, WSSecurityConfiguration securityConfig, UnifiedServiceRefMetaData serviceRefMetaData)
+ ServiceImpl(QName serviceName, URL wsdlURL, JavaWsdlMapping mappingURL, WSSecurityConfiguration securityConfig, UnifiedServiceRefMetaData usrMetaData)
{
this.wsdlLocation = wsdlURL;
+ this.usrMetaData = usrMetaData;
+
JAXRPCClientMetaDataBuilder builder = new JAXRPCClientMetaDataBuilder();
-
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
-
- serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, serviceRefMetaData, ctxClassLoader);
+
+ serviceMetaData = builder.buildMetaData(serviceName, wsdlURL, mappingURL, securityConfig, usrMetaData, ctxClassLoader);
handlerRegistry = new HandlerRegistryImpl(serviceMetaData);
}
@@ -160,7 +167,9 @@
{
String nsURI = portName.getNamespaceURI();
serviceMetaData.assertTargetNamespace(nsURI);
- return new CallImpl(this, portName, null);
+ CallImpl call = new CallImpl(this, portName, null);
+ initCallProperties(call, null);
+ return call;
}
/**
@@ -180,7 +189,9 @@
String nsURI = portName.getNamespaceURI();
serviceMetaData.assertTargetNamespace(nsURI);
QName opName = new QName(nsURI, operationName);
- return new CallImpl(this, portName, opName);
+ CallImpl call = new CallImpl(this, portName, opName);
+ initCallProperties(call, null);
+ return call;
}
/**
@@ -199,7 +210,9 @@
{
serviceMetaData.assertTargetNamespace(portName.getNamespaceURI());
serviceMetaData.assertTargetNamespace(opName.getNamespaceURI());
- return new CallImpl(this, portName, opName);
+ CallImpl call = new CallImpl(this, portName, opName);
+ initCallProperties(call, null);
+ return call;
}
/**
@@ -213,7 +226,9 @@
*/
public Call createCall() throws ServiceException
{
- return new CallImpl(this);
+ CallImpl call = new CallImpl(this);
+ initCallProperties(call, null);
+ return call;
}
/**
@@ -392,6 +407,7 @@
private Remote createProxy(Class seiClass, EndpointMetaData epMetaData) throws Exception
{
CallImpl call = new CallImpl(this, epMetaData);
+ initCallProperties(call, seiClass.getName());
PortProxy handler = new PortProxy(call);
ClassLoader cl = epMetaData.getClassLoader();
@@ -400,6 +416,47 @@
return proxy;
}
+ private void initCallProperties(CallImpl call, String seiName)
+ {
+ // nothing to do
+ if (usrMetaData == null)
+ return;
+
+ // General properties
+ Properties callProps = usrMetaData.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<?> names = callProps.propertyNames();
+ while (names.hasMoreElements())
+ {
+ String name = (String)names.nextElement();
+ String value = callProps.getProperty(name);
+ call.setProperty(name, value);
+ }
+ }
+
+ if (seiName != null)
+ {
+ for (UnifiedPortComponentRefMetaData upcRef : usrMetaData.getPortComponentRefs())
+ {
+ if (seiName.equals(upcRef.getServiceEndpointInterface()))
+ {
+ callProps = upcRef.getCallProperties();
+ if (callProps != null)
+ {
+ Enumeration<?> names = callProps.propertyNames();
+ while (names.hasMoreElements())
+ {
+ String name = (String)names.nextElement();
+ String value = callProps.getProperty(name);
+ call.setProperty(name, value);
+ }
+ }
+ }
+ }
+ }
+ }
+
/**
* Get the handler chain for the given endpoint name, maybe null.
*/
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -102,13 +102,13 @@
Reference ref = (Reference)obj;
// Unmarshall the ServiceRefMetaData
- UnifiedServiceRefMetaData serviceRefMetaData = null;
+ UnifiedServiceRefMetaData usrMetaData = null;
RefAddr metaRefAddr = ref.get(ServiceReferenceable.SERVICE_REF_META_DATA);
ByteArrayInputStream bais = new ByteArrayInputStream((byte[])metaRefAddr.getContent());
try
{
ObjectInputStream ois = new ObjectInputStream(bais);
- serviceRefMetaData = (UnifiedServiceRefMetaData)ois.readObject();
+ usrMetaData = (UnifiedServiceRefMetaData)ois.readObject();
ois.close();
}
catch (IOException ex)
@@ -137,25 +137,25 @@
}
ServiceImpl jaxrpcService = null;
- URL wsdlLocation = serviceRefMetaData.getWsdlLocation();
+ URL wsdlLocation = usrMetaData.getWsdlLocation();
if (wsdlLocation != null)
{
log.debug("Create jaxrpc service from wsdl");
// Create the actual service object
- QName serviceName = serviceRefMetaData.getServiceQName();
- JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)serviceRefMetaData.getJavaWsdlMapping();
- jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, serviceRefMetaData);
+ QName serviceName = usrMetaData.getServiceQName();
+ JavaWsdlMapping javaWsdlMapping = (JavaWsdlMapping)usrMetaData.getJavaWsdlMapping();
+ jaxrpcService = new ServiceImpl(serviceName, wsdlLocation, javaWsdlMapping, securityConfig, usrMetaData);
}
else
{
log.debug("Create jaxrpc service with no wsdl");
- jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
+ jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"), usrMetaData);
}
// Set any service level properties
ServiceMetaData serviceMetaData = jaxrpcService.getServiceMetaData();
- serviceMetaData.setProperties(serviceRefMetaData.getCallProperties());
+ serviceMetaData.setProperties(usrMetaData.getCallProperties());
// The web service client using a port-component-link, the contet is the URL to
// the PortComponentLinkServlet that will return the actual endpoint address
@@ -211,12 +211,12 @@
// load the service interface class
ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
- Class siClass = contextCL.loadClass(serviceRefMetaData.getServiceInterface());
+ Class siClass = contextCL.loadClass(usrMetaData.getServiceInterface());
if (Service.class.isAssignableFrom(siClass) == false)
throw new JAXRPCException("The service interface does not implement javax.xml.rpc.Service: " + siClass.getName());
// load all service endpoint interface classes
- UnifiedPortComponentRefMetaData[] pcrArray = serviceRefMetaData.getPortComponentRefs();
+ UnifiedPortComponentRefMetaData[] pcrArray = usrMetaData.getPortComponentRefs();
for (int i = 0; i < pcrArray.length; i++)
{
UnifiedPortComponentRefMetaData pcr = pcrArray[i];
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -100,7 +100,7 @@
/** Build from WSDL and jaxrpc-mapping.xml
*/
public ServiceMetaData buildMetaData(QName serviceQName, URL wsdlURL, JavaWsdlMapping javaWsdlMapping, WSSecurityConfiguration securityConfig,
- UnifiedServiceRefMetaData serviceRefMetaData, ClassLoader loader)
+ UnifiedServiceRefMetaData usrMetaData, ClassLoader loader)
{
log.debug("START buildMetaData: [service=" + serviceQName + "]");
try
@@ -119,9 +119,9 @@
if (javaWsdlMapping != null)
{
URL mappingURL = new URL(Constants.NS_JBOSSWS_URI + "/dummy-mapping-file");
- if (serviceRefMetaData != null && serviceRefMetaData.getMappingLocation() != null)
+ if (usrMetaData != null && usrMetaData.getMappingLocation() != null)
{
- mappingURL = serviceRefMetaData.getMappingLocation();
+ mappingURL = usrMetaData.getMappingLocation();
}
wsMetaData.addMappingDefinition(mappingURL.toExternalForm(), javaWsdlMapping);
serviceMetaData.setMappingLocation(mappingURL);
@@ -133,7 +133,7 @@
setupSecurity(securityConfig, wsMetaData.getRootFile());
}
- buildMetaDataInternal(serviceMetaData, wsdlDefinitions, javaWsdlMapping, serviceRefMetaData);
+ buildMetaDataInternal(serviceMetaData, wsdlDefinitions, javaWsdlMapping, usrMetaData);
// eagerly initialize
wsMetaData.eagerInitialize();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/j2ee/UnifiedPortComponentRefMetaData.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -40,8 +40,7 @@
private String serviceEndpointInterface;
// The optional <port-component-link> element
private String portComponentLink;
-
- /** Arbitrary proxy properties given by <call-property> */
+ // Arbitrary proxy properties given by <call-property>
private Properties callProperties;
public String getPortComponentLink()
Modified: branches/jbossws-1.2.0/jbossws-tests/build.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/build.xml 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/build.xml 2007-01-31 15:40:31 UTC (rev 2217)
@@ -111,7 +111,7 @@
<available property="installer.setup" file="jboss-ejb3-client.jar"/>
<mkdir dir="${tests.output.dir}/log"/>
- <touch file="${tests.output.dir}/logtest.log"/>
+ <touch file="${tests.output.dir}/log/test.log"/>
<tstamp>
<format property="build.id" pattern="yyyyMMddHHmm"/>
@@ -217,9 +217,11 @@
<pathelement location="${thirdparty.dir}/commons-logging.jar"/>
<pathelement location="${thirdparty.dir}/dom4j.jar"/>
<pathelement location="${thirdparty.dir}/wsdl4j.jar"/>
- <pathelement location="${tests.etc.dir}"/> <!-- log4j.xml -->
+ <pathelement location="${thirdparty.dir}/jboss-logging-log4j.jar"/>
+ <!--
<pathelement location="${thirdparty.dir}/log4j.jar"/>
- <pathelement location="${thirdparty.dir}/jboss-logging-log4j.jar"/>
+ <pathelement location="${tests.etc.dir}"/>
+ -->
</path>
</target>
@@ -306,12 +308,14 @@
-->
<target name="generate-sources" depends="compile" description="Generate the deployment resources.">
<!-- create jbpm process archives -->
- <mkdir dir="${tests.output.dir}/libs"/>
+ <mkdir dir="${tests.output.dir}/libs"/>
<zip destfile="${tests.output.dir}/libs/jaxrpc-samples-wsbpel-hello-process.zip">
<fileset dir="${tests.resources.dir}/jaxrpc/samples/wsbpel/hello/bpel" />
</zip>
+ <!-- Copy the BPEL sar -->
+ <copy file="${thirdparty.dir}/jbpm-bpel.sar" todir="${tests.output.dir}/libs"/>
- <!-- generate wsdl binding and service definitions for bpel processes -->
+ <!-- generate wsdl binding and service definitions for bpel processes -->
<taskdef name="servicegen" classname="org.jbpm.bpel.ant.ServiceGeneratorTask">
<classpath refid="jbpm.bpel.classpath"/>
</taskdef>
@@ -319,7 +323,7 @@
outputdir="${tests.output.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl"
bindingfile="hello-binding-.wsdl" servicefile="hello-service.wsdl" />
- <!-- generate mapping artifacts -->
+ <!-- generate mapping artifacts -->
<taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
<classpath refid="core.classpath"/>
<classpath location="${jbossws.client.jar}"/>
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1011/JBWS1011TestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -60,12 +60,6 @@
public void testCall() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String response = port.echoString("Hello");
assertEquals("Hello", response);
}
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/jbws1427/JBWS1427TestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -72,12 +72,6 @@
public final void testWsdlParser() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
WSDLDefinitionsFactory factory = WSDLDefinitionsFactory.newInstance();
File wsdlFile = new File("resources/jaxrpc/jbws1427/META-INF/wsdl/ProcessClaim.wsdl");
assertTrue("File exists: " + wsdlFile, wsdlFile.exists());
@@ -87,12 +81,6 @@
public final void testEndpointAccess() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
Message inObj = new Message("Kermit", new Integer(100));
Message retObj = port.processClaim(inObj);
assertEquals(inObj, retObj);
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/DocEJBTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -58,12 +58,6 @@
public void testEchoString() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
String world = "world!";
Object retObj = endpoint.echoString(hello, world);
@@ -72,12 +66,6 @@
public void testEchoSimpleUserType() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIConfiguredCallTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -73,12 +73,6 @@
public void testEchoString() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
QName operationName = new QName(TARGET_NAMESPACE, "echoString");
call.setOperationName(operationName);
assertFalse(call.isParameterAndReturnSpecRequired(operationName));
@@ -97,12 +91,6 @@
public void testEchoSimpleUserType() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
QName operationName = new QName(TARGET_NAMESPACE, "echoSimpleUserType");
call.setOperationName(operationName);
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcDIIUnconfiguredCallTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -65,12 +65,6 @@
call.setTargetEndpointAddress(TARGET_ENDPOINT_ADDRESS);
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
String world = "world!";
Object retObj = call.invoke(new Object[]{hello, world});
@@ -96,12 +90,6 @@
call.setTargetEndpointAddress(TARGET_ENDPOINT_ADDRESS);
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
Object retObj = call.invoke(new Object[]{hello, userType});
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcEJBTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -61,12 +61,6 @@
String hello = "Hello";
String world = "world!";
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
Object retObj = port.echoString(hello, world);
assertEquals(hello + world, retObj);
}
@@ -76,12 +70,6 @@
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
Object retObj = port.echoSimpleUserType(hello, userType);
assertEquals(userType, retObj);
}
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jsr109ejb/RpcProxyTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -73,12 +73,6 @@
String hello = "Hello";
String world = "world!";
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
Object retObj = port.echoString(hello, world);
assertEquals(hello + world, retObj);
}
@@ -88,12 +82,6 @@
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
Object retObj = port.echoSimpleUserType(hello, userType);
assertEquals(userType, retObj);
}
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/secureejb/SecureEJBTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -63,12 +63,6 @@
*/
public void testRoleSecuredSLSB() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/RoleSecuredSLSB");
@@ -94,12 +88,6 @@
*/
public void testBasicSecuredSLSB() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
OrganizationHome home = (OrganizationHome)iniCtx.lookup("ejb/BasicSecuredSLSB");
@@ -110,12 +98,6 @@
public void testBasicSecuredServiceAccess() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/BasicSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "BasicSecuredPort");
@@ -141,12 +123,6 @@
public void testRoleSecuredServiceAccess() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/RoleSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "RoleSecuredPort");
@@ -172,12 +148,6 @@
public void testConfidentialServiceAccess() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/ConfidentialSecured");
QName portName = new QName("http://org.jboss.ws/samples/secureejb", "ConfidentialPort");
@@ -192,8 +162,8 @@
{
stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://" + getServerHost() + ":8080/jaxrpc-samples-ejb/ConfidentialSecured");
port.getContactInfo("mafia");
- System.out.println("FIXME: JBAS-3595");
- //fail("Security exception expected");
+ System.out.println("FIXME: [JBAS-3595] - Tomcat allows http access with transport guarantie CONFIDENTIAL");
+ fail("Security exception expected");
}
catch (RemoteException ignore)
{
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wsbpel/JbpmBpelTestSetup.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wsbpel/JbpmBpelTestSetup.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wsbpel/JbpmBpelTestSetup.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -47,6 +47,8 @@
protected void setUp() throws Exception
{
+ new JBossWSTestHelper().deploy("jbpm-bpel.sar");
+
for (int i = 0; i < processFiles.length; i++)
{
String processFileName = processFiles[i];
@@ -59,6 +61,12 @@
deploy(processFile);
}
}
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ new JBossWSTestHelper().undeploy("jbpm-bpel.sar");
+ }
public static void deploy(File processFile) throws Exception
{
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/webserviceref/WebServiceRefEJBTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -62,12 +62,6 @@
public void testDynamicProxy() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
URL wsdlURL = new File("resources/jaxrpc/webserviceref/META-INF/wsdl/TestEndpoint.wsdl").toURL();
URL mappingURL = new File("resources/jaxrpc/webserviceref/META-INF/jaxrpc-mapping.xml").toURL();
QName qname = new QName("http://org.jboss.ws/wsref", "TestEndpointService");
@@ -81,12 +75,6 @@
public void testEJBClient() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
InitialContext iniCtx = getInitialContext();
EJBRemoteHome ejbHome = (EJBRemoteHome)iniCtx.lookup("/ejb/EJBClient");
EJBRemote ejbRemote = ejbHome.create();
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/wsse/UsernameTestCase.java 2007-01-31 15:40:31 UTC (rev 2217)
@@ -57,8 +57,6 @@
InitialContext iniCtx = getInitialContext();
Service service = (Service)iniCtx.lookup("java:comp/env/service/TestServiceEJB");
port = (JaxRpcTestService)service.getPort(JaxRpcTestService.class);
- ((Stub)port)._setProperty(Stub.USERNAME_PROPERTY, "kermit");
- ((Stub)port)._setProperty(Stub.PASSWORD_PROPERTY, "thefrog");
}
Properties props = System.getProperties();
@@ -72,12 +70,6 @@
public void testEchoString() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
String world = "world!";
Object retObj = port.echoString(hello, world);
@@ -86,12 +78,6 @@
public void testEchoSimpleUserType() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
SimpleUserType userType = new SimpleUserType(1, 2);
Object retObj = port.echoSimpleUserType(hello, userType);
@@ -100,12 +86,6 @@
public void testEchoStringNoUsername() throws Exception
{
- if (isTargetJBoss50())
- {
- System.out.println("FIXME: [JBAS-3817] Fix EJB2.1 deployments");
- return;
- }
-
String hello = "Hello";
String world = "world!";
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml 2007-01-31 14:16:44 UTC (rev 2216)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxrpc/wsse/username/META-INF/jboss-client.xml 2007-01-31 15:40:31 UTC (rev 2217)
@@ -8,6 +8,17 @@
<service-ref>
<service-ref-name>service/TestServiceEJB</service-ref-name>
<config-name>Standard WSSecurity Client</config-name>
+ <port-component-ref>
+ <service-endpoint-interface>org.jboss.test.ws.jaxrpc.wsse.JaxRpcTestService</service-endpoint-interface>
+ <call-property>
+ <prop-name>javax.xml.rpc.security.auth.username</prop-name>
+ <prop-value>kermit</prop-value>
+ </call-property>
+ <call-property>
+ <prop-name>javax.xml.rpc.security.auth.password</prop-name>
+ <prop-value>thefrog</prop-value>
+ </call-property>
+ </port-component-ref>
<wsdl-override>http://@jbosstest.host.name@:8080/jaxrpc-wsse-username?wsdl</wsdl-override>
</service-ref>
17 years, 11 months