JBossWS SVN: r2335 - branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-02-12 07:33:43 -0500 (Mon, 12 Feb 2007)
New Revision: 2335
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
Log:
typo
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java 2007-02-12 10:43:34 UTC (rev 2334)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java 2007-02-12 12:33:43 UTC (rev 2335)
@@ -30,7 +30,7 @@
import org.jboss.logging.Logger;
-//Test on type with wsdlLocation
+// Test on type with wsdlLocation
@WebServiceRef(name = "service1", value = TestEndpointService.class, wsdlLocation = "META-INF/wsdl/TestEndpoint.wsdl")
// Test multiple on type
17 years, 7 months
JBossWS SVN: r2334 - branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-02-12 05:43:34 -0500 (Mon, 12 Feb 2007)
New Revision: 2334
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
Log:
Simplify WebServiceRef setters
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java 2007-02-12 08:20:46 UTC (rev 2333)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/EJB3Client.java 2007-02-12 10:43:34 UTC (rev 2334)
@@ -60,7 +60,7 @@
// Test on method with value
@WebServiceRef(name = "TestEndpointService5")
- public void setServiceSetter5(TestEndpointService service)
+ public void setService5(TestEndpointService service)
{
this.service5 = service;
}
@@ -68,7 +68,7 @@
// Test on method without name
@WebServiceRef
- public void setServiceSetter6(TestEndpointService service)
+ public void setService6(TestEndpointService service)
{
this.service6 = service;
}
@@ -99,7 +99,7 @@
ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/TestEndpointService5")).getTestEndpointPort());
ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
- ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/" + getClass().getName() + "/serviceSetter6")).getTestEndpointPort());
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp.ejb3/env/" + getClass().getName() + "/Service6")).getTestEndpointPort());
ports.add((TestEndpoint)iniCtx.lookup("java:comp.ejb3/env/port1"));
ports.add(port2);
ports.add((TestEndpoint)iniCtx.lookup("java:comp.ejb3/env/Port2"));
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java 2007-02-12 08:20:46 UTC (rev 2333)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java 2007-02-12 10:43:34 UTC (rev 2334)
@@ -57,7 +57,7 @@
// Test on method with value
@WebServiceRef(name = "TestEndpointService5")
- public void setServiceSetter5(TestEndpointService service)
+ public void setService5(TestEndpointService service)
{
this.service5 = service;
}
@@ -65,7 +65,7 @@
// Test on method without name
@WebServiceRef
- public void setServiceSetter6(TestEndpointService service)
+ public void setService6(TestEndpointService service)
{
this.service6 = service;
}
@@ -98,7 +98,7 @@
ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
- ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/serviceSetter6")).getTestEndpointPort());
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + getClass().getName() + "/Service6")).getTestEndpointPort());
ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
ports.add(port2);
ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java 2007-02-12 08:20:46 UTC (rev 2333)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/samples/webserviceref/TestEndpointClientOne.java 2007-02-12 10:43:34 UTC (rev 2334)
@@ -52,7 +52,7 @@
// Test on method with name
@WebServiceRef(name = "TestEndpointService5")
- static void setServiceSetter5(TestEndpointService service)
+ static void setService5(TestEndpointService service)
{
TestEndpointClientOne.service5 = service;
}
@@ -60,7 +60,7 @@
// Test on method without name
@WebServiceRef
- static void setServiceSetter6(TestEndpointService service)
+ static void setService6(TestEndpointService service)
{
TestEndpointClientOne.service6 = service;
}
@@ -102,7 +102,7 @@
ports.add((TestEndpoint)service5.getPort(TestEndpoint.class));
ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/TestEndpointService5")).getTestEndpointPort());
ports.add((TestEndpoint)service6.getPort(TestEndpoint.class));
- ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + TestEndpointClientOne.class.getName() + "/serviceSetter6")).getTestEndpointPort());
+ ports.add(((TestEndpointService)iniCtx.lookup("java:comp/env/" + TestEndpointClientOne.class.getName() + "/Service6")).getTestEndpointPort());
ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/port1"));
ports.add(port2);
ports.add((TestEndpoint)iniCtx.lookup("java:comp/env/Port2"));
17 years, 7 months
JBossWS SVN: r2333 - branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/wsaddressing/WEB-INF.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-02-12 03:20:46 -0500 (Mon, 12 Feb 2007)
New Revision: 2333
Modified:
branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/wsaddressing/WEB-INF/jaxws-handlers.xml
Log:
layout xml
Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/wsaddressing/WEB-INF/jaxws-handlers.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/wsaddressing/WEB-INF/jaxws-handlers.xml 2007-02-10 06:04:23 UTC (rev 2332)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/samples/wsaddressing/WEB-INF/jaxws-handlers.xml 2007-02-12 08:20:46 UTC (rev 2333)
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_1_2.xsd">
-
- <handler-chain>
+
+ <handler-chain>
<protocol-bindings>##SOAP11_HTTP</protocol-bindings>
- <handler>
- <handler-name>Application Server Handler</handler-name>
- <handler-class>org.jboss.test.ws.jaxws.samples.wsaddressing.ServerHandler</handler-class>
- </handler>
- </handler-chain>
+ <handler>
+ <handler-name>Application Server Handler</handler-name>
+ <handler-class>org.jboss.test.ws.jaxws.samples.wsaddressing.ServerHandler</handler-class>
+ </handler>
+ </handler-chain>
</handler-chains>
\ No newline at end of file
17 years, 7 months
JBossWS SVN: r2332 - in branches/jbossws-1.2.0: build/ant-import and 13 other directories.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-02-10 01:04:23 -0500 (Sat, 10 Feb 2007)
New Revision: 2332
Added:
branches/jbossws-1.2.0/build/etc/wsconsume
branches/jbossws-1.2.0/build/etc/wsconsume.bat
branches/jbossws-1.2.0/build/etc/wsprovide
branches/jbossws-1.2.0/build/etc/wsprovide.bat
branches/jbossws-1.2.0/build/etc/wstools-log4j.xml
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/
branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
Removed:
branches/jbossws-1.2.0/build/etc/wsgen.sh
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java
Modified:
branches/jbossws-1.2.0/build/ant-import/build-release.xml
branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml
branches/jbossws-1.2.0/build/ant.properties.example
branches/jbossws-1.2.0/build/etc/default.mf
branches/jbossws-1.2.0/build/etc/wspublish.sh
branches/jbossws-1.2.0/build/etc/wstools.bat
branches/jbossws-1.2.0/build/etc/wstools.sh
branches/jbossws-1.2.0/build/version.properties
branches/jbossws-1.2.0/jbossws-core/build.xml
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
Log:
Backport tools
Modified: branches/jbossws-1.2.0/build/ant-import/build-release.xml
===================================================================
--- branches/jbossws-1.2.0/build/ant-import/build-release.xml 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/ant-import/build-release.xml 2007-02-10 06:04:23 UTC (rev 2332)
@@ -151,7 +151,10 @@
<fileset dir="${etc.dir}">
<include name="wstools.bat"/>
<include name="wstools.sh"/>
- <include name="wsgen.sh"/>
+ <include name="wsprovide.bat"/>
+ <include name="wsprovide"/>
+ <include name="wsconsume.bat"/>
+ <include name="wsconsume"/>
</fileset>
</copy>
Modified: branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml 2007-02-10 06:04:23 UTC (rev 2332)
@@ -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-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar" dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar" usetimestamp="true" verbose="true"/>
<mkdir dir="${thirdparty.dir}/jbpm-bpel"/>
<unzip dest="${thirdparty.dir}/jbpm-bpel" src="${thirdparty.dir}/jbpm-bpel.sar"/>
Modified: branches/jbossws-1.2.0/build/ant.properties.example
===================================================================
--- branches/jbossws-1.2.0/build/ant.properties.example 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/ant.properties.example 2007-02-10 06:04:23 UTC (rev 2332)
@@ -19,6 +19,12 @@
tomcat.manager.username=manager
tomcat.manager.password=manager
+# Required JAX-WS Home
+# The testsuite requires the RI tools to generate the artifacts
+# Use the RI codebase from java.net: https://jax-ws.dev.java.net/jax-ws-20-fcs/
+#
+ri.home=/usr/java/jaxws-ri
+
# Hudson QA Environment
hudson.root=/home/tdiesler/workspace
hudson.port=8180
@@ -57,3 +63,4 @@
javac.deprecation=yes
javac.fail.onerror=yes
javac.verbose=no
+
Property changes on: branches/jbossws-1.2.0/build/etc/default.mf
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: branches/jbossws-1.2.0/build/etc/wsconsume (from rev 2328, trunk/build/etc/wsconsume)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsconsume (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsconsume 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,81 @@
+#!/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
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JAVA_HOME/lib/tools.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-wsconsume-impl.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/activation.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jaxb-xjc.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_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"`
+ WSCONSUME_CLASSPATH=`cygpath --path --windows "$WSCONSUME_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 "$WSCONSUME_CLASSPATH" \
+ org.jboss.ws.tools.jaxws.command.wsconsume "$@"
Copied: branches/jbossws-1.2.0/build/etc/wsconsume.bat (from rev 2328, trunk/build/etc/wsconsume.bat)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsconsume.bat (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsconsume.bat 2007-02-10 06:04:23 UTC (rev 2332)
@@ -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 WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-xjc.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-wsimport-impl.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_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 "%WSCONSUME_CLASSPATH%" org.jboss.ws.tools.jaxws.command.wsconsume %*
Deleted: branches/jbossws-1.2.0/build/etc/wsgen.sh
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsgen.sh 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wsgen.sh 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,92 +0,0 @@
-#!/bin/sh
-
-# $Id: wstools.sh 1683 2006-12-21 12:40:22Z thomas.diesler(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
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/activation.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
-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"
-
-# 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"`
- WSGEN_CLASSPATH=`cygpath --path --windows "$WSGEN_CLASSPATH"`
- JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
-fi
-
-# Display our environment
-# echo "========================================================================="
-# echo ""
-# echo " WSTools Environment"
-# echo ""
-# echo " JBOSS_HOME: $JBOSS_HOME"
-# echo ""
-# echo " JAVA: $JAVA"
-# echo ""
-# echo " JAVA_OPTS: $JAVA_OPTS"
-# echo ""
-# echo " CLASSPATH: $WSGEN_CLASSPATH"
-# echo ""
-# echo "========================================================================="
-# echo ""
-
-# Execute the JVM
-"$JAVA" $JAVA_OPTS \
- -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
- -classpath "$WSGEN_CLASSPATH" \
- org.jboss.ws.tools.jaxws.WSGenerate "$@"
Copied: branches/jbossws-1.2.0/build/etc/wsprovide (from rev 2328, trunk/build/etc/wsprovide)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsprovide (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsprovide 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# $Id$
+
+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
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/activation.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_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"`
+ WSPROVIDE_CLASSPATH=`cygpath --path --windows "$WSPROVIDE_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 "$WSPROVIDE_CLASSPATH" \
+ org.jboss.ws.tools.jaxws.command.wsprovide "$@"
Copied: branches/jbossws-1.2.0/build/etc/wsprovide.bat (from rev 2328, trunk/build/etc/wsprovide.bat)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsprovide.bat (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsprovide.bat 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,45 @@
+@echo off
+
+rem $Id$
+
+@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 WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_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 "%WSPROVIDE_CLASSPATH%" org.jboss.ws.tools.jaxws.command.wsprovide %*
Modified: branches/jbossws-1.2.0/build/etc/wspublish.sh
===================================================================
--- branches/jbossws-1.2.0/build/etc/wspublish.sh 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wspublish.sh 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,6 +1,6 @@
#!/bin/sh
-# $Id: WSPUBLISH.sh 214 2006-04-20 17:43:45Z thomas.diesler(a)jboss.com $
+# $Id$
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
Property changes on: branches/jbossws-1.2.0/build/etc/wspublish.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: branches/jbossws-1.2.0/build/etc/wstools-log4j.xml (from rev 2328, trunk/build/etc/wstools-log4j.xml)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wstools-log4j.xml (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wstools-log4j.xml 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- WS-Tools Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+| For more configuration infromation and examples see the Jakarta Log4j
+| owebsite: http://jakarta.apache.org/log4j
+-->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="INFO"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss.ws">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.jboss.remoting">
+ <priority value="INFO"/>
+ </category>
+
+ <!--
+ <category name="org.jboss.xb">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+</log4j:configuration>
Modified: branches/jbossws-1.2.0/build/etc/wstools.bat
===================================================================
--- branches/jbossws-1.2.0/build/etc/wstools.bat 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wstools.bat 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,6 +1,6 @@
@echo off
-rem $Id: wstools.bat 1683 2006-12-21 12:40:22Z thomas.diesler(a)jboss.com $
+rem $Id$
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
Property changes on: branches/jbossws-1.2.0/build/etc/wstools.bat
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.2.0/build/etc/wstools.sh
===================================================================
--- branches/jbossws-1.2.0/build/etc/wstools.sh 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wstools.sh 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,6 +1,6 @@
#!/bin/sh
-# $Id: wstools.sh 1683 2006-12-21 12:40:22Z thomas.diesler(a)jboss.com $
+# $Id$
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
Property changes on: branches/jbossws-1.2.0/build/etc/wstools.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: branches/jbossws-1.2.0/build/version.properties
===================================================================
--- branches/jbossws-1.2.0/build/version.properties 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/version.properties 2007-02-10 06:04:23 UTC (rev 2332)
@@ -17,7 +17,7 @@
apache-xmlsec=1.3.0
ibm-wsdl4j=1.5.2jboss
javassist=3.4.GA
-jboss-jbossxb=1.0.0.CR9
+jboss-jbossxb=snapshot
jboss-microcontainer=1.0.2
jboss-remoting=2.0.0.GA
sun-jaxb=2.0.3
@@ -42,6 +42,7 @@
jboss-security=4.0.5.GA
jboss-vfs=2.0.0.Beta2
jbossas-core-libs=4.0.5.GA
+jbossws-wsconsume-impl=2.0.0
jbpm-bpel=1.1.Beta3
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
Modified: branches/jbossws-1.2.0/jbossws-core/build.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/build.xml 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/build.xml 2007-02-10 06:04:23 UTC (rev 2332)
@@ -156,10 +156,16 @@
<include name="dtd/**"/>
</fileset>
<fileset dir="${etc.dir}">
- <include name="wstools.sh"/>
+ <include name="wsprovide.bat"/>
+ <include name="wsconsume.bat"/>
<include name="wstools.bat"/>
<include name="wstools-log4j.xml"/>
</fileset>
+ <zipfileset dir="${etc.dir}" filemode="755">
+ <include name="wsprovide"/>
+ <include name="wsconsume"/>
+ <include name="wstools.sh"/>
+ </zipfileset>
</jar>
</target>
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -147,7 +147,8 @@
for (String property : propertyOrder)
addProperty(clazz, properties.get(property).getName(), new QName(property), property, null);
-
+
+ clazz.stopPruning(!prune);
pool.toClass(clazz, loader);
JavaUtils.clearBlacklists(loader);
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -50,6 +50,7 @@
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLWriter;
@@ -263,7 +264,8 @@
{
try
{
- String serviceName = serviceMetaData.getServiceName().getLocalPart();
+ // The RI uses upper case, and the TCK expects it, so we just mimic this even though we don't really have to
+ String wsdlName = ToolsUtils.firstLetterUpperCase(serviceMetaData.getServiceName().getLocalPart());
WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
@@ -276,12 +278,12 @@
if (wsdlDirectory != null)
{
dir = wsdlDirectory;
- wsdlFile = new File(dir, serviceName + ".wsdl");
+ wsdlFile = new File(dir, wsdlName + ".wsdl");
}
else
{
dir = IOUtils.createTempDirectory();
- wsdlFile = File.createTempFile(serviceName, ".wsdl", dir);
+ wsdlFile = File.createTempFile(wsdlName, ".wsdl", dir);
wsdlFile.deleteOnExit();
}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,210 +0,0 @@
-/*
- * 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.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * WSGenerate is a command line tool that generates portable JAX-WS artifacts
- * for a service endpoint implementation.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- */
-public class WSGenerate
-{
- private boolean generateSource = false;
- private boolean generateWsdl = false;
- private boolean quiet = false;
- private boolean showTraces = false;
- private ClassLoader loader = Thread.currentThread().getContextClassLoader();
- private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
-
- public static String PROGRAM_NAME = System.getProperty("program.name", "wsgen");
-
- public static void main(String[] args)
- {
- WSGenerate generate = new WSGenerate();
- String endpoint = generate.parseArguments(args);
- System.exit(generate.generate(endpoint));
- }
-
- private String parseArguments(String[] args)
- {
- String shortOpts = "hwko:r:s:cqt";
- LongOpt[] longOpts =
- {
- new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
- new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
- new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
- new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
- new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
- new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
- new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
- 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 'k':
- generateSource = true;
- break;
- case 's':
- sourceDir = new File(getopt.getOptarg());
- break;
- case 'r':
- resourceDir = new File(getopt.getOptarg());
- break;
- case 'w':
- generateWsdl = true;
- break;
- case 't':
- showTraces = true;
- break;
- case 'o':
- outputDir = new File(getopt.getOptarg());
- break;
- case 'q':
- quiet = true;
- break;
- case 'c':
- processClassPath(getopt.getOptarg());
- break;
- case 'h':
- printHelp();
- System.exit(0);
- case '?':
- System.exit(1);
- }
- }
-
- int endpointPos = getopt.getOptind();
- if (endpointPos >= args.length)
- {
- System.err.println("Error: endpoint implementation was not specified!");
- printHelp();
- System.exit(1);
- }
-
- return args[endpointPos];
- }
-
-
- private int generate(String endpoint)
- {
- if (!JavaUtils.isLoaded(endpoint, loader))
- {
- System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
- return 1;
- }
-
- WebServiceGenerator gen = WebServiceGenerator.newInstance(loader);
- gen.setGenerateWsdl(generateWsdl);
- gen.setGenerateSource(generateSource);
- gen.setOutputDirectory(outputDir);
- if (resourceDir != null)
- gen.setResourceDirectory(resourceDir);
- if (sourceDir != null)
- gen.setSourceDirectory(sourceDir);
-
- if (! quiet)
- gen.setMessageStream(System.out);
-
- try
- {
- gen.generate(endpoint);
- return 0;
- }
- catch (Throwable t)
- {
- System.err.println("Error: Could not generate. (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 void processClassPath(String classPath)
- {
- String[] entries = classPath.split(File.pathSeparator);
- List<URL> urls= new ArrayList<URL>(entries.length);
- for (String entry : entries)
- {
- try
- {
- urls.add(new File(entry).toURL());
- }
- catch (MalformedURLException e)
- {
- System.err.println("Error: a classpath entry was malformed: " + entry);
- }
- }
- loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
- }
-
- private static void printHelp()
- {
- PrintStream out = System.out;
- out.println("WSGenerate generates portable JAX-WS artifacts for an endpoint implementation.\n");
- out.println("usage: " + PROGRAM_NAME + " [options] <endpoint class name>\n");
- out.println("options: ");
- out.println(" -h, --help Show this help message");
- out.println(" -k, --keep Keep/Generate Java source");
- out.println(" -w, --wsdl Enable WSDL file generation");
- out.println(" -c. --classpath The classpath that contains the endpoint");
- out.println(" -o, --output=<directory> The directory to put generated artifacts");
- out.println(" -r, --resource=<directory> The directory to put resource 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();
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,217 +0,0 @@
-/*
-* 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 org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.BuildException;
-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.Path;
-import org.apache.tools.ant.types.Reference;
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * Ant task which invokes WebServiceGenerate.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- */
-public class WSGenerate extends Task
-{
- private Path classpath = new Path(getProject());
- private String sei = null;
- private File destdir = null;
- private File resourcedestdir = null;
- private File sourcedestdir = null;
- private boolean keep = false;
- private boolean genwsdl = false;
- private boolean verbose = false;
- private boolean fork = false;
-
- public void setClasspath(Path classpath)
- {
- this.classpath = classpath;
- }
-
- public void setClasspathRef(Reference ref)
- {
- createClasspath().setRefid(ref);
- }
-
- public Path createClasspath()
- {
- return classpath;
- }
-
- public void setDestdir(File destdir)
- {
- this.destdir = destdir;
- }
-
- public void setKeep(boolean keep)
- {
- this.keep = keep;
- }
-
- public void setSei(String sei)
- {
- this.sei = sei;
- }
-
- public void setEndpoint(String endpoint)
- {
- this.sei = endpoint;
- }
-
- public void setFork(boolean fork)
- {
- this.fork = fork;
- }
-
- public void setResourcedestdir(File resourcedestdir)
- {
- this.resourcedestdir = resourcedestdir;
- }
-
- public void setSourcedestdir(File sourcedestdir)
- {
- this.sourcedestdir = sourcedestdir;
- }
-
- public void setVerbose(boolean verbose)
- {
- this.verbose = verbose;
- }
-
- public void setGenwsdl(boolean genwsdl)
- {
- this.genwsdl = genwsdl;
- }
-
- private ClassLoader getClasspathLoader(ClassLoader parent)
- {
- return new AntClassLoader(parent, getProject(), classpath, false);
- }
-
- public void executeNonForked()
- {
- ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
- ClassLoader antLoader = this.getClass().getClassLoader();
- Thread.currentThread().setContextClassLoader(antLoader);
- try
- {
- WebServiceGenerator gen = WebServiceGenerator.newInstance();
- gen.setClassLoader(getClasspathLoader(antLoader));
- if (verbose)
- gen.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
- gen.setGenerateSource(keep);
- gen.setGenerateWsdl(genwsdl);
- if (destdir != null)
- gen.setOutputDirectory(destdir);
- if (resourcedestdir != null)
- gen.setResourceDirectory(resourcedestdir);
- if (sourcedestdir != null)
- gen.setSourceDirectory(sourcedestdir);
- if (verbose)
- log("Generating from endpoint: " + sei, Project.MSG_INFO);
-
- gen.generate(sei);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(prevCL);
- }
- }
-
- public void execute() throws BuildException
- {
- 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 void executeForked() throws BuildException
- {
- CommandlineJava command = new CommandlineJava();
- command.setClassname(org.jboss.ws.tools.jaxws.WSGenerate.class.getName());
-
- Path path = command.createClasspath(getProject());
- path.append(getTaskClassPath());
- path.append(classpath);
-
- if (keep)
- command.createArgument().setValue("-k");
-
- if (genwsdl)
- command.createArgument().setValue("-w");
-
- if (destdir != null)
- {
- command.createArgument().setValue("-o");
- command.createArgument().setFile(destdir);
- }
- if (resourcedestdir != null)
- {
- command.createArgument().setValue("-r");
- command.createArgument().setFile(resourcedestdir);
- }
- 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(sei);
-
- 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 wsgen", getLocation());
- }
-}
\ No newline at end of file
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,308 @@
+/*
+* 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.Commandline;
+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.WSContractConsumer;
+
+/**
+ * Ant task which consumes a Web Service contract.
+ *
+ * <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>
+ * <wsconsume
+ * 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 wsconsume extends Task
+{
+ private CommandlineJava command = new CommandlineJava();
+ 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 Commandline.Argument createJvmarg()
+ {
+ return command.createVmArgument();
+ }
+
+ 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 setPackage(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
+ {
+ WSContractConsumer importer = WSContractConsumer.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.consume(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
+ {
+ command.setClassname(org.jboss.ws.tools.jaxws.command.wsconsume.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 wsconsume", getLocation());
+ }
+}
\ No newline at end of file
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,266 @@
+/*
+* 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 org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+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.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * Ant task which invokes provides a Web Service contract and portable JAX-WS wrapper classes.
+ *
+ * <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>destdir</td><td>The output directory for generated artifacts.</td><td>"output"</td></tr>
+ * <tr><td>resourcedestdir</td><td>The output directory for resource artifacts (WSDL/XSD).</td><td>value of destdir</td></tr>
+ * <tr><td>sourcedir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
+ * <tr><td>genwsdl</td><td>Whether or not to generate WSDL.</td><td>false</td><tr>
+ * <tr><td>verbose</td><td>Enables more informational output about command progress.</td><td>false</td><tr>
+ * <tr><td>sei*</td><td>Service Endpoint Implementation.</td><td></td><tr>
+ * <tr><td>classpath</td><td>The classpath that contains the service endpoint implementation.</td><td>""</tr>
+ * </table>
+ * <b>* = required.</b>
+ *
+ * <p>Example:
+ *
+ * <pre>
+ * <target name="test-wsproivde" depends="init">
+ * <taskdef name="wsprovide" classname="org.jboss.ws.tools.jaxws.ant.wsprovide">
+ * <classpath refid="core.classpath"/>
+ * </taskdef>
+ * <wsgen
+ * fork="false"
+ * keep="true"
+ * destdir="out"
+ * resourcedestdir="out-resource"
+ * sourcedestdir="out-source"
+ * genwsdl="true"
+ * verbose="true"
+ * sei="org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrappedServiceImpl">
+ * <classpath>
+ * <pathelement path="${tests.output.dir}/classes"/>
+ * </classpath>
+ * </wsgen>
+ * </target>
+ * </pre>
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class wsprovide extends Task
+{
+ private Path classpath = new Path(getProject());
+ private CommandlineJava command = new CommandlineJava();
+ private String sei = null;
+ private File destdir = null;
+ private File resourcedestdir = null;
+ private File sourcedestdir = null;
+ private boolean keep = false;
+ private boolean genwsdl = 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 Commandline.Argument createJvmarg()
+ {
+ return command.createVmArgument();
+ }
+
+ public void setClasspath(Path classpath)
+ {
+ this.classpath = classpath;
+ }
+
+ public void setClasspathRef(Reference ref)
+ {
+ createClasspath().setRefid(ref);
+ }
+
+ public Path createClasspath()
+ {
+ return classpath;
+ }
+
+ public void setDestdir(File destdir)
+ {
+ this.destdir = destdir;
+ }
+
+ public void setKeep(boolean keep)
+ {
+ this.keep = keep;
+ }
+
+ public void setSei(String sei)
+ {
+ this.sei = sei;
+ }
+
+ public void setFork(boolean fork)
+ {
+ this.fork = fork;
+ }
+
+ public void setResourcedestdir(File resourcedestdir)
+ {
+ this.resourcedestdir = resourcedestdir;
+ }
+
+ public void setSourcedestdir(File sourcedestdir)
+ {
+ this.sourcedestdir = sourcedestdir;
+ }
+
+ public void setVerbose(boolean verbose)
+ {
+ this.verbose = verbose;
+ }
+
+ public void setGenwsdl(boolean genwsdl)
+ {
+ this.genwsdl = genwsdl;
+ }
+
+ private ClassLoader getClasspathLoader(ClassLoader parent)
+ {
+ return new AntClassLoader(parent, getProject(), classpath, false);
+ }
+
+ public void executeNonForked()
+ {
+ ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
+ ClassLoader antLoader = this.getClass().getClassLoader();
+ Thread.currentThread().setContextClassLoader(antLoader);
+ try
+ {
+ WSContractProvider gen = WSContractProvider.newInstance();
+ gen.setClassLoader(getClasspathLoader(antLoader));
+ if (verbose)
+ gen.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
+ gen.setGenerateSource(keep);
+ gen.setGenerateWsdl(genwsdl);
+ if (destdir != null)
+ gen.setOutputDirectory(destdir);
+ if (resourcedestdir != null)
+ gen.setResourceDirectory(resourcedestdir);
+ if (sourcedestdir != null)
+ gen.setSourceDirectory(sourcedestdir);
+ if (verbose)
+ log("Generating from endpoint: " + sei, Project.MSG_INFO);
+
+ gen.provide(sei);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(prevCL);
+ }
+ }
+
+ public void execute() throws BuildException
+ {
+ if (sei == null)
+ throw new BuildException("The sei 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 void executeForked() throws BuildException
+ {
+ command.setClassname(org.jboss.ws.tools.jaxws.command.wsprovide.class.getName());
+
+ Path path = command.createClasspath(getProject());
+ path.append(getTaskClassPath());
+ path.append(classpath);
+
+ if (keep)
+ command.createArgument().setValue("-k");
+
+ if (genwsdl)
+ command.createArgument().setValue("-w");
+
+ if (destdir != null)
+ {
+ command.createArgument().setValue("-o");
+ command.createArgument().setFile(destdir);
+ }
+ if (resourcedestdir != null)
+ {
+ command.createArgument().setValue("-r");
+ command.createArgument().setFile(resourcedestdir);
+ }
+ 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(sei);
+
+ 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 wsprovide", getLocation());
+ }
+}
\ No newline at end of file
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,75 @@
+/*
+* 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.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Locates a provider.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ *
+ */
+class Locator
+{
+ static <T> T locate(Class<T> providerType, String providerProperty, String defaultProvider, ClassLoader loader)
+ {
+ String provider = null;
+
+ try
+ {
+
+ PrivilegedAction action = new PropertyAccessAction(providerProperty);
+ provider = (String)AccessController.doPrivileged(action);
+ if (provider == null)
+ provider = defaultProvider;
+
+ Class<?> clazz = loader.loadClass(provider);
+ return (T) clazz.newInstance();
+ }
+ catch (Throwable t)
+ {
+ if (provider == null)
+ throw new IllegalStateException("Failure reading system property: " + providerProperty);
+
+ throw new IllegalStateException("Could not load provider:" + provider);
+ }
+
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+}
\ No newline at end of file
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,75 +0,0 @@
-/*
-* 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.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Locates a provider.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- *
- */
-class ProviderLocator
-{
- static <T> T locate(Class<T> providerType, String providerProperty, String defaultProvider, ClassLoader loader)
- {
- String provider = null;
-
- try
- {
-
- PrivilegedAction action = new PropertyAccessAction(providerProperty);
- provider = (String)AccessController.doPrivileged(action);
- if (provider == null)
- provider = defaultProvider;
-
- Class<?> clazz = loader.loadClass(provider);
- return (T) clazz.newInstance();
- }
- catch (Throwable t)
- {
- if (provider == null)
- throw new IllegalStateException("Failure reading system property: " + providerProperty);
-
- throw new IllegalStateException("Could not load provider:" + provider);
- }
-
- }
-
- private static class PropertyAccessAction implements PrivilegedAction
- {
- private String name;
-
- PropertyAccessAction(String name)
- {
- this.name = name;
- }
-
- public Object run()
- {
- return System.getProperty(name);
- }
- }
-
-}
\ No newline at end of file
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -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.WSContractConsumerFactory;
+
+/**
+ * WSContractConsumer 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 WSContractConsumer
+{
+ private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.WSContractConsumerFactoryImpl";
+ public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.WSContractConsumerFactoryImpl";
+
+ /**
+ * Obtain a new instance of a WSContractProvider. This will use the current
+ * thread's context class loader to locate the WSContractProviderFactory
+ * implementation.
+ *
+ * @return a new WSContractProvider
+ */
+ public static WSContractConsumer newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be used to
+ * locate the WebServiceImporterProvide implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WSContractConsumer
+ */
+ public static WSContractConsumer newInstance(ClassLoader loader)
+ {
+ WSContractConsumerFactory provider = Locator.locate(WSContractConsumerFactory.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 consume(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 consume(String wsdl) throws MalformedURLException
+ {
+ URL url = null;
+ try
+ {
+ url = new URL(wsdl);
+ }
+ catch (MalformedURLException e)
+ {
+ File file = new File(wsdl);
+ url = file.toURL();
+ }
+
+ consume(url);
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,150 @@
+package org.jboss.ws.tools.jaxws.api;
+
+import java.io.File;
+import java.io.PrintStream;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.tools.jaxws.spi.WSContractProviderFactory;
+
+
+/**
+ * WSContractProvider is responsible for generating the required portable
+ * JAX-WS artifacts for a service endpoint implementation. This includes class
+ * files for wrapper types and fault beans. WSDL may be optionally generated as
+ * well using this API.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ *
+ * <p>The following example generates class files, source files and WSDL for an
+ * endpoint:</p>
+ * <pre>
+ * WSContractProvider provider = WSContractProvider.newInstance();
+ * provider.setGenerateSource(true);
+ * provider.setGenerateWsdl(true);
+ * provider.setOutputDirectory(new File("output"));
+ * provider.setMessageStream(System.out);
+ * provider.provide(TestMe.class);
+ * </pre>
+ *
+ * <p>Thread-Safety:</p>
+ * This class expects to be thread-confined, so it can not be shared between threads.
+ */
+public abstract class WSContractProvider
+{
+ private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.WSContractProviderFactoryImpl";
+ public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.WSContractProviderFactoryImpl";
+
+ protected WSContractProvider()
+ {
+
+ }
+
+ /**
+ * Obtain a new instance of a WSContractProvider. This will use the current
+ * thread's context class loader to locate the WSContractProviderFactory
+ * implementation.
+ *
+ * @return a new WSContractProvider
+ */
+ public static WSContractProvider newInstance()
+ {
+ return newInstance(Thread.currentThread().getContextClassLoader());
+ }
+
+ /**
+ * Obtain a new instance of a WSContractProvider. The specified ClassLoader will be used to
+ * locate the WSContractProviderFactory implementation
+ *
+ * @param loader the ClassLoader to use
+ * @return a new WSContractProvider
+ */
+ public static WSContractProvider newInstance(ClassLoader loader)
+ {
+ WSContractProviderFactory provider = Locator.locate(WSContractProviderFactory.class, PROVIDER_PROPERTY, DEFAULT_PROVIDER, loader);
+ return provider.createGenerator(loader);
+ }
+
+ /**
+ * Enables/Disables WSDL generation.
+ *
+ * @param generateWsdl whether or not to generate WSDL
+ */
+ public abstract void setGenerateWsdl(boolean generateWsdl);
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ * @param generateSource whether or not to generate Java source.
+ */
+ public abstract void setGenerateSource(boolean generateSource);
+
+ /**
+ * 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 resource directory. This directory will contain any generated
+ * WSDL and XSD files. 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 resource files
+ */
+ public abstract void setResourceDirectory(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);
+
+ /**
+ * Sets the ClassLoader used to discover types. This defaults to the one used
+ * in instantiation.
+ *
+ * @param loader the ClassLoader to use
+ */
+ public abstract void setClassLoader(ClassLoader loader);
+
+ /**
+ * Generates artifacts using the current settings. This method may be invoked
+ * more than once (e.g. multiple endpoints).
+ *
+ * @param endpointClass the name of the endpoint implementation bean
+ * @throws WSException if any error occurs during processing, or the class is not found
+ */
+ public abstract void provide(String endpointClass);
+
+ /**
+ * Generates artifacts using the current settings. This method may be invoked
+ * more than once (e.g. multiple endpoints).
+ *
+ * @param endpointClass the endpoint implementation bean
+ * @throws WSException if any error occurs during processing
+ */
+ public abstract void provide(Class<?> endpointClass);
+
+ /**
+ * Sets the PrintStream to use for status feedback. The simplest example
+ * would be to use System.out.
+ *
+ * <p>Example output:</p>
+ * <pre>
+ * Generating WSDL:
+ * TestMeService.wsdl
+ * Writing Source:
+ * org/jboss/ws/tools/jaxws/TestMe.java
+ * org/jboss/ws/tools/jaxws/TestMeResponse.java
+ * Writing Classes:
+ * org/jboss/ws/tools/jaxws/TestMe.class
+ * org/jboss/ws/tools/jaxws/TestMeResponse.class
+ * </pre>
+ * @param messageStream the stream to use for status messages:
+ */
+ public abstract void setMessageStream(PrintStream messageStream);
+}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,150 +0,0 @@
-package org.jboss.ws.tools.jaxws.api;
-
-import java.io.File;
-import java.io.PrintStream;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.tools.jaxws.spi.WebServiceGeneratorProvider;
-
-
-/**
- * WebServiceGenerator is responsible for generating the required portable
- * JAX-WS artifacts for a service endpoint implementation. This includes class
- * files for wrapper types and fault beans. WSDL may be optionally generated as
- * well using this API.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- *
- * <p>The following example generates class files, source files and WSDL for an
- * endpoint:</p>
- * <pre>
- * WebServiceGenerator generator = WebServiceGenerator.newInstance();
- * generator.setGenerateSource(true);
- * generator.setGenerateWsdl(true);
- * generator.setOutputDirectory(new File("output"));
- * generator.setMessageStream(System.out);
- * generator.generate(TestMe.class);
- * </pre>
- *
- * <p>Thread-Safety:</p>
- * This class expects to be thread-confined, so it can not be shared between threads.
- */
-public abstract class WebServiceGenerator
-{
- private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.WebServiceGeneratorProviderImpl";
- public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.webServiceGeneratorProvider";
-
- protected WebServiceGenerator()
- {
-
- }
-
- /**
- * 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 WebServiceGenerator newInstance()
- {
- return newInstance(Thread.currentThread().getContextClassLoader());
- }
-
- /**
- * Obtain a new instance of a WebServiceGenerator. The specified ClassLoader will be used to
- * locate the WebServiceGeneratorProvide implementation
- *
- * @param loader the ClassLoader to use
- * @return a new WebServiceGenerator
- */
- public static WebServiceGenerator newInstance(ClassLoader loader)
- {
- WebServiceGeneratorProvider provider = ProviderLocator.locate(WebServiceGeneratorProvider.class, PROVIDER_PROPERTY, DEFAULT_PROVIDER, loader);
- return provider.createGenerator(loader);
- }
-
- /**
- * Enables/Disables WSDL generation.
- *
- * @param generateWsdl whether or not to generate WSDL
- */
- public abstract void setGenerateWsdl(boolean generateWsdl);
-
- /**
- * Enables/Disables Java source generation.
- *
- * @param generateSource whether or not to generate Java source.
- */
- public abstract void setGenerateSource(boolean generateSource);
-
- /**
- * 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 resource directory. This directory will contain any generated
- * WSDL and XSD files. 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 resource files
- */
- public abstract void setResourceDirectory(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);
-
- /**
- * Sets the ClassLoader used to discover types. This defaults to the one used
- * in instantiation.
- *
- * @param loader the ClassLoader to use
- */
- public abstract void setClassLoader(ClassLoader loader);
-
- /**
- * Generates artifacts using the current settings. This method may be invoked
- * more than once (e.g. multiple endpoints).
- *
- * @param endpointClass the name of the endpoint implementation bean
- * @throws WSException if any error occurs during processing, or the class is not found
- */
- public abstract void generate(String endpointClass);
-
- /**
- * Generates artifacts using the current settings. This method may be invoked
- * more than once (e.g. multiple endpoints).
- *
- * @param endpointClass the endpoint implementation bean
- * @throws WSException if any error occurs during processing
- */
- public abstract void generate(Class<?> endpointClass);
-
- /**
- * Sets the PrintStream to use for status feedback. The simplest example
- * would be to use System.out.
- *
- * <p>Example output:</p>
- * <pre>
- * Generating WSDL:
- * TestMeService.wsdl
- * Writing Source:
- * org/jboss/ws/tools/jaxws/TestMe.java
- * org/jboss/ws/tools/jaxws/TestMeResponse.java
- * Writing Classes:
- * org/jboss/ws/tools/jaxws/TestMe.class
- * org/jboss/ws/tools/jaxws/TestMeResponse.class
- * </pre>
- * @param messageStream the stream to use for status messages:
- */
- public abstract void setMessageStream(PrintStream messageStream);
-}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command)
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java 2007-02-09 23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,235 +0,0 @@
-/*
- * 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.command;
-
-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.WSContractConsumer;
-
-/**
- * wsconsume 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: 2221 $
- */
-public class wsconsume
-{
- 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", wsconsume.class.getName());
-
- public static void main(String[] args)
- {
- wsconsume importer = new wsconsume();
- 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)
- {
- WSContractConsumer importer = WSContractConsumer.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.consume(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("wsconsume 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();
- }
-}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -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.command;
+
+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.WSContractConsumer;
+
+/**
+ * wsconsume 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: 2221 $
+ */
+public class wsconsume
+{
+ 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", wsconsume.class.getName());
+
+ public static void main(String[] args)
+ {
+ wsconsume importer = new wsconsume();
+ 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)
+ {
+ WSContractConsumer importer = WSContractConsumer.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.consume(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("wsconsume 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();
+ }
+}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java 2007-02-09 23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,225 +0,0 @@
-/*
- * 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.command;
-
-import gnu.getopt.Getopt;
-import gnu.getopt.LongOpt;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.tools.jaxws.api.WSContractProvider;
-
-/**
- * wsprovide is a command line tool that generates portable JAX-WS artifacts
- * for a service endpoint implementation.
- *
- * <pre>
- * usage: wsprovide [options] <endpoint class name>
- * options:
- * -h, --help Show this help message
- * -k, --keep Keep/Generate Java source
- * -w, --wsdl Enable WSDL file generation
- * -c. --classpath The classpath that contains the endpoint
- * -o, --output=<directory> The directory to put generated artifacts
- * -r, --resource=<directory> The directory to put resource 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: 2164 $
- */
-public class wsprovide
-{
- private boolean generateSource = false;
- private boolean generateWsdl = false;
- private boolean quiet = false;
- private boolean showTraces = false;
- private ClassLoader loader = Thread.currentThread().getContextClassLoader();
- private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
-
- public static String PROGRAM_NAME = System.getProperty("program.name", wsprovide.class.getSimpleName());
-
- public static void main(String[] args)
- {
- wsprovide generate = new wsprovide();
- String endpoint = generate.parseArguments(args);
- System.exit(generate.generate(endpoint));
- }
-
- private String parseArguments(String[] args)
- {
- String shortOpts = "hwko:r:s:cqt";
- LongOpt[] longOpts =
- {
- new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
- new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
- new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
- new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
- new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
- new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
- new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
- 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 'k':
- generateSource = true;
- break;
- case 's':
- sourceDir = new File(getopt.getOptarg());
- break;
- case 'r':
- resourceDir = new File(getopt.getOptarg());
- break;
- case 'w':
- generateWsdl = true;
- break;
- case 't':
- showTraces = true;
- break;
- case 'o':
- outputDir = new File(getopt.getOptarg());
- break;
- case 'q':
- quiet = true;
- break;
- case 'c':
- processClassPath(getopt.getOptarg());
- break;
- case 'h':
- printHelp();
- System.exit(0);
- case '?':
- System.exit(1);
- }
- }
-
- int endpointPos = getopt.getOptind();
- if (endpointPos >= args.length)
- {
- System.err.println("Error: endpoint implementation was not specified!");
- printHelp();
- System.exit(1);
- }
-
- return args[endpointPos];
- }
-
-
- private int generate(String endpoint)
- {
- if (!JavaUtils.isLoaded(endpoint, loader))
- {
- System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
- return 1;
- }
-
- WSContractProvider gen = WSContractProvider.newInstance(loader);
- gen.setGenerateWsdl(generateWsdl);
- gen.setGenerateSource(generateSource);
- gen.setOutputDirectory(outputDir);
- if (resourceDir != null)
- gen.setResourceDirectory(resourceDir);
- if (sourceDir != null)
- gen.setSourceDirectory(sourceDir);
-
- if (! quiet)
- gen.setMessageStream(System.out);
-
- try
- {
- gen.provide(endpoint);
- return 0;
- }
- catch (Throwable t)
- {
- System.err.println("Error: Could not generate. (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 void processClassPath(String classPath)
- {
- String[] entries = classPath.split(File.pathSeparator);
- List<URL> urls= new ArrayList<URL>(entries.length);
- for (String entry : entries)
- {
- try
- {
- urls.add(new File(entry).toURL());
- }
- catch (MalformedURLException e)
- {
- System.err.println("Error: a classpath entry was malformed: " + entry);
- }
- }
- loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
- }
-
- private static void printHelp()
- {
- PrintStream out = System.out;
- out.println("wsprovide generates portable JAX-WS artifacts for an endpoint implementation.\n");
- out.println("usage: " + PROGRAM_NAME + " [options] <endpoint class name>\n");
- out.println("options: ");
- out.println(" -h, --help Show this help message");
- out.println(" -k, --keep Keep/Generate Java source");
- out.println(" -w, --wsdl Enable WSDL file generation");
- out.println(" -c. --classpath The classpath that contains the endpoint");
- out.println(" -o, --output=<directory> The directory to put generated artifacts");
- out.println(" -r, --resource=<directory> The directory to put resource 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();
- }
-}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,225 @@
+/*
+ * 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.command;
+
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * wsprovide is a command line tool that generates portable JAX-WS artifacts
+ * for a service endpoint implementation.
+ *
+ * <pre>
+ * usage: wsprovide [options] <endpoint class name>
+ * options:
+ * -h, --help Show this help message
+ * -k, --keep Keep/Generate Java source
+ * -w, --wsdl Enable WSDL file generation
+ * -c. --classpath The classpath that contains the endpoint
+ * -o, --output=<directory> The directory to put generated artifacts
+ * -r, --resource=<directory> The directory to put resource 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: 2164 $
+ */
+public class wsprovide
+{
+ private boolean generateSource = false;
+ private boolean generateWsdl = false;
+ private boolean quiet = false;
+ private boolean showTraces = false;
+ private ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ private File outputDir = new File("output");
+ private File resourceDir = null;
+ private File sourceDir = null;
+
+ public static String PROGRAM_NAME = System.getProperty("program.name", wsprovide.class.getSimpleName());
+
+ public static void main(String[] args)
+ {
+ wsprovide generate = new wsprovide();
+ String endpoint = generate.parseArguments(args);
+ System.exit(generate.generate(endpoint));
+ }
+
+ private String parseArguments(String[] args)
+ {
+ String shortOpts = "hwko:r:s:cqt";
+ LongOpt[] longOpts =
+ {
+ new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+ new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
+ new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+ new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
+ new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
+ new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+ new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+ 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 'k':
+ generateSource = true;
+ break;
+ case 's':
+ sourceDir = new File(getopt.getOptarg());
+ break;
+ case 'r':
+ resourceDir = new File(getopt.getOptarg());
+ break;
+ case 'w':
+ generateWsdl = true;
+ break;
+ case 't':
+ showTraces = true;
+ break;
+ case 'o':
+ outputDir = new File(getopt.getOptarg());
+ break;
+ case 'q':
+ quiet = true;
+ break;
+ case 'c':
+ processClassPath(getopt.getOptarg());
+ break;
+ case 'h':
+ printHelp();
+ System.exit(0);
+ case '?':
+ System.exit(1);
+ }
+ }
+
+ int endpointPos = getopt.getOptind();
+ if (endpointPos >= args.length)
+ {
+ System.err.println("Error: endpoint implementation was not specified!");
+ printHelp();
+ System.exit(1);
+ }
+
+ return args[endpointPos];
+ }
+
+
+ private int generate(String endpoint)
+ {
+ if (!JavaUtils.isLoaded(endpoint, loader))
+ {
+ System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
+ return 1;
+ }
+
+ WSContractProvider gen = WSContractProvider.newInstance(loader);
+ gen.setGenerateWsdl(generateWsdl);
+ gen.setGenerateSource(generateSource);
+ gen.setOutputDirectory(outputDir);
+ if (resourceDir != null)
+ gen.setResourceDirectory(resourceDir);
+ if (sourceDir != null)
+ gen.setSourceDirectory(sourceDir);
+
+ if (! quiet)
+ gen.setMessageStream(System.out);
+
+ try
+ {
+ gen.provide(endpoint);
+ return 0;
+ }
+ catch (Throwable t)
+ {
+ System.err.println("Error: Could not generate. (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 void processClassPath(String classPath)
+ {
+ String[] entries = classPath.split(File.pathSeparator);
+ List<URL> urls= new ArrayList<URL>(entries.length);
+ for (String entry : entries)
+ {
+ try
+ {
+ urls.add(new File(entry).toURL());
+ }
+ catch (MalformedURLException e)
+ {
+ System.err.println("Error: a classpath entry was malformed: " + entry);
+ }
+ }
+ loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
+ }
+
+ private static void printHelp()
+ {
+ PrintStream out = System.out;
+ out.println("wsprovide generates portable JAX-WS artifacts for an endpoint implementation.\n");
+ out.println("usage: " + PROGRAM_NAME + " [options] <endpoint class name>\n");
+ out.println("options: ");
+ out.println(" -h, --help Show this help message");
+ out.println(" -k, --keep Keep/Generate Java source");
+ out.println(" -w, --wsdl Enable WSDL file generation");
+ out.println(" -c. --classpath The classpath that contains the endpoint");
+ out.println(" -o, --output=<directory> The directory to put generated artifacts");
+ out.println(" -r, --resource=<directory> The directory to put resource 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();
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,35 @@
+/*
+ * 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.impl;
+
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+import org.jboss.ws.tools.jaxws.spi.WSContractProviderFactory;
+
+public class WSContractProviderFactoryImpl implements WSContractProviderFactory
+{
+ public WSContractProvider createGenerator(ClassLoader loader)
+ {
+ WSContractProviderImpl impl = new WSContractProviderImpl();
+ impl.setClassLoader(loader);
+ return impl;
+ }
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,183 @@
+/*
+* 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.impl;
+
+import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3;
+import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import javax.ejb.Stateless;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
+import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * The provided implementation of a WSContractProvider.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ */
+final class WSContractProviderImpl extends WSContractProvider
+{
+ private ClassLoader loader;
+ private boolean generateWsdl = false;
+ private boolean generateSource = false;
+ private File outputDir = new File("output");
+ private File resourceDir = null;
+ private File sourceDir = null;
+ private PrintStream messageStream = new NullPrintStream();
+
+ private void createDirectories(File resourceDir, File sourceDir)
+ {
+ if (!outputDir.exists())
+ if (!outputDir.mkdirs())
+ throw new WSException("Could not create directory: " + outputDir);
+
+ if (generateWsdl && !resourceDir.exists())
+ if (!resourceDir.mkdirs())
+ throw new WSException("Could not create directory: " + resourceDir);
+
+ if (generateSource && !sourceDir.exists())
+ if (!sourceDir.mkdirs())
+ throw new WSException("Could not create directory: " + sourceDir);
+ }
+
+ private UnifiedDeploymentInfo createUDI(Class<?> endpointClass, ClassLoader loader)
+ {
+ DeploymentType type = (endpointClass.isAnnotationPresent(Stateless.class)) ? JAXWS_EJB3 : JAXWS_JSE;
+ UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(type)
+ {
+ @Override
+ public URL getMetaDataFileURL(String resourcePath) throws IOException
+ {
+ return null;
+ }
+ };
+ udi.classLoader = loader;
+ return udi;
+ }
+
+ @Override
+ public void provide(Class<?> endpointClass)
+ {
+ // Use the output directory as the default
+ File resourceDir = (this.resourceDir != null) ? this.resourceDir : outputDir;
+ File sourceDir = (this.sourceDir != null) ? this.sourceDir : outputDir;
+
+ createDirectories(resourceDir, sourceDir);
+
+ // Create a dummy classloader to catch generated classes
+ ClassLoader loader = new URLClassLoader(new URL[0], this.loader);
+ UnifiedMetaData umd = new UnifiedMetaData(new ResourceLoaderAdapter(loader));
+ umd.setClassLoader(loader);
+
+ ChainedWritableWrapperGenerator generator = new ChainedWritableWrapperGenerator();
+ if (generateSource)
+ generator.add(new SourceWrapperGenerator(loader, messageStream), sourceDir);
+ generator.add(new BytecodeWrapperGenerator(loader, messageStream), outputDir);
+
+ JAXWSWebServiceMetaDataBuilder builder = new JAXWSWebServiceMetaDataBuilder();
+ builder.setWrapperGenerator(generator);
+ builder.setGenerateWsdl(generateWsdl);
+ builder.setToolMode(true);
+ builder.setWsdlDirectory(resourceDir);
+ builder.setMessageStream(messageStream);
+
+ if (generateWsdl)
+ messageStream.println("Generating WSDL:");
+
+ UnifiedDeploymentInfo udi = createUDI(endpointClass, loader);
+ builder.buildWebServiceMetaData(umd, udi, endpointClass, null);
+ try
+ {
+ generator.write();
+ }
+ catch (IOException io)
+ {
+ throw new WSException("Could not write output files:", io);
+ }
+ }
+
+ @Override
+ public void provide(String endpointClass)
+ {
+ try
+ {
+ provide(loader.loadClass(endpointClass));
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new WSException("Class not found: " + endpointClass);
+ }
+ }
+
+ @Override
+ public void setClassLoader(ClassLoader loader)
+ {
+ this.loader = loader;
+ }
+
+ @Override
+ public void setGenerateWsdl(boolean generateWsdl)
+ {
+ this.generateWsdl = generateWsdl;
+ }
+
+ @Override
+ public void setOutputDirectory(File directory)
+ {
+ outputDir = directory;
+ }
+
+ @Override
+ public void setGenerateSource(boolean generateSource)
+ {
+ this.generateSource = generateSource;
+ }
+
+ @Override
+ public void setResourceDirectory(File directory)
+ {
+ resourceDir = directory;
+ }
+
+ @Override
+ public void setSourceDirectory(File directory)
+ {
+ sourceDir = directory;
+ }
+
+ @Override
+ public void setMessageStream(PrintStream messageStream)
+ {
+ this.messageStream = messageStream;
+ }
+}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,167 +0,0 @@
-/*
-* 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.impl;
-
-import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3;
-import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.URL;
-
-import javax.ejb.Stateless;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * The provided implementation of a WebServiceGenerator.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- */
-final class WebServiceGeneratorImpl extends WebServiceGenerator
-{
- private ClassLoader loader;
- private boolean generateWsdl = false;
- private boolean generateSource = false;
- private File outputDir = new File("output");
- private File resourceDir = outputDir;
- private File sourceDir = outputDir;
- private PrintStream messageStream = new NullPrintStream();
-
- @Override
- public void generate(Class<?> endpointClass)
- {
- if (!outputDir.exists())
- if (!outputDir.mkdirs())
- throw new WSException("Could not create directory: " + outputDir);
-
- if (generateWsdl && !resourceDir.exists())
- if (!resourceDir.mkdirs())
- throw new WSException("Could not create directory: " + resourceDir);
-
-
- if (generateSource && !sourceDir.exists())
- if (!sourceDir.mkdirs())
- throw new WSException("Could not create directory: " + sourceDir);
-
- DeploymentType type = (endpointClass.isAnnotationPresent(Stateless.class)) ? JAXWS_EJB3 : JAXWS_JSE;
- UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(type)
- {
- @Override
- public URL getMetaDataFileURL(String resourcePath) throws IOException
- {
- return null;
- }
- };
- udi.classLoader = loader;
-
- UnifiedMetaData umd = new UnifiedMetaData(new ResourceLoaderAdapter(loader));
- umd.setClassLoader(loader);
-
- ChainedWritableWrapperGenerator generator = new ChainedWritableWrapperGenerator();
- if (generateSource)
- generator.add(new SourceWrapperGenerator(loader, messageStream), sourceDir);
- generator.add(new BytecodeWrapperGenerator(loader, messageStream), outputDir);
-
- JAXWSWebServiceMetaDataBuilder builder = new JAXWSWebServiceMetaDataBuilder();
- builder.setWrapperGenerator(generator);
- builder.setGenerateWsdl(generateWsdl);
- builder.setToolMode(true);
- builder.setWsdlDirectory(resourceDir);
- builder.setMessageStream(messageStream);
-
- if (generateWsdl)
- messageStream.println("Generating WSDL:");
-
- builder.buildWebServiceMetaData(umd, udi, endpointClass, null);
- try
- {
- generator.write();
- }
- catch (IOException io)
- {
- throw new WSException("Could not write output files:", io);
- }
- }
-
- @Override
- public void generate(String endpointClass)
- {
- try
- {
- generate(loader.loadClass(endpointClass));
- }
- catch (ClassNotFoundException e)
- {
- throw new WSException("Class not found: " + endpointClass);
- }
- }
-
- @Override
- public void setClassLoader(ClassLoader loader)
- {
- this.loader = loader;
- }
-
- @Override
- public void setGenerateWsdl(boolean generateWsdl)
- {
- this.generateWsdl = generateWsdl;
- }
-
- @Override
- public void setOutputDirectory(File directory)
- {
- outputDir = directory;
- }
-
- @Override
- public void setGenerateSource(boolean generateSource)
- {
- this.generateSource = generateSource;
- }
-
- @Override
- public void setResourceDirectory(File directory)
- {
- resourceDir = directory;
- }
-
- @Override
- public void setSourceDirectory(File directory)
- {
- sourceDir = directory;
- }
-
- @Override
- public void setMessageStream(PrintStream messageStream)
- {
- this.messageStream = messageStream;
- }
-}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,35 +0,0 @@
-/*
- * 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.impl;
-
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-import org.jboss.ws.tools.jaxws.spi.WebServiceGeneratorProvider;
-
-public class WebServiceGeneratorProviderImpl implements WebServiceGeneratorProvider
-{
- public WebServiceGenerator createGenerator(ClassLoader loader)
- {
- WebServiceGeneratorImpl impl = new WebServiceGeneratorImpl();
- impl.setClassLoader(loader);
- return impl;
- }
-}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -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.WSContractConsumer;
+
+/**
+ * WSContractConsumerFactory defines the contract for a WSContractConsumer factory.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ */
+public interface WSContractConsumerFactory
+{
+ /**
+ * Create a new WSContractConsumer. There are no restrictions on how this
+ * should be performed.
+ *
+ * @return a new WSContractConsumer
+ */
+ public WSContractConsumer createImporter();
+}
Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,43 @@
+/*
+ * 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.WSContractProvider;
+
+/**
+ * WSContractProviderFactory defines the contract for a WSContractProvider factory.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ */
+public interface WSContractProviderFactory
+{
+ /**
+ * Create a new WSContractProvider. There are no restrictions on how this
+ * should be performed. The passed ClassLoader is the one used in
+ * {@link WSContractProvider#newInstance(ClassLoader)}. This loader
+ * should be made available to the generated WSContractProvider.
+ *
+ * @param loader the ClassLoader for type discovery
+ * @return a new WSContractProvider
+ */
+ public WSContractProvider createGenerator(ClassLoader loader);
+}
Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,43 +0,0 @@
-/*
- * 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.WebServiceGenerator;
-
-/**
- * WebServiceGeneratorProvider defines the contract for a WebServiceGenerator provider.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- */
-public interface WebServiceGeneratorProvider
-{
- /**
- * Create a new WebServiceGenerator. There are no restrictions on how this
- * should be performed. The passed ClassLoader is the one used in
- * {@link WebServiceGenerator#newInstance(ClassLoader)}. This loader
- * should be made available to the generated WebServiceGenerator.
- *
- * @param loader the ClassLoader for type discovery
- * @return a new WebServiceGenerator
- */
- public WebServiceGenerator createGenerator(ClassLoader loader);
-}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -459,7 +459,9 @@
StringBuilder bodyParts = new StringBuilder();
if (Constants.DOCUMENT_LITERAL == wsdlStyle)
{
- bodyParts.append(reference.getPartName());
+ // Empty bare body
+ if (reference.getPartName() != null)
+ bodyParts.append(reference.getPartName());
}
else
{
Added: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java (rev 0)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,156 @@
+/*
+* 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.test.ws.tools.jaxws;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.jaxws.samples.soapbinding.DocWrappedServiceImpl;
+import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrder;
+import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrderAck;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Tests the WSContractProvider API.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WSContractProviderTestCase extends JBossWSTest
+{
+ public void testBasic() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/basic/out");
+ gen.setOutputDirectory(outputDir);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+
+ // There should be no source code
+ checkWrapperSource(outputDir, false);
+ }
+
+ private WSContractProvider getGenerator()
+ {
+ return WSContractProvider.newInstance();
+ }
+
+ private void checkWrapperSource(File outputDir, boolean shouldExist)
+ {
+ 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());
+ }
+
+ private void checkWrapperClasses(File outputDir) throws MalformedURLException, ClassNotFoundException, NoSuchMethodException
+ {
+ // Use a different loader each time to make sure the files exist
+ URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()}, Thread.currentThread().getContextClassLoader());
+
+ // Check request wrapper
+ 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.samples.soapbinding.jaxws.SubmitPOResponse", classLoader);
+ wrapper.getMethod("setPurchaseOrderAck", PurchaseOrderAck.class);
+ assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
+ }
+
+ public void testSource() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/source/out");
+ gen.setOutputDirectory(outputDir);
+ gen.setGenerateSource(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+ checkWrapperSource(outputDir, true);
+ }
+
+ public void testSourceDir() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/sourcedir/out");
+ File sourceDir = new File("tools/wsprovide/sourcedir/source");
+
+ gen.setOutputDirectory(outputDir);
+ gen.setSourceDirectory(sourceDir);
+ gen.setGenerateSource(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+ checkWrapperSource(outputDir, false);
+ checkWrapperSource(sourceDir, true);
+ }
+
+ public void testWsdl() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/wsdl/out");
+ gen.setOutputDirectory(outputDir);
+ gen.setGenerateWsdl(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+
+ // There should be no source code
+ checkWrapperSource(outputDir, false);
+
+ File wsdlFile = new File(outputDir, "DocWrappedService.wsdl");
+ WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
+ wsdlFactory.parse(wsdlFile.toURL());
+ }
+
+ public void testResourceDir() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/resourcedir/out");
+ File wsdlDir = new File("tools/wsprovide/resourcedir/wsdl");
+ gen.setOutputDirectory(outputDir);
+ gen.setResourceDirectory(wsdlDir);
+ gen.setGenerateWsdl(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+
+ // There should be no source code
+ checkWrapperSource(outputDir, false);
+
+ String wsdlName = "DocWrappedService.wsdl";
+ File wsdlFile = new File(outputDir, wsdlName);
+ assertFalse(wsdlFile.exists());
+
+ wsdlFile = new File(wsdlDir, wsdlName);
+ WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
+ wsdlFactory.parse(wsdlFile.toURL());
+ }
+}
\ No newline at end of file
Property changes on: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 7 months
JBossWS SVN: r2331 - trunk/build/etc.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-02-10 01:02:20 -0500 (Sat, 10 Feb 2007)
New Revision: 2331
Modified:
trunk/build/etc/wsconsume
Log:
correct classpath
Modified: trunk/build/etc/wsconsume
===================================================================
--- trunk/build/etc/wsconsume 2007-02-10 03:11:57 UTC (rev 2330)
+++ trunk/build/etc/wsconsume 2007-02-10 06:02:20 UTC (rev 2331)
@@ -50,7 +50,7 @@
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JAVA_HOME/lib/tools.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
-WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-wsimport-impl.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-wsconsume-impl.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/activation.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
17 years, 7 months
JBossWS SVN: r2330 - branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel.
by jbossws-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2007-02-09 22:11:57 -0500 (Fri, 09 Feb 2007)
New Revision: 2330
Modified:
branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
Log:
JBWS-867
Modified: branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
===================================================================
--- branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml 2007-02-10 01:52:14 UTC (rev 2329)
+++ branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml 2007-02-10 03:11:57 UTC (rev 2330)
@@ -90,7 +90,7 @@
<listitem><para>The <literal><partnerLinks></literal> section lists the parties that
interact with the process in the course of greeting the world. The sole partner link shown
- here corresponds to the agent sending the person name (the <emphasis>caller</emphasis>).
+ here corresponds to the agent sending the person name: (the caller).
</para></listitem>
<listitem><para>The <literal><variables></literal> section defines the data items held
@@ -195,7 +195,7 @@
<para>Before the process can serve requests, its definition must be stored in the jBPM database.
The unit test setup code shown below performs this operation. This code comes from
- class <classname>org.jboss.test.ws.jaxrpc.samples.wsbpel.JbpmBpelTestSetup</classname>.
+ class <literal>org.jboss.test.ws.jaxrpc.samples.wsbpel.JbpmBpelTestSetup</literal>.
The argument is a zip file containing your BPEL process and related WSDL
interfaces. The <literal>submitRequest</literal> method submits the zip file to a web module
deployed as part of the jBPM BPEL service. The web module connects to the database and
@@ -240,7 +240,7 @@
</para>
<para>The definition of a BPEL process only includes the port types of the participants, as
- mentioned in <link linkend="wsbpel.definition" endterm="wsbpel.definition.title" />. On the
+ mentioned in <link linkend="wsbpel.definition">Defining a business process</link>. On the
other hand, a JSR-109 deployment requires the presence of binding and service elements. JBoss
BPEL supplies a tool that generates SOAP 1.1 binding and service elements required for
deploying the web service provided by the process.</para>
@@ -304,7 +304,7 @@
<para>A separate descriptor, <literal>bpel-application.xml</literal>, specifies the name of
the process definition.</para>
- <programlisting><bpelApplication name="HelloWorld" xmlns="http://jbpm.org/bpel" /></programlisting>
+ <programlisting><![CDATA[<bpelApplication name="HelloWorld" xmlns="http://jbpm.org/bpel" />]]></programlisting>
<note><para>This name will be used to retrieve the process definition from the jBPM database.
It must match the process name in your BPEL document.</para></note>
@@ -318,9 +318,9 @@
<para>No special configuration is needed on the client side. You consume a service provided by
a WS-BPEL process the same way you consume any other service.</para>
- <para>You can reuse the Java mapping artifacts produced in <link linkend="wsbpel.artifacts"
- endterm="wsbpel.artifacts.title" /> to develop a <link linkend="jsr109-clients">JSR-109 client
- </link>.</para>
+ <para>You can reuse the Java mapping artifacts produced in <link linkend="wsbpel.artifacts">
+ Generating the required artifacts</link> to develop a <link linkend="jsr109-clients">JSR-109
+ client</link>.</para>
<programlisting><![CDATA[InitialContext iniCtx = getInitialContext();
helloService = (HelloWorldService)iniCtx.lookup("java:comp/env/service/BpelHello");
17 years, 7 months
JBossWS SVN: r2329 - in branches: jbossws-1.2.0/jbossws-docs/user-guide/project/en and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alex.guizar(a)jboss.com
Date: 2007-02-09 20:52:14 -0500 (Fri, 09 Feb 2007)
New Revision: 2329
Added:
branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/images/wsbpel-hello.png
Modified:
branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template
Log:
JBWS-867
Modified: branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml
===================================================================
--- branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml 2007-02-09 23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.0/docs/user-guide/project/en/modules/wsbpel/wsbpel.xml 2007-02-10 01:52:14 UTC (rev 2329)
@@ -83,8 +83,8 @@
</definitions>]]></programlisting>
- <para>You already know how to implement this in Java. Let's jump to the BPEL way. The document
- that defines our business process appears next. There are three major sections in it.</para>
+ <para>The document that describes our business behavior appears below. There are three major
+ sections in it.</para>
<itemizedlist>
@@ -182,30 +182,39 @@
(<ulink url="http://jbpm.org/gop">GOP</ulink>) foundation in jBPM maintains past and present
graph state in a database.</para>
- <para>Installing the jBPM service in JBoss AS is a prerrequisite. The samples suite fetches
- a preconfigured service archive from the JBoss repository and installs it automatically.
- Please refer to the jBPM BPEL <ulink
+ <para>Installing the jBPM service in JBoss AS is a prerrequisite. The samples suite installs
+ a preconfigured service archive automatically. Please refer to the jBPM BPEL <ulink
url="http://docs.jboss.com/jbpm/bpel/getstarted.html#getstarted.setup">user guide</ulink>
for details on how to customize the service to match your requirements and deployment
environment. The sample code that accompanies this chapter was developed and tested with
- jBPM BPEL version 1.1.Beta2.</para>
+ jBPM BPEL version 1.1.Beta3.</para>
<note><para>The preconfigured jBPM service comes with an <ulink url="http://www.hsqldb.org/">
HSQL</ulink> database, useful for development purposes. In production, you can switch to
the database of your choice.</para></note>
<para>Before the process can serve requests, its definition must be stored in the jBPM database.
- jBPM BPEL supplies an ant task, <literal>deployprocess</literal>, to assist here. The input of
- <literal>deployprocess</literal> is a zip file containing your BPEL process and related WSDL
- interfaces. The task submits the zip file to the jBPM service for storage.</para>
+ The unit test setup code shown below performs this operation. This code comes from
+ class <classname>org.jboss.test.ws.jaxrpc.samples.wsbpel.JbpmBpelTestSetup</classname>.
+ The argument is a zip file containing your BPEL process and related WSDL
+ interfaces. The <literal>submitRequest</literal> method submits the zip file to a web module
+ deployed as part of the jBPM BPEL service. The web module connects to the database and
+ stores the process definition.</para>
- <programlisting><![CDATA[<!-- Zip the BPEL process and related WSDL interfaces -->
-<zip destfile="${build.test.dir}/libs/jbossws-samples-wsbpel-hello-process.zip">
- <fileset dir="${build.test.dir}/resources/samples/wsbpel/hello/bpel" />
-</zip>
+ <programlisting><![CDATA[public static void deployProcess(File processFile) throws Exception
+{
+ // format file component
+ String file = getJbpmBpelDeployContext() + "?processfile=" + URLEncoder.encode(processFile.toURI().toString(), "UTF-8");
-<!-- Store the process definition in the jBPM database -->
-<storeprocess processfile="${build.test.dir}/libs/jbossws-samples-wsbpel-hello-process.zip" />]]></programlisting>
+ // create target URL
+ URL targetUrl = new URL("http", JBossWSTestHelper.getServerHost(), getServerHttpPort(), file);
+
+ // submit process deploy request
+ int responseCode = submitRequest(targetUrl);
+
+ if (responseCode != HttpURLConnection.HTTP_OK)
+ throw new IOException("could not deploy process: " + processFile);
+}]]></programlisting>
<para>The file <literal>bpel-definition.xml</literal> tells the location of the BPEL and WSDL
documents inside the archive.</para>
@@ -236,25 +245,13 @@
BPEL supplies a tool that generates SOAP 1.1 binding and service elements required for
deploying the web service provided by the process.</para>
- <programlisting><![CDATA[<!-- Define the servicegen ant task -->
-<taskdef resource="org/jbpm/bpel/ant/tasks.properties" format="properties">
- <classpath>
- <path location="${common.resources}" />
- <path refid="client.classpath" />
- <path location="${jboss.lib}/dom4j.jar" />
- <path location="${jboss.server.lib}/commons-collections.jar" />
- <path location="${jboss.server.deploy.jbpmbpel}" />
- <fileset dir="${jboss.server.deploy.jbpmbpel}">
- <include name="jbpm*.jar" />
- <include name="commons-lang*.jar" />
- <include name="jaxen*.jar" />
- </fileset>
- </classpath>
+ <programlisting><![CDATA[<!-- generate wsdl binding and service definitions for bpel processes -->
+<taskdef name="servicegen" classname="org.jbpm.bpel.ant.ServiceGeneratorTask">
+ <classpath refid="jbpm.bpel.classpath"/>
</taskdef>
-
-<!-- Generate binding and service elements -->
-<servicegen processfile="${build.test.dir}/libs/jbossws-samples-wsbpel-hello-process.zip"
- outputdir="${build.test.dir}/wstools/resources/samples/wsbpel/hello/WEB-INF/wsdl" />]]></programlisting>
+<servicegen processfile="${tests.output.dir}/libs/jaxrpc-samples-wsbpel-hello-process.zip"
+ outputdir="${tests.output.dir}/wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl"
+ bindingfile="hello-binding-.wsdl" servicefile="hello-service.wsdl" />]]></programlisting>
<para>The generated WSDL can be passed to <literal>wstools</literal>. Use the following
configuration.</para>
@@ -264,7 +261,7 @@
<package-namespace package="org.jboss.test.ws.jaxrpc.samples.wsbpel.hello"
namespace="http://jbpm.org/examples/hello" />
</global>
- <wsdl-java file="wstools/resources/samples/wsbpel/hello/WEB-INF/wsdl/service.wsdl">
+ <wsdl-java location="wstools/resources/jaxrpc/samples/wsbpel/hello/WEB-INF/wsdl/hello-service.wsdl">
<mapping file="jaxrpc-mapping.xml" />
</wsdl-java>
</configuration>]]></programlisting>
@@ -277,7 +274,7 @@
process variables directly.</para>
<para>Nevertheless, the Java mapping artifacts still must be present for the JSR-109
- deployment to be valid. Note that the supplied service implementation bean has empty methods
+ deployment to be valid. Notice the supplied service implementation bean has empty methods
only. The BPEL process specifies the behavior instead.</para>
</note>
@@ -309,7 +306,8 @@
<programlisting><bpelApplication name="HelloWorld" xmlns="http://jbpm.org/bpel" /></programlisting>
- <note><para>This name will be used to retrieve the process definition from the jBPM database.</para></note>
+ <note><para>This name will be used to retrieve the process definition from the jBPM database.
+ It must match the process name in your BPEL document.</para></note>
</section>
@@ -325,9 +323,9 @@
</link>.</para>
<programlisting><![CDATA[InitialContext iniCtx = getInitialContext();
-service = (HelloWorldService)iniCtx.lookup("java:comp/env/service/BpelHello");
+helloService = (HelloWorldService)iniCtx.lookup("java:comp/env/service/BpelHello");
-Greeter proxy = service.getGreeterPort();
+Greeter proxy = helloService.getGreeterPort();
String greeting = proxy.sayHello("Popeye");
assertEquals("Hello, Popeye!", greeting);]]></programlisting>
Added: branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/images/wsbpel-hello.png
===================================================================
(Binary files differ)
Property changes on: branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/images/wsbpel-hello.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template
===================================================================
--- branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template 2007-02-09 23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.2.0/jbossws-docs/user-guide/project/en/master.template 2007-02-10 01:52:14 UTC (rev 2329)
@@ -44,6 +44,7 @@
<!ENTITY ch-wssecurity SYSTEM "modules/wssecurity/wssecurity.xml">
<!ENTITY ch-wsaddressing SYSTEM "modules/wsaddressing/wsaddressing.xml">
<!ENTITY ch-wseventing SYSTEM "modules/wseventing/wseventing.xml">
+<!ENTITY ch-wsbpel SYSTEM "modules/wsbpel/wsbpel.xml">
<!ENTITY ch-wstransaction SYSTEM "modules/wstransaction/wstransaction.xml">
<!ENTITY ch-xmlregistry SYSTEM "modules/xmlregistry/xmlregistry.xml">
<!ENTITY appendix-a SYSTEM "modules/appendix-a.xml">
@@ -77,6 +78,7 @@
<para>Web Service Lead - Thomas Diesler</para>
<para>WS-Security, WSTools - Jason Greene</para>
<para>WS-Eventing, Standards - Heiko Braun</para>
+ <para>WS-BPEL - Alejandro Guizar</para>
</preface>
@@ -96,6 +98,7 @@
&ch-wssecurity;
&ch-wsaddressing;
&ch-wseventing;
+ &ch-wsbpel;
&ch-wstransaction;
&ch-xmlregistry;
&appendix-a;
17 years, 7 months
JBossWS SVN: r2328 - in branches/jbossws-1.2.0/jbossws-core/src/main/java: javax/xml/rpc/soap and 33 other directories.
by jbossws-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-02-09 18:24:09 -0500 (Fri, 09 Feb 2007)
New Revision: 2328
Modified:
branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/FactoryLoader.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
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/NullValueSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.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/HandlerRegistryImpl.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/core/jaxrpc/client/ServiceProxy.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JavaUtils.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingServerHandler.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/JBossXBContentAdapter.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/XOPMarshallerImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.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/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
Log:
Merge 2275 so that it is actually easier to backport my work
ConcurrentHashMap changes were not included in the merge
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/ServiceFactory.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -101,7 +101,7 @@
}
catch (ClassNotFoundException e1)
{
- log.debug("Cannot load factory: " + factoryName);
+ if(log.isDebugEnabled()) log.debug("Cannot load factory: " + factoryName);
}
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/rpc/soap/SOAPFaultException.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -61,7 +61,7 @@
super(faultString);
Name detailName = faultDetail != null ? faultDetail.getElementName() : null;
- log.debug("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
+ if(log.isDebugEnabled()) log.debug("new SOAPFaultException [code=" + faultCode + ",string=" + faultString + ",actor=" + faultActor + ",detail=" + detailName + "]");
this.faultCode = faultCode;
this.faultString = faultString;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/FactoryLoader.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/FactoryLoader.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/FactoryLoader.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -72,7 +72,7 @@
{
try
{
- log.debug("Load from system property: " + factoryName);
+ if(log.isDebugEnabled()) log.debug("Load from system property: " + factoryName);
Class factoryClass = loader.loadClass(factoryName);
factory = factoryClass.newInstance();
}
@@ -82,8 +82,8 @@
}
}
- // Use the properties file "lib/jaxm.properties" in the JRE directory.
- // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
+ // Use the properties file "lib/jaxm.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above.
if (factory == null)
{
action = new PropertyAccessAction("java.home");
@@ -98,7 +98,7 @@
factoryName = jaxmProperties.getProperty(propertyName);
if (factoryName != null)
{
- log.debug("Load from " + jaxmFile + ": " + factoryName);
+ if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile + ": " + factoryName);
Class factoryClass = loader.loadClass(factoryName);
factory = factoryClass.newInstance();
}
@@ -110,7 +110,7 @@
}
}
- // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
+ // Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
if (factory == null)
{
String filename = "META-INF/services/" + propertyName;
@@ -124,7 +124,7 @@
br.close();
if (factoryName != null)
{
- log.debug("Load from Service API " + filename + ": " + factoryName);
+ if(log.isDebugEnabled()) log.debug("Load from Service API " + filename + ": " + factoryName);
Class factoryClass = loader.loadClass(factoryName);
factory = factoryClass.newInstance();
}
@@ -142,7 +142,7 @@
try
{
factoryName = defaultFactory;
- log.debug("Load from default: " + factoryName);
+ if(log.isDebugEnabled()) log.debug("Load from default: " + factoryName);
Class factoryClass = loader.loadClass(factoryName);
factory = factoryClass.newInstance();
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/javax/xml/soap/SOAPConnectionFactory.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -81,7 +81,7 @@
}
catch (ClassNotFoundException e1)
{
- log.debug("Cannot load factory: " + factoryName);
+ if(log.isDebugEnabled()) log.debug("Cannot load factory: " + factoryName);
}
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -95,7 +95,7 @@
public void update(Observable observable, Object object)
{
- log.debug("Update config: " + object);
+ if(log.isDebugEnabled()) log.debug("Update config: " + object);
configure();
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonClient.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -283,12 +283,12 @@
try
{
URL wsaToURL = new URL(wsaTo);
- log.debug("Sending request to addressing destination: " + wsaToURL);
+ if(log.isDebugEnabled()) log.debug("Sending request to addressing destination: " + wsaToURL);
targetAddress = wsaToURL.toExternalForm();
}
catch (MalformedURLException ex)
{
- log.debug("Not a valid URL: " + wsaTo);
+ if(log.isDebugEnabled()) log.debug("Not a valid URL: " + wsaTo);
}
}
}
@@ -343,7 +343,7 @@
// Check if protocol handlers modified the payload
if (((SOAPBodyImpl)reqMessage.getSOAPBody()).isModifiedFromSource())
{
- log.debug("Handler modified body payload, unbind message again");
+ if(log.isDebugEnabled()) log.debug("Handler modified body payload, unbind message again");
SOAPMessage resMessage = msgContext.getSOAPMessage();
binding.unbindResponseMessage(opMetaData, resMessage, epInv, unboundHeaders);
}
@@ -363,7 +363,7 @@
{
for (AttachmentPart part : attachmentParts)
{
- log.debug("Adding attachment part: " + part.getContentId());
+ if(log.isDebugEnabled()) log.debug("Adding attachment part: " + part.getContentId());
reqMessage.addAttachmentPart(part);
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/CommonSOAPBinding.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -129,7 +129,7 @@
/** On the client side, generate the payload from IN parameters. */
public Object bindRequestMessage(OperationMetaData opMetaData, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders) throws BindingException
{
- log.debug("bindRequestMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("bindRequestMessage: " + opMetaData.getQName());
try
{
@@ -141,7 +141,7 @@
if (opMetaData.isRPCEncoded())
XOPContext.setMTOMEnabled(false);
else
- XOPContext.setMTOMEnabled( isMTOMEnabled() );
+ XOPContext.setMTOMEnabled( isMTOMEnabled() );
// Associate current message with message context
SOAPMessageImpl reqMessage = (SOAPMessageImpl)createMessage(opMetaData);
@@ -161,7 +161,7 @@
QName opQName = opMetaData.getQName();
Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
- log.debug("Create RPC body element: " + opName);
+ if(log.isDebugEnabled()) log.debug("Create RPC body element: " + opName);
soapBodyElement = new SOAPBodyElementRpc(opName);
soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
}
@@ -199,7 +199,7 @@
xmlName = namespaceRegistry.registerQName(xmlName);
Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(), xmlName.getNamespaceURI());
- log.debug("Add unboundHeader element: " + soapName);
+ if(log.isDebugEnabled()) log.debug("Add unboundHeader element: " + soapName);
SOAPContentElement contentElement = new SOAPHeaderElementImpl(soapName);
contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
soapHeader.addChildElement(contentElement);
@@ -226,7 +226,7 @@
/** On the server side, extract the IN parameters from the payload and populate an Invocation object */
public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, Object payload) throws BindingException
{
- log.debug("unbindRequestMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("unbindRequestMessage: " + opMetaData.getQName());
try
{
@@ -313,7 +313,7 @@
/** On the server side, generate the payload from OUT parameters. */
public Object bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
- log.debug("bindResponseMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("bindResponseMessage: " + opMetaData.getQName());
try
{
@@ -416,7 +416,7 @@
public void unbindResponseMessage(OperationMetaData opMetaData, Object payload, EndpointInvocation epInv, Map<QName, UnboundHeader> unboundHeaders)
throws BindingException
{
- log.debug("unbindResponseMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("unbindResponseMessage: " + opMetaData.getQName());
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/EndpointInvocation.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -99,13 +99,13 @@
public void setRequestParamValue(QName xmlName, Object value)
{
- log.debug("setRequestParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
+ if(log.isDebugEnabled()) log.debug("setRequestParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
reqPayload.put(xmlName, value);
}
public Object getRequestParamValue(QName xmlName) throws SOAPException
{
- log.debug("getRequestParamValue: " + xmlName);
+ if(log.isDebugEnabled()) log.debug("getRequestParamValue: " + xmlName);
Object paramValue = reqPayload.get(xmlName);
ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
paramValue = transformPayloadValue(paramMetaData, paramValue);
@@ -116,7 +116,7 @@
*/
public Object[] getRequestPayload() throws SOAPException
{
- log.debug("getRequestPayload");
+ if(log.isDebugEnabled()) log.debug("getRequestPayload");
List<QName> xmlNames = getRequestParamNames();
Object[] payload = new Object[opMetaData.getJavaMethod().getParameterTypes().length];
@@ -141,13 +141,13 @@
public void setResponseParamValue(QName xmlName, Object value)
{
- log.debug("setResponseParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
+ if(log.isDebugEnabled()) log.debug("setResponseParamValue: [name=" + xmlName + ",value=" + getTypeName(value) + "]");
resPayload.put(xmlName, value);
}
public Object getResponseParamValue(QName xmlName) throws SOAPException
{
- log.debug("getResponseParamValue: " + xmlName);
+ if(log.isDebugEnabled()) log.debug("getResponseParamValue: " + xmlName);
Object paramValue = resPayload.get(xmlName);
ParameterMetaData paramMetaData = opMetaData.getParameter(xmlName);
paramValue = transformPayloadValue(paramMetaData, paramValue);
@@ -168,13 +168,13 @@
if (value != null && retMetaData == null)
throw new WSException("Operation does not have a return value: " + opMetaData.getQName());
- log.debug("setReturnValue: " + getTypeName(value));
+ if(log.isDebugEnabled()) log.debug("setReturnValue: " + getTypeName(value));
this.returnValue = value;
}
public Object getReturnValue() throws SOAPException
{
- log.debug("getReturnValue");
+ if(log.isDebugEnabled()) log.debug("getReturnValue");
Object paramValue = returnValue;
ParameterMetaData paramMetaData = opMetaData.getReturnParameter();
if (paramMetaData != null)
@@ -241,7 +241,7 @@
}
}
- log.debug("transformPayloadValue: " + getTypeName(paramValue) + " -> " + getTypeName(retValue));
+ if(log.isDebugEnabled()) log.debug("transformPayloadValue: " + getTypeName(paramValue) + " -> " + getTypeName(retValue));
return retValue;
}
@@ -333,7 +333,7 @@
retValue = JavaUtils.syncArray(retValue, targetParameterType);
}
- log.debug("syncEndpointInputParam: " + getTypeName(paramValue) + " -> " + getTypeName(retValue) + "(" + index + ")");
+ if(log.isDebugEnabled()) log.debug("syncEndpointInputParam: " + getTypeName(paramValue) + " -> " + getTypeName(retValue) + "(" + index + ")");
payload[index] = retValue;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/ParameterWrapping.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -94,7 +94,7 @@
}
catch (Exception ex)
{
- log.debug("Invalid request wrapper: " + ex);
+ if(log.isDebugEnabled()) log.debug("Invalid request wrapper: " + ex);
return null;
}
}
@@ -104,7 +104,7 @@
assertOperationMetaData(request.getOperationMetaData());
Class reqStructType = request.getJavaType();
- log.debug("wrapRequestParameters: " + reqStructType.getName());
+ if(log.isDebugEnabled()) log.debug("wrapRequestParameters: " + reqStructType.getName());
List<WrappedParameter> wrappedParameters = request.getWrappedParameters();
try
{
@@ -140,7 +140,7 @@
List<WrappedParameter> wrappedParameters = request.getWrappedParameters();
Class reqStructType = reqStruct.getClass();
- log.debug("unwrapRequestParameters: " + reqStructType.getName());
+ if(log.isDebugEnabled()) log.debug("unwrapRequestParameters: " + reqStructType.getName());
try
{
for (WrappedParameter param : wrappedParameters)
@@ -177,11 +177,11 @@
Class resStructType = returnMetaData.getJavaType();
if (returnValue != null && returnValue.getClass() == resStructType)
{
- log.debug("Response parameter already wrapped" + resStructType.getName());
+ if(log.isDebugEnabled()) log.debug("Response parameter already wrapped" + resStructType.getName());
return returnValue;
}
- log.debug("wrapResponseParameter: " + resStructType.getName());
+ if(log.isDebugEnabled()) log.debug("wrapResponseParameter: " + resStructType.getName());
List<WrappedParameter> wrappedParameters = returnMetaData.getWrappedParameters();
try
{
@@ -214,7 +214,7 @@
{
Class resStructType = resStruct.getClass();
- log.debug("unwrapResponseParameter: " + resStructType.getName());
+ if(log.isDebugEnabled()) log.debug("unwrapResponseParameter: " + resStructType.getName());
List<WrappedParameter> wrappedParameters = retMetaData.getWrappedParameters();
Class[] targetTypes = operationMetaData.getJavaMethod().getParameterTypes();
try
@@ -285,7 +285,7 @@
String packageName = endpointMetaData.getServiceEndpointInterface().getPackage().getName();
String wrapperName = packageName + "._JBossWS_" + serviceName + "_" + endpointName + "_" + parameterName;
- log.debug("Generating wrapper: " + wrapperName);
+ if(log.isDebugEnabled()) log.debug("Generating wrapper: " + wrapperName);
Class wrapperType;
try
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SOAPFaultHelperJAXRPC.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -100,7 +100,7 @@
FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
if (faultMetaData != null)
{
- log.debug("Deserialize fault: " + faultMetaData);
+ if(log.isDebugEnabled()) log.debug("Deserialize fault: " + faultMetaData);
QName xmlType = faultMetaData.getXmlType();
Class javaType = faultMetaData.getJavaType();
@@ -142,7 +142,7 @@
}
else
{
- log.debug("Cannot find fault meta data for: " + xmlName);
+ if(log.isDebugEnabled()) log.debug("Cannot find fault meta data for: " + xmlName);
}
}
}
@@ -265,7 +265,7 @@
}
else
{
- log.debug("Cannot obtain fault meta data for: " + javaType);
+ if(log.isDebugEnabled()) log.debug("Cannot obtain fault meta data for: " + javaType);
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SchemaGenerator.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -49,7 +49,7 @@
public JBossXSModel generateXSDSchema(QName xmlType, Class javaType)
{
- log.debug("generateXSDSchema: [xmlType=" + xmlType + ",javaType=" + javaType.getName() + "]");
+ if(log.isDebugEnabled()) log.debug("generateXSDSchema: [xmlType=" + xmlType + ",javaType=" + javaType.getName() + "]");
try
{
assertXmlType(xmlType);
@@ -72,7 +72,7 @@
if (xsModel == null)
throw new WSException("Cannot generate XSModel");
- log.debug("\n" + xsModel.serialize());
+ if(log.isDebugEnabled()) log.debug("\n" + xsModel.serialize());
return xsModel;
}
catch (RuntimeException rte)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/SerializationContextJAXRPC.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -58,7 +58,7 @@
{
if (jaxrpcMapping == null)
{
- log.debug("Generate jaxrpcMapping from typeMapping");
+ if(log.isDebugEnabled()) log.debug("Generate jaxrpcMapping from typeMapping");
jaxrpcMapping = new JavaWsdlMapping();
for (QName xmlType : getTypeMapping().getRegisteredXmlTypes())
@@ -85,7 +85,7 @@
packageMapping.setNamespaceURI(nsURI);
packageMapping.setPackageType(packageName);
jaxrpcMapping.addPackageMapping(packageMapping);
- log.debug("Add package mapping: " + packageMapping);
+ if(log.isDebugEnabled()) log.debug("Add package mapping: " + packageMapping);
}
// Do not add mappings for array types
@@ -100,7 +100,7 @@
xmlTypeMapping.setJavaType(javaTypeName);
xmlTypeMapping.setRootTypeQName(xmlType);
jaxrpcMapping.addJavaXmlTypeMappings(xmlTypeMapping);
- log.debug("Add type mapping: " + xmlTypeMapping);
+ if(log.isDebugEnabled()) log.debug("Add type mapping: " + xmlTypeMapping);
}
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Deserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -53,7 +53,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
byte[] value = null;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/Base64Serializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -50,7 +50,7 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
String xmlFragment = null;
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -47,7 +47,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
Calendar value = null;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/CalendarSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -46,7 +46,7 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -47,7 +47,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
Date value = null;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/DateSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -50,7 +50,7 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value != null)
{
Calendar cal = new GregorianCalendar();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -49,7 +49,7 @@
*/
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
try
{
// TODO: Better way for DOM to source conversion
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/ElementSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -52,7 +52,7 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes)
throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value == null)
throw new IllegalArgumentException("Element value cannot be null");
if ((value instanceof Element) == false)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -47,7 +47,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
byte[] value = null;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/HexSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -47,7 +47,7 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
value = JavaUtils.getPrimitiveValueArray(value);
String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])value);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -76,7 +76,7 @@
*/
private Object deserialize(QName xmlName, QName xmlType, String val, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
// Expect the specific JAXRPC serialization context
SerializationContextJAXRPC jaxrpcContext = (SerializationContextJAXRPC)serContext;
@@ -109,7 +109,7 @@
throw new BindingException(ex);
}
- log.debug("deserialized: " + (value != null ? value.getClass().getName() : null));
+ if(log.isDebugEnabled()) log.debug("deserialized: " + (value != null ? value.getClass().getName() : null));
return value;
}
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-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/JBossXBSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -75,7 +75,7 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
// Expect the specific JAXRPC serialization context
SerializationContextJAXRPC jaxrpcContext = (SerializationContextJAXRPC)serContext;
@@ -102,7 +102,7 @@
delegate.marshal(value, strwr);
String xmlFragment = strwr.toString();
- log.debug("serialized: " + xmlFragment);
+ if(log.isDebugEnabled()) log.debug("serialized: " + xmlFragment);
return stringToResult(xmlFragment);
}
catch (RuntimeException rte)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/NullValueSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -57,7 +57,7 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
nsRegistry.registerURI(Constants.NS_SCHEMA_XSI, Constants.PREFIX_XSI);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -51,7 +51,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
QName value = null;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/QNameSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -48,7 +48,7 @@
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
QName qnameValue = (QName)value;
String nsURI = qnameValue.getNamespaceURI();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPArrayDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -67,7 +67,7 @@
*/
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
try
{
ParameterMetaData paramMetaData = (ParameterMetaData)serContext.getProperty(ParameterMetaData.class.getName());
@@ -90,7 +90,7 @@
throw new WSException("Cannot obtain component xmlType for: " + compJavaType);
// Get the component type deserializer factory
- log.debug("Get component deserializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
+ if(log.isDebugEnabled()) log.debug("Get component deserializer for: [javaType=" + compJavaType.getName() + ",xmlType=" + compXmlType + "]");
DeserializerFactoryBase compDeserializerFactory = (DeserializerFactoryBase)typeMapping.getDeserializer(compJavaType, compXmlType);
if (compDeserializerFactory == null)
{
@@ -105,7 +105,7 @@
if (arrDims.length < 1 || 2 < arrDims.length)
throw new WSException("Unsupported array dimensions: " + Arrays.asList(arrDims));
-
+
Iterator it = DOMUtils.getChildElements(arrayElement);
if (arrDims.length == 1)
{
@@ -121,7 +121,7 @@
}
}
- log.debug("deserialized: " + retArray.getClass().getName());
+ if(log.isDebugEnabled()) log.debug("deserialized: " + retArray.getClass().getName());
return retArray;
}
catch (RuntimeException e)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -49,7 +49,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
try
{
// TODO: Better way for DOM to source conversion
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SOAPElementSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -50,7 +50,7 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
if (value == null)
throw new IllegalArgumentException("SOAPElement value cannot be null");
if ((value instanceof SOAPElement) == false)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -46,7 +46,7 @@
private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
Object value = null;
String valueStr = unwrapValueStr(xmlFragment);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/binding/SimpleSerializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -52,7 +52,7 @@
*/
public Result serialize(QName xmlName, QName xmlType, Object value, SerializationContext serContext, NamedNodeMap attributes) throws BindingException
{
- log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
String valueStr;
String typeName = xmlType.getLocalPart();
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-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/CallImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -281,7 +281,7 @@
}
protected CommonMessageContext processPivot(CommonMessageContext requestContext) {
- log.debug("Begin response processing");
+ if(log.isDebugEnabled()) log.debug("Begin response processing");
return requestContext;
}
@@ -447,12 +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 + "]");
+ if(log.isDebugEnabled()) 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/HandlerRegistryImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/HandlerRegistryImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -112,7 +112,7 @@
HandlerMetaDataJAXRPC handler = new HandlerMetaDataJAXRPC(epMetaData, HandlerType.ENDPOINT);
handler.setHandlerClassName(info.getHandlerClass().getName());
handler.setSoapRoles(roles);
- log.debug("Add handler to: " + portName + handler);
+ if(log.isDebugEnabled()) log.debug("Add handler to: " + portName + handler);
epMetaData.addHandler(handler);
}
}
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-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -495,7 +495,7 @@
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
- log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
+ if(log.isDebugEnabled()) log.debug("Adding client side handler to endpoint '" + portName + "': " + info);
handlerInfos.add(info);
// register the handlers with the client engine
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-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceObjectFactory.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -140,7 +140,7 @@
URL wsdlLocation = usrMetaData.getWsdlLocation();
if (wsdlLocation != null)
{
- log.debug("Create jaxrpc service from wsdl");
+ if(log.isDebugEnabled()) log.debug("Create jaxrpc service from wsdl");
// Create the actual service object
QName serviceName = usrMetaData.getServiceQName();
@@ -149,7 +149,7 @@
}
else
{
- log.debug("Create jaxrpc service with no wsdl");
+ if(log.isDebugEnabled()) log.debug("Create jaxrpc service with no wsdl");
jaxrpcService = new ServiceImpl(new QName(Constants.NS_JBOSSWS_URI, "AnonymousService"));
}
@@ -163,7 +163,7 @@
if (pcLinkRef != null)
{
String pcLink = (String)pcLinkRef.getContent();
- log.debug("Resolving port-component-link: " + pcLink);
+ if(log.isDebugEnabled()) log.debug("Resolving port-component-link: " + pcLink);
// First try to obtain the endpoint address loacally
String endpointAddress = null;
@@ -193,7 +193,7 @@
is.close();
}
- log.debug("Resolved to: " + endpointAddress);
+ if(log.isDebugEnabled()) log.debug("Resolved to: " + endpointAddress);
if (serviceMetaData.getEndpoints().size() == 1)
{
EndpointMetaData epMetaData = serviceMetaData.getEndpoints().get(0);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceProxy.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -109,7 +109,7 @@
Object retObj = null;
if (jaxrpcServiceMethods.contains(method))
{
- log.debug("Invoke on jaxrpc service: " + methodName);
+ if(log.isDebugEnabled()) log.debug("Invoke on jaxrpc service: " + methodName);
if (method.getName().equals("getPort"))
{
@@ -124,7 +124,7 @@
}
if (serviceInterfaceMethods.contains(method))
{
- log.debug("Invoke on service interface: " + methodName);
+ if(log.isDebugEnabled()) log.debug("Invoke on service interface: " + methodName);
Class seiClass = method.getReturnType();
retObj = getPortMethod.invoke(jaxrpcService, new Object[]{seiClass});
@@ -132,7 +132,7 @@
}
if (objectMethods.contains(method))
{
- log.debug("Invoke on object: " + methodName);
+ if(log.isDebugEnabled()) log.debug("Invoke on object: " + methodName);
retObj = method.invoke(jaxrpcService, args);
return retObj;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/client/ServiceReferenceable.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -186,7 +186,7 @@
}
catch (IOException ex)
{
- log.debug("Cannot find security config: " + descriptorPath);
+ if(log.isDebugEnabled()) log.debug("Cannot find security config: " + descriptorPath);
return null;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerChainBaseImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -90,7 +90,7 @@
*/
public HandlerChainBaseImpl(List<HandlerInfo> infos, Set<String> roles)
{
- log.debug("Create a handler chain for roles: " + roles);
+ if(log.isDebugEnabled()) log.debug("Create a handler chain for roles: " + roles);
addHandlersToChain(infos, roles);
}
@@ -159,7 +159,7 @@
*/
public void init(Map config)
{
- log.debug("init: [config=" + config + "]");
+ if(log.isDebugEnabled()) log.debug("init: [config=" + config + "]");
for (int i = 0; i < handlers.size(); i++)
{
HandlerEntry entry = (HandlerEntry)handlers.get(i);
@@ -177,7 +177,7 @@
*/
public void destroy()
{
- log.debug("destroy");
+ if(log.isDebugEnabled()) log.debug("destroy");
for (int i = 0; i < handlers.size(); i++)
{
HandlerEntry entry = (HandlerEntry)handlers.get(i);
@@ -217,7 +217,7 @@
public void setRoles(String[] soapActorNames)
{
List<String> newRoles = Arrays.asList(soapActorNames);
- log.debug("setRoles: " + newRoles);
+ if(log.isDebugEnabled()) log.debug("setRoles: " + newRoles);
roles.clear();
roles.addAll(newRoles);
@@ -246,7 +246,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleRequest");
+ if(log.isDebugEnabled()) log.debug("Enter: handleRequest");
SOAPMessageContextJAXRPC jaxrpcContext = (SOAPMessageContextJAXRPC)msgContext;
jaxrpcContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
@@ -295,7 +295,7 @@
falseIndex = (handlerIndex - 1);
jaxrpcContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- log.debug("Exit: handleRequest with status: " + doNext);
+ if(log.isDebugEnabled()) log.debug("Exit: handleRequest with status: " + doNext);
}
}
@@ -328,7 +328,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleResponse");
+ if(log.isDebugEnabled()) log.debug("Enter: handleResponse");
SOAPMessageContextJAXRPC jaxrpcContext = (SOAPMessageContextJAXRPC)msgContext;
jaxrpcContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
@@ -377,7 +377,7 @@
falseIndex = (handlerIndex - 1);
jaxrpcContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- log.debug("Exit: handleResponse with status: " + doNext);
+ if(log.isDebugEnabled()) log.debug("Exit: handleResponse with status: " + doNext);
}
}
@@ -400,7 +400,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleFault");
+ if(log.isDebugEnabled()) log.debug("Enter: handleFault");
SOAPMessageContextJAXRPC jaxrpcContext = (SOAPMessageContextJAXRPC)msgContext;
jaxrpcContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
@@ -415,14 +415,14 @@
for (; doNext && handlerIndex >= 0; handlerIndex--)
{
currHandler = ((HandlerEntry)handlers.get(handlerIndex)).getHandler();
- log.debug("Handle fault: " + currHandler);
+ if(log.isDebugEnabled()) log.debug("Handle fault: " + currHandler);
doNext = currHandler.handleFault(msgContext);
}
}
finally
{
jaxrpcContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- log.debug("Exit: handleFault with status: " + doNext);
+ if(log.isDebugEnabled()) log.debug("Exit: handleFault with status: " + doNext);
}
}
@@ -465,7 +465,7 @@
HandlerEntry entry = (HandlerEntry)handlers.get(i);
if (entry.handler.getState() == HandlerWrapper.DOES_NOT_EXIST)
{
- log.debug("Replacing dirty handler: " + entry.handler);
+ if(log.isDebugEnabled()) log.debug("Replacing dirty handler: " + entry.handler);
try
{
HandlerWrapper handler = new HandlerWrapper((Handler)entry.info.getHandlerClass().newInstance());
@@ -516,7 +516,7 @@
if (opMetaData == null)
{
// The security handler must have decrypted the incomming message
- // before the dispatch target operation can be known
+ // before the dispatch target operation can be known
EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
opMetaData = soapMessage.getOperationMetaData(epMetaData);
}
@@ -576,7 +576,7 @@
if (type == null)
{
- log.debug("Using handler type default: " + HandlerType.ENDPOINT);
+ if(log.isDebugEnabled()) log.debug("Using handler type default: " + HandlerType.ENDPOINT);
type = HandlerType.ENDPOINT;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerDelegateJAXRPC.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -171,7 +171,7 @@
hConfig.put(HandlerType.class.getName(), jaxrpcMetaData.getHandlerType());
HandlerInfo info = new HandlerInfo(hClass, hConfig, headerArr);
- log.debug("Adding server side handler to service '" + sepMetaData.getPortName() + "': " + info);
+ if(log.isDebugEnabled()) log.debug("Adding server side handler to service '" + sepMetaData.getPortName() + "': " + info);
hInfos.add(info);
}
@@ -180,7 +180,7 @@
private void initHandlerChain(ServiceEndpointInfo seInfo, List<HandlerInfo> hInfos, Set<String> handlerRoles, HandlerType type)
{
- log.debug("Init handler chain with [" + hInfos.size() + "] handlers");
+ if(log.isDebugEnabled()) log.debug("Init handler chain with [" + hInfos.size() + "] handlers");
ServerHandlerChain handlerChain = new ServerHandlerChain(hInfos, handlerRoles, type);
if (type == HandlerType.PRE)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxrpc/handler/HandlerWrapper.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -90,7 +90,7 @@
*/
public void init(HandlerInfo config) throws JAXRPCException
{
- log.debug("init: " + delegate);
+ if(log.isDebugEnabled()) log.debug("init: " + delegate);
delegate.init(config);
state = METHOD_READY;
}
@@ -100,7 +100,7 @@
*/
public void destroy() throws JAXRPCException
{
- log.debug("destroy: " + delegate);
+ if(log.isDebugEnabled()) log.debug("destroy: " + delegate);
state = DOES_NOT_EXIST;
delegate.destroy();
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -99,7 +99,7 @@
if (wrappedParameters == null)
throw new WSException("Cannot generate a type when their is no wrapper parameters");
- log.debug("Generating wrapper: " + wrapperName);
+ if(log.isDebugEnabled()) log.debug("Generating wrapper: " + wrapperName);
QName xmlName = pmd.getXmlName();
QName xmlType = pmd.getXmlType();
@@ -131,7 +131,7 @@
public void generate(FaultMetaData fmd)
{
String faultBeanName = fmd.getFaultBeanName();
- log.debug("Generating fault bean: " + faultBeanName);
+ if(log.isDebugEnabled()) log.debug("Generating fault bean: " + faultBeanName);
QName xmlType = fmd.getXmlType();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/JAXBDeserializer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -55,7 +55,7 @@
public Object deserialize(QName xmlName, QName xmlType, Source xmlFragment, SerializationContext serContext) throws BindingException
{
- log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
+ if(log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
Object value = null;
try
@@ -64,7 +64,7 @@
TypeMappingImpl typeMapping = serContext.getTypeMapping();
Class javaType = typeMapping.getJavaType(xmlType);
-
+
JAXBContextCache contextCache = JAXBContextCache.getContextCache();
JAXBContext jaxbContext = contextCache.getInstance(types);
@@ -74,7 +74,7 @@
JAXBElement jbe = unmarshaller.unmarshal(xmlFragment, javaType);
value = jbe.getValue();
- log.debug("deserialized: " + (value != null ? value.getClass().getName() : null));
+ if(log.isDebugEnabled()) log.debug("deserialized: " + (value != null ? value.getClass().getName() : null));
}
catch (Exception ex)
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/SOAPFaultHelperJAXWS.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -72,7 +72,7 @@
FaultMetaData faultMetaData = opMetaData.getFault(xmlName);
if (faultMetaData != null)
{
- log.debug("Deserialize fault: " + faultMetaData);
+ if(log.isDebugEnabled()) log.debug("Deserialize fault: " + faultMetaData);
QName xmlType = faultMetaData.getXmlType();
Class<?> faultBeanClass = faultMetaData.getFaultBean();
@@ -121,7 +121,7 @@
}
else
{
- log.debug("Cannot find fault meta data for: " + xmlName);
+ if(log.isDebugEnabled()) log.debug("Cannot find fault meta data for: " + xmlName);
}
}
}
@@ -261,7 +261,7 @@
}
else
{
- log.debug("Cannot obtain fault meta data for: " + exClass);
+ if(log.isDebugEnabled()) log.debug("Cannot obtain fault meta data for: " + exClass);
}
return soapMessage;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/BindingImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -87,13 +87,13 @@
public List<Handler> getHandlerChain()
{
- log.debug("getHandlerChain: " + jaxwsHandlerChain);
+ if(log.isDebugEnabled()) log.debug("getHandlerChain: " + jaxwsHandlerChain);
return Collections.unmodifiableList(jaxwsHandlerChain);
}
public void setHandlerChain(List<Handler> handlerChain)
{
- log.debug("setHandlerChain: " + handlerChain);
+ if(log.isDebugEnabled()) log.debug("setHandlerChain: " + handlerChain);
jaxwsHandlerChain.clear();
jaxwsHandlerChain.addAll(handlerChain);
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/MessageBinding.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -67,7 +67,7 @@
/** On the server side, extract the IN parameters from the payload and populate an Invocation object */
public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, Object reqMessage) throws BindingException
{
- log.debug("unbindRequestMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("unbindRequestMessage: " + opMetaData.getQName());
try
{
@@ -94,7 +94,7 @@
/** On the server side, generate the payload from OUT parameters. */
public Object bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
- log.debug("bindResponseMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("bindResponseMessage: " + opMetaData.getQName());
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/binding/PayloadBinding.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -72,7 +72,7 @@
/** On the server side, extract the IN parameters from the payload and populate an Invocation object */
public EndpointInvocation unbindRequestMessage(OperationMetaData opMetaData, Object payload) throws BindingException
{
- log.debug("unbindRequestMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("unbindRequestMessage: " + opMetaData.getQName());
try
{
@@ -103,7 +103,7 @@
/** On the server side, generate the payload from OUT parameters. */
public Object bindResponseMessage(OperationMetaData opMetaData, EndpointInvocation epInv) throws BindingException
{
- log.debug("bindResponseMessage: " + opMetaData.getQName());
+ if(log.isDebugEnabled()) log.debug("bindResponseMessage: " + opMetaData.getQName());
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -127,7 +127,7 @@
*/
public void update(Observable observable, Object object)
{
- log.debug("Configuration change event received. Reconfigure handler chain: " + object);
+ if(log.isDebugEnabled()) log.debug("Configuration change event received. Reconfigure handler chain: " + object);
// re-populate the binding handler chain
resetCreateBindingHandlerChain();
@@ -207,7 +207,7 @@
protected CommonMessageContext processPivot(CommonMessageContext requestContext)
{
- log.debug("Begin response processing");
+ if(log.isDebugEnabled()) log.debug("Begin response processing");
// MTOM setting need to pass past pivot
boolean mtomEnabled = XOPContext.isMTOMEnabled();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -177,8 +177,8 @@
ResponseImpl response = new ResponseImpl();
Runnable task = new AsyncRunnable(response, null, opName, args, retType);
- log.debug("Schedule task " + ((AsyncRunnable)task).getTaskID().toString());
-
+ if(log.isDebugEnabled()) log.debug("Schedule task " + ((AsyncRunnable)task).getTaskID().toString());
+
Future future = executor.submit(task);
response.setFuture(future);
return response;
@@ -194,7 +194,7 @@
}
/**
- * 4.2.4 Conformance (Remote Exceptions): If an error occurs during a remote operation invocation, an implemention
+ * 4.2.4 Conformance (Remote Exceptions): If an error occurs during a remote operation invocation, an implemention
* MUST throw a service specific exception if possible. If the error cannot be mapped to a service
* specific exception, an implementation MUST throw a ProtocolException or one of its subclasses, as
* appropriate for the binding in use. See section 6.4.1 for more details.
@@ -240,7 +240,7 @@
Map<String, Object> resContext = response.getContext();
Object result = invoke(opName, args, retType, resContext);
- log.debug("Finished task " + getTaskID().toString()+": " + result);
+ if(log.isDebugEnabled()) log.debug("Finished task " + getTaskID().toString()+": " + result);
response.set(result);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -298,7 +298,7 @@
SOAPBodyImpl soapBody = (SOAPBodyImpl)resMsg.getSOAPBody();
SOAPElement soapElement = (SOAPElement)soapBody.getChildElements().next();
- log.debug("JAXB unmarshal: " + DOMWriter.printNode(soapElement, false));
+ if(log.isDebugEnabled()) log.debug("JAXB unmarshal: " + DOMWriter.printNode(soapElement, false));
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
retObj = unmarshaller.unmarshal(soapElement);
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/client/ServiceObjectFactory.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -106,7 +106,7 @@
if (Service.class.getName().equals(targetClassName))
targetClassName = serviceClassName;
- log.debug("[name=" + serviceRefName + ",service=" + serviceClassName + ",target=" + targetClassName + "]");
+ if(log.isDebugEnabled()) log.debug("[name=" + serviceRefName + ",service=" + serviceClassName + ",target=" + targetClassName + "]");
// Load the service class
ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
@@ -126,7 +126,7 @@
{
// Associate the UnifiedServiceRef with this thread
serviceRefAssociation.set(usRef);
-
+
// Generic javax.xml.ws.Service
if (serviceClass == Service.class)
{
@@ -202,7 +202,7 @@
return null;
}
}
-
+
public static UnifiedServiceRef getUnifiedServiceRefAssociation()
{
// The ServiceDelegateImpl get the usRef at ctor time
@@ -215,7 +215,7 @@
String configName = usRef.getConfigName();
if (service instanceof ConfigProvider)
{
- log.debug("Configure Service: [configName=" + configName + ",configFile=" + configFile + "]");
+ if(log.isDebugEnabled()) log.debug("Configure Service: [configName=" + configName + ",configFile=" + configFile + "]");
ConfigProvider cp = (ConfigProvider)service;
if (configName != null || configFile != null)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerChainExecutor.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -64,7 +64,7 @@
{
this.epMetaData = epMetaData;
- log.debug("Create a handler executor: " + handlerList);
+ if(log.isDebugEnabled()) log.debug("Create a handler executor: " + handlerList);
for (Handler handler : handlerList)
{
handlers.add(handler);
@@ -76,7 +76,7 @@
*/
public void close()
{
- log.debug("close");
+ if(log.isDebugEnabled()) log.debug("close");
for (Handler handler : handlers)
{
handler.close(null);
@@ -89,7 +89,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleRequest");
+ if(log.isDebugEnabled()) log.debug("Enter: handleRequest");
SOAPMessageContextJAXWS soapContext = (SOAPMessageContextJAXWS)msgContext;
soapContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
@@ -102,7 +102,7 @@
for (; doNext && handlerIndex < handlers.size(); handlerIndex++)
{
currHandler = handlers.get(handlerIndex);
-
+
if (log.isTraceEnabled())
{
SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
@@ -130,7 +130,7 @@
falseIndex = (handlerIndex - 1);
soapContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- log.debug("Exit: handleRequest with status: " + doNext);
+ if(log.isDebugEnabled()) log.debug("Exit: handleRequest with status: " + doNext);
}
}
@@ -146,7 +146,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleResponse");
+ if(log.isDebugEnabled()) log.debug("Enter: handleResponse");
int handlerIndex = handlers.size() - 1;
if (falseIndex != -1)
@@ -159,7 +159,7 @@
for (; doNext && handlerIndex >= 0; handlerIndex--)
{
currHandler = handlers.get(handlerIndex);
-
+
if (log.isTraceEnabled())
{
SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
@@ -187,7 +187,7 @@
falseIndex = (handlerIndex - 1);
soapContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- log.debug("Exit: handleResponse with status: " + doNext);
+ if(log.isDebugEnabled()) log.debug("Exit: handleResponse with status: " + doNext);
}
}
@@ -200,7 +200,7 @@
if (handlers.size() > 0)
{
- log.debug("Enter: handleFault");
+ if(log.isDebugEnabled()) log.debug("Enter: handleFault");
SOAPMessageContextJAXWS soapContext = (SOAPMessageContextJAXWS)msgContext;
soapContext.setProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
@@ -213,7 +213,7 @@
for (; doNext && handlerIndex < handlers.size(); handlerIndex++)
{
currHandler = handlers.get(handlerIndex);
-
+
if (log.isTraceEnabled())
{
SOAPPart soapPart = soapContext.getMessage().getSOAPPart();
@@ -241,7 +241,7 @@
falseIndex = (handlerIndex - 1);
soapContext.removeProperty(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
- log.debug("Exit: handleFault with status: " + doNext);
+ if(log.isDebugEnabled()) log.debug("Exit: handleFault with status: " + doNext);
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerDelegateJAXWS.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -51,7 +51,7 @@
public boolean callRequestHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
{
- log.debug("callRequestHandlerChain: " + type);
+ if(log.isDebugEnabled()) log.debug("callRequestHandlerChain: " + type);
SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
EndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
@@ -68,7 +68,7 @@
public boolean callResponseHandlerChain(ServiceEndpointInfo seInfo, HandlerType type)
{
- log.debug("callResponseHandlerChain: " + type);
+ if(log.isDebugEnabled()) log.debug("callResponseHandlerChain: " + type);
SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
List<Handler> handlerChain = getHandlerChain(epMetaData, type);
@@ -78,7 +78,7 @@
public boolean callFaultHandlerChain(ServiceEndpointInfo seInfo, HandlerType type, Exception ex)
{
- log.debug("callFaultHandlerChain: " + type);
+ if(log.isDebugEnabled()) log.debug("callFaultHandlerChain: " + type);
SOAPMessageContextJAXWS msgContext = (SOAPMessageContextJAXWS)MessageContextAssociation.peekMessageContext();
ServerEndpointMetaData epMetaData = seInfo.getServerEndpointMetaData();
List<Handler> handlerChain = getHandlerChain(epMetaData, type);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/handler/HandlerResolverImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -74,14 +74,14 @@
public List<Handler> getHandlerChain(PortInfo info, HandlerType type)
{
- log.debug("getHandlerChain: [type=" + type + ",info=" + info + "]");
+ if(log.isDebugEnabled()) log.debug("getHandlerChain: [type=" + type + ",info=" + info + "]");
List<Handler> unsortedChain = new ArrayList<Handler>();
String bindingID = info.getBindingID();
QName serviceName = info.getServiceName();
QName portName = info.getPortName();
-
+
Map<PortInfo, List<Handler>> handlerMap = getHandlerMap(type);
if (bindingID != null)
@@ -89,7 +89,7 @@
List<Handler> list = handlerMap.get(new PortInfoImpl(null, null, bindingID));
if (list != null)
{
- log.debug("add protocol handlers: " + list);
+ if(log.isDebugEnabled()) log.debug("add protocol handlers: " + list);
unsortedChain.addAll(list);
}
}
@@ -99,7 +99,7 @@
List<Handler> list = handlerMap.get(new PortInfoImpl(serviceName, null, null));
if (list != null)
{
- log.debug("add service handlers: " + list);
+ if(log.isDebugEnabled()) log.debug("add service handlers: " + list);
unsortedChain.addAll(list);
}
}
@@ -109,7 +109,7 @@
List<Handler> list = handlerMap.get(new PortInfoImpl(null, portName, null));
if (list != null)
{
- log.debug("add port handlers: " + list);
+ if(log.isDebugEnabled()) log.debug("add port handlers: " + list);
unsortedChain.addAll(list);
}
}
@@ -117,7 +117,7 @@
List<Handler> list = handlerMap.get(new PortInfoImpl(null, null, null));
if (list != null)
{
- log.debug("add general handlers: " + list);
+ if(log.isDebugEnabled()) log.debug("add general handlers: " + list);
unsortedChain.addAll(list);
}
@@ -139,10 +139,10 @@
public void initHandlerChain(EndpointMetaData epMetaData, HandlerType type)
{
- log.debug("initHandlerChain: " + type);
+ if(log.isDebugEnabled()) log.debug("initHandlerChain: " + type);
// clear all exisisting handler to avoid double registration
- log.debug("Clear handler map: " + jaxwsHandlers);
+ if(log.isDebugEnabled()) log.debug("Clear handler map: " + jaxwsHandlers);
Map<PortInfo, List<Handler>> handlerMap = getHandlerMap(type);
handlerMap.clear();
@@ -286,7 +286,7 @@
private boolean addHandler(PortInfo info, Handler handler, HandlerType type)
{
- log.debug("addHandler: " + info + ":" + handler);
+ if(log.isDebugEnabled()) log.debug("addHandler: " + info + ":" + handler);
Map<PortInfo, List<Handler>> handlerMap = getHandlerMap(type);
List<Handler> handlerList = handlerMap.get(info);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/EndpointImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -71,11 +71,11 @@
public EndpointImpl(String bindingId, Object implementor)
{
- log.debug("new EndpointImpl(bindingId=" + bindingId + ",implementor=" + implementor + ")");
-
+ if(log.isDebugEnabled()) log.debug("new EndpointImpl(bindingId=" + bindingId + ",implementor=" + implementor + ")");
+
if (implementor == null)
throw new IllegalArgumentException("Implementor cannot be null");
-
+
this.implementor = implementor;
this.bindingProvider = new BindingProviderImpl(bindingId);
}
@@ -93,17 +93,17 @@
}
/**
- * Publishes this endpoint at the given address. The necessary server infrastructure will be created and configured by the JAX-WS
- * implementation using some default configuration. In order to get more control over the server configuration,
+ * Publishes this endpoint at the given address. The necessary server infrastructure will be created and configured by the JAX-WS
+ * implementation using some default configuration. In order to get more control over the server configuration,
* please use the javax.xml.ws.Endpoint#publish(Object) method instead.
- *
+ *
* @param URI specifying the address to use. The address must be compatible with the binding specified at the time the endpoint was created.
*/
@Override
public void publish(String address)
{
- log.debug("publish: " + address);
-
+ if(log.isDebugEnabled()) log.debug("publish: " + address);
+
URI addrURI;
try
{
@@ -116,7 +116,7 @@
// Check with the security manger
checkPublishEndpointPermission();
-
+
// Create and start the HTTP server
HttpServer httpServer = HttpServer.create();
httpServer.setProperties(properties);
@@ -130,23 +130,23 @@
}
/**
- * Publishes this endpoint at the provided server context.
- * A server context encapsulates the server infrastructure and addressing information for a particular transport.
+ * Publishes this endpoint at the provided server context.
+ * A server context encapsulates the server infrastructure and addressing information for a particular transport.
* For a call to this method to succeed, the server context passed as an argument to it must be compatible with the endpoint's binding.
- *
+ *
* @param serverContext An object representing a server context to be used for publishing the endpoint.
*/
@Override
public void publish(Object context)
{
- log.debug("publish: " + context);
-
+ if(log.isDebugEnabled()) log.debug("publish: " + context);
+
if (isDestroyed)
throw new IllegalStateException("Endpoint already destroyed");
// Check with the security manger
checkPublishEndpointPermission();
-
+
// Check if we are standalone
boolean isStandalone;
try
@@ -155,15 +155,15 @@
factory.getServiceEndpointManager();
isStandalone = false;
}
- catch (Exception ex)
+ catch (Exception ex)
{
// ignore, there should be no ServiceEndpointManager in VM
isStandalone = true;
}
-
+
if (isStandalone == false)
throw new IllegalStateException("Cannot publish endpoint from within server");
-
+
if (context instanceof HttpContext)
{
serverContext = (HttpContext)context;
@@ -176,7 +176,7 @@
@Override
public void stop()
{
- log.debug("stop");
+ if(log.isDebugEnabled()) log.debug("stop");
if (serverContext == null || isPublished == false)
log.error("Endpoint not published");
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -352,13 +352,13 @@
if(usRef == null || usRef.getPortInfos().size() == 0)
{
- log.debug("No port configuration for: " + portName);
+ if(log.isDebugEnabled()) log.debug("No port configuration for: " + portName);
return;
}
-
+
String configFile = usRef.getConfigFile();
String configName = usRef.getConfigName();
-
+
boolean match = false;
for (PortInfo pi : usRef.getPortInfos())
{
@@ -369,7 +369,7 @@
{
if (piSEI != null && piPort != null)
match = seiName.equals(piSEI) && portName.equals(piPort);
- else
+ else
match = seiName.equals(piSEI) || portName.equals(piPort);
}
if (match == true)
@@ -378,12 +378,12 @@
configFile = pi.getConfigFile();
if (pi.getConfigName() != null)
configName = pi.getConfigName();
-
+
BindingProvider bp = (BindingProvider)stub;
Map<String, Object> reqCtx = bp.getRequestContext();
for (NameValuePair nvp : pi.getStubProperties())
{
- log.debug("Set stub property: " + nvp);
+ if(log.isDebugEnabled()) log.debug("Set stub property: " + nvp);
reqCtx.put(nvp.getName(), nvp.getValue());
}
break;
@@ -391,9 +391,9 @@
}
if (match == false)
- log.debug("No matching port configuration for: [portName=" + portName + ",seiName=" + seiName + "]");
-
- log.debug("Configure Stub: [configName=" + configName + ",configFile=" + configFile + "]");
+ if(log.isDebugEnabled()) log.debug("No matching port configuration for: [portName=" + portName + ",seiName=" + seiName + "]");
+
+ if(log.isDebugEnabled()) log.debug("Configure Stub: [configName=" + configName + ",configFile=" + configFile + "]");
if (configName != null || configFile != null)
stub.setConfigName(configName, configFile);
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointInvoker.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -160,7 +160,7 @@
// Check if protocol handlers modified the payload
if (((SOAPBodyImpl)reqMessage.getSOAPBody()).isModifiedFromSource())
{
- log.debug("Handler modified body payload, unbind message again");
+ if(log.isDebugEnabled()) log.debug("Handler modified body payload, unbind message again");
epInv = binding.unbindRequestMessage(opMetaData, reqMessage);
}
@@ -185,7 +185,7 @@
if(binding instanceof CommonSOAPBinding)
XOPContext.setMTOMEnabled( ((CommonSOAPBinding)binding).isMTOMEnabled());
-
+
// Bind the response message
SOAPMessage resMessage = (SOAPMessage)binding.bindResponseMessage(opMetaData, epInv);
msgContext.setSOAPMessage(resMessage);
@@ -208,7 +208,7 @@
{
CommonBinding binding = bindingProvider.getCommonBinding();
binding.bindFaultMessage(ex);
-
+
// call the handler chain
boolean handlersPass = callFaultHandlerChain(seInfo, HandlerType.POST, ex);
handlersPass = handlersPass && callFaultHandlerChain(seInfo, HandlerType.ENDPOINT, ex);
@@ -228,7 +228,7 @@
protected CommonMessageContext processPivot(CommonMessageContext requestContext)
{
- log.debug("Begin response processing");
+ if(log.isDebugEnabled()) log.debug("Begin response processing");
// TODO: implement
return requestContext;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/AbstractServiceEndpointServlet.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -106,7 +106,7 @@
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
- log.debug("doPost: " + req.getRequestURI());
+ if(log.isDebugEnabled()) log.debug("doPost: " + req.getRequestURI());
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpoint.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -119,7 +119,7 @@
{
seMetrics.stop();
seInfo.setState(State.STOPED);
- log.debug("Stop Endpoint" + seMetrics);
+ if(log.isDebugEnabled()) log.debug("Stop Endpoint" + seMetrics);
}
public void destroy()
@@ -136,15 +136,15 @@
//String wsdlHost = reqURL.getHost();
String wsdlHost = reqURL.getProtocol() + "://" + reqURL.getHost() + ":" + reqURL.getPort();
-
+
ServiceEndpointManagerFactory factory = ServiceEndpointManagerFactory.getInstance();
ServiceEndpointManager epManager = factory.getServiceEndpointManager();
if (epManager.getWebServiceHost().equals(ServiceEndpointManager.UNDEFINED_HOSTNAME) == false)
{
wsdlHost = epManager.getWebServiceHost();
}
- log.debug("WSDL request, using host: " + wsdlHost);
-
+ if(log.isDebugEnabled()) log.debug("WSDL request, using host: " + wsdlHost);
+
WSDLRequestHandler wsdlRequestHandler = new WSDLRequestHandler(epMetaData);
Document document = wsdlRequestHandler.getDocumentForPath(reqURL, wsdlHost, resPath);
@@ -174,7 +174,7 @@
throw new SOAPFaultException(faultCode, faultString, null, null);
}
- log.debug("BEGIN handleRequest: " + seInfo.getServiceEndpointID());
+ if(log.isDebugEnabled()) log.debug("BEGIN handleRequest: " + seInfo.getServiceEndpointID());
beginProcessing = seMetrics.processRequestMessage();
MessageFactoryImpl msgFactory = new MessageFactoryImpl();
@@ -202,7 +202,7 @@
// Invoke the service endpoint
ServiceEndpointInvoker seInvoker = seInfo.getInvoker();
SOAPMessage resMessage = seInvoker.invoke(seInfo, context);
-
+
if (resMessage != null)
postProcessResponse(headerSource, resMessage);
@@ -223,7 +223,7 @@
if (resMessage != null)
postProcessResponse(headerSource, resMessage);
-
+
return resMessage;
}
finally
@@ -250,7 +250,7 @@
// Reset the thread context class loader
Thread.currentThread().setContextClassLoader(ctxClassLoader);
- log.debug("END handleRequest: " + seInfo.getServiceEndpointID());
+ if(log.isDebugEnabled()) log.debug("END handleRequest: " + seInfo.getServiceEndpointID());
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointDeployer.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -70,7 +70,7 @@
public void create(UnifiedDeploymentInfo udi)
{
- log.debug("create: " + udi.name);
+ if(log.isDebugEnabled()) log.debug("create: " + udi.name);
try
{
UnifiedMetaData wsMetaData;
@@ -122,7 +122,7 @@
public void start(UnifiedDeploymentInfo udi)
{
- log.debug("start: " + udi.name);
+ if(log.isDebugEnabled()) log.debug("start: " + udi.name);
try
{
UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
@@ -157,7 +157,7 @@
public void stop(UnifiedDeploymentInfo udi)
{
- log.debug("stop: " + udi.name);
+ if(log.isDebugEnabled()) log.debug("stop: " + udi.name);
try
{
UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
@@ -190,7 +190,7 @@
public void destroy(UnifiedDeploymentInfo udi)
{
- log.debug("destroy: " + udi.name);
+ if(log.isDebugEnabled()) log.debug("destroy: " + udi.name);
try
{
UnifiedMetaData wsMetaData = getUnifiedMetaData(udi);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvokerJSE.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -86,7 +86,7 @@
/** Invoke an instance of the SEI implementation bean */
public void invokeServiceEndpoint(ServiceEndpointInfo seInfo, Object seiImpl, EndpointInvocation epInv) throws SOAPFaultException, Exception
{
- log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
+ if(log.isDebugEnabled()) log.debug("invokeServiceEndpoint: " + epInv.getJavaMethod().getName());
try
{
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/ServiceEndpointManager.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -134,13 +134,13 @@
{
if (host == null || host.trim().length() == 0)
{
- log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+ if(log.isDebugEnabled()) log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
host = UNDEFINED_HOSTNAME;
}
if ("0.0.0.0".equals(host))
{
InetAddress localHost = InetAddress.getLocalHost();
- log.debug("Using local host: " + localHost.getHostName());
+ if(log.isDebugEnabled()) log.debug("Using local host: " + localHost.getHostName());
host = localHost.getHostName();
}
this.webServiceHost = host;
@@ -205,7 +205,7 @@
{
return UnifiedMetaData.getImplementationVersion();
}
-
+
public List<ObjectName> getServiceEndpoints()
{
ArrayList<ObjectName> list = new ArrayList<ObjectName>();
@@ -416,23 +416,23 @@
msgContext.setProperty(MessageContextJAXWS.SERVLET_CONTEXT, servletContext);
msgContext.setProperty(MessageContextJAXWS.SERVLET_REQUEST, httpRequest);
msgContext.setProperty(MessageContextJAXWS.SERVLET_RESPONSE, httpResponse);
-
+
}
msgContext.setEndpointMetaData(sepMetaData);
-
+
MessageContextAssociation.pushMessageContext(msgContext);
try
{
SOAPMessage resMessage = wsEndpoint.handleRequest(headerSource, context, inStream);
-
+
Map<String, List<String>> headers = (Map<String, List<String>>)msgContext.getProperty(MessageContextJAXWS.HTTP_RESPONSE_HEADERS);
if (headers != null)
headerSource.setHeaderMap(headers);
-
+
Integer code = (Integer)msgContext.getProperty(MessageContextJAXWS.HTTP_RESPONSE_CODE);
if (code != null)
httpResponse.setStatus(code.intValue());
-
+
SOAPPart part = resMessage.getSOAPPart();
if (part == null)
throw new SOAPException("Cannot obtain SOAPPart from response message");
@@ -480,7 +480,7 @@
}
if (wsaTo != null)
{
- log.debug("Sending response to addressing destination: " + wsaTo);
+ if(log.isDebugEnabled()) log.debug("Sending response to addressing destination: " + wsaTo);
new SOAPConnectionImpl().callOneWay(soapMessage, wsaTo);
}
else
@@ -493,7 +493,7 @@
*/
public String processSOAPRequest(ObjectName sepID, String inMessage) throws Exception
{
- log.debug("processSOAPRequest: " + sepID);
+ if(log.isDebugEnabled()) log.debug("processSOAPRequest: " + sepID);
ByteArrayInputStream inputStream = new ByteArrayInputStream(inMessage.getBytes("UTF-8"));
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(512);
@@ -603,7 +603,7 @@
// Register the endpoint with the MBeanServer
registry.put(sepID, wsEndpoint);
- log.debug("WebService created: " + sepID);
+ if(log.isDebugEnabled()) log.debug("WebService created: " + sepID);
}
/** Start a service endpoint
@@ -654,7 +654,7 @@
registry.remove(sepID);
ServiceEndpointInfo seInfo = wsEndpoint.getServiceEndpointInfo();
- log.debug("WebService destroyed: " + seInfo.getServerEndpointMetaData().getEndpointAddress());
+ if(log.isDebugEnabled()) log.debug("WebService destroyed: " + seInfo.getServerEndpointMetaData().getEndpointAddress());
}
public void create() throws Exception
@@ -669,7 +669,7 @@
public void destroy() throws Exception
{
- log.debug("Destroy service endpoint manager");
+ if(log.isDebugEnabled()) log.debug("Destroy service endpoint manager");
MBeanServer server = getJMXServer();
if (server != null)
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/server/WSDLFilePublisher.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -155,7 +155,7 @@
wsdlWriter.writeWSDL(subdef, fw);
fw.close();
- log.debug("WSDL import published to: " + targetURL);
+ if(log.isDebugEnabled()) log.debug("WSDL import published to: " + targetURL);
// recursivly publish imports
publishWsdlImports(targetURL, subdef);
@@ -209,7 +209,7 @@
fos.close();
is.close();
- log.debug("XMLSchema import published to: " + xsdURL);
+ if(log.isDebugEnabled()) log.debug("XMLSchema import published to: " + xsdURL);
// recursivly publish imports
Element subdoc = DOMUtils.parse(xsdURL.openStream());
@@ -273,9 +273,9 @@
if (wsdlLocation == null)
throw new IllegalStateException("Cannot obtain wsdl location for: " + serviceMetaData.getServiceName());
+
+ if(log.isDebugEnabled()) log.debug("Publish WSDL file: " + wsdlLocation);
- log.debug("Publish WSDL file: " + wsdlLocation);
-
// Only file URLs are supported in <wsdl-publish-location>
String publishLocation = serviceMetaData.getWsdlPublishLocation();
boolean predefinedLocation = publishLocation != null && publishLocation.startsWith("file:");
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageContextAssociation.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -43,7 +43,7 @@
public static void pushMessageContext(CommonMessageContext msgContext)
{
- log.debug("pushMessageContext: " + msgContext + " (Thread " +Thread.currentThread().getName()+ ")");
+ if(log.isDebugEnabled()) log.debug("pushMessageContext: " + msgContext + " (Thread " +Thread.currentThread().getName()+ ")");
Stack<CommonMessageContext> stack = ThreadLocalAssociation.localMsgContextAssoc().get();
if (stack == null)
{
@@ -52,7 +52,7 @@
}
stack.push(msgContext);
}
-
+
public static CommonMessageContext peekMessageContext()
{
CommonMessageContext msgContext = null;
@@ -63,7 +63,7 @@
}
return msgContext;
}
-
+
public static CommonMessageContext popMessageContext()
{
CommonMessageContext msgContext = null;
@@ -72,7 +72,7 @@
{
msgContext = stack.pop();
}
- log.debug("popMessageContext: " + msgContext +" (Thread " +Thread.currentThread().getName()+ ")");
+ if(log.isDebugEnabled()) log.debug("popMessageContext: " + msgContext +" (Thread " +Thread.currentThread().getName()+ ")");
return msgContext;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/MessageFactoryImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -188,7 +188,7 @@
}
ContentType contentType = getContentType(mimeHeaders);
- log.debug("createMessage: [contentType=" + contentType + "]");
+ if(log.isDebugEnabled()) log.debug("createMessage: [contentType=" + contentType + "]");
// Debug the incoming message
if (log.isTraceEnabled())
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -103,7 +103,7 @@
public void setPayload(Source payload)
{
- log.debug("setPayload: " + payload.getClass().getName());
+ if(log.isDebugEnabled()) log.debug("setPayload: " + payload.getClass().getName());
removeContents();
this.payload = payload;
this.isDOMValid = false;
@@ -377,7 +377,7 @@
child = DOMUtils.parse(new InputSource(reader));
}
- // reset the excausted input stream
+ // reset the excausted input stream
String xmlStr = DOMWriter.printNode(child, false);
payload = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
}
@@ -400,8 +400,8 @@
}
else if (payload instanceof SAXSource)
{
- // The fact that JAXBSource derives from SAXSource is an implementation detail.
- // Thus in general applications are strongly discouraged from accessing methods defined on SAXSource.
+ // The fact that JAXBSource derives from SAXSource is an implementation detail.
+ // Thus in general applications are strongly discouraged from accessing methods defined on SAXSource.
// The XMLReader object obtained by the getXMLReader method shall be used only for parsing the InputSource object returned by the getInputSource method.
TransformerFactory tf = TransformerFactory.newInstance();
@@ -433,7 +433,7 @@
{
Element child = getBodyElementFromSource();
String xmlPayload = DOMWriter.printNode(child, false);
- log.debug("writeElementContent from payload: " + xmlPayload);
+ if(log.isDebugEnabled()) log.debug("writeElementContent from payload: " + xmlPayload);
writer.write(xmlPayload);
}
else
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPConnectionImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -245,7 +245,7 @@
try
{
// Get the invoker from Remoting for a given endpoint address
- log.debug("Get locator for: " + endpoint);
+ if(log.isDebugEnabled()) log.debug("Get locator for: " + endpoint);
targetAddress = addURLParameter(targetAddress, InvokerLocator.DATATYPE, "SOAPMessage");
InvokerLocator locator = new InvokerLocator(targetAddress);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageDispatcher.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -68,7 +68,7 @@
if (wsaAction.equals(opAux.getSOAPAction()))
{
opMetaData = opAux;
- log.debug("Use wsa:Action dispatch: " + wsaAction);
+ if(log.isDebugEnabled()) log.debug("Use wsa:Action dispatch: " + wsaAction);
break;
}
}
@@ -91,13 +91,13 @@
{
if (epMetaData.getStyle() == Style.RPC)
throw new SOAPException("Empty SOAP body with no child element not supported for RPC");
-
+
// [JBWS-1125] Support empty soap body elements
for (OperationMetaData opAux : epMetaData.getOperations())
{
if (opAux.getParameters().size() == 0)
{
- log.debug ("Dispatching empty SOAP body");
+ if(log.isDebugEnabled()) log.debug ("Dispatching empty SOAP body");
opMetaData = opAux;
break;
}
@@ -122,14 +122,14 @@
{
if (opAux.isMessageEndpoint())
{
- log.debug("Use generic message style dispatch");
+ if(log.isDebugEnabled()) log.debug("Use generic message style dispatch");
opMetaData = opAux;
break;
}
}
}
- log.debug("getDispatchDestination: " + (opMetaData != null ? opMetaData.getQName() : null));
+ if(log.isDebugEnabled()) log.debug("getDispatchDestination: " + (opMetaData != null ? opMetaData.getQName() : null));
return opMetaData;
}
}
\ No newline at end of file
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPMessageUnMarshaller.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -102,7 +102,7 @@
private MimeHeaders getMimeHeaders(Map metadata)
{
- log.debug("getMimeHeaders from: " + metadata);
+ if(log.isDebugEnabled()) log.debug("getMimeHeaders from: " + metadata);
MimeHeaders headers = new MimeHeaders();
Iterator i = metadata.keySet().iterator();
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/SOAPPartImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -148,7 +148,7 @@
// Specifically, the HTTP response entity-body must be empty.
if (source == null)
{
- log.debug("Setting content source to null removes the SOAPEnvelope");
+ if(log.isDebugEnabled()) log.debug("Setting content source to null removes the SOAPEnvelope");
soapEnvelope = null;
return;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/CIDGenerator.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -50,11 +50,11 @@
cid.append("cid:").append(count++).append("-").append(time).append("-")
.append(cid.hashCode()).append("@").append(MimeConstants.CID_DOMAIN);
- log.debug("generateFromCount: " + cid);
+ if(log.isDebugEnabled()) log.debug("generateFromCount: " + cid);
return cid.toString();
}
- public String generateFromName(String name)
+ public String generateFromName(String name)
{
// See http://www.ietf.org/rfc/rfc2392.txt on rules howto create cid's
@@ -69,7 +69,7 @@
}
String cid = name + "-" + UUIDGenerator.generateRandomUUIDString() + "@" + MimeConstants.CID_DOMAIN;
- log.debug("generateFromName: " + cid);
+ if(log.isDebugEnabled()) log.debug("generateFromName: " + cid);
return cid;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/soap/attachment/SwapableMemoryDataSource.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -127,12 +127,12 @@
if (rbaos == null)
{
- log.debug("Using swap file, location = " + swapFile.toURL() + " size = " + swapFile.length());
+ if(log.isDebugEnabled()) log.debug("Using swap file, location = " + swapFile.toURL() + " size = " + swapFile.length());
}
else
{
contentLength = rbaos.size();
- log.debug("Using memory buffer, size = " + contentLength);
+ if(log.isDebugEnabled()) log.debug("Using memory buffer, size = " + contentLength);
content = rbaos.getBytes();
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JBossWSEntityResolver.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -59,14 +59,14 @@
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
{
- log.debug("resolveEntity: [pub=" + publicId + ",sysid=" + systemId + "]");
+ if(log.isDebugEnabled()) log.debug("resolveEntity: [pub=" + publicId + ",sysid=" + systemId + "]");
InputSource inputSource = super.resolveEntity(publicId, systemId);
if (inputSource == null)
inputSource = resolveSystemIDAsURL(systemId, log.isTraceEnabled());
-
+
if (inputSource == null)
- log.debug("Cannot resolve entity: [pub=" + publicId + ",sysid=" + systemId + "]");
+ if(log.isDebugEnabled()) log.debug("Cannot resolve entity: [pub=" + publicId + ",sysid=" + systemId + "]");
return inputSource;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JavaUtils.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JavaUtils.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/utils/JavaUtils.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -411,7 +411,7 @@
{
ClassLoader destLoader = dest.getClassLoader();
ClassLoader srcLoader = src.getClassLoader();
- log.debug("Not assignable because of conflicting class loaders:\ndstLoader=" + destLoader + "\nsrcLoader=" + srcLoader);
+ if(log.isDebugEnabled()) log.debug("Not assignable because of conflicting class loaders:\ndstLoader=" + destLoader + "\nsrcLoader=" + srcLoader);
}
if (isAssignable == false && isPrimitive(dest))
@@ -586,11 +586,11 @@
return ret;
}
-
+
/**
* This method tests for retro translation by searching for a known problem where Class
* does not implement Type. If this is true, then code must never cast a Class to a Type.
- *
+ *
* @return true if we are in retro
*/
public static boolean isRetro14()
@@ -641,7 +641,7 @@
}
catch (Exception e)
{
- log.debug("Could not clear blacklists on " + loader);
+ if(log.isDebugEnabled()) log.debug("Could not clear blacklists on " + loader);
}
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingClientHandler.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -74,7 +74,7 @@
public boolean handleRequest(MessageContext msgContext)
{
- log.debug("handleRequest");
+ if(log.isDebugEnabled()) log.debug("handleRequest");
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.getProperty(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
@@ -107,7 +107,7 @@
public boolean handleResponse(MessageContext msgContext)
{
- log.debug("handleResponse");
+ if(log.isDebugEnabled()) log.debug("handleResponse");
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingServerHandler.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingServerHandler.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxrpc/WSAddressingServerHandler.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -81,7 +81,7 @@
*/
public boolean handleRequest(MessageContext msgContext)
{
- log.debug("handleRequest");
+ if(log.isDebugEnabled()) log.debug("handleRequest");
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)ADDR_BUILDER.newAddressingProperties();
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
@@ -100,7 +100,7 @@
*/
public boolean handleResponse(MessageContext msgContext)
{
- log.debug("handleResponse");
+ if(log.isDebugEnabled()) log.debug("handleResponse");
handleResponseOrFault(msgContext, false);
return true;
}
@@ -111,7 +111,7 @@
*/
public boolean handleFault(MessageContext msgContext)
{
- log.debug("handleFault");
+ if(log.isDebugEnabled()) log.debug("handleFault");
handleResponseOrFault(msgContext, true);
return true;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingClientHandler.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -60,7 +60,7 @@
protected boolean handleOutbound(MessageContext msgContext)
{
- log.debug("handleOutbound");
+ if(log.isDebugEnabled()) log.debug("handleOutbound");
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)msgContext.get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND);
if (addrProps != null)
@@ -86,7 +86,7 @@
protected boolean handleInbound(MessageContext msgContext)
{
- log.debug("handleInbound");
+ if(log.isDebugEnabled()) log.debug("handleInbound");
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/addressing/jaxws/WSAddressingServerHandler.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -63,7 +63,7 @@
protected boolean handleInbound(MessageContext msgContext)
{
- log.debug("handleInbound");
+ if(log.isDebugEnabled()) log.debug("handleInbound");
SOAPAddressingProperties addrProps = (SOAPAddressingProperties)ADDR_BUILDER.newAddressingProperties();
SOAPMessage soapMessage = ((SOAPMessageContext)msgContext).getMessage();
@@ -78,7 +78,7 @@
protected boolean handleOutbound(MessageContext msgContext)
{
- log.debug("handleOutbound");
+ if(log.isDebugEnabled()) log.debug("handleOutbound");
handleResponseOrFault(msgContext, false);
return true;
}
@@ -89,7 +89,7 @@
*/
public boolean handleFault(MessageContext msgContext)
{
- log.debug("handleFault");
+ if(log.isDebugEnabled()) log.debug("handleFault");
handleResponseOrFault(msgContext, true);
return true;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/Subscription.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -75,7 +75,7 @@
public void notify(Element event)
{
- log.debug(getIdentifier() + " dispatching " + event);
+ if(log.isDebugEnabled()) log.debug(getIdentifier() + " dispatching " + event);
try
{
@@ -137,7 +137,7 @@
if (null == endTo) // it's an optional field.
return;
- log.debug("Ending subscription " + getIdentifier());
+ if(log.isDebugEnabled()) log.debug("Ending subscription " + getIdentifier());
StringBuffer sb = new StringBuffer();
sb.append("<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope' ");
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/eventing/mgmt/SubscriptionManager.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -145,7 +145,7 @@
MBeanServer server = getJMXServer();
if (server != null)
{
- log.debug("Create subscription manager");
+ if(log.isDebugEnabled()) log.debug("Create subscription manager");
server.registerMBean(this, OBJECT_NAME);
}
}
@@ -155,14 +155,14 @@
MBeanServer server = getJMXServer();
if (server != null)
{
- log.debug("Destroy subscription manager");
+ if(log.isDebugEnabled()) log.debug("Destroy subscription manager");
server.unregisterMBean(OBJECT_NAME);
}
}
public void start() throws Exception
{
- log.debug("Start subscription manager");
+ if(log.isDebugEnabled()) log.debug("Start subscription manager");
// setup thread pool
threadPool = new ThreadPoolExecutor(5, 15, // core/max num threads
@@ -176,7 +176,7 @@
public void stop()
{
- log.debug("Stop subscription manager");
+ if(log.isDebugEnabled()) log.debug("Stop subscription manager");
try
{
// remove event dispatcher
@@ -226,7 +226,7 @@
updateManagerAddress(deploymentInfo, eventSource);
eventSource.setState(EventSource.State.CREATED);
- log.debug("Created: " + eventSource);
+ if(log.isDebugEnabled()) log.debug("Created: " + eventSource);
}
else
{
@@ -235,7 +235,7 @@
subscriptionMapping.put(eventSource.getNameSpace(), new CopyOnWriteArrayList<Subscription>());
eventSource.setState(EventSource.State.STARTED);
- log.debug("Started: " + eventSource);
+ if(log.isDebugEnabled()) log.debug("Started: " + eventSource);
}
}
@@ -285,7 +285,7 @@
subscriptions.clear();
eventSourceMapping.remove(eventSourceNS);
- log.debug("Event source " + eventSourceNS + " removed");
+ if(log.isDebugEnabled()) log.debug("Event source " + eventSourceNS + " removed");
}
}
@@ -295,7 +295,7 @@
public SubscriptionTicket subscribe(URI eventSourceNS, EndpointReferenceType notifyTo, EndpointReferenceType endTo, Date expires, Filter filter) throws SubscriptionError
{
- log.debug("Subscription request for " + eventSourceNS);
+ if(log.isDebugEnabled()) log.debug("Subscription request for " + eventSourceNS);
EventSource eventSource = eventSourceMapping.get(eventSourceNS);
if (null == eventSource)
@@ -349,7 +349,7 @@
Subscription subscription = new Subscription(eventSource.getNameSpace(), epr, notifyTo, endTo, expires, filter);
subscriptionMapping.get(eventSourceNS).add(subscription);
- log.debug("Registered subscription " + subscription.getIdentifier());
+ if(log.isDebugEnabled()) log.debug("Registered subscription " + subscription.getIdentifier());
return new SubscriptionTicket(epr, subscription.getExpires());
}
@@ -414,7 +414,7 @@
if (identifier.equals(s.getIdentifier()))
{
subscriptions.remove(s);
- log.debug("Removed subscription " + s);
+ if(log.isDebugEnabled()) log.debug("Removed subscription " + s);
break;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/security/SecurityStore.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -134,19 +134,19 @@
KeyStore keyStore = null;
try
{
- log.debug("loadStore: " + storeURL);
+ if(log.isDebugEnabled()) log.debug("loadStore: " + storeURL);
InputStream stream = storeURL.openStream();
if (stream == null)
throw new WSSecurityException("Cannot load store from: " + storeURL);
-
+
keyStore = KeyStore.getInstance(storeType);
if (keyStore == null)
throw new WSSecurityException("Cannot get keystore for type: " + storeType);
-
+
String decryptedPassword = decryptPassword(storePassword);
if (decryptedPassword == null)
throw new WSSecurityException("Cannot decrypt store password");
-
+
keyStore.load(stream, decryptedPassword.toCharArray());
}
catch (RuntimeException rte)
@@ -161,7 +161,7 @@
{
throw new WSSecurityException("Problems loading " + type + ": " + ex.getMessage(), ex);
}
-
+
return keyStore;
}
@@ -172,10 +172,10 @@
private String decryptPassword(String password) throws WSSecurityException
{
log.trace("decrypt password: " + password);
-
+
if (password == null)
throw new WSSecurityException("Invalid null password for security store");
-
+
if (password.charAt(0) == '{')
{
StringTokenizer tokenizer = new StringTokenizer(password, "{}");
@@ -196,14 +196,14 @@
}
if (password == null)
throw new WSSecurityException("Cannot decrypt password, result is null");
-
+
log.trace("decrypted password: " + password);
return password;
}
private String execPasswordCmd(String keyStorePasswordCmd) throws WSSecurityException
{
- log.debug("Executing command: " + keyStorePasswordCmd);
+ if(log.isDebugEnabled()) log.debug("Executing command: " + keyStorePasswordCmd);
try
{
Runtime rt = Runtime.getRuntime();
@@ -213,7 +213,7 @@
String password = reader.readLine();
stdin.close();
int exitCode = p.waitFor();
- log.debug("Command exited with: " + exitCode);
+ if(log.isDebugEnabled()) log.debug("Command exited with: " + exitCode);
return password;
}
catch (Exception e)
@@ -233,7 +233,7 @@
classname = keyStorePasswordCmd.substring(0, colon);
ctorArg = keyStorePasswordCmd.substring(colon + 1);
}
- log.debug("Loading class: " + classname + ", ctorArg=" + ctorArg);
+ if(log.isDebugEnabled()) log.debug("Loading class: " + classname + ", ctorArg=" + ctorArg);
try
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
@@ -252,16 +252,16 @@
}
try
{
- log.debug("Checking for toCharArray");
+ if(log.isDebugEnabled()) log.debug("Checking for toCharArray");
Class[] sig = {};
Method toCharArray = c.getMethod("toCharArray", sig);
Object[] args = {};
- log.debug("Invoking toCharArray");
+ if(log.isDebugEnabled()) log.debug("Invoking toCharArray");
password = new String((char[])toCharArray.invoke(instance, args));
}
catch (NoSuchMethodException e)
{
- log.debug("No toCharArray found, invoking toString");
+ if(log.isDebugEnabled()) log.debug("No toCharArray found, invoking toString");
password = instance.toString();
}
}
@@ -428,7 +428,7 @@
}
catch (Exception e)
{
- log.debug("Certificate is invalid", e);
+ if(log.isDebugEnabled()) log.debug("Certificate is invalid", e);
throw new FailedAuthenticationException();
}
@@ -477,7 +477,7 @@
}
catch (CertPathValidatorException cpve)
{
- log.debug("Certificate is invalid:", cpve);
+ if(log.isDebugEnabled()) log.debug("Certificate is invalid:", cpve);
throw new FailedAuthenticationException();
}
catch (InvalidAlgorithmParameterException e)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/XOPContext.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -266,7 +266,7 @@
{
SOAPElement parentElement = xopElement.getParentElement();
- log.debug("Replace base64 representation on element [xmlName=" + parentElement.getLocalName() + "]");
+ if(log.isDebugEnabled()) log.debug("Replace base64 representation on element [xmlName=" + parentElement.getLocalName() + "]");
String base64 = xopElement.getValue();
byte[] data = SimpleTypeBindings.unmarshalBase64(base64);
@@ -288,7 +288,7 @@
{
SOAPElement xopInclude = xopElement.addChildElement(Constants.NAME_XOP_INCLUDE);
xopInclude.setAttribute("href", cid);
- log.debug("Restored xop:Include element on [xmlName=" + xopElement.getLocalName() + "]");
+ if(log.isDebugEnabled()) log.debug("Restored xop:Include element on [xmlName=" + xopElement.getLocalName() + "]");
XOPContext.setXOPMessage(true);
}
@@ -302,7 +302,7 @@
private static void replaceXOPInclude(SOAPElement parent, SOAPElement xopIncludeElement)
{
- log.debug("Replace xop:Include on element [xmlName=" + parent.getLocalName() + "]");
+ if(log.isDebugEnabled()) log.debug("Replace xop:Include on element [xmlName=" + parent.getLocalName() + "]");
String cid = xopIncludeElement.getAttribute("href");
byte[] data;
@@ -331,7 +331,7 @@
parent.setValue(base64);
parent.setAttributeNS(NS_XOP_JBOSSWS, "content-type", contentType);
- log.debug("Created base64 representation for content-type " + contentType);
+ if(log.isDebugEnabled()) log.debug("Created base64 representation for content-type " + contentType);
// cleanup the attachment part
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
@@ -345,7 +345,7 @@
if (null == removedPart)
throw new WSException("Unable to remove attachment part " + cid);
- log.debug("Removed attachment part " + cid);
+ if(log.isDebugEnabled()) log.debug("Removed attachment part " + cid);
// leave soap object model in a valid state
setXOPMessage(false);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/JBossXBContentAdapter.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/JBossXBContentAdapter.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/JBossXBContentAdapter.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -81,7 +81,7 @@
if( mtomDisabled && convertableType )
{
String contentType = MimeUtils.resolveMimeType(object);
- log.debug("Adopt " + object.getClass() + " to byte[], contentType " + contentType);
+ if(log.isDebugEnabled()) log.debug("Adopt " + object.getClass() + " to byte[], contentType " + contentType);
DataHandler dh = new DataHandler(object, contentType);
ByteArrayOutputStream bout = new ByteArrayOutputStream();
@@ -125,7 +125,7 @@
if( isRegularMessage && isSimpleType && !doTypesMatch)
{
String contentType = MimeUtils.resolveMimeType(targetClass);
- log.debug("Adopt byte[] to " + targetClass +", contentType "+ contentType);
+ if(log.isDebugEnabled()) log.debug("Adopt byte[] to " + targetClass +", contentType "+ contentType);
try
{
@@ -154,7 +154,7 @@
try
{
String contentType = MimeUtils.resolveMimeType(targetClass);
- log.debug("Adopt DataHandler to " + targetClass +", contentType "+ contentType);
+ if(log.isDebugEnabled()) log.debug("Adopt DataHandler to " + targetClass +", contentType "+ contentType);
DataHandler dh = new DataHandler(
wrapAsDataSource(object, contentType)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/XOPMarshallerImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/XOPMarshallerImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxrpc/XOPMarshallerImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -68,7 +68,7 @@
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
QName xmlName = new QName(elementNamespace, elementName);
- log.debug("serialize: [xmlName=" + xmlName + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + "]");
String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
@@ -77,7 +77,7 @@
xopPart.addMimeHeader(MimeConstants.CONTENT_ID, '<'+cid+'>'); // RFC2392 requirement
soapMessage.addAttachmentPart(xopPart);
- log.debug("Created attachment part " +cid+", with content-type " +xopPart.getContentType());
+ if(log.isDebugEnabled()) log.debug("Created attachment part " +cid+", with content-type " +xopPart.getContentType());
return "cid:" + cid;
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/extensions/xop/jaxws/AttachmentMarshallerImpl.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -43,14 +43,14 @@
SOAPMessageImpl soapMessage = (SOAPMessageImpl)msgContext.getSOAPMessage();
QName xmlName = new QName(elementNamespace, elementLocalName);
- log.debug("serialize: [xmlName=" + xmlName + "]");
+ if(log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + "]");
String cid = soapMessage.getCidGenerator().generateFromName(xmlName.getLocalPart());
AttachmentPart xopPart = soapMessage.createAttachmentPart(data);
xopPart.addMimeHeader(MimeConstants.CONTENT_ID, '<' + cid + '>'); // RFC2392 requirement
soapMessage.addAttachmentPart(xopPart);
- log.debug("Created attachment part " + cid + ", with content-type " + xopPart.getContentType());
+ if(log.isDebugEnabled()) log.debug("Created attachment part " + cid + ", with content-type " + xopPart.getContentType());
return "cid:" + cid;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -335,7 +335,7 @@
if (alwaysModify || uriScheme == null || orgAddress.indexOf("REPLACE_WITH_ACTUAL_URL") >= 0)
{
- log.debug("Replace service endpoint address '" + orgAddress + "' with '" + serviceEndpointURL + "'");
+ if(log.isDebugEnabled()) log.debug("Replace service endpoint address '" + orgAddress + "' with '" + serviceEndpointURL + "'");
wsdlEndpoint.setAddress(serviceEndpointURL);
sepMetaData.setEndpointAddress(serviceEndpointURL);
@@ -345,7 +345,7 @@
}
else
{
- log.debug("Don't replace service endpoint address '" + orgAddress + "'");
+ if(log.isDebugEnabled()) log.debug("Don't replace service endpoint address '" + orgAddress + "'");
try
{
sepMetaData.setEndpointAddress(new URL(orgAddress).toExternalForm());
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-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCClientMetaDataBuilder.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -100,7 +100,7 @@
public ServiceMetaData buildMetaData(QName serviceQName, URL wsdlURL, JavaWsdlMapping javaWsdlMapping, WSSecurityConfiguration securityConfig,
UnifiedServiceRefMetaData usrMetaData, ClassLoader loader)
{
- log.debug("START buildMetaData: [service=" + serviceQName + "]");
+ if(log.isDebugEnabled()) log.debug("START buildMetaData: [service=" + serviceQName + "]");
try
{
ResourceLoaderAdapter vfsRoot = new ResourceLoaderAdapter(loader);
@@ -136,7 +136,7 @@
// eagerly initialize
wsMetaData.eagerInitialize();
- log.debug("END buildMetaData: " + wsMetaData);
+ if(log.isDebugEnabled()) log.debug("END buildMetaData: " + wsMetaData);
return serviceMetaData;
}
catch (RuntimeException rte)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -66,10 +66,10 @@
*/
public UnifiedMetaData buildMetaData(JAXRPCDeployment udi)
{
- log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
+ if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
{
- // For every webservice-description build the ServiceMetaData
+ // For every webservice-description build the ServiceMetaData
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.vfRoot);
wsMetaData.setDeploymentName(udi.getCanonicalName());
wsMetaData.setClassLoader(udi.classLoader);
@@ -228,7 +228,7 @@
}
}
- log.debug("END buildMetaData: " + wsMetaData);
+ if(log.isDebugEnabled()) log.debug("END buildMetaData: " + wsMetaData);
return wsMetaData;
}
catch (RuntimeException rte)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSClientMetaDataBuilder.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -66,7 +66,7 @@
if (wsdlURL == null)
throw new IllegalArgumentException("Invalid wsdlURL: " + wsdlURL);
- log.debug("START buildMetaData: [service=" + serviceName + "]");
+ if(log.isDebugEnabled()) log.debug("START buildMetaData: [service=" + serviceName + "]");
try
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(vfsRoot);
@@ -84,7 +84,7 @@
JBossXSModel schemaModel = WSDLUtils.getSchemaModel(wsdlDefinitions.getWsdlTypes());
serviceMetaData.getTypesMetaData().setSchemaModel(schemaModel);
- log.debug("END buildMetaData: " + wsMetaData);
+ if(log.isDebugEnabled()) log.debug("END buildMetaData: " + wsMetaData);
return serviceMetaData;
}
catch (RuntimeException rte)
@@ -101,7 +101,7 @@
*/
public ServiceMetaData buildMetaData(QName serviceName, URL wsdlURL)
{
- return buildMetaData(serviceName, wsdlURL, new ResourceLoaderAdapter());
+ return buildMetaData(serviceName, wsdlURL, new ResourceLoaderAdapter());
}
private void buildMetaDataInternal(ServiceMetaData serviceMetaData, WSDLDefinitions wsdlDefinitions) throws IOException
@@ -179,14 +179,14 @@
public void rebuildEndpointMetaData(EndpointMetaData epMetaData, Class<?> wsClass)
{
- log.debug("START: rebuildMetaData");
+ if(log.isDebugEnabled()) log.debug("START: rebuildMetaData");
// Clear the java types, etc.
resetMetaDataBuilder(epMetaData.getClassLoader());
// Nuke parameterStyle
epMetaData.setParameterStyle(null);
-
+
// Process an optional @BindingType annotation
if (wsClass.isAnnotationPresent(BindingType.class))
processBindingType(epMetaData, wsClass);
@@ -214,6 +214,6 @@
// Eager initialization
epMetaData.eagerInitialize();
- log.debug("END: rebuildMetaData\n" + epMetaData.getServiceMetaData());
+ if(log.isDebugEnabled()) log.debug("END: rebuildMetaData\n" + epMetaData.getServiceMetaData());
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -108,7 +108,7 @@
{
if (wsClass.isAnnotationPresent(BindingType.class))
{
- log.debug("processBindingType on: " + wsClass.getName());
+ if(log.isDebugEnabled()) log.debug("processBindingType on: " + wsClass.getName());
BindingType anBindingType = (BindingType)wsClass.getAnnotation(BindingType.class);
epMetaData.setBindingId(anBindingType.value());
}
@@ -118,7 +118,7 @@
{
if (wsClass.isAnnotationPresent(SOAPBinding.class))
{
- log.debug("processSOAPBinding on: " + wsClass.getName());
+ if(log.isDebugEnabled()) log.debug("processSOAPBinding on: " + wsClass.getName());
SOAPBinding anSoapBinding = wsClass.getAnnotation(SOAPBinding.class);
SOAPBinding.Style attrStyle = anSoapBinding.style();
@@ -152,9 +152,9 @@
if (wsClass.isAnnotationPresent(SOAPMessageHandlers.class))
throw new WSException("Cannot combine @HandlerChain with @SOAPMessageHandlers");
- // The explicit handler chain on the service has priority
+ // The explicit handler chain on the service has priority
String filename = epMetaData.getServiceMetaData().getHandlerChain();
-
+
HandlerChain anHandlerChain = wsClass.getAnnotation(HandlerChain.class);
if (filename == null && anHandlerChain != null)
filename = anHandlerChain.file();
@@ -162,9 +162,9 @@
// Nothing to do
if (filename == null)
return;
-
+
URL fileURL = null;
- log.debug("processHandlerChain [" + filename + "] on: " + wsClass.getName());
+ if(log.isDebugEnabled()) log.debug("processHandlerChain [" + filename + "] on: " + wsClass.getName());
// Try the filename as URL
try
@@ -720,20 +720,20 @@
{
if (wrapperParameter.loadWrapperBean() == null)
wrapperGenerator.generate(wrapperParameter);
-
+
Class wrapperClass = wrapperParameter.getJavaType();
javaTypes.add(wrapperClass);
-
+
// In case there is no @XmlRootElement
typeRefs.add(new TypeReference(wrapperParameter.getXmlName(), wrapperClass));
if (!opMetaData.isOneWay())
{
if (wrapperOutputParameter.loadWrapperBean() == null)
wrapperGenerator.generate(wrapperOutputParameter);
-
+
wrapperClass = wrapperOutputParameter.getJavaType();
javaTypes.add(wrapperClass);
-
+
// In case there is no @XmlRootElement
typeRefs.add(new TypeReference(wrapperOutputParameter.getXmlName(), wrapperClass));
}
@@ -786,13 +786,13 @@
protected void initWrapperGenerator(ClassLoader loader)
{
- // Use the dynamic generator by default. Otherwise reset the last
+ // Use the dynamic generator by default. Otherwise reset the last
if (wrapperGenerator == null)
wrapperGenerator = new DynamicWrapperGenerator(loader);
else
wrapperGenerator.reset(loader);
}
-
+
protected void resetMetaDataBuilder(ClassLoader loader)
{
initWrapperGenerator(loader);
@@ -806,7 +806,7 @@
try
{
String targetNS = epMetaData.getPortTypeName().getNamespaceURI().intern();
- log.debug("JAXBContext [types=" + javaTypes + ",tns=" + targetNS + "]");
+ if(log.isDebugEnabled()) log.debug("JAXBContext [types=" + javaTypes + ",tns=" + targetNS + "]");
jaxbCtx = JAXBRIContext.newInstance(javaTypes.toArray(new Class[0]), typeRefs, targetNS, false);
}
catch (JAXBException ex)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -53,9 +53,9 @@
*/
public UnifiedMetaData buildMetaData(UnifiedDeploymentInfo udi)
{
- log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
+ if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
- {
+ {
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.vfRoot);
wsMetaData.setDeploymentName(udi.getCanonicalName());
wsMetaData.setClassLoader(udi.classLoader);
@@ -90,7 +90,7 @@
}
}
- log.debug("END buildMetaData: " + wsMetaData);
+ if(log.isDebugEnabled()) log.debug("END buildMetaData: " + wsMetaData);
return wsMetaData;
}
catch (RuntimeException rte)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -46,7 +46,7 @@
*/
public UnifiedMetaData buildMetaData(UnifiedDeploymentInfo udi)
{
- log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
+ if(log.isDebugEnabled()) log.debug("START buildMetaData: [name=" + udi.getCanonicalName() + "]");
try
{
UnifiedMetaData wsMetaData = new UnifiedMetaData(udi.vfRoot);
@@ -73,7 +73,7 @@
}
}
- log.debug("END buildMetaData: " + wsMetaData);
+ if(log.isDebugEnabled()) log.debug("END buildMetaData: " + wsMetaData);
return wsMetaData;
}
catch (RuntimeException rte)
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/config/JBossWSConfigFactory.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -68,7 +68,7 @@
public Object parse(URL configURL)
{
- log.debug("parse: " + configURL);
+ if(log.isDebugEnabled()) log.debug("parse: " + configURL);
Object wsConfig;
try
@@ -122,7 +122,7 @@
*/
public CommonConfig getConfig(UnifiedVirtualFile vfsRoot, String configName, String configFile)
{
- log.debug("getConfig: [name=" + configName + ",url=" + configFile + "]");
+ if(log.isDebugEnabled()) log.debug("getConfig: [name=" + configName + ",url=" + configFile + "]");
if (configName == null)
throw new IllegalArgumentException("Config name cannot be null");
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -391,7 +391,7 @@
for (int i = 0; i < propertyCount; i++)
propertyValues[i] = faultBeanProperties[i].accessor().get(faultBean);
- log.debug("constructing " + javaType.getSimpleName() + ": " + Arrays.toString(propertyValues));
+ if(log.isDebugEnabled()) log.debug("constructing " + javaType.getSimpleName() + ": " + Arrays.toString(propertyValues));
serviceException = serviceExceptionConstructor.newInstance(propertyValues);
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/OperationMetaData.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -211,14 +211,14 @@
// compare params by java type name
if (matchParameters(method, true))
{
- log.debug("Found best matching java method: " + method);
+ if(log.isDebugEnabled()) log.debug("Found best matching java method: " + method);
isJavaMethod = true;
}
// compare params by assignability
if (!isJavaMethod && matchParameters(method, false))
{
- log.debug("Found possible matching java method: " + method);
+ if(log.isDebugEnabled()) log.debug("Found possible matching java method: " + method);
isJavaMethod = true;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -465,7 +465,7 @@
String mimeType = scanner.scan(javaType);
if (mimeType != null)
{
- log.debug("MTOM parameter found: " + xmlName);
+ if(log.isDebugEnabled()) log.debug("MTOM parameter found: " + xmlName);
setXOP(true);
}
}
@@ -504,7 +504,7 @@
}
catch (Exception ex)
{
- log.debug("Invalid wrapper type:" + typeName, ex);
+ if(log.isDebugEnabled()) log.debug("Invalid wrapper type:" + typeName, ex);
return false;
}
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/TypesMetaData.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -156,7 +156,7 @@
{
tmMetaData = new TypeMappingMetaData(this, xmlType, javaTypeName);
tmMetaData.setQNameScope(TypeMappingMetaData.QNAME_SCOPE_SIMPLE_TYPE);
- log.debug("Adding a simpleType without jaxrpc-mapping: " + tmMetaData);
+ if(log.isDebugEnabled()) log.debug("Adding a simpleType without jaxrpc-mapping: " + tmMetaData);
addTypeMapping(tmMetaData);
}
else
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/wsdl/xmlschema/JBossXSModel.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -660,7 +660,7 @@
if (type.getAnonymous())
{
anonymousTypeMap.put(namespace + ":" + name, type);
- log.debug("Registered as anon type: {" + namespace + ":" + name + "} -> " + type);
+ if(log.isDebugEnabled()) log.debug("Registered as anon type: {" + namespace + ":" + name + "} -> " + type);
}
return name;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -294,7 +294,7 @@
*/
public WSDLDefinitions generate(Class endpoint)
{
- log.debug("generate [endpoint=" + endpoint.getName() + ",tnsURI=" + targetNamespace + ",service=" + serviceName
+ if(log.isDebugEnabled()) log.debug("generate [endpoint=" + endpoint.getName() + ",tnsURI=" + targetNamespace + ",service=" + serviceName
+ ",portType=" + portTypeName + "]");
if( umd == null)
@@ -329,8 +329,8 @@
// Debug the generated wsdl
StringWriter sw = new StringWriter();
new WSDLWriter(wsdlDefinitions).write(sw, Constants.DEFAULT_XML_CHARSET);
- log.debug("Generated WSDL:\n" + sw.toString());
-
+ if(log.isDebugEnabled()) log.debug("Generated WSDL:\n" + sw.toString());
+
// Debug the generated mapping file
String jaxrpcMappingStr = null;
if (javaWsdlMapping != null)
@@ -338,7 +338,7 @@
Element root = DOMUtils.parse(javaWsdlMapping.serialize());
jaxrpcMappingStr = DOMWriter.printNode(root, true);
}
- log.debug("Generated Mapping:\n" + jaxrpcMappingStr);
+ if(log.isDebugEnabled()) log.debug("Generated Mapping:\n" + jaxrpcMappingStr);
}
catch (RuntimeException rte)
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL11.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -72,7 +72,7 @@
*/
public JavaToWSDL11()
{
- log.debug("Creating JavaToWSDL11 instance");
+ if(log.isDebugEnabled()) log.debug("Creating JavaToWSDL11 instance");
}
/**
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/JavaToWSDL20.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -77,7 +77,7 @@
*/
public JavaToWSDL20()
{
- log.debug("Creating JavaToWSDL20 instance");
+ if(log.isDebugEnabled()) log.debug("Creating JavaToWSDL20 instance");
}
/**
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/helpers/MappingFileGeneratorHelper.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -808,8 +808,8 @@
if (javaType == null)
{
- log.debug("Typemapping lookup failed for " + xmlName);
- log.debug("Falling back to identifier generation");
+ if(log.isDebugEnabled()) log.debug("Typemapping lookup failed for " + xmlName);
+ if(log.isDebugEnabled()) log.debug("Falling back to identifier generation");
String className = xmlType.getLocalPart();
if (className.charAt(0) == '>')
className = className.substring(1);
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SourceWrapperGenerator.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -98,7 +98,7 @@
String wrapperName = pmd.getJavaTypeName();
if (log.isDebugEnabled())
- log.debug("Generating wrapper: " + wrapperName);
+ if(log.isDebugEnabled()) log.debug("Generating wrapper: " + wrapperName);
try
{
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/schema/SchemaTypeCreator.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -347,7 +347,7 @@
JBossXSModelGroup group = (JBossXSModelGroup)complexType.getParticle().getTerm();
group.setParticles(particles);
- log.debug("generateNewType: " + sutils.write(complexType));
+ if(log.isDebugEnabled()) log.debug("generateNewType: " + sutils.write(complexType));
return complexType;
}
Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2007-02-09 22:25:00 UTC (rev 2327)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDLDefinitionsFactory.java 2007-02-09 23:24:09 UTC (rev 2328)
@@ -101,7 +101,7 @@
if (wsdlLocation == null)
throw new IllegalArgumentException("URL cannot be null");
- log.debug("parse: " + wsdlLocation.toExternalForm());
+ if(log.isDebugEnabled()) log.debug("parse: " + wsdlLocation.toExternalForm());
EntityResolver entityResolver = new JBossWSEntityResolver();
WSDLDefinitions wsdlDefinitions = null;
17 years, 7 months
JBossWS SVN: r2327 - 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-02-09 17:25:00 -0500 (Fri, 09 Feb 2007)
New Revision: 2327
Removed:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WebServiceGeneratorTestCase.java
Log:
remove old file
Deleted: 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-02-09 22:16:24 UTC (rev 2326)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WebServiceGeneratorTestCase.java 2007-02-09 22:25:00 UTC (rev 2327)
@@ -1,156 +0,0 @@
-/*
-* 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.test.ws.tools.jaxws;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.jboss.test.ws.JBossWSTest;
-import org.jboss.test.ws.jaxws.samples.soapbinding.DocWrappedServiceImpl;
-import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrder;
-import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrderAck;
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.tools.jaxws.api.WSContractProvider;
-import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
-
-/**
- * Tests the WSContractProvider API.
- *
- * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
- * @version $Revision$
- */
-public class WebServiceGeneratorTestCase extends JBossWSTest
-{
- public void testBasic() throws Exception
- {
- WSContractProvider gen = getGenerator();
- File outputDir = new File("tools/wsgen/basic/out");
- gen.setOutputDirectory(outputDir);
- gen.provide(DocWrappedServiceImpl.class);
-
- checkWrapperClasses(outputDir);
-
- // There should be no source code
- checkWrapperSource(outputDir, false);
- }
-
- private WSContractProvider getGenerator()
- {
- return WSContractProvider.newInstance();
- }
-
- private void checkWrapperSource(File outputDir, boolean shouldExist)
- {
- 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());
- }
-
- private void checkWrapperClasses(File outputDir) throws MalformedURLException, ClassNotFoundException, NoSuchMethodException
- {
- // Use a different loader each time to make sure the files exist
- URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()}, Thread.currentThread().getContextClassLoader());
-
- // Check request wrapper
- 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.samples.soapbinding.jaxws.SubmitPOResponse", classLoader);
- wrapper.getMethod("setPurchaseOrderAck", PurchaseOrderAck.class);
- assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
- }
-
- public void testSource() throws Exception
- {
- WSContractProvider gen = getGenerator();
- File outputDir = new File("tools/wsgen/source/out");
- gen.setOutputDirectory(outputDir);
- gen.setGenerateSource(true);
- gen.provide(DocWrappedServiceImpl.class);
-
- checkWrapperClasses(outputDir);
- checkWrapperSource(outputDir, true);
- }
-
- public void testSourceDir() throws Exception
- {
- WSContractProvider gen = getGenerator();
- File outputDir = new File("tools/wsgen/sourcedir/out");
- File sourceDir = new File("tools/wsgen/sourcedir/source");
-
- gen.setOutputDirectory(outputDir);
- gen.setSourceDirectory(sourceDir);
- gen.setGenerateSource(true);
- gen.provide(DocWrappedServiceImpl.class);
-
- checkWrapperClasses(outputDir);
- checkWrapperSource(outputDir, false);
- checkWrapperSource(sourceDir, true);
- }
-
- public void testWsdl() throws Exception
- {
- WSContractProvider gen = getGenerator();
- File outputDir = new File("tools/wsgen/wsdl/out");
- gen.setOutputDirectory(outputDir);
- gen.setGenerateWsdl(true);
- gen.provide(DocWrappedServiceImpl.class);
-
- checkWrapperClasses(outputDir);
-
- // There should be no source code
- checkWrapperSource(outputDir, false);
-
- File wsdlFile = new File(outputDir, "DocWrappedService.wsdl");
- WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- wsdlFactory.parse(wsdlFile.toURL());
- }
-
- public void testResourceDir() throws Exception
- {
- WSContractProvider gen = getGenerator();
- File outputDir = new File("tools/wsgen/resourcedir/out");
- File wsdlDir = new File("tools/wsgen/resourcedir/wsdl");
- gen.setOutputDirectory(outputDir);
- gen.setResourceDirectory(wsdlDir);
- gen.setGenerateWsdl(true);
- gen.provide(DocWrappedServiceImpl.class);
-
- checkWrapperClasses(outputDir);
-
- // There should be no source code
- checkWrapperSource(outputDir, false);
-
- String wsdlName = "DocWrappedService.wsdl";
- File wsdlFile = new File(outputDir, wsdlName);
- assertFalse(wsdlFile.exists());
-
- wsdlFile = new File(wsdlDir, wsdlName);
- WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
- wsdlFactory.parse(wsdlFile.toURL());
- }
-}
\ No newline at end of file
17 years, 7 months
JBossWS SVN: r2326 - 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-02-09 17:16:24 -0500 (Fri, 09 Feb 2007)
New Revision: 2326
Added:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
Log:
Rename test
Copied: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java (from rev 2325, 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/WSContractProviderTestCase.java (rev 0)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-02-09 22:16:24 UTC (rev 2326)
@@ -0,0 +1,156 @@
+/*
+* 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.test.ws.tools.jaxws;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.jaxws.samples.soapbinding.DocWrappedServiceImpl;
+import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrder;
+import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrderAck;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Tests the WSContractProvider API.
+ *
+ * @author <a href="mailto:jason.greene@jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WSContractProviderTestCase extends JBossWSTest
+{
+ public void testBasic() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/basic/out");
+ gen.setOutputDirectory(outputDir);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+
+ // There should be no source code
+ checkWrapperSource(outputDir, false);
+ }
+
+ private WSContractProvider getGenerator()
+ {
+ return WSContractProvider.newInstance();
+ }
+
+ private void checkWrapperSource(File outputDir, boolean shouldExist)
+ {
+ 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());
+ }
+
+ private void checkWrapperClasses(File outputDir) throws MalformedURLException, ClassNotFoundException, NoSuchMethodException
+ {
+ // Use a different loader each time to make sure the files exist
+ URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()}, Thread.currentThread().getContextClassLoader());
+
+ // Check request wrapper
+ 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.samples.soapbinding.jaxws.SubmitPOResponse", classLoader);
+ wrapper.getMethod("setPurchaseOrderAck", PurchaseOrderAck.class);
+ assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
+ }
+
+ public void testSource() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/source/out");
+ gen.setOutputDirectory(outputDir);
+ gen.setGenerateSource(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+ checkWrapperSource(outputDir, true);
+ }
+
+ public void testSourceDir() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/sourcedir/out");
+ File sourceDir = new File("tools/wsprovide/sourcedir/source");
+
+ gen.setOutputDirectory(outputDir);
+ gen.setSourceDirectory(sourceDir);
+ gen.setGenerateSource(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+ checkWrapperSource(outputDir, false);
+ checkWrapperSource(sourceDir, true);
+ }
+
+ public void testWsdl() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/wsdl/out");
+ gen.setOutputDirectory(outputDir);
+ gen.setGenerateWsdl(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+
+ // There should be no source code
+ checkWrapperSource(outputDir, false);
+
+ File wsdlFile = new File(outputDir, "DocWrappedService.wsdl");
+ WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
+ wsdlFactory.parse(wsdlFile.toURL());
+ }
+
+ public void testResourceDir() throws Exception
+ {
+ WSContractProvider gen = getGenerator();
+ File outputDir = new File("tools/wsprovide/resourcedir/out");
+ File wsdlDir = new File("tools/wsprovide/resourcedir/wsdl");
+ gen.setOutputDirectory(outputDir);
+ gen.setResourceDirectory(wsdlDir);
+ gen.setGenerateWsdl(true);
+ gen.provide(DocWrappedServiceImpl.class);
+
+ checkWrapperClasses(outputDir);
+
+ // There should be no source code
+ checkWrapperSource(outputDir, false);
+
+ String wsdlName = "DocWrappedService.wsdl";
+ File wsdlFile = new File(outputDir, wsdlName);
+ assertFalse(wsdlFile.exists());
+
+ wsdlFile = new File(wsdlDir, wsdlName);
+ WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
+ wsdlFactory.parse(wsdlFile.toURL());
+ }
+}
\ No newline at end of file
17 years, 7 months