You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pubscribe-dev@ws.apache.org by ip...@apache.org on 2005/05/25 01:59:17 UTC
svn commit: r178327 - in /incubator/hermes/trunk: project.xml
src/java/org/apache/ws/notification/base/faults/NoCurrentMessageOnTopicFaultException.java
src/java/org/apache/ws/notification/base/v2004_06/porttype/impl/NotificationProducerPortTypeImpl.java
src/java/org/apache/ws/util/test/PortListen.java
Author: ips
Date: Tue May 24 16:59:16 2005
New Revision: 178327
URL: http://svn.apache.org/viewcvs?rev=178327&view=rev
Log:
upgraded to Axis 1.2 final; improved error handling
Modified:
incubator/hermes/trunk/project.xml
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/faults/NoCurrentMessageOnTopicFaultException.java
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v2004_06/porttype/impl/NotificationProducerPortTypeImpl.java
incubator/hermes/trunk/src/java/org/apache/ws/util/test/PortListen.java
Modified: incubator/hermes/trunk/project.xml
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/project.xml?rev=178327&r1=178326&r2=178327&view=diff
==============================================================================
--- incubator/hermes/trunk/project.xml (original)
+++ incubator/hermes/trunk/project.xml Tue May 24 16:59:16 2005
@@ -6,320 +6,321 @@
<!-- Reference for this file is at: http://maven.apache.org/reference/project-descriptor.html -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://maven.apache.org/xsd/maven-project-3.0.0.xsd">
+ xsi:noNamespaceSchemaLocation="http://maven.apache.org/xsd/maven-project-3.0.0.xsd">
- <pomVersion>3</pomVersion>
- <id>hermes-incubating</id>
- <name>Hermes</name>
- <groupId>hermes</groupId>
- <currentVersion>1.0-alpha-SNAPSHOT</currentVersion>
- <organization>
- <name>Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
- </organization>
- <inceptionYear>2004</inceptionYear>
- <package>org.apache.ws</package>
- <description>A robust Java implementation of the OASIS WS-Notification (WSN) family of specifications.</description>
- <shortDescription>Hermes Project</shortDescription>
- <url>http://incubator.apache.org/hermes/</url>
- <issueTrackingUrl>http://nagoya.apache.org/jira/browse/Hermes</issueTrackingUrl>
-
- <repository>
- <connection></connection>
- <url>https://svn.apache.org/repos/asf/incubator/hermes/</url>
- </repository>
-
- <versions>
- <version>
- <id>0_5_0_iter5</id>
- <name>0.5.0_iter5</name>
- <tag>HEAD</tag>
- </version>
- </versions>
-
- <mailingLists>
- <mailingList>
- <name>Hermes Developer List</name>
- <subscribe>hermes-dev-subscribe@ws.apache.org</subscribe>
- <unsubscribe>hermes-dev-unsubscribe@ws.apache.org</unsubscribe>
- <archive>http://ws.apache.org/mail/hermes-dev/</archive>
- </mailingList>
- </mailingLists>
-
- <developers>
-
- <developer>
- <name>Sal Campana</name>
- <id>scamp</id>
- <email>sal.campana@hp.com</email>
- <organization>Hewlett-Packard Company</organization>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>-5</timezone>
- </developer>
-
- <developer>
- <name>Stefan Lischke</name>
- <id>scamp</id>
- <email>lischke@novacom.net</email>
- <organization>Technical University of Berlin</organization>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>-5</timezone>
- </developer>
-
- <developer>
- <name>Ian Springer</name>
- <id>ips</id>
- <email>ian.springer@hp.com</email>
- <organization>Hewlett-Packard Company</organization>
- <roles>
- <role>Developer</role>
- </roles>
- <timezone>-5</timezone>
- </developer>
-
- </developers>
-
- <dependencies>
-
- <dependency>
- <groupId>addressing</groupId>
- <artifactId>addressing</artifactId>
- <version>SNAPSHOT</version>
- <url>http://ws.apache.org/ws-fx/addressing/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Needed for handling WS-Addressing.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.6.2</version>
- <url>http://ant.apache.org/</url>
- <properties>
- <scope>compile-time-only</scope>
- <usage>Needed for various custom Tasks we've defined for updating a Wsdd and running WsdmWsdl2Java.</usage>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>apollo</groupId>
- <artifactId>apollo-incubating</artifactId>
- <version>1.0-alpha3-SNAPSHOT</version>
- <url>http://incubator.apache.org/apollo/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>WSRF impl</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>apollo</groupId>
- <artifactId>wsa-xbeans</artifactId>
- <version>SNAPSHOT</version>
- <url>http://incubator.apache.org/apollo/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Needed for handling requests. This contains the XmlBeans-generated code from the WSA XSDs. This "could" be eliminated and generated on the fly, but it would make the builds longer.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>apollo</groupId>
- <artifactId>wsrf-xbeans</artifactId>
- <version>SNAPSHOT</version>
- <url>http://incubator.apache.org/apollo/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Needed for handling requests. This contains the XmlBeans-generated code from the WSRF WSDLs/XSDs. This "could" be eliminated and generated on the fly, but it would make the builds longer.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>apollo</groupId>
- <artifactId>apollo-jndi-config</artifactId>
- <version>SNAPSHOT</version>
- <url>http://incubator.apache.org/apollo/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- <usage>Needed for handling our JNDI XML config file via XmlBeans. This "could" be removed, but then we'd probably replace it with commons-config. The reason we avoided that approach is that we leveredge XmlBeans extensively in our codebase.</usage>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis</artifactId>
- <version>1.2-RC2</version>
- <url>http://ws.apache.org/axis/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Needed for compiling Axis-specific impls in our codebase. It is also needed for unit tests, etc.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis-jaxrpc</artifactId>
- <version>1.2-RC2</version>
- <url>http://ws.apache.org/axis/</url>
- <properties>
- <license>BinaryCodeLicense-JaxRpcApi.txt</license>
- <usage>Needed for building our JAX-RPC compliant Handler impl.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>axis</groupId>
- <artifactId>axis-saaj</artifactId>
- <version>1.2-RC2</version>
- <url>http://ws.apache.org/axis/</url>
- <properties>
- <license>BinaryCodeLicense-SaajApi.txt</license>
- <usage>Needed for building our SOAP-specific code.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>apollo</groupId>
- <artifactId>commonj-twm-api</artifactId>
- <version>1.1</version>
- <url>http://dev2dev.bea.com/technologies/commonj/twm/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Timer APIs used for scheduled resource termination</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.0</version>
- <url>http://jakarta.apache.org/commons/cli/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.1</version>
- <url>http://jakarta.apache.org/commons/collections/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-digester</groupId>
- <artifactId>commons-digester</artifactId>
- <version>1.6</version>
- <url>http://jakarta.apache.org/commons/digester/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-discovery</groupId>
- <artifactId>commons-discovery</artifactId>
- <version>0.2</version>
- <url>http://jakarta.apache.org/commons/discovery/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- <usage>Needed by Axis.</usage>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.0</version>
- <url>http://jakarta.apache.org/commons/io/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Needed for general IO operations.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.0</version>
- <url>http://jakarta.apache.org/commons/lang/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- <usage>Needed for utility operations like StringUtils, ExceptionUtils etc.</usage>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.0.4</version>
- <url>http://jakarta.apache.org/commons/logging/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Needed for logging purposes.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4</version>
- <url>http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html</url>
- <properties>
- <license>DougLeaTechnologyLicense.txt</license>
- <usage>Needed for threading.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>hermes</groupId>
- <artifactId>wsn-xbeans</artifactId>
- <version>SNAPSHOT</version>
- <url>http://incubator.apache.org/hermes/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>XMLBeans for WSN spec types</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>hermes</groupId>
- <artifactId>wse-xbeans</artifactId>
- <version>SNAPSHOT</version>
- <url>http://incubator.apache.org/hermes/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>XMLBeans for WS-Eventing spec types</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
+ <pomVersion>3</pomVersion>
+ <id>hermes-incubating</id>
+ <name>Hermes</name>
+ <groupId>hermes</groupId>
+ <currentVersion>1.0-alpha-SNAPSHOT</currentVersion>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <inceptionYear>2004</inceptionYear>
+ <package>org.apache.ws</package>
+ <description>A robust Java implementation of the OASIS WS-Notification (WSN) family of specifications.</description>
+ <shortDescription>Hermes Project</shortDescription>
+ <url>http://incubator.apache.org/hermes/</url>
+ <issueTrackingUrl>http://nagoya.apache.org/jira/browse/Hermes</issueTrackingUrl>
+
+ <repository>
+ <connection>scm|svn|http://svn.apache.org/repos/asf/incubator/hermes/trunk/</connection>
+ <developerConnection>scm|svn|https://svn.apache.org/repos/asf/incubator/hermes/trunk/</developerConnection>
+ <url>https://svn.apache.org/repos/asf/incubator/hermes/</url>
+ </repository>
+
+ <versions>
+ <version>
+ <id>0_5_0_iter5</id>
+ <name>0.5.0_iter5</name>
+ <tag>HEAD</tag>
+ </version>
+ </versions>
+
+ <mailingLists>
+ <mailingList>
+ <name>Hermes Developer List</name>
+ <subscribe>hermes-dev-subscribe@ws.apache.org</subscribe>
+ <unsubscribe>hermes-dev-unsubscribe@ws.apache.org</unsubscribe>
+ <archive>http://ws.apache.org/mail/hermes-dev/</archive>
+ </mailingList>
+ </mailingLists>
+
+ <developers>
+
+ <developer>
+ <name>Sal Campana</name>
+ <id>scamp</id>
+ <email>sal.campana@hp.com</email>
+ <organization>Hewlett-Packard Company</organization>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <timezone>-5</timezone>
+ </developer>
+
+ <developer>
+ <name>Stefan Lischke</name>
+ <id>scamp</id>
+ <email>lischke@novacom.net</email>
+ <organization>Technical University of Berlin</organization>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <timezone>-5</timezone>
+ </developer>
+
+ <developer>
+ <name>Ian Springer</name>
+ <id>ips</id>
+ <email>ian.springer@hp.com</email>
+ <organization>Hewlett-Packard Company</organization>
+ <roles>
+ <role>Developer</role>
+ </roles>
+ <timezone>-5</timezone>
+ </developer>
+
+ </developers>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>addressing</groupId>
+ <artifactId>addressing</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://ws.apache.org/ws-fx/addressing/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Needed for handling WS-Addressing.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.2</version>
+ <url>http://ant.apache.org/</url>
+ <properties>
+ <scope>compile-time-only</scope>
+ <usage>Needed for various custom Tasks we've defined for updating a Wsdd and running WsdmWsdl2Java.</usage>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>apollo</groupId>
+ <artifactId>apollo-incubating</artifactId>
+ <version>1.0-alpha3-SNAPSHOT</version>
+ <url>http://incubator.apache.org/apollo/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>WSRF impl</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>apollo</groupId>
+ <artifactId>wsa-xbeans</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://incubator.apache.org/apollo/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Needed for handling requests. This contains the XmlBeans-generated code from the WSA XSDs. This "could" be eliminated and generated on the fly, but it would make the builds longer.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>apollo</groupId>
+ <artifactId>wsrf-xbeans</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://incubator.apache.org/apollo/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Needed for handling requests. This contains the XmlBeans-generated code from the WSRF WSDLs/XSDs. This "could" be eliminated and generated on the fly, but it would make the builds longer.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>apollo</groupId>
+ <artifactId>apollo-jndi-config</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://incubator.apache.org/apollo/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <war.bundle>true</war.bundle>
+ <usage>Needed for handling our JNDI XML config file via XmlBeans. This "could" be removed, but then we'd probably replace it with commons-config. The reason we avoided that approach is that we leveredge XmlBeans extensively in our codebase.</usage>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.2</version>
+ <url>http://ws.apache.org/axis/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Needed for compiling Axis-specific impls in our codebase. It is also needed for unit tests, etc.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ <version>1.2</version>
+ <url>http://ws.apache.org/axis/</url>
+ <properties>
+ <license>BinaryCodeLicense-JaxRpcApi.txt</license>
+ <usage>Needed for building our JAX-RPC compliant Handler impl.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ <version>1.2</version>
+ <url>http://ws.apache.org/axis/</url>
+ <properties>
+ <license>BinaryCodeLicense-SaajApi.txt</license>
+ <usage>Needed for building our SOAP-specific code.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>apollo</groupId>
+ <artifactId>commonj-twm-api</artifactId>
+ <version>1.1</version>
+ <url>http://dev2dev.bea.com/technologies/commonj/twm/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Timer APIs used for scheduled resource termination</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/cli/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ <url>http://jakarta.apache.org/commons/collections/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.6</version>
+ <url>http://jakarta.apache.org/commons/digester/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ <version>0.2</version>
+ <url>http://jakarta.apache.org/commons/discovery/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <war.bundle>true</war.bundle>
+ <usage>Needed by Axis.</usage>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.0</version>
+ <url>http://jakarta.apache.org/commons/io/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Needed for general IO operations.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.0</version>
+ <url>http://jakarta.apache.org/commons/lang/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <war.bundle>true</war.bundle>
+ <usage>Needed for utility operations like StringUtils, ExceptionUtils etc.</usage>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ <url>http://jakarta.apache.org/commons/logging/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Needed for logging purposes.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4</version>
+ <url>http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html</url>
+ <properties>
+ <license>DougLeaTechnologyLicense.txt</license>
+ <usage>Needed for threading.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>hermes</groupId>
+ <artifactId>wsn-xbeans</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://incubator.apache.org/hermes/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>XMLBeans for WSN spec types</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>hermes</groupId>
+ <artifactId>wse-xbeans</artifactId>
+ <version>SNAPSHOT</version>
+ <url>http://incubator.apache.org/hermes/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>XMLBeans for WS-Eventing spec types</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
<dependency>
<groupId>log4j</groupId>
@@ -332,7 +333,7 @@
<usage>Needed by Velocity.</usage>
</properties>
</dependency>
-
+
<dependency>
<groupId>directory-naming</groupId>
<artifactId>naming-core</artifactId>
@@ -358,7 +359,7 @@
<war.bundle>true</war.bundle>
</properties>
</dependency>
-
+
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
@@ -371,79 +372,79 @@
<comment>We are maintaining beta-2 because -> beta-6 had an OutOfMemoryError when interacting with XmlCursor.select(..) when using our sushi ResourcePropSet</comment>
</properties>
</dependency>
-
- <dependency>
- <groupId>jetty</groupId>
- <artifactId>org.mortbay.jetty</artifactId>
- <version>4.2.22</version>
- <url>http://jetty.mortbay.org/</url>
- <properties>
- <war.bundle>false</war.bundle>
- <usage>for the JettyAxisServer in the Application</usage>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <url>http://www.junit.org/</url>
- <properties>
- <classloader>root</classloader>
- <license>CommonPublicLicense-1.0.txt</license>
- <usage>Needed for running unit tests.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>servletapi</groupId>
- <artifactId>servletapi</artifactId>
- <version>2.3</version>
- <url>http://java.sun.com/products/servlet/</url>
- <properties>
- <scope>compile-time-only</scope>
- <usage>Needed to compile our servlet.</usage>
- <war.bundle>false</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.4</version>
- <url>http://jakarta.apache.org/velocity/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <usage>Templating engine used by Wsdl2Java,</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>wsdl4j</groupId>
- <artifactId>wsdl4j</artifactId>
- <version>1.5-SNAPSHOT</version>
- <url>http://www-124.ibm.com/developerworks/projects/wsdl4j/</url>
- <properties>
- <license>CommonPublicLicense-1.0.txt</license>
- <war.bundle>true</war.bundle>
- <usage>Needed for working with WSDL files as objects.</usage>
- </properties>
- </dependency>
-
- <dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.5.1</version>
- <url>http://xml.apache.org/xalan-j/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <scope>compile-time-only</scope>
- <usage>Needed for XSL and report generation.</usage>
- <war.bundle>true</war.bundle>
- </properties>
- </dependency>
+
+ <dependency>
+ <groupId>jetty</groupId>
+ <artifactId>org.mortbay.jetty</artifactId>
+ <version>4.2.22</version>
+ <url>http://jetty.mortbay.org/</url>
+ <properties>
+ <war.bundle>false</war.bundle>
+ <usage>for the JettyAxisServer in the Application</usage>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <url>http://www.junit.org/</url>
+ <properties>
+ <classloader>root</classloader>
+ <license>CommonPublicLicense-1.0.txt</license>
+ <usage>Needed for running unit tests.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>servletapi</groupId>
+ <artifactId>servletapi</artifactId>
+ <version>2.3</version>
+ <url>http://java.sun.com/products/servlet/</url>
+ <properties>
+ <scope>compile-time-only</scope>
+ <usage>Needed to compile our servlet.</usage>
+ <war.bundle>false</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.4</version>
+ <url>http://jakarta.apache.org/velocity/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <usage>Templating engine used by Wsdl2Java,</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <version>1.5-SNAPSHOT</version>
+ <url>http://www-124.ibm.com/developerworks/projects/wsdl4j/</url>
+ <properties>
+ <license>CommonPublicLicense-1.0.txt</license>
+ <war.bundle>true</war.bundle>
+ <usage>Needed for working with WSDL files as objects.</usage>
+ </properties>
+ </dependency>
+
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.5.1</version>
+ <url>http://xml.apache.org/xalan-j/</url>
+ <properties>
+ <license>ApacheLicense-2.0.txt</license>
+ <scope>compile-time-only</scope>
+ <usage>Needed for XSL and report generation.</usage>
+ <war.bundle>true</war.bundle>
+ </properties>
+ </dependency>
<dependency>
<groupId>xmlbeans</groupId>
@@ -467,89 +468,77 @@
<war.bundle>true</war.bundle>
<usage>Needed for handling XML types in a platform agnostic way.</usage>
</properties>
- </dependency>
-<!--
- <dependency>
- <groupId>xmlbeans</groupId>
- <artifactId>xbean</artifactId>
- <version>1.0.4</version>
- <url>http://xmlbeans.apache.org/</url>
- <properties>
- <license>ApacheLicense-2.0.txt</license>
- <war.bundle>true</war.bundle>
- <usage>Needed for handling XML types in a platform agnostic way.</usage>
- </properties>
- </dependency>
--->
- <dependency>
- <groupId>yfilter</groupId>
- <artifactId>yfilter</artifactId>
- <version>1.0</version>
- <url>http://yfilter.cs.berkeley.edu/</url>
- <properties>
- <license>YFilterLicense-1.0.txt</license>
- <war.bundle>true</war.bundle>
- <usage>efficient parallel XPath Filtering</usage>
- </properties>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <nagEmailAddress>hermes-dev@ws.apache.org</nagEmailAddress>
- <sourceDirectory>src/java</sourceDirectory>
- <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
-
- <unitTest>
- <includes>
- <include>**/*TestCase.java</include>
- </includes>
- <excludes>
- <exclude>**/Abstract*TestCase.java</exclude>
- </excludes>
- </unitTest>
-
- <resources>
-
- <resource>
- <directory>${basedir}/src/java</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- <exclude>**/package.html</exclude>
- </excludes>
- <filtering>false</filtering>
- </resource>
-
- <resource>
- <directory>src</directory>
- <includes>
- <include>templates/**</include>
- </includes>
- <filtering>false</filtering>
- </resource>
-
- <resource>
- <directory>src/wsdl</directory>
- <targetPath>wsdl</targetPath>
- </resource>
-
- </resources>
-
- </build>
-
- <reports>
- <!--<report>maven-checkstyle-plugin</report>-->
- <!--<report>maven-changelog-plugin</report>-->
- <!--<report>maven-developer-activity-plugin</report>-->
- <!--<report>maven-file-activity-plugin</report>-->
- <report>maven-javadoc-plugin</report>
- <!--<report>maven-jdepend-plugin</report>-->
- <report>maven-junit-report-plugin</report>
- <!--<report>maven-jxr-plugin</report>-->
- <!--<report>maven-simian-plugin</report>-->
- </reports>
-
- <properties/>
-
+ </dependency>
+
+ <dependency>
+ <groupId>yfilter</groupId>
+ <artifactId>yfilter</artifactId>
+ <version>1.0</version>
+ <url>http://yfilter.cs.berkeley.edu/</url>
+ <properties>
+ <license>YFilterLicense-1.0.txt</license>
+ <war.bundle>true</war.bundle>
+ <usage>efficient parallel XPath Filtering</usage>
+ </properties>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+
+ <nagEmailAddress>hermes-dev@ws.apache.org</nagEmailAddress>
+ <sourceDirectory>src/java</sourceDirectory>
+ <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+
+ <unitTest>
+ <includes>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/Abstract*TestCase.java</exclude>
+ </excludes>
+ </unitTest>
+
+ <resources>
+
+ <resource>
+ <directory>${basedir}/src/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ <exclude>**/package.html</exclude>
+ </excludes>
+ <filtering>false</filtering>
+ </resource>
+
+ <resource>
+ <directory>src</directory>
+ <includes>
+ <include>templates/**</include>
+ </includes>
+ <filtering>false</filtering>
+ </resource>
+
+ <resource>
+ <directory>src/wsdl</directory>
+ <targetPath>wsdl</targetPath>
+ </resource>
+
+ </resources>
+
+ </build>
+
+ <reports>
+ <!--<report>maven-checkstyle-plugin</report>-->
+ <!--<report>maven-changelog-plugin</report>-->
+ <!--<report>maven-developer-activity-plugin</report>-->
+ <!--<report>maven-file-activity-plugin</report>-->
+ <report>maven-javadoc-plugin</report>
+ <!--<report>maven-jdepend-plugin</report>-->
+ <report>maven-junit-report-plugin</report>
+ <!--<report>maven-jxr-plugin</report>-->
+ <!--<report>maven-simian-plugin</report>-->
+ </reports>
+
+ <properties/>
+
</project>
Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/faults/NoCurrentMessageOnTopicFaultException.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/faults/NoCurrentMessageOnTopicFaultException.java?rev=178327&r1=178326&r2=178327&view=diff
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/faults/NoCurrentMessageOnTopicFaultException.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/faults/NoCurrentMessageOnTopicFaultException.java Tue May 24 16:59:16 2005
@@ -15,7 +15,7 @@
public NoCurrentMessageOnTopicFaultException(WsnNamespaceVersionHolder namespaceVersionHolder)
{
- super(namespaceVersionHolder, "The specified Topic is supported but there is no notification message currently available on it.");
+ super(namespaceVersionHolder, "The specified Topic is supported, but there is no notification message currently available on it.");
m_name = new QName( namespaceVersionHolder.getBaseNotificationXsdNamespace(), "NoCurrentMessageOnTopicFault", BaseNotificationConstants.NSPREFIX_WSNT_SCHEMA );
}
Modified: incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v2004_06/porttype/impl/NotificationProducerPortTypeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v2004_06/porttype/impl/NotificationProducerPortTypeImpl.java?rev=178327&r1=178326&r2=178327&view=diff
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v2004_06/porttype/impl/NotificationProducerPortTypeImpl.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v2004_06/porttype/impl/NotificationProducerPortTypeImpl.java Tue May 24 16:59:16 2005
@@ -86,7 +86,7 @@
if ( topics.length == 0 )
{
throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
- "Given TopicExpression did not match any Topics supported by this NotificationProducer." );
+ "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match at least one." );
}
Calendar initialTerminationTime = null;
if ( request.isSetInitialTerminationTime() )
@@ -110,8 +110,7 @@
}
EndpointReferenceType subscriptionEPR = null;
- //this prop has default values in schema...it "should" get a value either way if not explicitly set in request
- boolean useNotify = request.isSetUseNotify() ? request.getUseNotify() : true;
+ boolean useNotify = request.isSetUseNotify() ? request.getUseNotify() : true; // NOTE: we must set the default value ourselves, as XMLBeans does NOT do this for us
EndpointReference producerEPR = getResource().getEndpointReference();
SubscriptionHome subscriptionHome = null;
try
@@ -162,10 +161,15 @@
TopicExpressionType topicExprXmlBean = request.getTopic();
TopicExpression topicExpr = new XmlBeansTopicExpression( topicExprXmlBean );
Topic[] topics = evaluateTopicExpression( topicExpr );
- if ( topics.length != 1 )
+ if ( topics.length == 0 )
{
throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
- "Given TopicExpression did not match exactly one Topic supported by this NotificationProducer." );
+ "Given TopicExpression did not match any Topics supported by this NotificationProducer - the WS-BaseN spec mandates that it match exactly one." );
+ }
+ if ( topics.length > 1 )
+ {
+ throw new InvalidTopicExpressionFaultException( NAMESPACE_SET,
+ "Given TopicExpression matched more than one Topic supported by this NotificationProducer - the WS-BaseN spec mandates that it match exactly one." );
}
Topic topic = topics[0];
XmlObject currentMsg = (XmlObject) topic.getCurrentMessage();
Modified: incubator/hermes/trunk/src/java/org/apache/ws/util/test/PortListen.java
URL: http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/util/test/PortListen.java?rev=178327&r1=178326&r2=178327&view=diff
==============================================================================
--- incubator/hermes/trunk/src/java/org/apache/ws/util/test/PortListen.java (original)
+++ incubator/hermes/trunk/src/java/org/apache/ws/util/test/PortListen.java Tue May 24 16:59:16 2005
@@ -16,13 +16,11 @@
* limitations under the License.
*=============================================================================*/
-import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
+import java.io.BufferedReader;
import java.io.IOException;
-import java.io.InterruptedIOException;
import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.BufferedReader;
+import java.io.InterruptedIOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.text.DateFormat;
@@ -32,257 +30,263 @@
import java.util.TimeZone;
/**
- * Single-message HTTP listener. When this object is instantiated, it will spawn a thread
- * and listen for a message on the specified port. Call {@link #waitForIncomingMessage()}
- * to block, waiting for the message.
+ * Single-message HTTP listener. When this object is instantiated, it will spawn
+ * a thread and listen for a message on the specified port. Call
+ * {@link #waitForIncomingMessage()} to block, waiting for the message.
*
* @author mazz
* @author ips
*/
public class PortListen
{
- private static DateFormat HTTP_DATE_FORMAT = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US );
- static
- {
- HTTP_DATE_FORMAT.setTimeZone( TimeZone.getTimeZone( "GMT" ) );
- }
-
- /**
- * the buffer to store the incoming message
- */
- private StringBuffer m_incomingMessage;
-
- /**
- * Instantiates the object and immediately begins listening for a message.
- *
- * @param port the port to listen to
- * @param timeout the time (in milliseconds) the socket accept() will wait for an incoming connection
- */
- public PortListen( int port,
- int timeout )
- {
- m_incomingMessage = new StringBuffer( );
-
- // spawn the thread
- getIncomingMessage( port, timeout, m_incomingMessage );
-
- return;
- }
-
- /**
- * Waits for the incoming message.
- * <p/>
- * This method will block waiting for the incoming message to come in or for
- * an error to occur.
- *
- * @return the incoming message as an immutable <code>String</code>
- */
- public String waitForIncomingMessage( )
- {
- synchronized ( m_incomingMessage )
- {
- while ( m_incomingMessage.length( ) == 0 )
- {
- try
- {
- m_incomingMessage.wait( 1000 );
- }
- catch ( InterruptedException e )
+ private static final DateFormat HTTP_DATE_FORMAT = new SimpleDateFormat(
+ "EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US );
+
+ static
+ {
+ HTTP_DATE_FORMAT.setTimeZone( TimeZone.getTimeZone( "GMT" ) );
+ }
+
+ /**
+ * the buffer to store the incoming message
+ */
+ private StringBuffer m_incomingMessage;
+
+ /**
+ * Instantiates the object and immediately begins listening for a message.
+ *
+ * @param port the port to listen to; a value of <code>0</code> creates a socket on any free port
+ * @param timeout the time (in milliseconds) the socket accept() will wait for an incoming connection;
+ * a value of <code>0</code> indicates accept() should wait infinitely
+ */
+ public PortListen( int port,
+ int timeout )
+ {
+ m_incomingMessage = new StringBuffer();
+ // spawn the thread
+ getIncomingMessage( port, timeout, m_incomingMessage );
+ }
+
+ /**
+ * Waits for the incoming message.
+ * <p/>
+ * This method will block waiting for the incoming message to come in or for an error to occur.
+ *
+ * @return the incoming message as a string
+ */
+ public String waitForIncomingMessage()
+ {
+ synchronized ( m_incomingMessage )
+ {
+ while ( m_incomingMessage.length() == 0 )
{
+ try
+ {
+ m_incomingMessage.wait( 1000 );
+ }
+ catch ( InterruptedException ignored )
+ {
+ }
}
- }
- }
-
- return m_incomingMessage.toString( );
- }
-
- /**
- * Listens for an incoming TCP/IP message. When an incoming message is received, it is stored in the
- * <code>retIncomingMessage</code> string buffer and <code>notify</code> on that string buffer will
- * be called to let the caller know that it is ready.
- * <p/>
- * The incoming message string buffer must be non-<code>null</code> and must be empty.
- * <p/>
- * If an error occurs, the string buffer will be filled with the string "ERROR:" followed by the exception message.
- * Even on an error, <code>notify</code> will be called to let the caller know that something happened.
- * <p/>
- * Note that this method does not block - it spawns a thread to perform the listening and returns immediately.
- * <p/>
- * This will return an HTTP server-like response back to the client.
- *
- * @param port the port to listen to
- * @param timeout the time (in milliseconds) the socket accept() will wait for an incoming connection
- * @param retIncomingMessage the incoming message to be returned to the caller - this buffer will be filled in and
- * <code>notify</code> will be called on it to let the caller know that it is ready
- *
- * @throws IllegalArgumentException if the given buffer was <code>null</code> or not empty
- */
- protected void getIncomingMessage( final int port,
- final int timeout,
- final StringBuffer retIncomingMessage )
- throws IllegalArgumentException
- {
- if ( ( retIncomingMessage == null ) || ( retIncomingMessage.length( ) > 0 ) )
- {
- throw new IllegalArgumentException( "Must provide a non-null string buffer that is empty" );
- }
-
- // use as a monitor lock to determine when the thread has started
- // this must be final to allow for the inner Runnable class to access it
- final Object listenerStarted = new Object( );
+ }
- Thread listener =
- new Thread( new Runnable( )
- {
- private final String m_httpServerName = "WS-NotificationConsumer/1.0";
- private final String m_httpVersion = "1.0";
- private final String m_httpStatus = "202 Accepted";
-
- public void run( )
- {
- ServerSocket server = null;
-
- try
- {
- server = new ServerSocket( port );
- server.setSoTimeout( timeout );
-
- // let the outer method know that we have started and just about to block on the accept
- synchronized ( listenerStarted )
- {
- listenerStarted.notify( );
- }
-
- Socket sock = server.accept( );
- sock.setSoTimeout( 500 );
- BufferedReader bufIn = new BufferedReader( new InputStreamReader( sock.getInputStream( ) ) );
- BufferedOutputStream bufOut = new BufferedOutputStream( sock.getOutputStream( ) );
-
- byte[] responseBytes = buildResponse( ).toString( ).getBytes( );
+ return m_incomingMessage.toString();
+ }
+ /**
+ * Listens for an incoming TCP/IP message. When an incoming message is received, it is stored in the
+ * <code>retIncomingMessage</code> string buffer and <code>notify</code> on that string buffer will be called to let
+ * the caller know that it is ready.
+ * <p/>
+ * The incoming message string buffer must be non-<code>null</code> and must be empty.
+ * <p/>
+ * If an error occurs, the string buffer will be filled with the string "ERROR:" followed by the exception message.
+ * Even on an error, <code>notify</code> will be called to let the caller know that something happened.
+ * <p/>
+ * Note that this method does not block - it spawns a thread to perform the listening and returns immediately.
+ * <p/>
+ * This will return an HTTP server-like response back to the client.
+ *
+ * @param port the port to listen to
+ * @param timeout the time (in milliseconds) the socket accept() will wait for an incoming connection
+ * @param retIncomingMessage the incoming message to be returned to the caller - this buffer will be filled in and
+ * <code>notify</code> will be called on it to let the caller know that it is ready
+ *
+ * @throws IllegalArgumentException if the given buffer was <code>null</code> or not empty
+ */
+ protected void getIncomingMessage( final int port,
+ final int timeout,
+ final StringBuffer retIncomingMessage )
+ throws IllegalArgumentException
+ {
+ if ( retIncomingMessage == null || retIncomingMessage.length() > 0 )
+ {
+ throw new IllegalArgumentException( "Must provide a non-null string buffer that is empty" );
+ }
+
+ // use as a monitor lock to determine when the thread has started
+ // this must be final to allow for the inner Runnable class to access it
+ final Object listenerStarted = new Object();
+
+ Thread listener =
+ new Thread( new Runnable()
+ {
+ private static final String HTTP_SERVER_NAME = "WS-NotificationConsumer/1.0";
+ private static final String HTTP_VERSION = "1.0";
+ private static final String HTTP_STATUS = "202 Accepted";
+
+ public void run()
+ {
+ ServerSocket server = null;
+ try
+ {
+ server = new ServerSocket( port );
+ server.setSoTimeout( timeout );
- try
- {
- String line;
- synchronized ( retIncomingMessage )
+ // let the outer method know that we have started and just about to block on the accept
+ synchronized ( listenerStarted )
+ {
+ listenerStarted.notify();
+ }
+
+ Socket sock = server.accept();
+ sock.setSoTimeout( 500 );
+ BufferedReader bufIn = new BufferedReader(
+ new InputStreamReader( sock.getInputStream() ) );
+ BufferedOutputStream bufOut = new BufferedOutputStream( sock.getOutputStream() );
+
+ byte[] responseBytes = buildResponse().toString().getBytes();
+
+ try
+ {
+ synchronized ( retIncomingMessage )
+ {
+ while ( !bufIn.readLine().equals( "" ) ) // skip empty lines
+ {
+ }
+ char[] buffer = new char[10240];
+ int length = -1;
+ while ( ( length = bufIn.read( buffer, 0, buffer.length ) ) != -1 )
+ {
+ retIncomingMessage.append( buffer, 0, length );
+ }
+ }
+ }
+ catch ( InterruptedIOException ignored )
+ {
+ }
+ bufOut.write( responseBytes, 0, responseBytes.length );
+ bufOut.flush();
+ bufIn.close();
+ bufOut.close();
+ }
+ catch ( Throwable t )
{
- while ( ! (line = bufIn.readLine()).equals( "" ) )
- {
- }
- char[] buffer = new char[10240];
- int length = -1;
- while ( ( length = bufIn.read(buffer,0, buffer.length ) ) != -1 )
- {
- retIncomingMessage.append( buffer , 0, length );
- }
+ synchronized ( retIncomingMessage )
+ {
+ retIncomingMessage.delete( 0,
+ retIncomingMessage.length() );
+ retIncomingMessage.append( "ERROR: " );
+ retIncomingMessage.append( t );
+ }
}
- }
- catch ( InterruptedIOException ignored )
- {
- }
- bufOut.write( responseBytes, 0, responseBytes.length );
- bufOut.flush( );
- bufIn.close( );
- bufOut.close( );
- }
- catch ( Throwable t )
- {
- synchronized ( retIncomingMessage )
- {
- retIncomingMessage.delete( 0,
- retIncomingMessage.length( ) );
- retIncomingMessage.append( "ERROR:" );
- retIncomingMessage.append( t );
- }
- }
- finally
- {
- synchronized ( retIncomingMessage )
- {
- // make sure something goes in the message, even if nothing was received
- if ( retIncomingMessage.length( ) == 0 )
+ finally
{
- retIncomingMessage.append( "ERROR: incoming message was empty" );
+ synchronized ( retIncomingMessage )
+ {
+ // make sure something goes in the message, even if nothing was received
+ if ( retIncomingMessage.length() == 0 )
+ {
+ retIncomingMessage.append( "ERROR: incoming message was empty" );
+ }
+
+ retIncomingMessage.notify();
+ }
+
+ if ( server != null )
+ {
+ try
+ {
+ server.close();
+ }
+ catch ( IOException ignored )
+ {
+ }
+ }
+
+ // do this as a fail safe
+ synchronized ( listenerStarted )
+ {
+ listenerStarted.notify();
+ }
}
- retIncomingMessage.notify( );
- }
+ }
- if ( server != null )
- {
- try
- {
- server.close( );
- }
- catch ( IOException ignored )
- {
- }
- }
+ /**
+ * Build a one-way HTTP response message that complies to the WS-I Basic Profile 1.0, section 5.6.10
+ * - see http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16651160
+ *
+ * @return a WS-I-compliant Notify response message
+ */
+ private String buildResponse()
+ {
+ Date timeNow = new Date();
+ Date sameTimeTomorrow = new Date( timeNow.getTime() + ( 24 * 60 * 60 * 1000 ) );
+ StringBuffer responseBuf = new StringBuffer( "HTTP/" );
+ responseBuf.append( HTTP_VERSION );
+ responseBuf.append( " " );
+ responseBuf.append( HTTP_STATUS );
+ responseBuf.append( "\r\n" );
+
+ responseBuf.append( "Date: " );
+ responseBuf.append( HTTP_DATE_FORMAT.format( timeNow ) );
+ responseBuf.append( "\r\n" );
+
+ responseBuf.append( "Server: " );
+ responseBuf.append( HTTP_SERVER_NAME );
+ responseBuf.append( "\r\n" );
+
+ responseBuf.append( "Cache-Control: " );
+ responseBuf.append( "max-age=86400" );
+ responseBuf.append( "\r\n" );
+
+ responseBuf.append( "Expires: " );
+ responseBuf.append( HTTP_DATE_FORMAT.format( sameTimeTomorrow ) );
+ responseBuf.append( "\r\n" );
+
+ return responseBuf.toString();
+ }
+ } );
+
+ // start listening and then return when the thread has officially gone live
+ // and the socket is ready to be accepted
+ synchronized ( listenerStarted )
+ {
+ listener.start();
+
+ try
+ {
+ listenerStarted.wait();
+ }
+ catch ( InterruptedException ignored )
+ {
+ }
+ }
+ }
+
+ public static void main( String[] args )
+ {
+ int port = args.length >= 1 ? Integer.valueOf( args[0] ).intValue() : 0;
+ int timeout = args.length >= 2 ? Integer.valueOf( args[1] ).intValue() : 0;
+ PortListen portListen = new PortListen( port, timeout );
+ System.out.println( "Listening for notification on port " + port + "..." );
+ String msg = portListen.waitForIncomingMessage();
+ System.out.println( "Received notification! SOAP message follows..." );
+ System.out.println( msg );
+ System.out.println( "Listener stopped." );
+ }
- // do this as a fail safe
- synchronized ( listenerStarted )
- {
- listenerStarted.notify( );
- }
- }
-
- return;
- }
-
- /**
- * Build a one-way HTTP response message that complies to the WS-I
- * Basic Profile 1.0, section 5.6.10 - see
- * http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16651160
- *
- * @return a WS-I-compliant Notify response message
- */
- private String buildResponse( )
- {
- Date timeNow = new Date( );
- Date sameTimeTomorrow = new Date( timeNow.getTime( ) + ( 24 * 60 * 60 * 1000 ) );
- StringBuffer responseBuf = new StringBuffer( "HTTP/" );
- responseBuf.append( m_httpVersion );
- responseBuf.append( " " );
- responseBuf.append( m_httpStatus );
- responseBuf.append( "\r\n" );
-
- responseBuf.append( "Date: " );
- responseBuf.append( HTTP_DATE_FORMAT.format( timeNow ) );
- responseBuf.append( "\r\n" );
-
- responseBuf.append( "Server: " );
- responseBuf.append( m_httpServerName );
- responseBuf.append( "\r\n" );
-
- responseBuf.append( "Cache-Control: " );
- responseBuf.append( "max-age=86400" );
- responseBuf.append( "\r\n" );
-
- responseBuf.append( "Expires: " );
- responseBuf.append( HTTP_DATE_FORMAT.format( sameTimeTomorrow ) );
- responseBuf.append( "\r\n" );
-
- return responseBuf.toString( );
- }
- } );
-
- // start listening and then return when the thread has officially gone live
- // and the socket is ready to be accepted
- synchronized ( listenerStarted )
- {
- listener.start( );
-
- try
- {
- listenerStarted.wait( );
- }
- catch ( InterruptedException ignored )
- {
- }
- }
-
- return;
- }
-}
\ No newline at end of file
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: hermes-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: hermes-dev-help@ws.apache.org