[jboss-svn-commits] JBL Code SVN: r19700 - in labs/jbosstm/workspace/interop/WSTX11-interop: dd and 24 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Apr 23 12:42:53 EDT 2008
Author: adinn
Date: 2008-04-23 12:42:53 -0400 (Wed, 23 Apr 2008)
New Revision: 19700
Added:
labs/jbosstm/workspace/interop/WSTX11-interop/dd/
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/build.sh
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/initiatorhandlers.xml
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/participanthandlers.xml
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-binding.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-initiator-binding.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-participant-binding.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-binding.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-initiator-binding.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-participant-binding.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba.wsdl
labs/jbosstm/workspace/interop/WSTX11-interop/lib/commons-logging.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/jaxrpc.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/saaj-api.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon.jar
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingConstants.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/CoordinationContextManager.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorPortType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorService.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ObjectFactory.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantPortType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantService.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestMessageType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestURLMessageType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/package-info.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATParticipantInitialisation.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/BAInteropClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorPortType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorService.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ObjectFactory.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantPortType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantService.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/TestMessageType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/package-info.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/InitiatorPortTypeImpl.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/ParticipantPortTypeImpl.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAParticipantInitialisation.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/handlers/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/handlers/CoordinationContextHandler.java
Removed:
labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossjts.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossts-common.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit-3.8.1.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon8.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/servlet.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/stax-api-1.0.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-c.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-t.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/wsas.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/wscf.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx-asl-2.0.3.jar
labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx.jar
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/processor.xsl
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/TestMessageType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/handlers/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/policy/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/TestMessageType.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/handlers/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/policy/
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/server/
Modified:
labs/jbosstm/workspace/interop/WSTX11-interop/build.xml
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/InteropTestCase.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropPreparedAfterTimeoutState.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedAbortState.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedCommitState.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropDroppedParticipantCompletedState.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropParticipantCompletedState.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropUnsolicitedCompleteState.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingProxySAXHandler.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/TestServlet.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropConstants.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropUtil.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/AsyncParticipantStub.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ParticipantStub.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/SyncParticipantStub.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/CommitFailureRecoveryDurable2PCParticipant.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/VolatileAndDurableVolatile2PCParticipant.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorCallback.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorProcessor.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATParticipantProcessor.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATInitiatorInitialisation.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/AsyncParticipantStub.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropConstants.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropUtil.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/ParticipantStub.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/SyncParticipantStub.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CannotCompleteParticipant.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CompletedParticipant.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/ExitParticipant.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/FailParticipant.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorCallback.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorProcessor.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAParticipantProcessor.java
labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAInitiatorInitialisation.java
labs/jbosstm/workspace/interop/WSTX11-interop/web.xml
labs/jbosstm/workspace/interop/WSTX11-interop/web/index.jsp
Log:
modified WSTX11 tests so that initiator and participant communicate using JaxWS, JAXB and generated WSCOOR/AT/BA types and so they invoke the JaxWS XTS 1.1 implementation using the same
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/build.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/build.xml 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/build.xml 2008-04-23 16:42:53 UTC (rev 19700)
@@ -6,30 +6,55 @@
<property environment="env"/>
- <property name="host" value="127.0.0.1"/>
+ <property name="host" value="localhost"/>
<property name="port" value="8080"/>
- <property name="jboss.deploy.dir" location="${env.HOME}/jboss-deploy"/>
+ <property name="jboss.deploy.dir" location="${env.JBOSS_HOME}/server/default/deploy"/>
<property name="build.dir" location="build"/>
<property name="build.classes.dir" location="${build.dir}/classes"/>
<property name="build.lib.dir" location="${build.dir}/lib"/>
- <property name="build.war.file" location="${build.lib.dir}/interop.war"/>
+ <property name="build.war.file" location="${build.lib.dir}/interop11.war"/>
<property name="build.webxml.file" location="${build.lib.dir}/web.xml"/>
<property name="src.dir" location="src"/>
+ <property name="conf.dir" location="conf"/>
+ <property name="dd.dir" location="dd/"/>
<property name="webxml.file" location="web.xml"/>
<property name="lib.dir" location="lib"/>
<property name="web.dir" location="web"/>
- <property name="dist.compile.libs" value="ws-c.jar ws-t.jar wscf.jar wstx.jar wsas.jar jbossjts.jar jbossts-common.jar stax-api-1.0.jar junit-3.8.1.jar saxon8.jar"/>
+ <property name="jboss.client.lib.dir" location="${env.JBOSS_HOME}/client"/>
+ <!-- export XTS_HOME=/home/adinn/jboss/jbossts/trunk/XTS/xts-install -->
+ <property name="xts.lib.dir" location="${env.XTS_HOME}/lib"/>
+ <property name="xts.ext.lib.dir" location="${xts.lib.dir}/ext"/>
+
+ <!--
+ <property name="dist.compile.libs" value="ws-c.jar ws-t.jar wscf.jar wstx.jar wsas.jar jbossjta.jar jbossts-common.jar stax-api-1.0.jar junit-3.8.1.jar saxon8.jar"/>
+ -->
+ <property name="xts11.compile.libs" value="ws-c11.jar ws-t11.jar wscf11.jar wstx11.jar"/>
+ <property name="xts.compile.libs" value="ws-c.jar ws-t.jar wscf.jar wstx.jar wsas.jar"/>
+ <property name="xts.ext.compile.libs" value="jbossjta.jar"/>
+ <property name="jboss.compile.client.libs" value="jaxb-api.jar jboss-javaee.jar jboss-jaxrpc.jar jboss-jaxws-ext.jar jboss-jaxws.jar jbossws-client.jar jboss-saaj.jar"/>
+
+ <property name="dist.compile.libs" value="junit.jar saxon.jar"/>
+
+
+ <!--
<property name="dist.dependency.libs" value="wstx-asl-2.0.3.jar"/>
<property name="dist.libs" value="${dist.compile.libs} ${dist.dependency.libs}"/>
- <property name="compile.libs" value="${dist.compile.libs} servlet.jar"/>
+ -->
+ <property name="dist.libs" value="${dist.compile.libs}"/>
+ <property name="dist.xts.libs" value="${xts11.compile.libs} ${xts.compile.libs}"/>
+ <property name="dist.xts.ext.libs" value="${xts.ext.compile.libs}"/>
+
<property name="compile.debug" value="true"/>
<path id="classpath">
- <fileset dir="${lib.dir}" includes="${compile.libs}"/>
+ <fileset dir="${lib.dir}" includes="${dist.compile.libs}"/>
+ <fileset dir="${xts.lib.dir}" includes="${dist.xts.libs}"/>
+ <fileset dir="${xts.ext.lib.dir}" includes="${dist.xts.ext.libs}"/>
+ <fileset dir="${jboss.client.lib.dir}" includes="${jboss.compile.client.libs}"/>
</path>
<property name="classpath" refid="classpath"/>
@@ -49,12 +74,37 @@
<filter token="HOST" value="${host}"/>
<filter token="PORT" value="${port}"/>
</filterset>
- </copy>
- <war destfile="${build.war.file}" webxml="${build.webxml.file}">
+ </copy>
+ <!-- todo put one copy of each handler file in WEB-INF and refer to it correctly from SEI class annotation-->
+ <copy file="${dd.dir}/interop11/initiatorhandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/atinterop/sei" overwrite="yes">
+ </copy>
+ <copy file="${dd.dir}/interop11/participanthandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/atinterop/sei" overwrite="yes">
+ </copy>
+ <copy file="${dd.dir}/interop11/initiatorhandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/bainterop/sei" overwrite="yes">
+ </copy>
+ <copy file="${dd.dir}/interop11/participanthandlers.xml" toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/bainterop/sei" overwrite="yes">
+ </copy>
+ <!-- wsdl gets loaded relative to service implementation class -->
+ <copy toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/atinterop/generated"
+ overwrite="yes">
+ <fileset dir="${dd.dir}/interop11"
+ includes="wsdl/interopat*.wsdl"/>
+ </copy>
+ <copy toDir="${build.classes.dir}/com/jboss/transaction/txinterop/webservices/bainterop/generated"
+ overwrite="yes">
+ <fileset dir="${dd.dir}/interop11"
+ includes="wsdl/interopba*.wsdl"/>
+ </copy>
+ <war destfile="${build.war.file}" webxml="${build.webxml.file}">
<classes dir="${build.classes.dir}"/>
<classes dir="${src.dir}" excludes="**/*.java"/>
- <lib dir="${lib.dir}" includes="${dist.libs}"/>
- <fileset dir="${web.dir}"/>
+ <lib dir="${lib.dir}" includes="${dist.libs}"/>
+ <!--
+ <lib dir="${xts.lib.dir}" includes="${dist.xts.libs}"/>
+ -->
+ <webinf dir="${conf.dir}" includes="*"/>
+ <webinf dir="${dd.dir}/interop11" includes="wsdl/*.wsdl"/>
+ <fileset dir="${web.dir}"/>
</war>
</target>
@@ -62,6 +112,10 @@
<copy file="${build.war.file}" todir="${jboss.deploy.dir}"/>
</target>
+ <target name="undeploy">
+ <delete file="${jboss.deploy.dir}/interop11.war"/>
+ </target>
+
<target name="clean">
<delete dir="${build.dir}"/>
</target>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/build.sh
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/build.sh (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/build.sh 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,36 @@
+#
+#
+#
+
+if [ ! -d tmp ] ; then
+ mkdir tmp
+fi
+
+if [ ! -d tmp/classes ] ; then
+ mkdir tmp/classes
+fi
+
+if [ ! -d tmp/src ] ; then
+ mkdir tmp/src
+fi
+
+# delete old generated versions -- any changes should be made to a copy!
+
+rm -rf tmp/classes/* tmp/src/*
+
+#$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interop11-binding.wsdl -d tmp/classes -s tmp/src -target 2.1 -p com.jboss.transaction.txinterop.webservices.atinterop.generated wsdl/interopat-initiator-binding.wsdl
+
+#$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interop11-binding.wsdl -d tmp/classes -s tmp/src -target 2.1 -p com.jboss.transaction.txinterop.webservices.atinterop.generated wsdl/interopat-participant-binding.wsdl
+
+#$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interop11-binding.wsdl -d tmp/classes -s tmp/src -target 2.1 -p com.jboss.transaction.txinterop.webservices.bainterop.generated wsdl/interopba-initiator-binding.wsdl
+
+#$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interop11-binding.wsdl -d tmp/classes -s tmp/src -target 2.1 -p com.jboss.transaction.txinterop.webservices.bainterop.generated wsdl/interopba-participant-binding.wsdl
+
+$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interopat-initiator-binding.wsdl -d tmp/classes -s tmp/src -target 2.0 -p com.jboss.transaction.txinterop.webservices.atinterop.generated wsdl/interopat-initiator-binding.wsdl
+
+$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interopat-participant-binding.wsdl -d tmp/classes -s tmp/src -target 2.0 -p com.jboss.transaction.txinterop.webservices.atinterop.generated wsdl/interopat-participant-binding.wsdl
+
+$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interopba-initiator-binding.wsdl -d tmp/classes -s tmp/src -target 2.0 -p com.jboss.transaction.txinterop.webservices.bainterop.generated wsdl/interopba-initiator-binding.wsdl
+
+$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/interopba-participant-binding.wsdl -d tmp/classes -s tmp/src -target 2.0 -p com.jboss.transaction.txinterop.webservices.bainterop.generated wsdl/interopba-participant-binding.wsdl
+
Copied: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/initiatorhandlers.xml (from rev 19592, labs/jbosstm/trunk/XTS/WS-C/dev/dd/ws-c_handlers.xml)
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/initiatorhandlers.xml (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/initiatorhandlers.xml 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
+ of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU General Public License, v. 2.0.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License,
+ v. 2.0 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2007,
+ @author JBoss Inc.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>WS Addressing Server Handler</handler-name>
+ <handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/participanthandlers.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/participanthandlers.xml (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/participanthandlers.xml 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ as indicated by the @author tags.
+ See the copyright.txt in the distribution for a full listing
+ of individual contributors.
+ This copyrighted material is made available to anyone wishing to use,
+ modify, copy, or redistribute it subject to the terms and conditions
+ of the GNU General Public License, v. 2.0.
+ This program is distributed in the hope that it will be useful, but WITHOUT A
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License,
+ v. 2.0 along with this distribution; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ MA 02110-1301, USA.
+
+ (C) 2007,
+ @author JBoss Inc.
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>Coordination Context Handler</handler-name>
+ <handler-class>com.jboss.transaction.txinterop.webservices.handlers.CoordinationContextHandler</handler-class>
+ </handler>
+ <handler>
+ <handler-name>WS Addressing Server Handler</handler-name>
+ <handler-class>org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-binding.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-binding.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-binding.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+ xmlns:tns="http://fabrikam123.com"
+ targetNamespace="http://fabrikam123.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <import
+ namespace="http://fabrikam123.com"
+ location="interopat.wsdl"/>
+
+ <binding name="Initiator_SOAPBinding" type="tns:InitiatorPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Response">
+ <soap:operation soapAction="http://fabrikam123.com/Response"/>
+ <input message="tns:Response">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <binding name="Participant_SOAPBinding" type="tns:ParticipantPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="CompletionCommit">
+ <soap:operation soapAction="http://fabrikam123.com/CompletionCommit"/>
+ <input message="tns:CompletionCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CompletionRollback">
+ <soap:operation soapAction="http://fabrikam123.com/CompletionRollback"/>
+ <input message="tns:CompletionRollback">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Commit">
+ <soap:operation soapAction="http://fabrikam123.com/Commit"/>
+ <input message="tns:Commit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Rollback">
+ <soap:operation soapAction="http://fabrikam123.com/Rollback"/>
+ <input message="tns:Rollback">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Phase2Rollback">
+ <soap:operation soapAction="http://fabrikam123.com/Phase2Rollback"/>
+ <input message="tns:Phase2Rollback">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Readonly">
+ <soap:operation soapAction="http://fabrikam123.com/Readonly"/>
+ <input message="tns:Readonly">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="VolatileAndDurable">
+ <soap:operation soapAction="http://fabrikam123.com/VolatileAndDurable"/>
+ <input message="tns:VolatileAndDurable">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="EarlyReadonly">
+ <soap:operation soapAction="http://fabrikam123.com/EarlyReadonly"/>
+ <input message="tns:EarlyReadonly">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="EarlyAborted">
+ <soap:operation soapAction="http://fabrikam123.com/EarlyAborted"/>
+ <input message="tns:EarlyAborted">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="ReplayCommit">
+ <soap:operation soapAction="http://fabrikam123.com/ReplayCommit"/>
+ <input message="tns:ReplayCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="RetryPreparedCommit">
+ <soap:operation soapAction="http://fabrikam123.com/RetryPreparedCommit"/>
+ <input message="tns:RetryPreparedCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="RetryPreparedAbort">
+ <soap:operation soapAction="http://fabrikam123.com/RetryPreparedAbort"/>
+ <input message="tns:RetryPreparedAbort">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="RetryCommit">
+ <soap:operation soapAction="http://fabrikam123.com/RetryCommit"/>
+ <input message="tns:RetryCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="PreparedAfterTimeout">
+ <soap:operation soapAction="http://fabrikam123.com/PreparedAfterTimeout"/>
+ <input message="tns:PreparedAfterTimeout">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="LostCommitted">
+ <soap:operation soapAction="http://fabrikam123.com/LostCommitted"/>
+ <input message="tns:LostCommitted">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <service name="InteropService">
+ <port binding="tns:Initiator_SOAPBinding" name="InitiatorPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopat/InteropService"/>
+ </port>
+ <port binding="tns:Participant_SOAPBinding" name="ParticipantPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopat/ParticipantService"/>
+ </port>
+ </service>
+
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-initiator-binding.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-initiator-binding.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-initiator-binding.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+ xmlns:tns="http://fabrikam123.com"
+ targetNamespace="http://fabrikam123.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <import
+ namespace="http://fabrikam123.com"
+ location="interopat.wsdl"/>
+
+ <binding name="Initiator_SOAPBinding" type="tns:InitiatorPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Response">
+ <soap:operation soapAction="http://fabrikam123.com/Response"/>
+ <input message="tns:Response">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <service name="InitiatorService">
+ <port binding="tns:Initiator_SOAPBinding" name="InitiatorPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopat/InitiatorService"/>
+ </port>
+ </service>
+
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-participant-binding.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-participant-binding.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat-participant-binding.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+ xmlns:tns="http://fabrikam123.com"
+ targetNamespace="http://fabrikam123.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <import
+ namespace="http://fabrikam123.com"
+ location="interopat.wsdl"/>
+
+ <binding name="Participant_SOAPBinding" type="tns:ParticipantPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="CompletionCommit">
+ <soap:operation soapAction="http://fabrikam123.com/CompletionCommit"/>
+ <input message="tns:CompletionCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CompletionRollback">
+ <soap:operation soapAction="http://fabrikam123.com/CompletionRollback"/>
+ <input message="tns:CompletionRollback">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Commit">
+ <soap:operation soapAction="http://fabrikam123.com/Commit"/>
+ <input message="tns:Commit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Rollback">
+ <soap:operation soapAction="http://fabrikam123.com/Rollback"/>
+ <input message="tns:Rollback">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Phase2Rollback">
+ <soap:operation soapAction="http://fabrikam123.com/Phase2Rollback"/>
+ <input message="tns:Phase2Rollback">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Readonly">
+ <soap:operation soapAction="http://fabrikam123.com/Readonly"/>
+ <input message="tns:Readonly">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="VolatileAndDurable">
+ <soap:operation soapAction="http://fabrikam123.com/VolatileAndDurable"/>
+ <input message="tns:VolatileAndDurable">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="EarlyReadonly">
+ <soap:operation soapAction="http://fabrikam123.com/EarlyReadonly"/>
+ <input message="tns:EarlyReadonly">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="EarlyAborted">
+ <soap:operation soapAction="http://fabrikam123.com/EarlyAborted"/>
+ <input message="tns:EarlyAborted">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="ReplayCommit">
+ <soap:operation soapAction="http://fabrikam123.com/ReplayCommit"/>
+ <input message="tns:ReplayCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="RetryPreparedCommit">
+ <soap:operation soapAction="http://fabrikam123.com/RetryPreparedCommit"/>
+ <input message="tns:RetryPreparedCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="RetryPreparedAbort">
+ <soap:operation soapAction="http://fabrikam123.com/RetryPreparedAbort"/>
+ <input message="tns:RetryPreparedAbort">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="RetryCommit">
+ <soap:operation soapAction="http://fabrikam123.com/RetryCommit"/>
+ <input message="tns:RetryCommit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="PreparedAfterTimeout">
+ <soap:operation soapAction="http://fabrikam123.com/PreparedAfterTimeout"/>
+ <input message="tns:PreparedAfterTimeout">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="LostCommitted">
+ <soap:operation soapAction="http://fabrikam123.com/LostCommitted"/>
+ <input message="tns:LostCommitted">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <service name="ParticipantService">
+ <port binding="tns:Participant_SOAPBinding" name="ParticipantPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopat/ParticipantService"/>
+ </port>
+ </service>
+
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopat.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://fabrikam123.com"
+ targetNamespace="http://fabrikam123.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://fabrikam123.com">
+ <s:complexType name="TestMessageType">
+ <s:sequence />
+ </s:complexType>
+ <s:element name="Response" type="tns:TestMessageType" />
+ <s:element name="CompletionCommit" type="s:string" />
+ <s:element name="CompletionRollback" type="s:string" />
+ <s:element name="Commit" type="tns:TestMessageType" />
+ <s:element name="Rollback" type="tns:TestMessageType" />
+ <s:element name="Phase2Rollback" type="tns:TestMessageType" />
+ <s:element name="Readonly" type="tns:TestMessageType" />
+ <s:element name="VolatileAndDurable" type="tns:TestMessageType" />
+ <s:element name="EarlyReadonly" type="tns:TestMessageType" />
+ <s:element name="EarlyAborted" type="tns:TestMessageType" />
+ <s:element name="ReplayCommit" type="tns:TestMessageType" />
+ <s:element name="RetryPreparedCommit" type="tns:TestMessageType" />
+ <s:element name="RetryPreparedAbort" type="tns:TestMessageType" />
+ <s:element name="RetryCommit" type="tns:TestMessageType" />
+ <s:element name="PreparedAfterTimeout" type="tns:TestMessageType" />
+ <s:element name="LostCommitted" type="tns:TestMessageType" />
+ </s:schema>
+ </types>
+ <message name="CompletionCommit">
+ <part name="parameters" element="tns:CompletionCommit" />
+ </message>
+ <message name="CompletionRollback">
+ <part name="parameters" element="tns:CompletionRollback" />
+ </message>
+ <message name="Commit">
+ <part name="parameters" element="tns:Commit" />
+ </message>
+ <message name="Rollback">
+ <part name="parameters" element="tns:Rollback" />
+ </message>
+ <message name="Phase2Rollback">
+ <part name="parameters" element="tns:Phase2Rollback" />
+ </message>
+ <message name="Readonly">
+ <part name="parameters" element="tns:Readonly" />
+ </message>
+ <message name="VolatileAndDurable">
+ <part name="parameters" element="tns:VolatileAndDurable" />
+ </message>
+ <message name="EarlyReadonly">
+ <part name="parameters" element="tns:EarlyReadonly" />
+ </message>
+ <message name="EarlyAborted">
+ <part name="parameters" element="tns:EarlyAborted" />
+ </message>
+ <message name="ReplayCommit">
+ <part name="parameters" element="tns:ReplayCommit" />
+ </message>
+ <message name="RetryPreparedCommit">
+ <part name="parameters" element="tns:RetryPreparedCommit" />
+ </message>
+ <message name="RetryPreparedAbort">
+ <part name="parameters" element="tns:RetryPreparedAbort" />
+ </message>
+ <message name="RetryCommit">
+ <part name="parameters" element="tns:RetryCommit" />
+ </message>
+ <message name="PreparedAfterTimeout">
+ <part name="parameters" element="tns:PreparedAfterTimeout" />
+ </message>
+ <message name="LostCommitted">
+ <part name="parameters" element="tns:LostCommitted" />
+ </message>
+ <message name="Response">
+ <part name="parameters" element="tns:Response" />
+ </message>
+ <portType name="InitiatorPortType">
+ <operation name="Response">
+ <input name="Response" message="tns:Response" />
+ </operation>
+ </portType>
+ <portType name="ParticipantPortType">
+ <operation name="CompletionCommit"><!-- Scenario 1.1 -->
+ <input name="CompletionCommit" message="tns:CompletionCommit" />
+ </operation>
+ <operation name="CompletionRollback"><!-- Scenario 1.2 -->
+ <input name="CompletionRollback" message="tns:CompletionRollback" />
+ </operation>
+ <operation name="Commit"><!-- Scenario 2.1 -->
+ <input name="Commit" message="tns:Commit" />
+ </operation>
+ <operation name="Rollback"><!-- Scenario 2.2 -->
+ <input name="Rollback" message="tns:Rollback" />
+ </operation>
+ <operation name="Phase2Rollback"><!-- Scenario 3.1 -->
+ <input name="Phase2Rollback" message="tns:Phase2Rollback" />
+ </operation>
+ <operation name="Readonly"><!-- Scenario 3.2 -->
+ <input name="Readonly" message="tns:Readonly" />
+ </operation>
+ <operation name="VolatileAndDurable"><!-- Scenario 3.3 -->
+ <input name="VolatileAndDurable" message="tns:VolatileAndDurable" />
+ </operation>
+ <operation name="EarlyReadonly"><!-- Scenario 4.1 -->
+ <input name="EarlyReadonly" message="tns:EarlyReadonly" />
+ </operation>
+ <operation name="EarlyAborted"><!-- Scenario 4.2 -->
+ <input name="EarlyAborted" message="tns:EarlyAborted" />
+ </operation>
+ <operation name="ReplayCommit"><!-- Scenario 5.1 -->
+ <input name="ReplayCommit" message="tns:ReplayCommit" />
+ </operation>
+ <operation name="RetryPreparedCommit"><!-- Scenario 5.2 -->
+ <input name="RetryPreparedCommit" message="tns:RetryPreparedCommit" />
+ </operation>
+ <operation name="RetryPreparedAbort"><!-- Scenario 5.3 -->
+ <input name="RetryPreparedAbort" message="tns:RetryPreparedAbort" />
+ </operation>
+ <operation name="RetryCommit"><!-- Scenario 5.4 -->
+ <input name="RetryCommit" message="tns:RetryCommit" />
+ </operation>
+ <operation name="PreparedAfterTimeout"><!-- Scenario 5.5 -->
+ <input name="PreparedAfterTimeout" message="tns:PreparedAfterTimeout" />
+ </operation>
+ <operation name="LostCommitted"><!-- Scenario 5.6 -->
+ <input name="LostCommitted" message="tns:LostCommitted" />
+ </operation>
+ </portType>
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-binding.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-binding.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-binding.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+ xmlns:tns="http://fabrikam123.com/wsba"
+ targetNamespace="http://fabrikam123.com/wsba"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <import
+ namespace="http://fabrikam123.com/wsba"
+ location="interopba.wsdl"/>
+
+ <binding name="Initiator_SOAPBinding" type="tns:InitiatorPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Response">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Response"/>
+ <input message="tns:Response">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <binding name="Participant_SOAPBinding" type="tns:ParticipantPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Cancel">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Cancel"/>
+ <input message="tns:Cancel">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Exit">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Exit"/>
+ <input message="tns:Exit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Fail">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Fail"/>
+ <input message="tns:Fail">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CannotComplete">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/CannotComplete"/>
+ <input message="tns:CannotComplete">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="ParticipantCompleteClose">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/ParticipantCompleteClose"/>
+ <input message="tns:ParticipantCompleteClose">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CoordinatorCompleteClose">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/CoordinatorCompleteClose"/>
+ <input message="tns:CoordinatorCompleteClose">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="UnsolicitedComplete">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/UnsolicitedComplete"/>
+ <input message="tns:UnsolicitedComplete">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Compensate">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Compensate"/>
+ <input message="tns:Compensate">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CompensationFail">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/CompensationFail"/>
+ <input message="tns:CompensationFail">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="ParticipantCancelCompletedRace">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/ParticipantCancelCompletedRace"/>
+ <input message="tns:ParticipantCancelCompletedRace">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="MessageLossAndRecovery">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/MessageLossAndRecovery"/>
+ <input message="tns:MessageLossAndRecovery">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="MixedOutcome">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/MixedOutcome"/>
+ <input message="tns:MixedOutcome">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <service name="InteropService">
+ <port binding="tns:Initiator_SOAPBinding" name="InitiatorPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopba/InteropService"/>
+ </port>
+ <port binding="tns:Participant_SOAPBinding" name="ParticipantPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopba/ParticipantService"/>
+ </port>
+ </service>
+
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-initiator-binding.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-initiator-binding.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-initiator-binding.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+ xmlns:tns="http://fabrikam123.com/wsba"
+ targetNamespace="http://fabrikam123.com/wsba"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <import
+ namespace="http://fabrikam123.com/wsba"
+ location="interopba.wsdl"/>
+
+ <binding name="Initiator_SOAPBinding" type="tns:InitiatorPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Response">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Response"/>
+ <input message="tns:Response">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <service name="InitiatorService">
+ <port binding="tns:Initiator_SOAPBinding" name="InitiatorPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopba/InitiatorService"/>
+ </port>
+ </service>
+
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-participant-binding.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-participant-binding.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba-participant-binding.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsaw="http://www.w3.org/2006/02/addressing/wsdl"
+ xmlns:tns="http://fabrikam123.com/wsba"
+ targetNamespace="http://fabrikam123.com/wsba"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <import
+ namespace="http://fabrikam123.com/wsba"
+ location="interopba.wsdl"/>
+
+ <binding name="Participant_SOAPBinding" type="tns:ParticipantPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="Cancel">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Cancel"/>
+ <input message="tns:Cancel">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Exit">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Exit"/>
+ <input message="tns:Exit">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Fail">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Fail"/>
+ <input message="tns:Fail">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CannotComplete">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/CannotComplete"/>
+ <input message="tns:CannotComplete">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="ParticipantCompleteClose">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/ParticipantCompleteClose"/>
+ <input message="tns:ParticipantCompleteClose">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CoordinatorCompleteClose">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/CoordinatorCompleteClose"/>
+ <input message="tns:CoordinatorCompleteClose">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="UnsolicitedComplete">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/UnsolicitedComplete"/>
+ <input message="tns:UnsolicitedComplete">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="Compensate">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/Compensate"/>
+ <input message="tns:Compensate">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="CompensationFail">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/CompensationFail"/>
+ <input message="tns:CompensationFail">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="ParticipantCancelCompletedRace">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/ParticipantCancelCompletedRace"/>
+ <input message="tns:ParticipantCancelCompletedRace">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="MessageLossAndRecovery">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/MessageLossAndRecovery"/>
+ <input message="tns:MessageLossAndRecovery">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ <operation name="MixedOutcome">
+ <soap:operation soapAction="http://fabrikam123.com/wsba/MixedOutcome"/>
+ <input message="tns:MixedOutcome">
+ <soap:body use="literal"/>
+ </input>
+ </operation>
+ </binding>
+
+ <service name="ParticipantService">
+ <port binding="tns:Participant_SOAPBinding" name="ParticipantPortType">
+ <wsaw:UsingAddressing required="true"/>
+ <soap:address location="http://localhost:9000/interopba/ParticipantService"/>
+ </port>
+ </service>
+
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba.wsdl (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/dd/interop11/wsdl/interopba.wsdl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<definitions
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://fabrikam123.com/wsba"
+ targetNamespace="http://fabrikam123.com/wsba"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified"
+ targetNamespace="http://fabrikam123.com/wsba">
+ <s:complexType name="TestMessageType">
+ <s:sequence />
+ </s:complexType>
+ <s:element name="Response" type="tns:TestMessageType" />
+ <s:element name="Cancel" type="tns:TestMessageType" />
+ <s:element name="Exit" type="tns:TestMessageType" />
+ <s:element name="Fail" type="tns:TestMessageType" />
+ <s:element name="CannotComplete" type="tns:TestMessageType" />
+ <s:element name="ParticipantCompleteClose" type="tns:TestMessageType" />
+ <s:element name="CoordinatorCompleteClose" type="tns:TestMessageType" />
+ <s:element name="UnsolicitedComplete" type="tns:TestMessageType" />
+ <s:element name="Compensate" type="tns:TestMessageType" />
+ <s:element name="CompensationFail" type="tns:TestMessageType" />
+ <s:element name="ParticipantCancelCompletedRace" type="tns:TestMessageType" />
+ <s:element name="MessageLossAndRecovery" type="tns:TestMessageType" />
+ <s:element name="MixedOutcome" type="tns:TestMessageType" />
+ </s:schema>
+ </types>
+ <message name="Response">
+ <part name="parameters" element="tns:Response" />
+ </message>
+ <message name="Cancel">
+ <part name="parameters" element="tns:Cancel" />
+ </message>
+ <message name="Exit">
+ <part name="parameters" element="tns:Exit" />
+ </message>
+ <message name="Fail">
+ <part name="parameters" element="tns:Fail" />
+ </message>
+ <message name="CannotComplete">
+ <part name="parameters" element="tns:CannotComplete" />
+ </message>
+ <message name="ParticipantCompleteClose">
+ <part name="parameters" element="tns:ParticipantCompleteClose" />
+ </message>
+ <message name="CoordinatorCompleteClose">
+ <part name="parameters" element="tns:CoordinatorCompleteClose" />
+ </message>
+ <message name="UnsolicitedComplete">
+ <part name="parameters" element="tns:UnsolicitedComplete" />
+ </message>
+ <message name="Compensate">
+ <part name="parameters" element="tns:Compensate" />
+ </message>
+ <message name="CompensationFail">
+ <part name="parameters" element="tns:CompensationFail" />
+ </message>
+ <message name="ParticipantCancelCompletedRace">
+ <part name="parameters" element="tns:ParticipantCancelCompletedRace" />
+ </message>
+ <message name="MessageLossAndRecovery">
+ <part name="parameters" element="tns:MessageLossAndRecovery" />
+ </message>
+ <message name="MixedOutcome">
+ <part name="parameters" element="tns:MixedOutcome" />
+ </message>
+ <portType name="InitiatorPortType">
+ <operation name="Response">
+ <input name="Response" message="tns:Response" />
+ </operation>
+ </portType>
+ <portType name="ParticipantPortType">
+ <operation name="Cancel"> <!-- Scenario 1.1 -->
+ <input name="Cancel" message="tns:Cancel" />
+ </operation>
+ <operation name="Exit"> <!-- Scenario 1.2 -->
+ <input name="Exit" message="tns:Exit" />
+ </operation>
+ <operation name="Fail"> <!-- Scenario 1.3 -->
+ <input name="Fail" message="tns:Fail" />
+ </operation>
+ <operation name="CannotComplete"> <!-- Scenario 1.4 -->
+ <input name="CannotComplete" message="tns:CannotComplete" />
+ </operation>
+ <operation name="ParticipantCompleteClose"> <!-- Scenario 1.5 -->
+ <input name="ParticipantCompleteClose"
+ message="tns:ParticipantCompleteClose" />
+ </operation>
+ <operation name="CoordinatorCompleteClose"> <!-- Scenario 1.6 -->
+ <input name="CoordinatorCompleteClose"
+ message="tns:CoordinatorCompleteClose" />
+ </operation>
+ <operation name="UnsolicitedComplete"> <!-- Scenario 1.7 -->
+ <input name="UnsolicitedComplete" message="tns:UnsolicitedComplete" />
+ </operation>
+ <operation name="Compensate"> <!-- Scenario 1.8 -->
+ <input name="Compensate" message="tns:Compensate" />
+ </operation>
+ <operation name="CompensationFail"> <!-- Scenario 1.9 -->
+ <input name="CompensationFail"
+ message="tns:CompensationFail" />
+ </operation>
+ <operation name="ParticipantCancelCompletedRace"> <!-- Scenario 1.10 -->
+ <input name="ParticipantCancelCompletedRace"
+ message="tns:ParticipantCancelCompletedRace" />
+ </operation>
+ <operation name="MessageLossAndRecovery"> <!-- Scenario 1.11 -->
+ <input name="MessageLossAndRecovery" message="tns:MessageLossAndRecovery" />
+ </operation>
+ <operation name="MixedOutcome"> <!-- Scenario 1.12 -->
+ <input name="MixedOutcome" message="tns:MixedOutcome" />
+ </operation>
+ </portType>
+</definitions>
Added: labs/jbosstm/workspace/interop/WSTX11-interop/lib/commons-logging.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/interop/WSTX11-interop/lib/commons-logging.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/interop/WSTX11-interop/lib/jaxrpc.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/interop/WSTX11-interop/lib/jaxrpc.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossjts.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossjts.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossjts.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ext/jbossjts.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossts-common.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossts-common.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/jbossts-common.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ext/jbossts-common.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit-3.8.1.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit-3.8.1.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit-3.8.1.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /usr/java/junit3.8.1/junit.jar
\ No newline at end of file
Added: labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/interop/WSTX11-interop/lib/junit.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/interop/WSTX11-interop/lib/saaj-api.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/interop/WSTX11-interop/lib/saaj-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon.jar
===================================================================
(Binary files differ)
Property changes on: labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon8.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon8.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/saxon8.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /usr/java/saxonb8/saxon8.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/servlet.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/servlet.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/servlet.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ext/servlet.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/stax-api-1.0.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/stax-api-1.0.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/stax-api-1.0.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ext/stax-api-1.0.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-c.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-c.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-c.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ws-c.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-t.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-t.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/ws-t.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ws-t.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/wsas.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/wsas.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/wsas.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/wsas.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/wscf.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/wscf.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/wscf.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/wscf.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx-asl-2.0.3.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx-asl-2.0.3.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx-asl-2.0.3.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/ext/wstx-asl-2.0.3.jar
\ No newline at end of file
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx.jar
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx.jar 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/lib/wstx.jar 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/jbosstm/XTS/xts-install/lib/wstx.jar
\ No newline at end of file
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/ATTestCase.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,9 +1,9 @@
package com.jboss.transaction.txinterop.interop;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
-import com.arjuna.webservices.wscoor11.CoordinationConstants;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.arjuna.wst.CompletionCoordinatorParticipant;
import com.arjuna.wst.SystemException;
import com.arjuna.wst.TransactionRolledBackException;
@@ -431,6 +431,9 @@
public void testAT5_5()
throws Exception
{
+ // TODO this test fails because under JaxWS we cannot post a Soap Fault when we receive an invalid OneWay message
+ fail("PreparedAfterTimeout does not complete successfully");
+
final String conversationId = getConversationId() ;
final ATInteropPreparedAfterTimeoutState state = new ATInteropPreparedAfterTimeoutState() ;
ProxyConversation.setConversationState(conversationId, state) ;
@@ -513,8 +516,8 @@
static
{
- final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
- SOURCE_PARTICIPANT_URI = soapRegistry.getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;
- SOURCE_COORDINATOR_URI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ SOURCE_PARTICIPANT_URI = serviceRegistry.getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;
+ SOURCE_COORDINATOR_URI = serviceRegistry.getServiceURI(CoordinationConstants.ACTIVATION_SERVICE_NAME) ;
}
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/BATestCase.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,9 +1,9 @@
package com.jboss.transaction.txinterop.interop;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.wsba11.BusinessActivityConstants;
-import com.arjuna.webservices.wscoor11.CoordinationConstants;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.arjuna.webservices11.ServiceRegistry;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.arjuna.wst.BusinessActivityTerminator;
import com.jboss.transaction.txinterop.interop.states.BAInteropDroppedParticipantCompletedState;
import com.jboss.transaction.txinterop.interop.states.BAInteropParticipantCompletedState;
@@ -228,6 +228,9 @@
public void testBA1_7()
throws Exception
{
+ // TODO this test fails because under JaxWS we cannot post a Soap Fault when we receive an invalid OneWay message
+ fail("UnsolicitedComplete does not complete successfully");
+
final String conversationId = getConversationId() ;
final BAInteropUnsolicitedCompleteState state = new BAInteropUnsolicitedCompleteState() ;
ProxyConversation.setConversationState(conversationId, state) ;
@@ -430,8 +433,8 @@
static
{
- final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
- SOURCE_PARTICIPANT_URI = soapRegistry.getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;
- SOURCE_COORDINATOR_URI = soapRegistry.getServiceURI(CoordinationConstants.SERVICE_ACTIVATION_COORDINATOR) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ SOURCE_PARTICIPANT_URI = serviceRegistry.getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;
+ SOURCE_COORDINATOR_URI = serviceRegistry.getServiceURI(CoordinationConstants.ACTIVATION_SERVICE_NAME) ;
}
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/InteropTestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/InteropTestCase.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/InteropTestCase.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -49,7 +49,7 @@
/**
* Set the participant URI.
- * @param serviceURI The participant URI.
+ * @param participantURI The participant URI.
*/
public void setParticipantURI(final String participantURI)
{
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropPreparedAfterTimeoutState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropPreparedAfterTimeoutState.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropPreparedAfterTimeoutState.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,6 +1,6 @@
package com.jboss.transaction.txinterop.interop.states;
-import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
/**
* A conversation state for prepare after timeout test.
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedAbortState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedAbortState.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedAbortState.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,6 +1,6 @@
package com.jboss.transaction.txinterop.interop.states;
-import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
/**
* A conversation state for retry prepared abort test.
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedCommitState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedCommitState.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/ATInteropRetryPreparedCommitState.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,6 +1,6 @@
package com.jboss.transaction.txinterop.interop.states;
-import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
/**
* A conversation state for retry prepared commit state.
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropDroppedParticipantCompletedState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropDroppedParticipantCompletedState.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropDroppedParticipantCompletedState.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,6 +1,6 @@
package com.jboss.transaction.txinterop.interop.states;
-import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
/**
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropParticipantCompletedState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropParticipantCompletedState.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropParticipantCompletedState.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,6 +1,6 @@
package com.jboss.transaction.txinterop.interop.states;
-import com.arjuna.webservices.wsba11.BusinessActivityConstants;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
/**
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropUnsolicitedCompleteState.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropUnsolicitedCompleteState.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/interop/states/BAInteropUnsolicitedCompleteState.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -4,8 +4,8 @@
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
-import com.arjuna.webservices.wsba11.BusinessActivityConstants;
-import com.arjuna.webservices.wscoor11.CoordinationConstants;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
import com.jboss.transaction.txinterop.proxy.BaseHandler;
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingConstants.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingConstants.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,308 @@
+package com.jboss.transaction.txinterop.proxy;
+
+import javax.xml.namespace.QName;
+
+/**
+ * constants used in WS Addressing 2005/08
+ */
+public class AddressingConstants {
+ /**
+ * The Namespace.
+ */
+ public static String WSA_NAMESPACE = "http://www.w3.org/2005/08/addressing" ;
+ /**
+ * The Attribute Namespace.
+ */
+ public static String WSA_ATTRIBUTE_NAMESPACE = "" ;
+ /**
+ * The namespace prefix.
+ */
+ public static String WSA_PREFIX = "wsa" ;
+ /**
+ * The attribute namespace prefix.
+ */
+ public static String WSA_ATTRIBUTE_PREFIX = "" ;
+
+ /**
+ * The Action element.
+ */
+ public static String WSA_ELEMENT_ACTION = "Action" ;
+ /**
+ * The Action QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_ACTION = new QName(WSA_NAMESPACE, WSA_ELEMENT_ACTION, WSA_PREFIX) ;
+ /**
+ * The Endpoint Reference element.
+ */
+ public static String WSA_ELEMENT_ENDPOINT_REFERENCE = "EndpointReference" ;
+ /**
+ * The Endpoint Reference QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_ENDPOINT_REFERENCE = new QName(WSA_NAMESPACE, WSA_ELEMENT_ENDPOINT_REFERENCE, WSA_PREFIX) ;
+ /**
+ * The Fault To element.
+ */
+ public static String WSA_ELEMENT_FAULT_TO = "FaultTo" ;
+ /**
+ * The Fault To QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_FAULT_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_FAULT_TO, WSA_PREFIX) ;
+ /**
+ * The From element.
+ */
+ public static String WSA_ELEMENT_FROM = "From" ;
+ /**
+ * The From QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_FROM = new QName(WSA_NAMESPACE, WSA_ELEMENT_FROM, WSA_PREFIX) ;
+ /**
+ * The Message ID element.
+ */
+ public static String WSA_ELEMENT_MESSAGE_ID = "MessageID" ;
+ /**
+ * The Message ID QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_MESSAGE_ID = new QName(WSA_NAMESPACE, WSA_ELEMENT_MESSAGE_ID, WSA_PREFIX) ;
+ /**
+ * The Relates To element.
+ */
+ public static String WSA_ELEMENT_RELATES_TO = "RelatesTo" ;
+ /**
+ * The Relates To QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_RELATES_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_RELATES_TO, WSA_PREFIX) ;
+ /**
+ * The Reply To element.
+ */
+ public static String WSA_ELEMENT_REPLY_TO = "ReplyTo" ;
+ /**
+ * The Reply To QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_REPLY_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_REPLY_TO, WSA_PREFIX) ;
+ /**
+ * The To element.
+ */
+ public static String WSA_ELEMENT_TO = "To" ;
+ /**
+ * The To QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_TO = new QName(WSA_NAMESPACE, WSA_ELEMENT_TO, WSA_PREFIX) ;
+ /**
+ * The Address element.
+ */
+ public static String WSA_ELEMENT_ADDRESS = "Address" ;
+ /**
+ * The Address QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_ADDRESS = new QName(WSA_NAMESPACE, WSA_ELEMENT_ADDRESS, WSA_PREFIX) ;
+ /**
+ * The Reference Parameters element.
+ */
+ public static String WSA_ELEMENT_REFERENCE_PARAMETERS = "ReferenceParameters" ;
+ /**
+ * The Reference Parameters QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_REFERENCE_PARAMETERS = new QName(WSA_NAMESPACE, WSA_ELEMENT_REFERENCE_PARAMETERS, WSA_PREFIX) ;
+ /**
+ * The Metadata element.
+ */
+ public static String WSA_ELEMENT_METADATA = "Metadata" ;
+ /**
+ * The Metadata QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_METADATA = new QName(WSA_NAMESPACE, WSA_ELEMENT_METADATA, WSA_PREFIX) ;
+
+ /**
+ * The Relationship Type attribute.
+ */
+ public static String WSA_ATTRIBUTE_RELATIONSHIP_TYPE = "RelationshipType" ;
+ /**
+ * The Relationship Type QName.
+ */
+ public static QName WSA_ATTRIBUTE_QNAME_RELATIONSHIP_TYPE = new QName(WSA_ATTRIBUTE_NAMESPACE, WSA_ATTRIBUTE_RELATIONSHIP_TYPE, WSA_ATTRIBUTE_PREFIX) ;
+
+ /**
+ * The value of the Action element for faults.
+ */
+ public static String WSA_ACTION_FAULT = WSA_NAMESPACE + "/fault" ;
+ /**
+ * The value of the Action element for SOAP faults.
+ */
+ public static String WSA_ACTION_SOAP_FAULT = WSA_NAMESPACE + "/soap/fault" ;
+
+ /**
+ * The unspecified Message ID for use in relationships.
+ * KEV check
+ */
+ public static String WSA_MESSAGE_ID_UNSPECIFIED = WSA_NAMESPACE + "/unspecified" ;
+
+ /**
+ * The address URI representing an anonymous endpoint.
+ */
+ public static String WSA_ADDRESS_ANONYMOUS = WSA_NAMESPACE + "/anonymous" ;
+ /**
+ * The address URI representing the none endpoint.
+ */
+ public static String WSA_ADDRESS_NONE = WSA_NAMESPACE + "/none" ;
+
+ /**
+ * The relates to reply URI.
+ */
+ public static String WSA_RELATES_TO_REPLY = WSA_NAMESPACE + "/reply" ;
+
+ /**
+ * The Is Reference Parameter attribute.
+ */
+ public static String WSA_ATTRIBUTE_IS_REFERENCE_PARAMETER = "IsReferenceParameter" ;
+ /**
+ * The Is Reference Parameter QName.
+ */
+ public static QName WSA_ATTRIBUTE_QNAME_IS_REFERENCE_PARAMETER = new QName(WSA_NAMESPACE, WSA_ATTRIBUTE_IS_REFERENCE_PARAMETER, WSA_PREFIX) ;
+
+ /**
+ * The Fault Detail element.
+ */
+ public static String WSA_ELEMENT_FAULT_DETAIL = "FaultDetail" ;
+ /**
+ * The Fault Detail QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_FAULT_DETAIL = new QName(WSA_NAMESPACE, WSA_ELEMENT_FAULT_DETAIL, WSA_PREFIX) ;
+
+ /**
+ * The Invalid Addressing Header fault code.
+ */
+ public static String WSA_FAULT_CODE_INVALID_ADDRESSING_HEADER = "InvalidAddressingHeader" ;
+ /**
+ * The Invalid Addressing Header fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_INVALID_ADDRESSING_HEADER = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_ADDRESSING_HEADER, WSA_PREFIX) ;
+ /**
+ * The Invalid Address fault code.
+ */
+ public static String WSA_FAULT_CODE_INVALID_ADDRESS = "InvalidAddress" ;
+ /**
+ * The Invalid Address fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_INVALID_ADDRESS = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_ADDRESS, WSA_PREFIX) ;
+ /**
+ * The Invalid EPR fault code.
+ */
+ public static String WSA_FAULT_CODE_INVALID_EPR = "InvalidEPR" ;
+ /**
+ * The Invalid EPR fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_INVALID_EPR = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_EPR, WSA_PREFIX) ;
+ /**
+ * The Invalid Cardinality fault code.
+ */
+ public static String WSA_FAULT_CODE_INVALID_CARDINALITY = "InvalidCardinality" ;
+ /**
+ * The Invalid Cardinality fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_INVALID_CARDINALITY = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_INVALID_CARDINALITY, WSA_PREFIX) ;
+ /**
+ * The Missing Address In EPR fault code.
+ */
+ public static String WSA_FAULT_CODE_MISSING_ADDRESS_IN_EPR = "MissingAddressInEPR" ;
+ /**
+ * The Missing Address In EPR fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_MISSING_ADDRESS_IN_EPR = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_MISSING_ADDRESS_IN_EPR, WSA_PREFIX) ;
+ /**
+ * The Duplicate Message ID fault code.
+ */
+ public static String WSA_FAULT_CODE_DUPLICATE_MESSAGE_ID = "DuplicateMessageID" ;
+ /**
+ * The Duplicate Message ID fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_DUPLICATE_MESSAGE_ID = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_DUPLICATE_MESSAGE_ID, WSA_PREFIX) ;
+ /**
+ * The Action Mismatch fault code.
+ */
+ public static String WSA_FAULT_CODE_ACTION_MISMATCH = "ActionMismatch" ;
+ /**
+ * The Action Mismatch fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_ACTION_MISMATCH = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_ACTION_MISMATCH, WSA_PREFIX) ;
+ /**
+ * The Message Addressing Header Required fault code.
+ */
+ public static String WSA_FAULT_CODE_MESSAGING_ADDRESSING_HEADER_REQUIRED = "MessageAddressingHeaderRequired" ;
+ /**
+ * The Message Addressing Header Required fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_MESSAGING_ADDRESSING_HEADER_REQUIRED = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_MESSAGING_ADDRESSING_HEADER_REQUIRED, WSA_PREFIX) ;
+ /**
+ * The Destination Unreachable fault code.
+ */
+ public static String WSA_FAULT_CODE_DESTINATION_UNREACHABLE = "DestinationUnreachable" ;
+ /**
+ * The Destination Unreachable fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_DESTINATION_UNREACHABLE = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_DESTINATION_UNREACHABLE, WSA_PREFIX) ;
+ /**
+ * The Action Not Supported fault code.
+ */
+ public static String WSA_FAULT_CODE_ACTION_NOT_SUPPORTED = "ActionNotSupported" ;
+ /**
+ * The Action Not Supported fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_ACTION_NOT_SUPPORTED = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_ACTION_NOT_SUPPORTED, WSA_PREFIX) ;
+ /**
+ * The Endpoint Unavailable fault code.
+ */
+ public static String WSA_FAULT_CODE_ENDPOINT_UNAVAILABLE = "EndpointUnavailable" ;
+ /**
+ * The Endpoint Unavailable fault code QName.
+ */
+ public static QName WSA_FAULT_CODE_QNAME_ENDPOINT_UNAVAILABLE = new QName(WSA_NAMESPACE, WSA_FAULT_CODE_ENDPOINT_UNAVAILABLE, WSA_PREFIX) ;
+
+ /**
+ * The Problem Header element.
+ */
+ public static String WSA_ELEMENT_PROBLEM_HEADER = "ProblemHeader" ;
+ /**
+ * The Problem Header QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_PROBLEM_HEADER = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_HEADER, WSA_PREFIX) ;
+ /**
+ * The Problem Header QName element.
+ */
+ public static String WSA_ELEMENT_PROBLEM_HEADER_QNAME = "ProblemHeaderQName" ;
+ /**
+ * The Problem Header QName QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_PROBLEM_HEADER_QNAME = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_HEADER_QNAME, WSA_PREFIX) ;
+ /**
+ * The Problem IRI element.
+ */
+ public static String WSA_ELEMENT_PROBLEM_IRI = "ProblemIRI" ;
+ /**
+ * The Problem IRI QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_PROBLEM_IRI = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_IRI, WSA_PREFIX) ;
+ /**
+ * The Problem Action element.
+ */
+ public static String WSA_ELEMENT_PROBLEM_ACTION = "ProblemAction" ;
+ /**
+ * The Problem Action QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_PROBLEM_ACTION = new QName(WSA_NAMESPACE, WSA_ELEMENT_PROBLEM_ACTION, WSA_PREFIX) ;
+ /**
+ * The Soap Action element.
+ */
+ public static String WSA_ELEMENT_SOAP_ACTION = "SoapAction" ;
+ /**
+ * The Soap Action QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_SOAP_ACTION = new QName(WSA_NAMESPACE, WSA_ELEMENT_SOAP_ACTION, WSA_PREFIX) ;
+ /**
+ * The Retry After element.
+ */
+ public static String WSA_ELEMENT_RETRY_AFTER = "RetryAfter" ;
+ /**
+ * The Retry After QName.
+ */
+ public static QName WSA_ELEMENT_QNAME_RETRY_AFTER = new QName(WSA_NAMESPACE, WSA_ELEMENT_METADATA, WSA_PREFIX) ;
+}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingProxySAXHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingProxySAXHandler.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/AddressingProxySAXHandler.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -7,8 +7,8 @@
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
-import com.arjuna.webservices.wsaddr2005.AddressingConstants;
-import com.arjuna.webservices.wsjboss.JBossConstants;
+import com.jboss.transaction.txinterop.proxy.AddressingConstants;
+import com.arjuna.webservices.wsarj.ArjunaConstants;
/**
* Sax parser for rewriting the XML via the proxy.
@@ -94,7 +94,7 @@
inToElement = true ;
}
}
- else if (JBossConstants.WSJBOSS_NAMESPACE.equals(uri) && JBossConstants.WSJBOSS_ELEMENT_INSTANCE_IDENTIFIER.equals(localName)
+ else if (ArjunaConstants.WSARJ_NAMESPACE.equals(uri) && ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER.equals(localName)
&& (attributes.getValue(WSA_NAMESPACE_URI, AddressingConstants.WSA_ATTRIBUTE_IS_REFERENCE_PARAMETER) != null))
{
inIdentifierElement = true ;
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/proxy/ProxyListenerService.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -44,6 +44,14 @@
*/
public static final String SOAP_ACTION_HEADER = "SOAPAction" ;
/**
+ * The name of the Transfer encoding header.
+ */
+ public static final String TRANSFER_ENCODING_HEADER = "transfer-encoding" ;
+ /**
+ * The name of the SOAP Action header.
+ */
+ public static final String TRANSFER_ENCODING_VALUE_CHUNKED = "chunked" ;
+ /**
* The default data size.
*/
private static final int DEFAULT_DATA_SIZE = 256 ;
@@ -92,8 +100,8 @@
final WriterSAXHandler writerHandler = new WriterSAXHandler(newMessageWriter) ;
final AddressingProxySAXHandler addressingHandler = new AddressingProxySAXHandler(writerHandler, alternateConversationIdentifier) ;
- final ContentHandler stateHandler = (state == null ? null : state.getHandler(addressingHandler)) ;
- final ContentHandler parserHandler = (stateHandler == null ? addressingHandler : stateHandler) ;
+ ContentHandler stateHandler = (state == null ? null : state.getHandler(addressingHandler)) ;
+ ContentHandler parserHandler = (stateHandler == null ? addressingHandler : stateHandler) ;
final XMLReader xmlReader = XMLReaderFactory.createXMLReader() ;
xmlReader.setContentHandler(parserHandler) ;
@@ -126,9 +134,15 @@
while(headerNameEnum.hasMoreElements())
{
final String name = (String)headerNameEnum.nextElement() ;
- if (name.equals(SOAP_ACTION_HEADER))
+ if (name.equalsIgnoreCase(TRANSFER_ENCODING_HEADER))
{
- destConnection.setRequestProperty(name, soapAction) ;
+ // any messages we send are not chunked!
+ final String value = httpServletRequest.getHeader(name) ;
+ if (!value.equalsIgnoreCase(TRANSFER_ENCODING_VALUE_CHUNKED))
+ {
+ // this may actually cause a problem depending upon the encoding but try it anyway
+ destConnection.setRequestProperty(name, value) ;
+ }
}
else
{
@@ -169,11 +183,6 @@
default:
// Pass the response back.
httpServletResponse.setStatus(destConnection.getResponseCode()) ;
- final int contentLength = destConnection.getContentLength() ;
- if (contentLength >= 0)
- {
- httpServletResponse.setContentLength(contentLength) ;
- }
if (fullContentType != null)
{
httpServletResponse.setContentType(fullContentType) ;
@@ -193,40 +202,52 @@
{
is = destConnection.getInputStream() ;
}
- final InputStreamReader isr = new InputStreamReader(is) ;
- try
- {
- final StringWriter writer = new StringWriter() ;
- do
- {
- readCount = isr.read(data, 0, datasize) ;
- if (readCount > 0)
+ if (is != null) {
+ final byte[] responseBytes = getContents(is) ;
+ if (responseBytes.length > 0) {
+ try
{
- writer.write(data, 0, readCount) ;
+ final StringWriter newResponseWriter = new StringWriter() ;
+ final WriterSAXHandler responseWriterHandler = new WriterSAXHandler(newResponseWriter) ;
+ final AddressingProxySAXHandler responseAddressingHandler = new AddressingProxySAXHandler(responseWriterHandler, alternateConversationIdentifier) ;
+
+ // refetch the state handler so it gets a chance to go away
+ stateHandler = (state == null ? null : state.getHandler(responseAddressingHandler)) ;
+ parserHandler = (stateHandler == null ? responseAddressingHandler : stateHandler) ;
+
+ // always use the standard handler for replies?
+ final XMLReader responseXmlReader = XMLReaderFactory.createXMLReader() ;
+ responseXmlReader.setContentHandler(parserHandler) ;
+ responseXmlReader.parse(new InputSource(new ByteArrayInputStream(responseBytes))) ;
+
+ final StringBuffer newResponseBuffer = newResponseWriter.getBuffer() ;
+ final String newResponseString = newResponseBuffer.toString();
+
+ final String responseString = (jbossClient ? newResponseString : new String(responseBytes));
+ if ((contentType != null) && !(SOAP_11_CONTENT_TYPE.equals(contentType) ||
+ SOAP_12_CONTENT_TYPE.equals(contentType)))
+ {
+ ProxyConversation.appendConversation(conversationIdentifier, escapeContents(responseString)) ;
+ }
+ else
+ {
+ ProxyConversation.appendConversation(conversationIdentifier, responseString) ;
+ }
+ final ServletOutputStream sos = httpServletResponse.getOutputStream() ;
+ sos.print(newResponseString) ;
+ sos.flush() ;
+ httpServletResponse.setContentLength(newResponseString.length()) ;
}
- }
- while(readCount > 0) ;
- final String responseContents = writer.toString() ;
- if (responseContents.length() > 0)
- {
- if ((contentType != null) && !(SOAP_11_CONTENT_TYPE.equals(contentType) ||
- SOAP_12_CONTENT_TYPE.equals(contentType)))
+ finally
{
- ProxyConversation.appendConversation(conversationIdentifier, escapeContents(responseContents)) ;
+ is.close() ;
}
- else
- {
- ProxyConversation.appendConversation(conversationIdentifier, responseContents) ;
- }
- final ServletOutputStream sos = httpServletResponse.getOutputStream() ;
- sos.print(responseContents) ;
- sos.flush() ;
+ } else {
+ httpServletResponse.setContentLength(0) ;
}
+ } else {
+ httpServletResponse.setContentLength(0) ;
}
- finally
- {
- is.close() ;
- }
break ;
}
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/TestServlet.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/TestServlet.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/TestServlet.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -81,8 +81,8 @@
final String serviceURI = request.getParameter(TestConstants.PARAM_SERVICE_URI) ;
final String test = request.getParameter(TestConstants.PARAM_TEST) ;
final String testTimeoutValue = request.getParameter(TestConstants.PARAM_TEST_TIMEOUT) ;
- final String asyncTestValue = request.getParameter(TestConstants.PARAM_ASYNC_TEST) ;
-
+ // final String asyncTestValue = request.getParameter(TestConstants.PARAM_ASYNC_TEST) ;
+
final int serviceURILength = (serviceURI == null ? 0 : serviceURI.length()) ;
final int testLength = (test == null ? 0 : test.length()) ;
@@ -99,8 +99,9 @@
catch (final NumberFormatException nfe) {} // ignore
}
- final boolean asyncTest = (asyncTestValue != null) ;
-
+ // final boolean asyncTest = (asyncTestValue != null) ;
+ final boolean asyncTest = true ;
+
if ((serviceURILength == 0) || (testLength == 0) || !testTimeoutValid)
{
final RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/invalidParameters.html") ;
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/processor.xsl
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/processor.xsl 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/test/processor.xsl 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1 +0,0 @@
-link /home/kevin/ws-addressing/testsuite/observer/processor.xsl
\ No newline at end of file
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/CoordinationContextManager.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/CoordinationContextManager.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/CoordinationContextManager.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,59 @@
+package com.jboss.transaction.txinterop.webservices;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Helper class for passing a coordination context in a SOAP header when using JaxWS
+ */
+public class CoordinationContextManager {
+ /**
+ * The key used for the coordination context within a message exchange.
+ */
+ private static final String COORDINATION_CONTEXT_PROPERTY = "org.jboss.xts.message.context.coordination.context.property";
+
+ /**
+ * The coordination context associated with the thread.
+ */
+ private static final ThreadLocal THREAD_CONTEXT = new ThreadLocal() ;
+
+ /**
+ * Get the coordination context from the message context if present.
+ * @param messageContext The message context.
+ * @return The coordination context or null if not present.
+ */
+ public static CoordinationContextType getContext(final MessageContext messageContext)
+ {
+ return (CoordinationContextType)messageContext.get(COORDINATION_CONTEXT_PROPERTY) ;
+ }
+
+ /**
+ * Set the coordination context for the message context.
+ * @param messageContext The message context.
+ * @param coordinationContext The coordination context.
+ */
+ public static void setContext(final MessageContext messageContext, final CoordinationContextType coordinationContext)
+ {
+ messageContext.put(COORDINATION_CONTEXT_PROPERTY, coordinationContext) ;
+ messageContext.setScope(COORDINATION_CONTEXT_PROPERTY, MessageContext.Scope.APPLICATION);
+ }
+
+ /**
+ * Get the coordination context from the current thread if present.
+ * @return The coordination context or null if not present.
+ */
+ public static CoordinationContextType getThreadContext()
+ {
+ return (CoordinationContextType)THREAD_CONTEXT.get() ;
+ }
+
+ /**
+ * Set the coordination context for the current thread.
+ * @param coordinationContext The coordination context.
+ */
+ public static void setThreadContext(final CoordinationContextType coordinationContext)
+ {
+ THREAD_CONTEXT.set(coordinationContext) ;
+ }
+}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropConstants.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropConstants.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -10,9 +10,14 @@
/**
* The interop test initiator service name.
*/
- public String SERVICE_INITIATOR = "TX11ATInitiator" ;
-
+ public String SERVICE_INITIATOR = "ATInitiatorService" ;
+
/**
+ * The interop test participant service name.
+ */
+ public String SERVICE_PARTICIPANT = "ATParticipantService" ;
+
+ /**
* The interop Namespace.
*/
public String INTEROP_NAMESPACE = "http://fabrikam123.com" ;
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropUtil.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropUtil.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ATInteropUtil.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,22 +1,23 @@
package com.jboss.transaction.txinterop.webservices.atinterop;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
-import com.arjuna.webservices.wsat11.AtomicTransactionConstants;
-import com.arjuna.webservices.wsat11.processors.ParticipantProcessor;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.webservices.wsjboss.InstanceIdentifier;
-import com.arjuna.wsc.ActivationCoordinator11;
-import com.arjuna.wsc.RegistrationCoordinator11;
-import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.webservices11.wsat.AtomicTransactionConstants;
+import com.arjuna.webservices11.wsat.processors.ParticipantProcessor;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.messaging.MessageId;
import com.arjuna.wst.CompletionCoordinatorParticipant;
import com.arjuna.wst.Durable2PCParticipant;
import com.arjuna.wst.Participant;
import com.arjuna.wst.Volatile2PCParticipant;
-import com.arjuna.wst.messaging.engines.Participant11Engine;
-import com.arjuna.wst.stub.Completion11Stub;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
+import com.arjuna.wst11.stub.CompletionStub;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
/**
* Utility methods
*/
@@ -31,7 +32,7 @@
public static CoordinationContextType createCoordinationContext(final String coordinatorURI)
throws Exception
{
- return ActivationCoordinator11.createCoordinationContext(coordinatorURI, MessageId.getMessageId(), AtomicTransactionConstants.WSAT_PROTOCOL, null, null) ;
+ return ActivationCoordinator.createCoordinationContext(coordinatorURI, MessageId.getMessageId(), AtomicTransactionConstants.WSAT_PROTOCOL, null, null) ;
}
/**
@@ -43,8 +44,8 @@
public static CompletionCoordinatorParticipant registerCompletion(final CoordinationContextType context, final String id)
throws Exception
{
- final EndpointReferenceType completionCoordinator = register(context, getCompletionParticipant(id), AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION) ;
- return new Completion11Stub(id, completionCoordinator);
+ final W3CEndpointReference completionCoordinator = register(context, getCompletionParticipant(id), AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION) ;
+ return new CompletionStub(id, completionCoordinator);
}
/**
@@ -55,7 +56,7 @@
* @return The participant engine.
* @throws Exception for errors.
*/
- public static Participant11Engine registerDurable2PC(final CoordinationContextType context, final Durable2PCParticipant participant, final String id)
+ public static ParticipantEngine registerDurable2PC(final CoordinationContextType context, final Durable2PCParticipant participant, final String id)
throws Exception
{
return registerParticipant(context, participant, id, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_DURABLE_2PC) ;
@@ -69,7 +70,7 @@
* @return The participant engine.
* @throws Exception for errors.
*/
- public static Participant11Engine registerVolatile2PC(final CoordinationContextType context, final Volatile2PCParticipant participant, final String id)
+ public static ParticipantEngine registerVolatile2PC(final CoordinationContextType context, final Volatile2PCParticipant participant, final String id)
throws Exception
{
return registerParticipant(context, participant, id, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_VOLATILE_2PC) ;
@@ -84,12 +85,12 @@
* @return The participant engine.
* @throws Exception for errors.
*/
- private static Participant11Engine registerParticipant(final CoordinationContextType context, final Participant participant, final String id, final String protocol)
+ private static ParticipantEngine registerParticipant(final CoordinationContextType context, final Participant participant, final String id, final String protocol)
throws Exception
{
- final EndpointReferenceType coordinator = RegistrationCoordinator11.register(context, MessageId.getMessageId(),
+ final W3CEndpointReference coordinator = RegistrationCoordinator.register(context, MessageId.getMessageId(),
getParticipant(id), protocol) ;
- final Participant11Engine engine = new Participant11Engine(participant, id, coordinator) ;
+ final ParticipantEngine engine = new ParticipantEngine(participant, id, coordinator) ;
ParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
return engine ;
}
@@ -102,44 +103,43 @@
* @return The coordinator endpoint.
* @throws Exception for errors.
*/
- private static EndpointReferenceType register(final CoordinationContextType context, final EndpointReferenceType participant, final String protocol)
+ private static W3CEndpointReference register(final CoordinationContextType context, final W3CEndpointReference participant, final String protocol)
throws Exception
{
- return RegistrationCoordinator11.register(context, MessageId.getMessageId(), participant, protocol) ;
+ return RegistrationCoordinator.register(context, MessageId.getMessageId(), participant, protocol) ;
}
/**
- * Get the endpoint reference for completion.
+ * Get an endpoint reference for the completion initiator service.
* @param id The completion id.
* @return The endpoint reference.
*/
- private static EndpointReferenceType getCompletionParticipant(final String id)
+ private static W3CEndpointReference getCompletionParticipant(final String id)
{
- return getEndpointReference(AtomicTransactionConstants.SERVICE_COMPLETION_INITIATOR, id) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ final String serviceURI = serviceRegistry.getServiceURI(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_NAME) ;
+ final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(AtomicTransactionConstants.COMPLETION_INITIATOR_SERVICE_QNAME);
+ builder.endpointName(AtomicTransactionConstants.COMPLETION_INITIATOR_PORT_QNAME);
+ builder.address(serviceURI);
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+ return builder.build();
}
/**
- * Get the endpoint reference for a participant.
+ * Get an endpoint reference for the participant service.
* @param id The participant id.
* @return The endpoint reference.
*/
- private static EndpointReferenceType getParticipant(final String id)
+ private static W3CEndpointReference getParticipant(final String id)
{
- return getEndpointReference(AtomicTransactionConstants.SERVICE_PARTICIPANT, id) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ final String serviceURI = serviceRegistry.getServiceURI(AtomicTransactionConstants.PARTICIPANT_SERVICE_NAME) ;
+ final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(AtomicTransactionConstants.PARTICIPANT_SERVICE_QNAME);
+ builder.endpointName(AtomicTransactionConstants.PARTICIPANT_PORT_QNAME);
+ builder.address(serviceURI);
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+ return builder.build();
}
-
- /**
- * Get the endpoint reference for a service.
- * @param service The service.
- * @param id The service id.
- * @return The endpoint reference.
- */
- private static EndpointReferenceType getEndpointReference(final String service, final String id)
- {
- final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
- final String serviceURI = soapRegistry.getServiceURI(service) ;
- final EndpointReferenceType participant = new EndpointReferenceType(new AttributedURIType(serviceURI)) ;
- InstanceIdentifier.setEndpointInstanceIdentifier(participant, id) ;
- return participant ;
- }
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/AsyncParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/AsyncParticipantStub.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/AsyncParticipantStub.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -4,25 +4,21 @@
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
-import com.arjuna.webservices.soap.Soap11Details;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.wsc.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.SoapFault11;
import com.jboss.transaction.txinterop.webservices.atinterop.client.AsyncParticipantClient;
import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorCallback;
import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The participant stub.
*/
public class AsyncParticipantStub implements ParticipantStub
{
- /**
- * The SOAP 1.1 details.
- */
- private static final SoapDetails SOAP_DETAILS = new Soap11Details() ;
-
/***
* The participant stub singletong.
*/
@@ -48,14 +44,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCompletionCommit(addressingContext, SOAP_DETAILS, coordinatorURI) ;
+ AsyncParticipantClient.getClient().sendCompletionCommit(addressingProperties, coordinatorURI) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -77,14 +73,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCompletionRollback(addressingContext, SOAP_DETAILS, coordinatorURI) ;
+ AsyncParticipantClient.getClient().sendCompletionRollback(addressingProperties, coordinatorURI) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -106,14 +102,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendCommit(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -135,14 +131,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendRollback(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendRollback(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -164,14 +160,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -193,14 +189,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendReadonly(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendReadonly(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -222,14 +218,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendVolatileAndDurable(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendVolatileAndDurable(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -251,14 +247,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -280,14 +276,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -309,14 +305,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendReplayCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendReplayCommit(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -338,14 +334,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendRetryPreparedCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendRetryPreparedCommit(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -367,14 +363,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendRetryPreparedAbort(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendRetryPreparedAbort(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -396,14 +392,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendRetryCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendRetryCommit(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -425,14 +421,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -454,14 +450,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
final RequestCallback callback = new RequestCallback() ;
final ATInitiatorProcessor initiator = ATInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendLostCommitted(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendLostCommitted(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -482,11 +478,11 @@
{
if (callback.hasFailed())
{
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Callback execution failed") ;
+ throw new SoapFault11(SoapFaultType.FAULT_RECEIVER, null, "Callback execution failed") ;
}
else if (!callback.hasTriggered())
{
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Callback wasn't triggered") ;
+ throw new SoapFault11(SoapFaultType.FAULT_RECEIVER, null, "Callback wasn't triggered") ;
}
else if (!callback.isResponse())
{
@@ -510,11 +506,9 @@
/**
* A response.
- * @param response The response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void response(final TestMessageType response,
- final AddressingContext addressingContext)
+ public void response(final AddressingProperties addressingProperties)
{
this.response = true ;
}
@@ -522,9 +516,9 @@
/**
* A SOAP fault response.
* @param soapFault The SOAP fault response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+ public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties)
{
this.soapFault = soapFault ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ParticipantStub.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/ParticipantStub.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,7 +3,7 @@
import java.io.IOException;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
/**
* The interface for the participant stub.
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/SyncParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/SyncParticipantStub.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/SyncParticipantStub.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,24 +3,19 @@
import java.io.IOException;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.soap.Soap11Details;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.wsc.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
import com.jboss.transaction.txinterop.webservices.atinterop.client.SyncParticipantClient;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The participant stub.
*/
public class SyncParticipantStub implements ParticipantStub
{
/**
- * The SOAP 1.1 details.
- */
- private static final SoapDetails SOAP_DETAILS = new Soap11Details() ;
-
- /***
* The participant stub singletong.
*/
private static final ParticipantStub PARTICIPANT_STUB = new SyncParticipantStub() ;
@@ -45,9 +40,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
- SyncParticipantClient.getClient().sendCompletionCommit(addressingContext, SOAP_DETAILS, coordinatorURI) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+ SyncParticipantClient.getClient().sendCompletionCommit(addressingProperties, coordinatorURI) ;
}
/**
@@ -61,9 +56,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
- SyncParticipantClient.getClient().sendCompletionRollback(addressingContext, SOAP_DETAILS, coordinatorURI) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+ SyncParticipantClient.getClient().sendCompletionRollback(addressingProperties, coordinatorURI) ;
}
/**
@@ -77,9 +72,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
- SyncParticipantClient.getClient().sendCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+ SyncParticipantClient.getClient().sendCommit(coordinationContext, addressingProperties) ;
}
/**
@@ -93,9 +88,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
- SyncParticipantClient.getClient().sendRollback(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+ SyncParticipantClient.getClient().sendRollback(coordinationContext, addressingProperties) ;
}
/**
@@ -109,9 +104,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
- SyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+ SyncParticipantClient.getClient().sendPhase2Rollback(coordinationContext, addressingProperties) ;
}
/**
@@ -125,9 +120,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
-
- SyncParticipantClient.getClient().sendReadonly(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
+
+ SyncParticipantClient.getClient().sendReadonly(coordinationContext, addressingProperties) ;
}
/**
@@ -141,9 +136,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendVolatileAndDurable(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendVolatileAndDurable(coordinationContext, addressingProperties) ;
}
/**
@@ -157,9 +152,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendEarlyReadonly(coordinationContext, addressingProperties) ;
}
/**
@@ -173,9 +168,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendEarlyAborted(coordinationContext, addressingProperties) ;
}
/**
@@ -189,9 +184,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendReplayCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendReplayCommit(coordinationContext, addressingProperties) ;
}
/**
@@ -205,9 +200,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendRetryPreparedCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendRetryPreparedCommit(coordinationContext, addressingProperties) ;
}
/**
@@ -221,9 +216,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendRetryPreparedAbort(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendRetryPreparedAbort(coordinationContext, addressingProperties) ;
}
/**
@@ -237,9 +232,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendRetryCommit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendRetryCommit(coordinationContext, addressingProperties) ;
}
/**
@@ -253,9 +248,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendPreparedAfterTimeout(coordinationContext, addressingProperties) ;
}
/**
@@ -269,8 +264,8 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendLostCommitted(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendLostCommitted(coordinationContext, addressingProperties) ;
}
}
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/TestMessageType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/TestMessageType.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/TestMessageType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.jboss.transaction.txinterop.webservices.atinterop;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.arjuna.webservices.stax.ElementContent;
-
-/*
- * <xsd:complexType name="TestMessageType">
- * <xsd:sequence/>
- * </xsd:complexType>
- */
-/**
- * Representation of the Test Message type.
- * @author kevin
- */
-public class TestMessageType extends ElementContent
-{
- /**
- * Default constructor.
- */
- public TestMessageType()
- {
- }
-
- /**
- * Construct a register response from the input stream.
- *
- * @param in The input stream.
- * @throws XMLStreamException For errors during parsing.
- */
- public TestMessageType(final XMLStreamReader in)
- throws XMLStreamException
- {
- parse(in) ;
- }
-
- /**
- * Add the element.
- * @param in The current input stream.
- * @param elementName The qualified element name.
- */
- protected void putElement(final XMLStreamReader in,
- final QName elementName)
- throws XMLStreamException
- {
- throw new XMLStreamException("Unexpected element name: " + elementName) ;
- }
-}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/ATInteropClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,135 @@
+package com.jboss.transaction.txinterop.webservices.atinterop.client;
+
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.handler.Handler;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.net.URISyntaxException;
+
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorService;
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantService;
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorPortType;
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType;
+import com.jboss.transaction.txinterop.webservices.handlers.CoordinationContextHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Apr 17, 2008
+ * Time: 4:18:34 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ATInteropClient {
+ // TODO -- do we really need a thread local here or can we just use one service?
+ /**
+ * thread local which maintains a per thread activation service instance
+ */
+ private static ThreadLocal<InitiatorService> initiatorService = new ThreadLocal<InitiatorService>();
+
+ /**
+ * thread local which maintains a per thread activation service instance
+ */
+ private static ThreadLocal<ParticipantService> participantService = new ThreadLocal<ParticipantService>();
+
+ /**
+ * builder used to construct addressing info for calls
+ */
+ private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+ /**
+ * fetch a coordinator activation service unique to the current thread
+ * @return
+ */
+ private static synchronized InitiatorService getInitiatorService()
+ {
+ if (initiatorService.get() == null) {
+ initiatorService.set(new InitiatorService());
+ }
+ return initiatorService.get();
+ }
+
+ /**
+ * fetch a coordinator registration service unique to the current thread
+ * @return
+ */
+ private static synchronized ParticipantService getParticipantService()
+ {
+ if (participantService.get() == null) {
+ participantService.set(new ParticipantService());
+ }
+ return participantService.get();
+ }
+
+ public static InitiatorPortType getInitiatorPort(AddressingProperties addressingProperties,
+ String action)
+ {
+ // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+ InitiatorService service = getInitiatorService();
+ InitiatorPortType port = service.getPort(InitiatorPortType.class);
+ BindingProvider bindingProvider = (BindingProvider)port;
+ AttributedURI toUri = addressingProperties.getTo();
+ List<Handler> customHandlerChain = new ArrayList<Handler>();
+ /*
+ * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+ */
+ customHandlerChain.add(new WSAddressingClientHandler());
+ bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+ Map<String, Object> requestContext = bindingProvider.getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+ // jbossws should do this for us . . .
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+ requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+ try {
+ addressingProperties.setAction(builder.newURI(action));
+ } catch (URISyntaxException use) {
+ // TODO log this error
+ }
+
+ return port;
+ }
+
+ // don't think we ever need this as we get a registration port from the endpoint ref returned by
+ // the activation port request
+ public static ParticipantPortType getParticipantPort(AddressingProperties addressingProperties, String action)
+ {
+ // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+ ParticipantService service = getParticipantService();
+ ParticipantPortType port = service.getPort(ParticipantPortType.class);
+ BindingProvider bindingProvider = (BindingProvider)port;
+ AttributedURI toUri = addressingProperties.getTo();
+ List<Handler> customHandlerChain = new ArrayList<Handler>();
+ /*
+ * we need to add the coordination context handler in the case where we are passing a
+ * coordination context via a header element
+ */
+ customHandlerChain.add(new CoordinationContextHandler());
+ /*
+ * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+ */
+ customHandlerChain.add(new WSAddressingClientHandler());
+ bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+ Map<String, Object> requestContext = bindingProvider.getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+ // jbossws should do this for us . . .
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+ requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+ try {
+ addressingProperties.setAction(builder.newURI(action));
+ } catch (URISyntaxException use) {
+ // TODO log this error
+ }
+
+ return port;
+ }
+}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/AsyncParticipantClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,27 +1,20 @@
package com.jboss.transaction.txinterop.webservices.atinterop.client;
import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URI;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapBody;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.base.policy.ClientPolicy;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.stax.NamedElement;
-import com.arjuna.webservices.stax.TextElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
-import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
-import com.arjuna.webservices.wscoor11.CoordinationContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.webservices.wscoor11.policy.CoordinationContextPolicy;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.txinterop.webservices.CoordinationContextManager;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
-import com.jboss.transaction.txinterop.webservices.atinterop.TestMessageType;
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantPortType;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.EndpointReference;
+import javax.xml.ws.addressing.AddressingBuilder;
+
/**
* The participant client.
* @author kevin
@@ -32,7 +25,7 @@
* The client singleton.
*/
private static final AsyncParticipantClient CLIENT = new AsyncParticipantClient() ;
-
+
/**
* The completion commit action.
*/
@@ -93,466 +86,362 @@
* The lost committed Action.
*/
private final String lostCommittedAction = ATInteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
-
+
/**
- * The SOAP service representing the client.
- */
- private final SoapService soapService ;
- /**
* The initiator URI for replies.
*/
- private final EndpointReferenceType initiator ;
-
+ private EndpointReference initiator = null;
+
/**
* Construct the interop synch client.
*/
private AsyncParticipantClient()
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
+ //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+
// Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
+ //AddressingPolicy.register(handlerRegistry) ;
// Add coordination context
- CoordinationContextPolicy.register(handlerRegistry) ;
+ //CoordinationContextPolicy.register(handlerRegistry) ;
// Add client policies
- ClientPolicy.register(handlerRegistry) ;
-
- soapService = new SoapService(handlerRegistry) ;
- final String initiatorURI = SoapRegistry.getRegistry().getServiceURI(ATInteropConstants.SERVICE_INITIATOR) ;
- initiator = new EndpointReferenceType(new AttributedURIType(initiatorURI)) ;
- }
+ //ClientPolicy.register(handlerRegistry) ;
+ //soapService = new SoapService(handlerRegistry) ;
+ AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+ final String initiatorURIString = ServiceRegistry.getRegistry().getServiceURI(ATInteropConstants.SERVICE_INITIATOR) ;
+ URI uri = null;
+ try {
+ uri = new URI(initiatorURIString);
+ initiator = builder.newEndpointReference(uri);
+ } catch (URISyntaxException e) {
+ // TODO log error here
+ }
+ }
/**
* Send a completion commit request.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @param coordinatorURI The coordinator URI.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCompletionCommit(final AddressingContext addressingContext, final SoapDetails soapDetails, final String coordinatorURI)
+ public void sendCompletionCommit(final AddressingProperties addressingProperties, final String coordinatorURI)
throws SoapFault, IOException
{
- final TextElement completionCommit = new TextElement(coordinatorURI) ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_COMPLETION_COMMIT, completionCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(completionCommitAction) ;
- addressingContext.setAction(new AttributedURIType(completionCommitAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, completionCommitAction);
+ port.completionCommit(coordinatorURI);
}
/**
* Send a completion rollback request.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @param coordinatorURI The coordinator URI.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCompletionRollback(final AddressingContext addressingContext, final SoapDetails soapDetails, final String coordinatorURI)
+ public void sendCompletionRollback(final AddressingProperties addressingProperties, final String coordinatorURI)
throws SoapFault, IOException
{
- final TextElement completionRollback = new TextElement(coordinatorURI) ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_COMPLETION_ROLLBACK, completionRollback) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(completionRollbackAction) ;
- addressingContext.setAction(new AttributedURIType(completionRollbackAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, completionRollbackAction);
+ port.completionRollback(coordinatorURI);
}
/**
* Send a commit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType commit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_COMMIT, commit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(commitAction) ;
- addressingContext.setAction(new AttributedURIType(commitAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, commitAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.commit();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a rollback request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendRollback(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType rollback = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_ROLLBACK, rollback) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(rollbackAction) ;
- addressingContext.setAction(new AttributedURIType(rollbackAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, rollbackAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.rollback();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a phase2Rollback request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendPhase2Rollback(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendPhase2Rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType phase2Rollback = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_PHASE_2_ROLLBACK, phase2Rollback) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(phase2RollbackAction) ;
- addressingContext.setAction(new AttributedURIType(phase2RollbackAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, phase2RollbackAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.phase2Rollback();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a readonly request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendReadonly(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType readonly = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_READONLY, readonly) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(readonlyAction) ;
- addressingContext.setAction(new AttributedURIType(readonlyAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, readonlyAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.readonly();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a volatileAndDurable request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendVolatileAndDurable(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendVolatileAndDurable(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType volatileAndDurable = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_VOLATILE_AND_DURABLE, volatileAndDurable) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(volatileAndDurableAction) ;
- addressingContext.setAction(new AttributedURIType(volatileAndDurableAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, volatileAndDurableAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.volatileAndDurable();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send an earlyReadonly request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendEarlyReadonly(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendEarlyReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType earlyReadonly = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_EARLY_READONLY, earlyReadonly) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(earlyReadonlyAction) ;
- addressingContext.setAction(new AttributedURIType(earlyReadonlyAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, earlyReadonlyAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.earlyReadonly();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a earlyAborted request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendEarlyAborted(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendEarlyAborted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType earlyAborted = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_EARLY_ABORTED, earlyAborted) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(earlyAbortedAction) ;
- addressingContext.setAction(new AttributedURIType(earlyAbortedAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, earlyAbortedAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.earlyAborted();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a replayCommit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendReplayCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendReplayCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType replayCommit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_REPLAY_COMMIT, replayCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(replayCommitAction) ;
- addressingContext.setAction(new AttributedURIType(replayCommitAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, replayCommitAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.replayCommit();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a retryPreparedCommit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendRetryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRetryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType retryPreparedCommit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RETRY_PREPARED_COMMIT, retryPreparedCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(retryPreparedCommitAction) ;
- addressingContext.setAction(new AttributedURIType(retryPreparedCommitAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, retryPreparedCommitAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.retryPreparedCommit();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a retryPreparedAbort request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType retryPreparedAbort = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RETRY_PREPARED_ABORT, retryPreparedAbort) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(retryPreparedAbortAction) ;
- addressingContext.setAction(new AttributedURIType(retryPreparedAbortAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, retryPreparedAbortAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.retryPreparedAbort();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a retryCommit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
- * @throws SoapFault For any errors.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws IOException for any transport errors.
*/
- public void sendRetryCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRetryCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType retryCommit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RETRY_COMMIT, retryCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(retryCommitAction) ;
- addressingContext.setAction(new AttributedURIType(retryCommitAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, retryCommitAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.retryCommit();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a preparedAfterTimeout request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendPreparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendPreparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType preparedAfterTimeout = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_PREPARED_AFTER_TIMEOUT, preparedAfterTimeout) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(preparedAfterTimeoutAction) ;
- addressingContext.setAction(new AttributedURIType(preparedAfterTimeoutAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, preparedAfterTimeoutAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.preparedAfterTimeout();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
/**
* Send a lostCommitted request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendLostCommitted(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendLostCommitted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType lostCommitted = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_LOST_COMMITTED, lostCommitted) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(lostCommittedAction) ;
- addressingContext.setAction(new AttributedURIType(lostCommittedAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = ATInteropClient.getParticipantPort(addressingProperties, lostCommittedAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
try
{
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ port.lostCommitted();
}
finally
{
- CoordinationContext.setThreadContext(null) ;
+ CoordinationContextManager.setThreadContext(null) ;
}
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/InitiatorClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,20 +2,12 @@
import java.io.IOException;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapBody;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.base.policy.ClientPolicy;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.stax.NamedElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
-import com.jboss.transaction.txinterop.webservices.atinterop.TestMessageType;
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorPortType;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The initiator client.
* @author kevin
@@ -33,61 +25,54 @@
private final String responseAction = ATInteropConstants.INTEROP_ACTION_RESPONSE ;
/**
- * The SOAP service representing the client.
- */
- private final SoapService soapService ;
-
- /**
* Construct the interop synch client.
*/
private InitiatorClient()
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+ //final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
// Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
+ //AddressingPolicy.register(handlerRegistry) ;
// Add client policies
- ClientPolicy.register(handlerRegistry) ;
+ //ClientPolicy.register(handlerRegistry) ;
- soapService = new SoapService(handlerRegistry) ;
+ //soapService = new SoapService(handlerRegistry) ;
}
/**
* Send a response.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendResponse(final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendResponse(final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType response = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RESPONSE, response) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(responseAction) ;
- addressingContext.setAction(new AttributedURIType(responseAction)) ;
-
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ InitiatorPortType port = ATInteropClient.getInitiatorPort(addressingProperties, responseAction);
+ port.response();
}
/**
* Send a fault.
- * @param addressingContext The addressing context.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context.
* @param soapFault The SOAP fault.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendSoapFault(final AddressingContext addressingContext, final SoapDetails soapDetails, final SoapFault soapFault)
+ public void sendSoapFault(final AddressingProperties addressingProperties, final SoapFault soapFault)
throws SoapFault, IOException
{
- final String soapFaultAction = soapFault.getAction() ;
- if (soapFaultAction != null)
- {
- addressingContext.setAction(new AttributedURIType(soapFaultAction)) ;
- }
- WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
+ // TODO cannot send a soap fault using JaxWS so rethrow the soap fault for the caller to log
+ // this means an async client will get wedged but that's the interop spec's fault!
+ // the interop spec wsdl really ought to specify soap faults on the operations
+
+ //final String soapFaultAction = soapFault.getAction() ;
+ //if (soapFaultAction != null)
+ //{
+ // addressingContext.setAction(new AttributedURIType(soapFaultAction)) ;
+ //}
+ //WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
+ throw soapFault;
}
/**
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/client/SyncParticipantClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,27 +2,11 @@
import java.io.IOException;
-import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapBody;
-import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapFaultType;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.base.policy.ClientPolicy;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.stax.NamedElement;
-import com.arjuna.webservices.stax.TextElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
-import com.arjuna.webservices.wscoor11.CoordinationContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.webservices.wscoor11.policy.CoordinationContextPolicy;
+import com.arjuna.webservices.*;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
-import com.jboss.transaction.txinterop.webservices.atinterop.TestMessageType;
-import com.jboss.transaction.txinterop.webservices.atinterop.policy.ATInitiatorPolicy;
/**
* The participant client.
@@ -97,470 +81,193 @@
private final String lostCommittedAction = ATInteropConstants.INTEROP_ACTION_LOST_COMMITTED ;
/**
- * The SOAP service representing the client.
- */
- private final SoapService soapService ;
-
- /**
* Construct the interop synch client.
*/
private SyncParticipantClient()
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
- // Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
- // Add coordination context
- CoordinationContextPolicy.register(handlerRegistry) ;
- // Add the initiator policy
- ATInitiatorPolicy.register(handlerRegistry) ;
- // Add client policies
- ClientPolicy.register(handlerRegistry) ;
-
- soapService = new SoapService(handlerRegistry) ;
}
/**
* Send a completion commit request.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @param coordinatorURI The coordinator URI.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCompletionCommit(final AddressingContext addressingContext, final SoapDetails soapDetails, final String coordinatorURI)
+ public void sendCompletionCommit(final AddressingProperties addressingProperties, final String coordinatorURI)
throws SoapFault, IOException
{
- final TextElement completionCommit = new TextElement(coordinatorURI) ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_COMPLETION_COMMIT, completionCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(completionCommitAction) ;
- addressingContext.setAction(new AttributedURIType(completionCommitAction)) ;
-
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
}
/**
* Send a completion rollback request.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @param coordinatorURI The coordinator URI.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCompletionRollback(final AddressingContext addressingContext, final SoapDetails soapDetails, final String coordinatorURI)
+ public void sendCompletionRollback(final AddressingProperties addressingProperties, final String coordinatorURI)
throws SoapFault, IOException
{
- final TextElement completionRollback = new TextElement(coordinatorURI) ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_COMPLETION_ROLLBACK, completionRollback) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(completionRollbackAction) ;
- addressingContext.setAction(new AttributedURIType(completionRollbackAction)) ;
-
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
}
/**
* Send a commit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType commit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_COMMIT, commit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(commitAction) ;
- addressingContext.setAction(new AttributedURIType(commitAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a rollback request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendRollback(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType rollback = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_ROLLBACK, rollback) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(rollbackAction) ;
- addressingContext.setAction(new AttributedURIType(rollbackAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a phase2Rollback request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendPhase2Rollback(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendPhase2Rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType phase2Rollback = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_PHASE_2_ROLLBACK, phase2Rollback) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(phase2RollbackAction) ;
- addressingContext.setAction(new AttributedURIType(phase2RollbackAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a readonly request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendReadonly(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType readonly = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_READONLY, readonly) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(readonlyAction) ;
- addressingContext.setAction(new AttributedURIType(readonlyAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a volatileAndDurable request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendVolatileAndDurable(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendVolatileAndDurable(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType volatileAndDurable = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_VOLATILE_AND_DURABLE, volatileAndDurable) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(volatileAndDurableAction) ;
- addressingContext.setAction(new AttributedURIType(volatileAndDurableAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send an earlyReadonly request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendEarlyReadonly(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendEarlyReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType earlyReadonly = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_EARLY_READONLY, earlyReadonly) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(earlyReadonlyAction) ;
- addressingContext.setAction(new AttributedURIType(earlyReadonlyAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a earlyAborted request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendEarlyAborted(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendEarlyAborted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType earlyAborted = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_EARLY_ABORTED, earlyAborted) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(earlyAbortedAction) ;
- addressingContext.setAction(new AttributedURIType(earlyAbortedAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a replayCommit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendReplayCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendReplayCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType replayCommit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_REPLAY_COMMIT, replayCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(replayCommitAction) ;
- addressingContext.setAction(new AttributedURIType(replayCommitAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a retryPreparedCommit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendRetryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRetryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType retryPreparedCommit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RETRY_PREPARED_COMMIT, retryPreparedCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(retryPreparedCommitAction) ;
- addressingContext.setAction(new AttributedURIType(retryPreparedCommitAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a retryPreparedAbort request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRetryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType retryPreparedAbort = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RETRY_PREPARED_ABORT, retryPreparedAbort) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(retryPreparedAbortAction) ;
- addressingContext.setAction(new AttributedURIType(retryPreparedAbortAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a retryCommit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendRetryCommit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendRetryCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType retryCommit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_RETRY_COMMIT, retryCommit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(retryCommitAction) ;
- addressingContext.setAction(new AttributedURIType(retryCommitAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a preparedAfterTimeout request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendPreparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendPreparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType preparedAfterTimeout = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_PREPARED_AFTER_TIMEOUT, preparedAfterTimeout) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(preparedAfterTimeoutAction) ;
- addressingContext.setAction(new AttributedURIType(preparedAfterTimeoutAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a lostCommitted request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendLostCommitted(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendLostCommitted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType lostCommitted = new TestMessageType() ;
- final NamedElement contents = new NamedElement(ATInteropConstants.INTEROP_ELEMENT_QNAME_LOST_COMMITTED, lostCommitted) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(lostCommittedAction) ;
- addressingContext.setAction(new AttributedURIType(lostCommittedAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
- * Process the response.
- * @param soapBody The soap body.
- * @return The response.
- * @throws SoapFault For any errors.
- * @throws IOException for any transport errors.
- */
- private TestMessageType processResponse(final SoapBody soapBody)
- throws SoapFault, IOException
- {
- if (soapBody != null)
- {
- final NamedElement responseElement = soapBody.getContents() ;
- if (responseElement != null)
- {
- final QName responseName = responseElement.getName() ;
- if (ATInteropConstants.INTEROP_ELEMENT_QNAME_RESPONSE.equals(responseName))
- {
- try
- {
- return (TestMessageType)responseElement.getElementContent() ;
- }
- catch (final ClassCastException cce)
- {
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Expected test message response type for element: " + responseName) ;
- }
- }
- else
- {
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Unexpected response element: " + responseName) ;
- }
- }
- }
- return null ;
- }
-
- /**
* Get the Interop client singleton.
* @return The Interop client singleton.
*/
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorPortType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorPortType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorPortType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,28 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebService(name = "InitiatorPortType", targetNamespace = "http://fabrikam123.com")
+public interface InitiatorPortType {
+
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Response", action = "http://fabrikam123.com/Response")
+ @Oneway
+ @RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void response();
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorService.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/InitiatorService.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,58 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebServiceClient(name = "InitiatorService", targetNamespace = "http://fabrikam123.com", wsdlLocation = "wsdl/interopat-initiator-binding.wsdl")
+public class InitiatorService
+ extends Service
+{
+
+ private final static URL INITIATORSERVICE_WSDL_LOCATION;
+ private final static Logger logger = Logger.getLogger(com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorService.class.getName());
+
+ static {
+ URL url = null;
+ try {
+ URL baseUrl;
+ baseUrl = com.jboss.transaction.txinterop.webservices.atinterop.generated.InitiatorService.class.getResource(".");
+ url = new URL(baseUrl, "wsdl/interopat-initiator-binding.wsdl");
+ } catch (MalformedURLException e) {
+ logger.warning("Failed to create URL for the wsdl Location: 'wsdl/interopat-initiator-binding.wsdl', retrying as a local file");
+ logger.warning(e.getMessage());
+ }
+ INITIATORSERVICE_WSDL_LOCATION = url;
+ }
+
+ public InitiatorService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public InitiatorService() {
+ super(INITIATORSERVICE_WSDL_LOCATION, new QName("http://fabrikam123.com", "InitiatorService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns InitiatorPortType
+ */
+ @WebEndpoint(name = "InitiatorPortType")
+ public InitiatorPortType getInitiatorPortType() {
+ return super.getPort(new QName("http://fabrikam123.com", "InitiatorPortType"), InitiatorPortType.class);
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ObjectFactory.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ObjectFactory.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ObjectFactory.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,203 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.jboss.transaction.txinterop.webservices.atinterop.generated package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _Readonly_QNAME = new QName("http://fabrikam123.com", "Readonly");
+ private final static QName _Response_QNAME = new QName("http://fabrikam123.com", "Response");
+ private final static QName _Commit_QNAME = new QName("http://fabrikam123.com", "Commit");
+ private final static QName _VolatileAndDurable_QNAME = new QName("http://fabrikam123.com", "VolatileAndDurable");
+ private final static QName _ReplayCommit_QNAME = new QName("http://fabrikam123.com", "ReplayCommit");
+ private final static QName _PreparedAfterTimeout_QNAME = new QName("http://fabrikam123.com", "PreparedAfterTimeout");
+ private final static QName _Phase2Rollback_QNAME = new QName("http://fabrikam123.com", "Phase2Rollback");
+ private final static QName _EarlyAborted_QNAME = new QName("http://fabrikam123.com", "EarlyAborted");
+ private final static QName _EarlyReadonly_QNAME = new QName("http://fabrikam123.com", "EarlyReadonly");
+ private final static QName _Rollback_QNAME = new QName("http://fabrikam123.com", "Rollback");
+ private final static QName _CompletionCommit_QNAME = new QName("http://fabrikam123.com", "CompletionCommit");
+ private final static QName _RetryCommit_QNAME = new QName("http://fabrikam123.com", "RetryCommit");
+ private final static QName _RetryPreparedCommit_QNAME = new QName("http://fabrikam123.com", "RetryPreparedCommit");
+ private final static QName _RetryPreparedAbort_QNAME = new QName("http://fabrikam123.com", "RetryPreparedAbort");
+ private final static QName _LostCommitted_QNAME = new QName("http://fabrikam123.com", "LostCommitted");
+ private final static QName _CompletionRollback_QNAME = new QName("http://fabrikam123.com", "CompletionRollback");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.jboss.transaction.txinterop.webservices.atinterop.generated
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link TestMessageType }
+ *
+ */
+ public TestMessageType createTestMessageType() {
+ return new TestMessageType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "Readonly")
+ public JAXBElement<TestMessageType> createReadonly(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Readonly_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "Response")
+ public JAXBElement<TestMessageType> createResponse(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Response_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "Commit")
+ public JAXBElement<TestMessageType> createCommit(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Commit_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "VolatileAndDurable")
+ public JAXBElement<TestMessageType> createVolatileAndDurable(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_VolatileAndDurable_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "ReplayCommit")
+ public JAXBElement<TestMessageType> createReplayCommit(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_ReplayCommit_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "PreparedAfterTimeout")
+ public JAXBElement<TestMessageType> createPreparedAfterTimeout(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_PreparedAfterTimeout_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "Phase2Rollback")
+ public JAXBElement<TestMessageType> createPhase2Rollback(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Phase2Rollback_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "EarlyAborted")
+ public JAXBElement<TestMessageType> createEarlyAborted(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_EarlyAborted_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "EarlyReadonly")
+ public JAXBElement<TestMessageType> createEarlyReadonly(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_EarlyReadonly_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "Rollback")
+ public JAXBElement<TestMessageType> createRollback(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Rollback_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "CompletionCommit")
+ public JAXBElement<String> createCompletionCommit(String value) {
+ return new JAXBElement<String>(_CompletionCommit_QNAME, String.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "RetryCommit")
+ public JAXBElement<TestMessageType> createRetryCommit(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_RetryCommit_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "RetryPreparedCommit")
+ public JAXBElement<TestMessageType> createRetryPreparedCommit(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_RetryPreparedCommit_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "RetryPreparedAbort")
+ public JAXBElement<TestMessageType> createRetryPreparedAbort(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_RetryPreparedAbort_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "LostCommitted")
+ public JAXBElement<TestMessageType> createLostCommitted(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_LostCommitted_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com", name = "CompletionRollback")
+ public JAXBElement<String> createCompletionRollback(String value) {
+ return new JAXBElement<String>(_CompletionRollback_QNAME, String.class, null, value);
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantPortType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantPortType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantPortType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,148 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebService(name = "ParticipantPortType", targetNamespace = "http://fabrikam123.com")
+public interface ParticipantPortType {
+
+
+ /**
+ *
+ * @param parameters
+ */
+ @WebMethod(operationName = "CompletionCommit", action = "http://fabrikam123.com/CompletionCommit")
+ @Oneway
+ @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ public void completionCommit(
+ @WebParam(name = "CompletionCommit", targetNamespace = "http://fabrikam123.com", partName = "parameters")
+ String parameters);
+
+ /**
+ *
+ * @param parameters
+ */
+ @WebMethod(operationName = "CompletionRollback", action = "http://fabrikam123.com/CompletionRollback")
+ @Oneway
+ @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ public void completionRollback(
+ @WebParam(name = "CompletionRollback", targetNamespace = "http://fabrikam123.com", partName = "parameters")
+ String parameters);
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Commit", action = "http://fabrikam123.com/Commit")
+ @Oneway
+ @RequestWrapper(localName = "Commit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void commit();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Rollback", action = "http://fabrikam123.com/Rollback")
+ @Oneway
+ @RequestWrapper(localName = "Rollback", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void rollback();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Phase2Rollback", action = "http://fabrikam123.com/Phase2Rollback")
+ @Oneway
+ @RequestWrapper(localName = "Phase2Rollback", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void phase2Rollback();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Readonly", action = "http://fabrikam123.com/Readonly")
+ @Oneway
+ @RequestWrapper(localName = "Readonly", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void readonly();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "VolatileAndDurable", action = "http://fabrikam123.com/VolatileAndDurable")
+ @Oneway
+ @RequestWrapper(localName = "VolatileAndDurable", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void volatileAndDurable();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "EarlyReadonly", action = "http://fabrikam123.com/EarlyReadonly")
+ @Oneway
+ @RequestWrapper(localName = "EarlyReadonly", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void earlyReadonly();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "EarlyAborted", action = "http://fabrikam123.com/EarlyAborted")
+ @Oneway
+ @RequestWrapper(localName = "EarlyAborted", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void earlyAborted();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "ReplayCommit", action = "http://fabrikam123.com/ReplayCommit")
+ @Oneway
+ @RequestWrapper(localName = "ReplayCommit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void replayCommit();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "RetryPreparedCommit", action = "http://fabrikam123.com/RetryPreparedCommit")
+ @Oneway
+ @RequestWrapper(localName = "RetryPreparedCommit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void retryPreparedCommit();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "RetryPreparedAbort", action = "http://fabrikam123.com/RetryPreparedAbort")
+ @Oneway
+ @RequestWrapper(localName = "RetryPreparedAbort", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void retryPreparedAbort();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "RetryCommit", action = "http://fabrikam123.com/RetryCommit")
+ @Oneway
+ @RequestWrapper(localName = "RetryCommit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void retryCommit();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "PreparedAfterTimeout", action = "http://fabrikam123.com/PreparedAfterTimeout")
+ @Oneway
+ @RequestWrapper(localName = "PreparedAfterTimeout", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void preparedAfterTimeout();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "LostCommitted", action = "http://fabrikam123.com/LostCommitted")
+ @Oneway
+ @RequestWrapper(localName = "LostCommitted", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void lostCommitted();
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantService.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/ParticipantService.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,58 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebServiceClient(name = "ParticipantService", targetNamespace = "http://fabrikam123.com", wsdlLocation = "wsdl/interopat-participant-binding.wsdl")
+public class ParticipantService
+ extends Service
+{
+
+ private final static URL PARTICIPANTSERVICE_WSDL_LOCATION;
+ private final static Logger logger = Logger.getLogger(com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantService.class.getName());
+
+ static {
+ URL url = null;
+ try {
+ URL baseUrl;
+ baseUrl = com.jboss.transaction.txinterop.webservices.atinterop.generated.ParticipantService.class.getResource(".");
+ url = new URL(baseUrl, "wsdl/interopat-participant-binding.wsdl");
+ } catch (MalformedURLException e) {
+ logger.warning("Failed to create URL for the wsdl Location: 'wsdl/interopat-participant-binding.wsdl', retrying as a local file");
+ logger.warning(e.getMessage());
+ }
+ PARTICIPANTSERVICE_WSDL_LOCATION = url;
+ }
+
+ public ParticipantService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public ParticipantService() {
+ super(PARTICIPANTSERVICE_WSDL_LOCATION, new QName("http://fabrikam123.com", "ParticipantService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns ParticipantPortType
+ */
+ @WebEndpoint(name = "ParticipantPortType")
+ public ParticipantPortType getParticipantPortType() {
+ return super.getPort(new QName("http://fabrikam123.com", "ParticipantPortType"), ParticipantPortType.class);
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestMessageType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestMessageType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestMessageType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,32 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TestMessageType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TestMessageType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TestMessageType")
+public class TestMessageType {
+
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestURLMessageType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestURLMessageType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/TestURLMessageType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,62 @@
+
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TestURLMessageType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TestURLMessageType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="URL" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TestURLMessageType", propOrder = {
+ "url"
+})
+public class TestURLMessageType {
+
+ @XmlElement(name = "URL", required = true)
+ protected String url;
+
+ /**
+ * Gets the value of the url property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getURL() {
+ return url;
+ }
+
+ /**
+ * Sets the value of the url property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setURL(String value) {
+ this.url = value;
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/package-info.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/package-info.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/generated/package-info.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,2 @@
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://fabrikam123.com")
+package com.jboss.transaction.txinterop.webservices.atinterop.generated;
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/CommitFailureRecoveryDurable2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/CommitFailureRecoveryDurable2PCParticipant.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/CommitFailureRecoveryDurable2PCParticipant.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -8,7 +8,7 @@
import com.arjuna.wst.SystemException;
import com.arjuna.wst.Vote;
import com.arjuna.wst.WrongStateException;
-import com.arjuna.wst.messaging.engines.Participant11Engine;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
/**
* The durable 2PC participant which fails the first call to commit and recovers.
@@ -18,7 +18,7 @@
/**
* The participant engine.
*/
- private Participant11Engine engine ;
+ private ParticipantEngine engine ;
/**
* The set recovery flag.
*/
@@ -32,7 +32,7 @@
* Set the participant engine.
* @param engine The participant engine.
*/
- public void setEngine(final Participant11Engine engine)
+ public void setEngine(final ParticipantEngine engine)
{
this.engine = engine ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/VolatileAndDurableVolatile2PCParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/VolatileAndDurableVolatile2PCParticipant.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/participant/VolatileAndDurableVolatile2PCParticipant.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,7 +1,7 @@
package com.jboss.transaction.txinterop.webservices.atinterop.participant;
import com.arjuna.ats.arjuna.common.Uid;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.arjuna.wst.ReadOnly;
import com.arjuna.wst.SystemException;
import com.arjuna.wst.Volatile2PCParticipant;
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorCallback.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorCallback.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorCallback.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -22,9 +22,9 @@
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.jboss.transaction.txinterop.webservices.atinterop.TestMessageType;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The callback for the initiator client.
* @author kevin
@@ -33,16 +33,14 @@
{
/**
* A response.
- * @param response The response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public abstract void response(final TestMessageType response,
- final AddressingContext addressingContext) ;
+ public abstract void response(final AddressingProperties addressingProperties) ;
/**
* A SOAP fault response.
* @param soapFault The SOAP fault response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext) ;
+ public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties) ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorProcessor.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATInitiatorProcessor.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -22,15 +22,15 @@
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.processor.BaseWSAddr2005ResponseProcessor;
-import com.jboss.transaction.txinterop.webservices.atinterop.TestMessageType;
+import com.arjuna.webservices11.wsaddr.processor.BaseWSAddrResponseProcessor;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The Initiator processor.
* @author kevin
*/
-public class ATInitiatorProcessor extends BaseWSAddr2005ResponseProcessor
+public class ATInitiatorProcessor extends BaseWSAddrResponseProcessor
{
/**
* The initiator singleton.
@@ -48,30 +48,29 @@
/**
* Handle a response response.
- * @param response The response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void handleResponse(final TestMessageType response, final AddressingContext addressingContext)
+ public void handleResponse(final AddressingProperties addressingProperties)
{
handleCallbacks(new CallbackExecutorAdapter() {
public void execute(final Callback callback) {
- ((ATInitiatorCallback)callback).response(response, addressingContext) ;
+ ((ATInitiatorCallback)callback).response(addressingProperties) ;
}
- }, getIDs(addressingContext)) ;
+ }, getIDs(addressingProperties)) ;
}
/**
* Register a SOAP fault response.
* @param soapFault The SOAP fault response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void handleSoapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+ public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties)
{
handleCallbacks(new CallbackExecutorAdapter() {
public void execute(final Callback callback) {
- ((ATInitiatorCallback)callback).soapFault(soapFault, addressingContext) ;
+ ((ATInitiatorCallback)callback).soapFault(soapFault, addressingProperties) ;
}
- }, getIDs(addressingContext)) ;
+ }, getIDs(addressingProperties)) ;
}
/**
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATParticipantProcessor.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/processors/ATParticipantProcessor.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -22,13 +22,11 @@
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.stax.TextElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.arjuna.wst.CompletionCoordinatorParticipant;
-import com.arjuna.wst.messaging.engines.Participant11Engine;
+import com.arjuna.wst11.messaging.engines.ParticipantEngine;
+import com.arjuna.webservices11.SoapFault11;
import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropUtil;
-import com.jboss.transaction.txinterop.webservices.atinterop.TestMessageType;
import com.jboss.transaction.txinterop.webservices.atinterop.participant.CommitDurable2PCParticipant;
import com.jboss.transaction.txinterop.webservices.atinterop.participant.CommitFailureDurable2PCParticipant;
import com.jboss.transaction.txinterop.webservices.atinterop.participant.CommitFailureRecoveryDurable2PCParticipant;
@@ -37,6 +35,8 @@
import com.jboss.transaction.txinterop.webservices.atinterop.participant.RollbackDurable2PCParticipant;
import com.jboss.transaction.txinterop.webservices.atinterop.participant.VolatileAndDurableVolatile2PCParticipant;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The Participant processor.
* @author kevin
@@ -59,15 +59,13 @@
/**
* Execute the CompletionCommit
- * @param completionCommit The completion commit request.
- * @param addressingContext The current addressing context.
- * @return The response.
+ * @param coordinatorURI The address of the coordinator to employ
+ * @param addressingProperties The current addressing context.
* @throws SoapFault for errors during processing
*/
- public TestMessageType completionCommit(final TextElement completionCommit, final AddressingContext addressingContext)
+ public void completionCommit(final String coordinatorURI, final AddressingProperties addressingProperties)
throws SoapFault
{
- final String coordinatorURI = completionCommit.getText() ;
try
{
final CoordinationContextType context = ATInteropUtil.createCoordinationContext(coordinatorURI) ;
@@ -76,22 +74,20 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the CompletionRollback
- * @param completionRollback The completion rollback request.
- * @param addressingContext The current addressing context.
+ * @param coordinatorURI The address of the coordinator to employ.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType completionRollback(final TextElement completionRollback, final AddressingContext addressingContext)
+ public void completionRollback(final String coordinatorURI, final AddressingProperties addressingProperties)
throws SoapFault
{
- final String coordinatorURI = completionRollback.getText() ;
try
{
final CoordinationContextType context = ATInteropUtil.createCoordinationContext(coordinatorURI) ;
@@ -100,19 +96,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Commit
- * @param commit The commit request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType commit(final TestMessageType commit, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void commit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -121,19 +115,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Rollback
- * @param rollback The rollback request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType rollback(final TestMessageType rollback, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -142,19 +134,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Phase2Rollback
- * @param phase2Rollback The phase 2 rollback request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType phase2Rollback(final TestMessageType phase2Rollback, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void phase2Rollback(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -164,19 +154,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Readonly
- * @param readonly The readonly request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType readonly(final TestMessageType readonly, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void readonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -186,19 +174,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the VolatileAndDurable
- * @param volatileAndDurable The volatile and durable request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType volatileAndDurable(final TestMessageType volatileAndDurable, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void volatileAndDurable(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -207,88 +193,80 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the EarlyReadonly
- * @param earlyReadonly The early readonly request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType earlyReadonly(final TestMessageType earlyReadonly, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void earlyReadonly(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
- final Participant11Engine engine = ATInteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
+ final ParticipantEngine engine = ATInteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
ATInteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
engine.earlyReadonly() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the EarlyAborted
- * @param earlyAborted The early aborted request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType earlyAborted(final TestMessageType earlyAborted, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void earlyAborted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
- final Participant11Engine engine = ATInteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
+ final ParticipantEngine engine = ATInteropUtil.registerVolatile2PC(coordinationContext, new CommitVolatile2PCParticipant(), new Uid().toString()) ;
ATInteropUtil.registerDurable2PC(coordinationContext, new CommitDurable2PCParticipant(), new Uid().toString()) ;
engine.earlyRollback() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the ReplayCommit
- * @param replayCommit The replay commit request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType replayCommit(final TestMessageType replayCommit, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void replayCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final CommitFailureRecoveryDurable2PCParticipant participant = new CommitFailureRecoveryDurable2PCParticipant() ;
- final Participant11Engine engine = ATInteropUtil.registerDurable2PC(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantEngine engine = ATInteropUtil.registerDurable2PC(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the RetryPreparedCommit
- * @param retryPreparedCommit The retry prepared commit request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType retryPreparedCommit(final TestMessageType retryPreparedCommit, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void retryPreparedCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -298,19 +276,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the RetryPreparedAbort
- * @param retryPreparedAbort The retry prepared abort request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType retryPreparedAbort(final TestMessageType retryPreparedAbort, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void retryPreparedAbort(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -319,19 +295,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the RetryCommit
- * @param retryCommit The retry commit request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType retryCommit(final TestMessageType retryCommit, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void retryCommit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -340,19 +314,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the PreparedAfterTimeout
- * @param preparedAfterTimeout The prepared after timeout request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType preparedAfterTimeout(final TestMessageType preparedAfterTimeout, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void preparedAfterTimeout(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -362,19 +334,17 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the LostCommitted
- * @param lostCommitted The lost committed request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType lostCommitted(final TestMessageType lostCommitted, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void lostCommitted(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -383,8 +353,7 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/InitiatorPortTypeImpl.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,56 @@
+package com.jboss.transaction.txinterop.webservices.atinterop.sei;
+
+import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor;
+
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.annotation.Resource;
+
+/**
+ * Implementor class for OASIS WS-Interop 1.1 Initiator Service
+ */
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * Implementation class for WSTX 1.1 AT Interop Test Initiator service
+ */
+ at WebService(name = "InitiatorPortType",
+ targetNamespace = "http://fabrikam123.com",
+ portName = "InitiatorPortType",
+ wsdlLocation="/WEB-INF/wsdl/interopat-initiator-binding.wsdl",
+ serviceName="InitiatorService")
+// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file="initiatorhandlers.xml")
+public class InitiatorPortTypeImpl {
+
+ /**
+ * injected resource providing access to WSA addressing properties
+ */
+ @Resource
+ private WebServiceContext webServiceCtx;
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Response", action = "http://fabrikam123.com/Response")
+ @Oneway
+ @RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void response()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+ ATInitiatorProcessor.getInitiator().handleResponse(inboundAddressProperties) ;
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/sei/ParticipantPortTypeImpl.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,385 @@
+package com.jboss.transaction.txinterop.webservices.atinterop.sei;
+
+import com.jboss.transaction.txinterop.webservices.atinterop.generated.ObjectFactory;
+import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATParticipantProcessor;
+import com.jboss.transaction.txinterop.webservices.atinterop.client.InitiatorClient;
+import com.jboss.transaction.txinterop.webservices.CoordinationContextManager;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.SoapFault11;
+import com.arjuna.wsc11.messaging.MessageId;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.annotation.Resource;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import java.net.URI;
+
+
+/**
+ * Implementation class for WSTX 1.1 AT Interop Test Initiator service
+ */
+ at WebService(name = "ParticipantPortType",
+ targetNamespace = "http://fabrikam123.com",
+ portName="ParticipantPortType",
+ wsdlLocation="/WEB-INF/wsdl/interopat-participant-binding.wsdl",
+ serviceName="ParticipantService")
+// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file="participanthandlers.xml")
+public class ParticipantPortTypeImpl {
+
+ /**
+ * injected resource providing access to WSA addressing properties
+ */
+ @Resource
+ private WebServiceContext webServiceCtx;
+
+ /**
+ *
+ * @param parameters
+ */
+ @WebMethod(operationName = "CompletionCommit", action = "http://fabrikam123.com/CompletionCommit")
+ @Oneway
+ @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ public void completionCommit(
+ @WebParam(name = "CompletionCommit", targetNamespace = "http://fabrikam123.com", partName = "parameters")
+ String parameters)
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ try {
+ ATParticipantProcessor.getParticipant().completionCommit(parameters, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ * @param parameters
+ */
+ @WebMethod(operationName = "CompletionRollback", action = "http://fabrikam123.com/CompletionRollback")
+ @Oneway
+ @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
+ public void completionRollback(
+ @WebParam(name = "CompletionRollback", targetNamespace = "http://fabrikam123.com", partName = "parameters")
+ String parameters)
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ try {
+ ATParticipantProcessor.getParticipant().completionRollback(parameters, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Commit", action = "http://fabrikam123.com/Commit")
+ @Oneway
+ @RequestWrapper(localName = "Commit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void commit()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().commit(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Rollback", action = "http://fabrikam123.com/Rollback")
+ @Oneway
+ @RequestWrapper(localName = "Rollback", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void rollback()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().rollback(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Phase2Rollback", action = "http://fabrikam123.com/Phase2Rollback")
+ @Oneway
+ @RequestWrapper(localName = "Phase2Rollback", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void phase2Rollback()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().phase2Rollback(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Readonly", action = "http://fabrikam123.com/Readonly")
+ @Oneway
+ @RequestWrapper(localName = "Readonly", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void readonly()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().readonly(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "VolatileAndDurable", action = "http://fabrikam123.com/VolatileAndDurable")
+ @Oneway
+ @RequestWrapper(localName = "VolatileAndDurable", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void volatileAndDurable()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().volatileAndDurable(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "EarlyReadonly", action = "http://fabrikam123.com/EarlyReadonly")
+ @Oneway
+ @RequestWrapper(localName = "EarlyReadonly", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void earlyReadonly()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().earlyReadonly(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "EarlyAborted", action = "http://fabrikam123.com/EarlyAborted")
+ @Oneway
+ @RequestWrapper(localName = "EarlyAborted", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void earlyAborted()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().earlyAborted(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "ReplayCommit", action = "http://fabrikam123.com/ReplayCommit")
+ @Oneway
+ @RequestWrapper(localName = "ReplayCommit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void replayCommit()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().replayCommit(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "RetryPreparedCommit", action = "http://fabrikam123.com/RetryPreparedCommit")
+ @Oneway
+ @RequestWrapper(localName = "RetryPreparedCommit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void retryPreparedCommit()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().retryPreparedCommit(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "RetryPreparedAbort", action = "http://fabrikam123.com/RetryPreparedAbort")
+ @Oneway
+ @RequestWrapper(localName = "RetryPreparedAbort", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void retryPreparedAbort()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().retryPreparedAbort(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "RetryCommit", action = "http://fabrikam123.com/RetryCommit")
+ @Oneway
+ @RequestWrapper(localName = "RetryCommit", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void retryCommit()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().retryCommit(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "PreparedAfterTimeout", action = "http://fabrikam123.com/PreparedAfterTimeout")
+ @Oneway
+ @RequestWrapper(localName = "PreparedAfterTimeout", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void preparedAfterTimeout()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().preparedAfterTimeout(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "LostCommitted", action = "http://fabrikam123.com/LostCommitted")
+ @Oneway
+ @RequestWrapper(localName = "LostCommitted", targetNamespace = "http://fabrikam123.com", className = "com.jboss.transaction.txinterop.webservices.atinterop.generated.TestMessageType")
+ public void lostCommitted()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ ATParticipantProcessor.getParticipant().lostCommitted(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ * send an acknowledgement notifying a successfuly processed request
+ *
+ * @param inboundAddressProperties identifes who to reply to and what message id the response should relate to
+ */
+ private void sendResponse(AddressingProperties inboundAddressProperties)
+ {
+ AddressingProperties outboundAddressProperties = AddressingHelper.createResponseContext(inboundAddressProperties, MessageId.getMessageId());
+
+ try {
+ InitiatorClient.getClient().sendResponse(outboundAddressProperties);
+ } catch (Throwable th) {
+ URI uri = outboundAddressProperties.getTo().getURI();
+ System.out.println("com.jboss.transaction.txinterop.webservices.atinterop.sei.ParticipantPortTypeImpl_1: unable to send response to " + uri);
+ throw new ProtocolException(th);
+ }
+ }
+
+ /**
+ * send a soap fault notifying an unsuccessfuly processed request
+ *
+ * @param inboundAddressProperties identifes who to reply to and what message id the fault message should relate to
+ */
+ private void sendSoapFault(AddressingProperties inboundAddressProperties, SoapFault sf)
+ {
+ AddressingProperties outboundAddressProperties = AddressingHelper.createResponseContext(inboundAddressProperties, MessageId.getMessageId());
+
+ try {
+ InitiatorClient.getClient().sendSoapFault(outboundAddressProperties, sf);
+ } catch (Throwable th) {
+ System.out.println("com.jboss.transaction.txinterop.webservices.atinterop.sei.ParticipantPortTypeImpl_2: unable to log soap fault " + sf);
+ throw new ProtocolException(th);
+ }
+ }
+}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATInitiatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATInitiatorInitialisation.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATInitiatorInitialisation.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,14 +2,11 @@
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices11.ServiceRegistry;
import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
-import com.jboss.transaction.txinterop.webservices.atinterop.policy.ATInitiatorPolicy;
-
+
/**
* Initialise the interop initiator service.
* @author kevin
@@ -22,16 +19,12 @@
*/
public void contextInitialized(final ServletContextEvent servletContextEvent)
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
- // Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
- // Add endpoint
- ATInitiatorPolicy.register(handlerRegistry) ;
-
- final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
- soapRegistry.registerSoapService(ATInteropConstants.SERVICE_INITIATOR,
- new SoapService(handlerRegistry)) ;
+ ServletContext context = servletContextEvent.getServletContext();
+ String baseURI = context.getInitParameter("BaseURI");
+ final String uri = baseURI + "/ATInitiatorService";
+
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.registerServiceProvider(ATInteropConstants.SERVICE_INITIATOR, uri) ;
}
/**
@@ -40,5 +33,7 @@
*/
public void contextDestroyed(final ServletContextEvent servletContextEvent)
{
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.removeServiceProvider(ATInteropConstants.SERVICE_INITIATOR) ;
}
}
Copied: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATParticipantInitialisation.java (from rev 14866, labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATInitiatorInitialisation.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATParticipantInitialisation.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/atinterop/server/ATParticipantInitialisation.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,39 @@
+package com.jboss.transaction.txinterop.webservices.atinterop.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
+
+/**
+ * Initialise the interop initiator service.
+ * @author kevin
+ */
+public class ATParticipantInitialisation implements ServletContextListener
+{
+ /**
+ * The context has been initialized.
+ * @param servletContextEvent The servlet context event.
+ */
+ public void contextInitialized(final ServletContextEvent servletContextEvent)
+ {
+ ServletContext context = servletContextEvent.getServletContext();
+ String baseURI = context.getInitParameter("BaseURI");
+ final String uri = baseURI + "/ATParticipantService";
+
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.registerServiceProvider(ATInteropConstants.SERVICE_PARTICIPANT, uri) ;
+ }
+
+ /**
+ * The context is about to be destroyed.
+ * @param servletContextEvent The servlet context event.
+ */
+ public void contextDestroyed(final ServletContextEvent servletContextEvent)
+ {
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.removeServiceProvider(ATInteropConstants.SERVICE_PARTICIPANT) ;
+ }
+}
\ No newline at end of file
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/AsyncParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/AsyncParticipantStub.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/AsyncParticipantStub.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -4,25 +4,21 @@
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.SoapFaultType;
-import com.arjuna.webservices.soap.Soap11Details;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.wsc.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.webservices11.SoapFault11;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
import com.jboss.transaction.txinterop.webservices.bainterop.client.AsyncParticipantClient;
import com.jboss.transaction.txinterop.webservices.bainterop.processors.BAInitiatorCallback;
import com.jboss.transaction.txinterop.webservices.bainterop.processors.BAInitiatorProcessor;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The participant stub.
*/
public class AsyncParticipantStub implements ParticipantStub
{
- /**
- * The SOAP 1.1 details.
- */
- private static final SoapDetails SOAP_DETAILS = new Soap11Details() ;
-
/***
* The participant stub singletong.
*/
@@ -48,14 +44,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCancel(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendCancel(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -77,14 +73,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendExit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendExit(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -106,14 +102,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendFail(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendFail(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -135,14 +131,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCannotComplete(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendCannotComplete(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -164,14 +160,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendParticipantCompleteClose(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendParticipantCompleteClose(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -193,14 +189,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCoordinatorCompleteClose(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendCoordinatorCompleteClose(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -222,14 +218,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendUnsolicitedComplete(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendUnsolicitedComplete(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -251,14 +247,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCompensate(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendCompensate(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -280,14 +276,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendCompensationFail(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendCompensationFail(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -309,14 +305,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendParticipantCancelCompletedRace(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendParticipantCancelCompletedRace(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -338,14 +334,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendMessageLossAndRecovery(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendMessageLossAndRecovery(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -367,14 +363,14 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
final RequestCallback callback = new RequestCallback() ;
final BAInitiatorProcessor initiator = BAInitiatorProcessor.getInitiator() ;
initiator.registerCallback(messageId, callback) ;
try
{
- AsyncParticipantClient.getClient().sendMixedOutcome(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ AsyncParticipantClient.getClient().sendMixedOutcome(coordinationContext, addressingProperties) ;
callback.waitUntilTriggered(15000) ;
}
finally
@@ -395,11 +391,11 @@
{
if (callback.hasFailed())
{
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Callback execution failed") ;
+ throw new SoapFault11(SoapFaultType.FAULT_RECEIVER, null, "Callback execution failed") ;
}
else if (!callback.hasTriggered())
{
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Callback wasn't triggered") ;
+ throw new SoapFault11(SoapFaultType.FAULT_RECEIVER, null, "Callback wasn't triggered") ;
}
else if (!callback.isResponse())
{
@@ -423,11 +419,9 @@
/**
* A response.
- * @param response The response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void response(final TestMessageType response,
- final AddressingContext addressingContext)
+ public void response(final AddressingProperties addressingProperties)
{
this.response = true ;
}
@@ -435,9 +429,9 @@
/**
* A SOAP fault response.
* @param soapFault The SOAP fault response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void soapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+ public void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties)
{
this.soapFault = soapFault ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropConstants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropConstants.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropConstants.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -10,9 +10,14 @@
/**
* The interop test initiator service name.
*/
- public String SERVICE_INITIATOR = "TX11BAInitiator" ;
-
+ public String SERVICE_INITIATOR = "BAInitiatorService" ;
+
/**
+ * The interop test initiator service name.
+ */
+ public String SERVICE_PARTICIPANT = "BAParticipantService" ;
+
+ /**
* The interop Namespace.
*/
public String INTEROP_NAMESPACE = "http://fabrikam123.com/wsba" ;
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropUtil.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropUtil.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/BAInteropUtil.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,24 +1,26 @@
package com.jboss.transaction.txinterop.webservices.bainterop;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
-import com.arjuna.webservices.wsba11.BusinessActivityConstants;
-import com.arjuna.webservices.wsba11.processors.CoordinatorCompletionParticipantProcessor;
-import com.arjuna.webservices.wsba11.processors.ParticipantCompletionParticipantProcessor;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.webservices.wsjboss.InstanceIdentifier;
-import com.arjuna.webservices.wsjbosstx.JBossTXConstants;
-import com.arjuna.wsc.ActivationCoordinator11;
-import com.arjuna.wsc.RegistrationCoordinator11;
-import com.arjuna.wsc.messaging.MessageId;
+import com.arjuna.webservices11.wsba.BusinessActivityConstants;
+import com.arjuna.webservices11.wsba.processors.CoordinatorCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsba.processors.ParticipantCompletionParticipantProcessor;
+import com.arjuna.webservices11.wsarjtx.ArjunaTX11Constants;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.webservices11.wsarj.InstanceIdentifier;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.arjuna.webservices.wsarjtx.ArjunaTXConstants;
+import com.arjuna.wsc11.ActivationCoordinator;
+import com.arjuna.wsc11.RegistrationCoordinator;
+import com.arjuna.wsc11.messaging.MessageId;
import com.arjuna.wst.BusinessActivityTerminator;
import com.arjuna.wst.BusinessAgreementWithCoordinatorCompletionParticipant;
import com.arjuna.wst.BusinessAgreementWithParticipantCompletionParticipant;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine;
-import com.arjuna.wst.stub.BusinessActivityTerminator11Stub;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine;
+import com.arjuna.wst11.stub.BusinessActivityTerminatorStub;
+import javax.xml.ws.wsaddressing.W3CEndpointReference;
+import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
+
/**
* Utility methods
*/
@@ -58,7 +60,7 @@
private static CoordinationContextType createCoordinationContext(final String coordinatorURI, final String protocol)
throws Exception
{
- return ActivationCoordinator11.createCoordinationContext(coordinatorURI, MessageId.getMessageId(), protocol, null, null) ;
+ return ActivationCoordinator.createCoordinationContext(coordinatorURI, MessageId.getMessageId(), protocol, null, null) ;
}
/**
@@ -71,8 +73,8 @@
public static BusinessActivityTerminator registerTerminator(final CoordinationContextType context, final String id)
throws Exception
{
- final EndpointReferenceType completionCoordinator = register(context, getTerminatorParticipant(id), JBossTXConstants.WSJBOSSTX_PROTOCOL_TERMINATION) ;
- return new BusinessActivityTerminator11Stub(id, completionCoordinator);
+ final W3CEndpointReference completionCoordinator = register(context, getTerminatorParticipant(id), ArjunaTXConstants.WSARJTX_PROTOCOL_TERMINATION) ;
+ return new BusinessActivityTerminatorStub(id, completionCoordinator);
}
/**
@@ -83,13 +85,13 @@
* @return The participant engine.
* @throws Exception for errors.
*/
- public static ParticipantCompletionParticipant11Engine registerParticipantCompletion(final CoordinationContextType context,
+ public static ParticipantCompletionParticipantEngine registerParticipantCompletion(final CoordinationContextType context,
final BusinessAgreementWithParticipantCompletionParticipant participant, final String id)
throws Exception
{
- final EndpointReferenceType coordinator = RegistrationCoordinator11.register(context, MessageId.getMessageId(),
+ final W3CEndpointReference coordinator = RegistrationCoordinator.register(context, MessageId.getMessageId(),
getParticipantCompletionParticipant(id), BusinessActivityConstants.WSBA_SUB_PROTOCOL_PARTICIPANT_COMPLETION) ;
- final ParticipantCompletionParticipant11Engine engine = new ParticipantCompletionParticipant11Engine(id, coordinator, participant) ;
+ final ParticipantCompletionParticipantEngine engine = new ParticipantCompletionParticipantEngine(id, coordinator, participant) ;
ParticipantCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
return engine ;
}
@@ -102,13 +104,13 @@
* @return The participant engine.
* @throws Exception for errors.
*/
- public static CoordinatorCompletionParticipant11Engine registerCoordinatorCompletion(final CoordinationContextType context,
+ public static CoordinatorCompletionParticipantEngine registerCoordinatorCompletion(final CoordinationContextType context,
final BusinessAgreementWithCoordinatorCompletionParticipant participant, final String id)
throws Exception
{
- final EndpointReferenceType coordinator = RegistrationCoordinator11.register(context, MessageId.getMessageId(),
+ final W3CEndpointReference coordinator = RegistrationCoordinator.register(context, MessageId.getMessageId(),
getCoordinatorCompletionParticipant(id), BusinessActivityConstants.WSBA_SUB_PROTOCOL_COORDINATOR_COMPLETION) ;
- final CoordinatorCompletionParticipant11Engine engine = new CoordinatorCompletionParticipant11Engine(id, coordinator, participant) ;
+ final CoordinatorCompletionParticipantEngine engine = new CoordinatorCompletionParticipantEngine(id, coordinator, participant) ;
CoordinatorCompletionParticipantProcessor.getProcessor().activateParticipant(engine, id) ;
return engine ;
}
@@ -121,10 +123,10 @@
* @return The coordinator endpoint.
* @throws Exception for errors.
*/
- private static EndpointReferenceType register(final CoordinationContextType context, final EndpointReferenceType participant, final String protocol)
+ private static W3CEndpointReference register(final CoordinationContextType context, final W3CEndpointReference participant, final String protocol)
throws Exception
{
- return RegistrationCoordinator11.register(context, MessageId.getMessageId(), participant, protocol) ;
+ return RegistrationCoordinator.register(context, MessageId.getMessageId(), participant, protocol) ;
}
/**
@@ -132,9 +134,16 @@
* @param id The participant id.
* @return The endpoint reference.
*/
- private static EndpointReferenceType getTerminatorParticipant(final String id)
+ private static W3CEndpointReference getTerminatorParticipant(final String id)
{
- return getEndpointReference(JBossTXConstants.SERVICE_TERMINATION_PARTICIPANT, id) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ final String serviceURI = serviceRegistry.getServiceURI(ArjunaTX11Constants.TERMINATION_PARTICIPANT_SERVICE_NAME) ;
+ final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(ArjunaTX11Constants.TERMINATION_PARTICIPANT_SERVICE_QNAME);
+ builder.endpointName(ArjunaTX11Constants.TERMINATION_PARTICIPANT_PORT_QNAME);
+ builder.address(serviceURI);
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+ return builder.build();
}
/**
@@ -142,9 +151,16 @@
* @param id The participant id.
* @return The endpoint reference.
*/
- private static EndpointReferenceType getParticipantCompletionParticipant(final String id)
+ private static W3CEndpointReference getParticipantCompletionParticipant(final String id)
{
- return getEndpointReference(BusinessActivityConstants.SERVICE_PARTICIPANT_COMPLETION_PARTICIPANT, id) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ final String serviceURI = serviceRegistry.getServiceURI(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_NAME) ;
+ final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_SERVICE_QNAME);
+ builder.endpointName(BusinessActivityConstants.PARTICIPANT_COMPLETION_PARTICIPANT_PORT_QNAME);
+ builder.address(serviceURI);
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+ return builder.build();
}
/**
@@ -152,23 +168,15 @@
* @param id The participant id.
* @return The endpoint reference.
*/
- private static EndpointReferenceType getCoordinatorCompletionParticipant(final String id)
+ private static W3CEndpointReference getCoordinatorCompletionParticipant(final String id)
{
- return getEndpointReference(BusinessActivityConstants.SERVICE_COORDINATOR_COMPLETION_PARTICIPANT, id) ;
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ final String serviceURI = serviceRegistry.getServiceURI(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_NAME) ;
+ final W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
+ builder.serviceName(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_SERVICE_QNAME);
+ builder.endpointName(BusinessActivityConstants.COORDINATOR_COMPLETION_PARTICIPANT_PORT_QNAME);
+ builder.address(serviceURI);
+ InstanceIdentifier.setEndpointInstanceIdentifier(builder, id) ;
+ return builder.build();
}
-
- /**
- * Get the endpoint reference for a service.
- * @param service The service.
- * @param id The service id.
- * @return The endpoint reference.
- */
- private static EndpointReferenceType getEndpointReference(final String service, final String id)
- {
- final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
- final String serviceURI = soapRegistry.getServiceURI(service) ;
- final EndpointReferenceType participant = new EndpointReferenceType(new AttributedURIType(serviceURI)) ;
- InstanceIdentifier.setEndpointInstanceIdentifier(participant, id) ;
- return participant ;
- }
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/ParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/ParticipantStub.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/ParticipantStub.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,7 +3,7 @@
import java.io.IOException;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
/**
* The interface for the participant stub.
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/SyncParticipantStub.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/SyncParticipantStub.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/SyncParticipantStub.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,23 +3,18 @@
import java.io.IOException;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.soap.Soap11Details;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.wsc.messaging.MessageId;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wsc11.messaging.MessageId;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
import com.jboss.transaction.txinterop.webservices.bainterop.client.SyncParticipantClient;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The participant stub.
*/
public class SyncParticipantStub implements ParticipantStub
{
- /**
- * The SOAP 1.1 details.
- */
- private static final SoapDetails SOAP_DETAILS = new Soap11Details() ;
-
/***
* The participant stub singletong.
*/
@@ -45,9 +40,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendCancel(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendCancel(coordinationContext, addressingProperties) ;
}
/**
@@ -61,9 +56,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendExit(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendExit(coordinationContext, addressingProperties) ;
}
/**
@@ -77,9 +72,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendFail(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendFail(coordinationContext, addressingProperties) ;
}
/**
@@ -93,9 +88,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendCannotComplete(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendCannotComplete(coordinationContext, addressingProperties) ;
}
/**
@@ -109,9 +104,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendParticipantCompleteClose(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendParticipantCompleteClose(coordinationContext, addressingProperties) ;
}
/**
@@ -125,9 +120,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendCoordinatorCompleteClose(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendCoordinatorCompleteClose(coordinationContext, addressingProperties) ;
}
/**
@@ -141,9 +136,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendUnsolicitedComplete(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendUnsolicitedComplete(coordinationContext, addressingProperties) ;
}
/**
@@ -157,9 +152,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendCompensate(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendCompensate(coordinationContext, addressingProperties) ;
}
/**
@@ -173,9 +168,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendCompensationFail(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendCompensationFail(coordinationContext, addressingProperties) ;
}
/**
@@ -189,9 +184,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendParticipantCancelCompletedRace(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendParticipantCancelCompletedRace(coordinationContext, addressingProperties) ;
}
/**
@@ -205,9 +200,9 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendMessageLossAndRecovery(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendMessageLossAndRecovery(coordinationContext, addressingProperties) ;
}
/**
@@ -221,8 +216,8 @@
throws SoapFault, IOException
{
final String messageId = MessageId.getMessageId() ;
- final AddressingContext addressingContext = AddressingContext.createRequestContext(serviceURI, messageId) ;
+ final AddressingProperties addressingProperties = AddressingHelper.createRequestContext(serviceURI, messageId) ;
- SyncParticipantClient.getClient().sendMixedOutcome(coordinationContext, addressingContext, SOAP_DETAILS) ;
+ SyncParticipantClient.getClient().sendMixedOutcome(coordinationContext, addressingProperties) ;
}
}
Deleted: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/TestMessageType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/TestMessageType.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/TestMessageType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a full listing
- * of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU General Public License, v. 2.0.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU General Public License for more details.
- * You should have received a copy of the GNU General Public License,
- * v. 2.0 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- *
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package com.jboss.transaction.txinterop.webservices.bainterop;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import com.arjuna.webservices.stax.ElementContent;
-
-/*
- * <xsd:complexType name="TestMessageType">
- * <xsd:sequence/>
- * </xsd:complexType>
- */
-/**
- * Representation of the Test Message type.
- * @author kevin
- */
-public class TestMessageType extends ElementContent
-{
- /**
- * Default constructor.
- */
- public TestMessageType()
- {
- }
-
- /**
- * Construct a register response from the input stream.
- *
- * @param in The input stream.
- * @throws XMLStreamException For errors during parsing.
- */
- public TestMessageType(final XMLStreamReader in)
- throws XMLStreamException
- {
- parse(in) ;
- }
-
- /**
- * Add the element.
- * @param in The current input stream.
- * @param elementName The qualified element name.
- */
- protected void putElement(final XMLStreamReader in,
- final QName elementName)
- throws XMLStreamException
- {
- throw new XMLStreamException("Unexpected element name: " + elementName) ;
- }
-}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/AsyncParticipantClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,26 +1,20 @@
package com.jboss.transaction.txinterop.webservices.bainterop.client;
import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapBody;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.base.policy.ClientPolicy;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.stax.NamedElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
-import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
-import com.arjuna.webservices.wscoor11.CoordinationContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.webservices.wscoor11.policy.CoordinationContextPolicy;
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.txinterop.webservices.CoordinationContextManager;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropConstants;
-import com.jboss.transaction.txinterop.webservices.bainterop.TestMessageType;
+import com.jboss.transaction.txinterop.webservices.bainterop.generated.ParticipantPortType;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.EndpointReference;
+import javax.xml.ws.addressing.AddressingBuilder;
+
/**
* The participant client.
* @author kevin
@@ -82,391 +76,274 @@
private final String mixedOutcomeAction = BAInteropConstants.INTEROP_ACTION_MIXED_OUTCOME ;
/**
- * The SOAP service representing the client.
- */
- private final SoapService soapService ;
- /**
* The initiator URI for replies.
*/
- private final EndpointReferenceType initiator ;
+ private EndpointReference initiator = null;
/**
* Construct the interop synch client.
*/
private AsyncParticipantClient()
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+ // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
// Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
+ // AddressingPolicy.register(handlerRegistry) ;
// Add coordination context
- CoordinationContextPolicy.register(handlerRegistry) ;
+ // CoordinationContextPolicy.register(handlerRegistry) ;
// Add client policies
- ClientPolicy.register(handlerRegistry) ;
+ // ClientPolicy.register(handlerRegistry) ;
- soapService = new SoapService(handlerRegistry) ;
- final String initiatorURI = SoapRegistry.getRegistry().getServiceURI(BAInteropConstants.SERVICE_INITIATOR) ;
- initiator = new EndpointReferenceType(new AttributedURIType(initiatorURI)) ;
+ // soapService = new SoapService(handlerRegistry) ;
+ final String initiatorURIString = ServiceRegistry.getRegistry().getServiceURI(BAInteropConstants.SERVICE_INITIATOR) ;
+ AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+ URI uri = null;
+ try {
+ uri = new URI(initiatorURIString);
+ initiator = builder.newEndpointReference(uri);
+ } catch (URISyntaxException e) {
+ // TODO log error here
+ }
}
/**
* Send a cancel request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCancel(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCancel(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType cancel = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_CANCEL, cancel) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(cancelAction) ;
- addressingContext.setAction(new AttributedURIType(cancelAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, cancelAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.cancel();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a exit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendExit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendExit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType exit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_EXIT, exit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(exitAction) ;
- addressingContext.setAction(new AttributedURIType(exitAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, exitAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.exit();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a fail request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendFail(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendFail(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType fail = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_FAIL, fail) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(failAction) ;
- addressingContext.setAction(new AttributedURIType(failAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, failAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.fail();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a cannot complete request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCannotComplete(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCannotComplete(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType cannotComplete = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_CANNOT_COMPLETE, cannotComplete) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(cannotCompleteAction) ;
- addressingContext.setAction(new AttributedURIType(cannotCompleteAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, cannotCompleteAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.cannotComplete();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a participant complete close request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendParticipantCompleteClose(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendParticipantCompleteClose(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType participantCompleteClose = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_PARTICIPANT_COMPLETE_CLOSE, participantCompleteClose) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(participantCompleteCloseAction) ;
- addressingContext.setAction(new AttributedURIType(participantCompleteCloseAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, participantCompleteCloseAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.participantCompleteClose();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a coordinator complete close request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCoordinatorCompleteClose(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCoordinatorCompleteClose(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType coordinatorCompleteClose = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_COORDINATOR_COMPLETE_CLOSE, coordinatorCompleteClose) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(coordinatorCompleteCloseAction) ;
- addressingContext.setAction(new AttributedURIType(coordinatorCompleteCloseAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, coordinatorCompleteCloseAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.coordinatorCompleteClose();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a unsolicited complete request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendUnsolicitedComplete(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendUnsolicitedComplete(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType unsolicitedComplete = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_UNSOLICITED_COMPLETE, unsolicitedComplete) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(unsolicitedCompleteAction) ;
- addressingContext.setAction(new AttributedURIType(unsolicitedCompleteAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, unsolicitedCompleteAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.unsolicitedComplete();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a compensate request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCompensate(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCompensate(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType compensate = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_COMPENSATE, compensate) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(compensateAction) ;
- addressingContext.setAction(new AttributedURIType(compensateAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, compensateAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.compensate();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a compensation fail request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendCompensationFail(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCompensationFail(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType participantCompensationFail = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_COMPENSATION_FAIL, participantCompensationFail) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(participantCompensationFailAction) ;
- addressingContext.setAction(new AttributedURIType(participantCompensationFailAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, participantCompensationFailAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.compensationFail();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a participant cancel completed race request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendParticipantCancelCompletedRace(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendParticipantCancelCompletedRace(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType participantCancelCompletedRace = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_PARTICIPANT_CANCEL_COMPLETED_RACE, participantCancelCompletedRace) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(participantCancelCompletedRaceAction) ;
- addressingContext.setAction(new AttributedURIType(participantCancelCompletedRaceAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, participantCancelCompletedRaceAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.participantCancelCompletedRace();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a message loss and recovery request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendMessageLossAndRecovery(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendMessageLossAndRecovery(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType messageLossAndRecovery = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_MESSAGE_LOSS_AND_RECOVERY, messageLossAndRecovery) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(messageLossAndRecoveryAction) ;
- addressingContext.setAction(new AttributedURIType(messageLossAndRecoveryAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, messageLossAndRecoveryAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.messageLossAndRecovery();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a mixed outcome request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendMixedOutcome(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendMixedOutcome(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType mixedOutcome = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_MIXED_OUTCOME, mixedOutcome) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(mixedOutcomeAction) ;
- addressingContext.setAction(new AttributedURIType(mixedOutcomeAction)) ;
-
- addressingContext.setReplyTo(initiator) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ addressingProperties.setReplyTo(initiator) ;
+ ParticipantPortType port = BAInteropClient.getParticipantPort(addressingProperties, mixedOutcomeAction);
+ CoordinationContextManager.setThreadContext(coordinationContext) ;
+ try {
+ port.mixedOutcome();
+ } finally {
+ CoordinationContextManager.setThreadContext(null) ;
}
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/BAInteropClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/BAInteropClient.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/BAInteropClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,133 @@
+package com.jboss.transaction.txinterop.webservices.bainterop.client;
+
+import org.jboss.ws.extensions.addressing.jaxws.WSAddressingClientHandler;
+
+import javax.xml.ws.addressing.AddressingBuilder;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.AttributedURI;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.handler.Handler;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.net.URISyntaxException;
+
+import com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorService;
+import com.jboss.transaction.txinterop.webservices.bainterop.generated.ParticipantService;
+import com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorPortType;
+import com.jboss.transaction.txinterop.webservices.bainterop.generated.ParticipantPortType;
+import com.jboss.transaction.txinterop.webservices.handlers.CoordinationContextHandler;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: adinn
+ * Date: Apr 17, 2008
+ * Time: 4:18:34 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class BAInteropClient {
+ // TODO -- do we really need a thread local here or can we just use one service?
+ /**
+ * thread local which maintains a per thread activation service instance
+ */
+ private static ThreadLocal<InitiatorService> initiatorService = new ThreadLocal<InitiatorService>();
+
+ /**
+ * thread local which maintains a per thread activation service instance
+ */
+ private static ThreadLocal<ParticipantService> participantService = new ThreadLocal<ParticipantService>();
+
+ /**
+ * builder used to construct addressing info for calls
+ */
+ private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+
+ /**
+ * fetch a coordinator activation service unique to the current thread
+ * @return
+ */
+ private static synchronized InitiatorService getInitiatorService()
+ {
+ if (initiatorService.get() == null) {
+ initiatorService.set(new InitiatorService());
+ }
+ return initiatorService.get();
+ }
+
+ /**
+ * fetch a coordinator registration service unique to the current thread
+ * @return
+ */
+ private static synchronized ParticipantService getParticipantService()
+ {
+ if (participantService.get() == null) {
+ participantService.set(new ParticipantService());
+ }
+ return participantService.get();
+ }
+
+ public static InitiatorPortType getInitiatorPort(AddressingProperties addressingProperties,
+ String action)
+ {
+ // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+ InitiatorService service = getInitiatorService();
+ InitiatorPortType port = service.getPort(InitiatorPortType.class);
+ BindingProvider bindingProvider = (BindingProvider)port;
+ AttributedURI toUri = addressingProperties.getTo();
+ List<Handler> customHandlerChain = new ArrayList<Handler>();
+ /*
+ * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+ */
+ customHandlerChain.add(new WSAddressingClientHandler());
+ bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+ Map<String, Object> requestContext = bindingProvider.getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+ // jbossws should do this for us . . .
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+ requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+ try {
+ addressingProperties.setAction(builder.newURI(action));
+ } catch (URISyntaxException use) {
+ // TODO log this error
+ }
+
+ return port;
+ }
+
+ // don't think we ever need this as we get a registration port from the endpoint ref returned by
+ // the activation port request
+ public static ParticipantPortType getParticipantPort(AddressingProperties addressingProperties, String action)
+ {
+ // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
+ ParticipantService service = getParticipantService();
+ ParticipantPortType port = service.getPort(ParticipantPortType.class);
+ BindingProvider bindingProvider = (BindingProvider)port;
+ AttributedURI toUri = addressingProperties.getTo();
+ List<Handler> customHandlerChain = new ArrayList<Handler>();
+ /*
+ * we have to add the JaxWS WSAddressingClientHandler because we cannot specify the WSAddressing feature
+ */
+ customHandlerChain.add(new WSAddressingClientHandler());
+ /*
+ * we need to add the coordination context handler in the case where we are passing a
+ * coordination context via a header element
+ */
+ customHandlerChain.add(new CoordinationContextHandler());
+ bindingProvider.getBinding().setHandlerChain(customHandlerChain);
+
+ Map<String, Object> requestContext = bindingProvider.getRequestContext();
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
+ // jbossws should do this for us . . .
+ requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
+ requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri.getURI().toString());
+ try {
+ addressingProperties.setAction(builder.newURI(action));
+ } catch (URISyntaxException use) {
+ // TODO log this error
+ }
+
+ return port;
+ }
+}
\ No newline at end of file
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/InitiatorClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,20 +2,12 @@
import java.io.IOException;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapBody;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.base.policy.ClientPolicy;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.stax.NamedElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropConstants;
-import com.jboss.transaction.txinterop.webservices.bainterop.TestMessageType;
+import com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorPortType;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The initiator client.
* @author kevin
@@ -33,61 +25,54 @@
private final String responseAction = BAInteropConstants.INTEROP_ACTION_RESPONSE ;
/**
- * The SOAP service representing the client.
- */
- private final SoapService soapService ;
-
- /**
* Construct the interop synch client.
*/
private InitiatorClient()
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
+ // final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
// Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
+ // AddressingPolicy.register(handlerRegistry) ;
// Add client policies
- ClientPolicy.register(handlerRegistry) ;
+ // ClientPolicy.register(handlerRegistry) ;
- soapService = new SoapService(handlerRegistry) ;
+ // soapService = new SoapService(handlerRegistry) ;
}
/**
* Send a response.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendResponse(final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendResponse(final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType response = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_RESPONSE, response) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(responseAction) ;
- addressingContext.setAction(new AttributedURIType(responseAction)) ;
-
- WSAddr2005Client.sendOneWay(soapBody, addressingContext, soapDetails, soapService) ;
+ InitiatorPortType port = BAInteropClient.getInitiatorPort(addressingProperties, responseAction);
+ port.response();
}
/**
* Send a fault.
- * @param addressingContext The addressing context.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context.
* @param soapFault The SOAP fault.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public void sendSoapFault(final AddressingContext addressingContext, final SoapDetails soapDetails, final SoapFault soapFault)
+ public void sendSoapFault(final AddressingProperties addressingProperties, final SoapFault soapFault)
throws SoapFault, IOException
{
- final String soapFaultAction = soapFault.getAction() ;
- if (soapFaultAction != null)
- {
- addressingContext.setAction(new AttributedURIType(soapFaultAction)) ;
- }
- WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
+ // TODO cannot send a soap fault using JaxWS so rethrow the soap fault for the caller to log
+ // this means an async client will get wedged but that's the interop spec's fault!
+ // the interop spec wsdl really ought to specify soap faults on the operations
+
+ //final String soapFaultAction = soapFault.getAction() ;
+ //if (soapFaultAction != null)
+ //{
+ // addressingContext.setAction(new AttributedURIType(soapFaultAction)) ;
+ //}
+ //WSAddr2005Client.sendSoapFault(soapFault, addressingContext, soapDetails, soapService) ;
+ throw soapFault;
}
/**
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/client/SyncParticipantClient.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,28 +2,11 @@
import java.io.IOException;
-import javax.xml.namespace.QName;
+import javax.xml.ws.addressing.AddressingProperties;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapBody;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.SoapFaultType;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.base.policy.ClientPolicy;
-import com.arjuna.webservices.soap.SoapDetails;
-import com.arjuna.webservices.stax.NamedElement;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.AttributedURIType;
-import com.arjuna.webservices.wsaddr2005.EndpointReferenceType;
-import com.arjuna.webservices.wsaddr2005.client.WSAddr2005Client;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
-import com.arjuna.webservices.wscoor11.CoordinationContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.webservices.wscoor11.policy.CoordinationContextPolicy;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropConstants;
-import com.jboss.transaction.txinterop.webservices.bainterop.TestMessageType;
-import com.jboss.transaction.txinterop.webservices.bainterop.policy.BAInitiatorPolicy;
/**
* The participant client.
@@ -86,402 +69,157 @@
private final String mixedOutcomeAction = BAInteropConstants.INTEROP_ACTION_MIXED_OUTCOME ;
/**
- * The SOAP service representing the client.
- */
- private final SoapService soapService ;
-
- /**
* Construct the interop synch client.
*/
private SyncParticipantClient()
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
- // Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
- // Add coordination context
- CoordinationContextPolicy.register(handlerRegistry) ;
- // Add the initiator policy
- BAInitiatorPolicy.register(handlerRegistry) ;
- // Add client policies
- ClientPolicy.register(handlerRegistry) ;
-
- soapService = new SoapService(handlerRegistry) ;
}
/**
* Send a cancel request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCancel(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCancel(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType cancel = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_CANCEL, cancel) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(cancelAction) ;
- addressingContext.setAction(new AttributedURIType(cancelAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a exit request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendExit(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendExit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType exit = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_EXIT, exit) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(exitAction) ;
- addressingContext.setAction(new AttributedURIType(exitAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a fail request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendFail(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendFail(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType fail = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_FAIL, fail) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(failAction) ;
- addressingContext.setAction(new AttributedURIType(failAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a cannot complete request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCannotComplete(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCannotComplete(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType cannotComplete = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_CANNOT_COMPLETE, cannotComplete) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(cannotCompleteAction) ;
- addressingContext.setAction(new AttributedURIType(cannotCompleteAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a participant complete close request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendParticipantCompleteClose(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendParticipantCompleteClose(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType participantCompleteClose = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_PARTICIPANT_COMPLETE_CLOSE, participantCompleteClose) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(participantCompleteCloseAction) ;
- addressingContext.setAction(new AttributedURIType(participantCompleteCloseAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a coordinator complete close request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCoordinatorCompleteClose(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCoordinatorCompleteClose(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType coordinatorCompleteClose = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_COORDINATOR_COMPLETE_CLOSE, coordinatorCompleteClose) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(coordinatorCompleteCloseAction) ;
- addressingContext.setAction(new AttributedURIType(coordinatorCompleteCloseAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a unsolicited complete request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendUnsolicitedComplete(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendUnsolicitedComplete(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType unsolicitedComplete = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_UNSOLICITED_COMPLETE, unsolicitedComplete) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(unsolicitedCompleteAction) ;
- addressingContext.setAction(new AttributedURIType(unsolicitedCompleteAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a compensate request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCompensate(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCompensate(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType compensate = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_COMPENSATE, compensate) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(compensateAction) ;
- addressingContext.setAction(new AttributedURIType(compensateAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a compensation fail request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendCompensationFail(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendCompensationFail(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType participantCompensationFail = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_COMPENSATION_FAIL, participantCompensationFail) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(participantCompensationFailAction) ;
- addressingContext.setAction(new AttributedURIType(participantCompensationFailAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a participant cancel completed race request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendParticipantCancelCompletedRace(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendParticipantCancelCompletedRace(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType participantCancelCompletedRace = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_PARTICIPANT_CANCEL_COMPLETED_RACE, participantCancelCompletedRace) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(participantCancelCompletedRaceAction) ;
- addressingContext.setAction(new AttributedURIType(participantCancelCompletedRaceAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a message loss and recovery request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendMessageLossAndRecovery(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendMessageLossAndRecovery(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType messageLossAndRecovery = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_MESSAGE_LOSS_AND_RECOVERY, messageLossAndRecovery) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(messageLossAndRecoveryAction) ;
- addressingContext.setAction(new AttributedURIType(messageLossAndRecoveryAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
* Send a mixed outcome request.
* @param coordinationContext The coordination context.
- * @param addressingContext The addressing context initialised with to, message ID and relates to.
- * @param soapDetails The SOAP details.
+ * @param addressingProperties The addressing context initialised with to, message ID and relates to.
* @throws SoapFault For any errors.
* @throws IOException for any transport errors.
*/
- public TestMessageType sendMixedOutcome(final CoordinationContextType coordinationContext, final AddressingContext addressingContext, final SoapDetails soapDetails)
+ public void sendMixedOutcome(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault, IOException
{
- final TestMessageType mixedOutcome = new TestMessageType() ;
- final NamedElement contents = new NamedElement(BAInteropConstants.INTEROP_ELEMENT_QNAME_MIXED_OUTCOME, mixedOutcome) ;
- final SoapBody soapBody = new SoapBody(contents) ;
- soapBody.setAction(mixedOutcomeAction) ;
- addressingContext.setAction(new AttributedURIType(mixedOutcomeAction)) ;
-
- CoordinationContext.setThreadContext(coordinationContext) ;
- try
- {
- return processResponse(WSAddr2005Client.send(soapBody, addressingContext, soapDetails, soapService)) ;
- }
- finally
- {
- CoordinationContext.setThreadContext(null) ;
- }
}
/**
- * Process the response.
- * @param soapBody The soap body.
- * @return The response.
- * @throws SoapFault For any errors.
- * @throws IOException for any transport errors.
- */
- private TestMessageType processResponse(final SoapBody soapBody)
- throws SoapFault, IOException
- {
- if (soapBody != null)
- {
- final NamedElement responseElement = soapBody.getContents() ;
- if (responseElement != null)
- {
- final QName responseName = responseElement.getName() ;
- if (BAInteropConstants.INTEROP_ELEMENT_QNAME_RESPONSE.equals(responseName))
- {
- try
- {
- return (TestMessageType)responseElement.getElementContent() ;
- }
- catch (final ClassCastException cce)
- {
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Expected test message response type for element: " + responseName) ;
- }
- }
- else
- {
- throw new SoapFault(SoapFaultType.FAULT_RECEIVER, null, "Unexpected response element: " + responseName) ;
- }
- }
- }
- return null ;
- }
-
- /**
* Get the Interop client singleton.
* @return The Interop client singleton.
*/
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorPortType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorPortType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorPortType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,28 @@
+
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebService(name = "InitiatorPortType", targetNamespace = "http://fabrikam123.com/wsba")
+public interface InitiatorPortType {
+
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Response", action = "http://fabrikam123.com/wsba/Response")
+ @Oneway
+ @RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void response();
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorService.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/InitiatorService.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,58 @@
+
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebServiceClient(name = "InitiatorService", targetNamespace = "http://fabrikam123.com/wsba", wsdlLocation = "wsdl/interopba-initiator-binding.wsdl")
+public class InitiatorService
+ extends Service
+{
+
+ private final static URL INITIATORSERVICE_WSDL_LOCATION;
+ private final static Logger logger = Logger.getLogger(com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorService.class.getName());
+
+ static {
+ URL url = null;
+ try {
+ URL baseUrl;
+ baseUrl = com.jboss.transaction.txinterop.webservices.bainterop.generated.InitiatorService.class.getResource(".");
+ url = new URL(baseUrl, "wsdl/interopba-initiator-binding.wsdl");
+ } catch (MalformedURLException e) {
+ logger.warning("Failed to create URL for the wsdl Location: 'wsdl/interopba-initiator-binding.wsdl', retrying as a local file");
+ logger.warning(e.getMessage());
+ }
+ INITIATORSERVICE_WSDL_LOCATION = url;
+ }
+
+ public InitiatorService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public InitiatorService() {
+ super(INITIATORSERVICE_WSDL_LOCATION, new QName("http://fabrikam123.com/wsba", "InitiatorService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns InitiatorPortType
+ */
+ @WebEndpoint(name = "InitiatorPortType")
+ public InitiatorPortType getInitiatorPortType() {
+ return super.getPort(new QName("http://fabrikam123.com/wsba", "InitiatorPortType"), InitiatorPortType.class);
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ObjectFactory.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ObjectFactory.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ObjectFactory.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,173 @@
+
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the com.jboss.transaction.txinterop.webservices.bainterop.generated package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+ private final static QName _ParticipantCompleteClose_QNAME = new QName("http://fabrikam123.com/wsba", "ParticipantCompleteClose");
+ private final static QName _MixedOutcome_QNAME = new QName("http://fabrikam123.com/wsba", "MixedOutcome");
+ private final static QName _Response_QNAME = new QName("http://fabrikam123.com/wsba", "Response");
+ private final static QName _Fail_QNAME = new QName("http://fabrikam123.com/wsba", "Fail");
+ private final static QName _UnsolicitedComplete_QNAME = new QName("http://fabrikam123.com/wsba", "UnsolicitedComplete");
+ private final static QName _CannotComplete_QNAME = new QName("http://fabrikam123.com/wsba", "CannotComplete");
+ private final static QName _Compensate_QNAME = new QName("http://fabrikam123.com/wsba", "Compensate");
+ private final static QName _Exit_QNAME = new QName("http://fabrikam123.com/wsba", "Exit");
+ private final static QName _CoordinatorCompleteClose_QNAME = new QName("http://fabrikam123.com/wsba", "CoordinatorCompleteClose");
+ private final static QName _MessageLossAndRecovery_QNAME = new QName("http://fabrikam123.com/wsba", "MessageLossAndRecovery");
+ private final static QName _ParticipantCancelCompletedRace_QNAME = new QName("http://fabrikam123.com/wsba", "ParticipantCancelCompletedRace");
+ private final static QName _Cancel_QNAME = new QName("http://fabrikam123.com/wsba", "Cancel");
+ private final static QName _CompensationFail_QNAME = new QName("http://fabrikam123.com/wsba", "CompensationFail");
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.jboss.transaction.txinterop.webservices.bainterop.generated
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link TestMessageType }
+ *
+ */
+ public TestMessageType createTestMessageType() {
+ return new TestMessageType();
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "ParticipantCompleteClose")
+ public JAXBElement<TestMessageType> createParticipantCompleteClose(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_ParticipantCompleteClose_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "MixedOutcome")
+ public JAXBElement<TestMessageType> createMixedOutcome(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_MixedOutcome_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "Response")
+ public JAXBElement<TestMessageType> createResponse(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Response_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "Fail")
+ public JAXBElement<TestMessageType> createFail(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Fail_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "UnsolicitedComplete")
+ public JAXBElement<TestMessageType> createUnsolicitedComplete(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_UnsolicitedComplete_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "CannotComplete")
+ public JAXBElement<TestMessageType> createCannotComplete(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_CannotComplete_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "Compensate")
+ public JAXBElement<TestMessageType> createCompensate(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Compensate_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "Exit")
+ public JAXBElement<TestMessageType> createExit(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Exit_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "CoordinatorCompleteClose")
+ public JAXBElement<TestMessageType> createCoordinatorCompleteClose(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_CoordinatorCompleteClose_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "MessageLossAndRecovery")
+ public JAXBElement<TestMessageType> createMessageLossAndRecovery(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_MessageLossAndRecovery_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "ParticipantCancelCompletedRace")
+ public JAXBElement<TestMessageType> createParticipantCancelCompletedRace(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_ParticipantCancelCompletedRace_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "Cancel")
+ public JAXBElement<TestMessageType> createCancel(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_Cancel_QNAME, TestMessageType.class, null, value);
+ }
+
+ /**
+ * Create an instance of {@link JAXBElement }{@code <}{@link TestMessageType }{@code >}}
+ *
+ */
+ @XmlElementDecl(namespace = "http://fabrikam123.com/wsba", name = "CompensationFail")
+ public JAXBElement<TestMessageType> createCompensationFail(TestMessageType value) {
+ return new JAXBElement<TestMessageType>(_CompensationFail_QNAME, TestMessageType.class, null, value);
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantPortType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantPortType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantPortType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,116 @@
+
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebService(name = "ParticipantPortType", targetNamespace = "http://fabrikam123.com/wsba")
+public interface ParticipantPortType {
+
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Cancel", action = "http://fabrikam123.com/wsba/Cancel")
+ @Oneway
+ @RequestWrapper(localName = "Cancel", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void cancel();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Exit", action = "http://fabrikam123.com/wsba/Exit")
+ @Oneway
+ @RequestWrapper(localName = "Exit", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void exit();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Fail", action = "http://fabrikam123.com/wsba/Fail")
+ @Oneway
+ @RequestWrapper(localName = "Fail", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void fail();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "CannotComplete", action = "http://fabrikam123.com/wsba/CannotComplete")
+ @Oneway
+ @RequestWrapper(localName = "CannotComplete", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void cannotComplete();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "ParticipantCompleteClose", action = "http://fabrikam123.com/wsba/ParticipantCompleteClose")
+ @Oneway
+ @RequestWrapper(localName = "ParticipantCompleteClose", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void participantCompleteClose();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "CoordinatorCompleteClose", action = "http://fabrikam123.com/wsba/CoordinatorCompleteClose")
+ @Oneway
+ @RequestWrapper(localName = "CoordinatorCompleteClose", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void coordinatorCompleteClose();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "UnsolicitedComplete", action = "http://fabrikam123.com/wsba/UnsolicitedComplete")
+ @Oneway
+ @RequestWrapper(localName = "UnsolicitedComplete", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void unsolicitedComplete();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Compensate", action = "http://fabrikam123.com/wsba/Compensate")
+ @Oneway
+ @RequestWrapper(localName = "Compensate", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void compensate();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "CompensationFail", action = "http://fabrikam123.com/wsba/CompensationFail")
+ @Oneway
+ @RequestWrapper(localName = "CompensationFail", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void compensationFail();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "ParticipantCancelCompletedRace", action = "http://fabrikam123.com/wsba/ParticipantCancelCompletedRace")
+ @Oneway
+ @RequestWrapper(localName = "ParticipantCancelCompletedRace", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void participantCancelCompletedRace();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "MessageLossAndRecovery", action = "http://fabrikam123.com/wsba/MessageLossAndRecovery")
+ @Oneway
+ @RequestWrapper(localName = "MessageLossAndRecovery", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void messageLossAndRecovery();
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "MixedOutcome", action = "http://fabrikam123.com/wsba/MixedOutcome")
+ @Oneway
+ @RequestWrapper(localName = "MixedOutcome", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void mixedOutcome();
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantService.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantService.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/ParticipantService.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,58 @@
+
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.logging.Logger;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.1.2-hudson-182-RC1
+ * Generated source version: 2.0
+ *
+ */
+ at WebServiceClient(name = "ParticipantService", targetNamespace = "http://fabrikam123.com/wsba", wsdlLocation = "wsdl/interopba-participant-binding.wsdl")
+public class ParticipantService
+ extends Service
+{
+
+ private final static URL PARTICIPANTSERVICE_WSDL_LOCATION;
+ private final static Logger logger = Logger.getLogger(com.jboss.transaction.txinterop.webservices.bainterop.generated.ParticipantService.class.getName());
+
+ static {
+ URL url = null;
+ try {
+ URL baseUrl;
+ baseUrl = com.jboss.transaction.txinterop.webservices.bainterop.generated.ParticipantService.class.getResource(".");
+ url = new URL(baseUrl, "wsdl/interopba-participant-binding.wsdl");
+ } catch (MalformedURLException e) {
+ logger.warning("Failed to create URL for the wsdl Location: 'wsdl/interopba-participant-binding.wsdl', retrying as a local file");
+ logger.warning(e.getMessage());
+ }
+ PARTICIPANTSERVICE_WSDL_LOCATION = url;
+ }
+
+ public ParticipantService(URL wsdlLocation, QName serviceName) {
+ super(wsdlLocation, serviceName);
+ }
+
+ public ParticipantService() {
+ super(PARTICIPANTSERVICE_WSDL_LOCATION, new QName("http://fabrikam123.com/wsba", "ParticipantService"));
+ }
+
+ /**
+ *
+ * @return
+ * returns ParticipantPortType
+ */
+ @WebEndpoint(name = "ParticipantPortType")
+ public ParticipantPortType getParticipantPortType() {
+ return super.getPort(new QName("http://fabrikam123.com/wsba", "ParticipantPortType"), ParticipantPortType.class);
+ }
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/TestMessageType.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/TestMessageType.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/TestMessageType.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,32 @@
+
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for TestMessageType complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="TestMessageType">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * </sequence>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "TestMessageType")
+public class TestMessageType {
+
+
+}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/package-info.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/package-info.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/generated/package-info.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,2 @@
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://fabrikam123.com/wsba")
+package com.jboss.transaction.txinterop.webservices.bainterop.generated;
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CannotCompleteParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CannotCompleteParticipant.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CannotCompleteParticipant.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,13 +3,13 @@
import java.util.TimerTask;
import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine;
public class CannotCompleteParticipant extends CoordinatorCompletionParticipantAdapter
{
- private CoordinatorCompletionParticipant11Engine engine ;
+ private CoordinatorCompletionParticipantEngine engine ;
- public void setEngine(final CoordinatorCompletionParticipant11Engine engine)
+ public void setEngine(final CoordinatorCompletionParticipantEngine engine)
{
this.engine = engine ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CompletedParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CompletedParticipant.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/CompletedParticipant.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,13 +3,13 @@
import java.util.TimerTask;
import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine;
public class CompletedParticipant extends ParticipantCompletionParticipantAdapter
{
- private ParticipantCompletionParticipant11Engine engine ;
+ private ParticipantCompletionParticipantEngine engine ;
- public void setEngine(final ParticipantCompletionParticipant11Engine engine)
+ public void setEngine(final ParticipantCompletionParticipantEngine engine)
{
this.engine = engine ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/ExitParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/ExitParticipant.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/ExitParticipant.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,13 +3,13 @@
import java.util.TimerTask;
import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine;
public class ExitParticipant extends CoordinatorCompletionParticipantAdapter
{
- private CoordinatorCompletionParticipant11Engine engine ;
+ private CoordinatorCompletionParticipantEngine engine ;
- public void setEngine(final CoordinatorCompletionParticipant11Engine engine)
+ public void setEngine(final CoordinatorCompletionParticipantEngine engine)
{
this.engine = engine ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/FailParticipant.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/FailParticipant.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/participant/FailParticipant.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -3,14 +3,14 @@
import java.util.TimerTask;
import com.arjuna.webservices.util.TransportTimer;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine;
import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropConstants;
public class FailParticipant extends ParticipantCompletionParticipantAdapter
{
- private ParticipantCompletionParticipant11Engine engine ;
+ private ParticipantCompletionParticipantEngine engine ;
- public void setEngine(final ParticipantCompletionParticipant11Engine engine)
+ public void setEngine(final ParticipantCompletionParticipantEngine engine)
{
this.engine = engine ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorCallback.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorCallback.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorCallback.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -22,9 +22,9 @@
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.jboss.transaction.txinterop.webservices.bainterop.TestMessageType;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The callback for the initiator client.
* @author kevin
@@ -33,16 +33,14 @@
{
/**
* A response.
- * @param response The response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public abstract void response(final TestMessageType response,
- final AddressingContext addressingContext) ;
+ public abstract void response(final AddressingProperties addressingProperties) ;
/**
* A SOAP fault response.
* @param soapFault The SOAP fault response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public abstract void soapFault(final SoapFault soapFault, final AddressingContext addressingContext) ;
+ public abstract void soapFault(final SoapFault soapFault, final AddressingProperties addressingProperties) ;
}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorProcessor.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorProcessor.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAInitiatorProcessor.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -22,15 +22,15 @@
import com.arjuna.webservices.SoapFault;
import com.arjuna.webservices.base.processors.Callback;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wsaddr2005.processor.BaseWSAddr2005ResponseProcessor;
-import com.jboss.transaction.txinterop.webservices.bainterop.TestMessageType;
+import com.arjuna.webservices11.wsaddr.processor.BaseWSAddrResponseProcessor;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The Initiator processor.
* @author kevin
*/
-public class BAInitiatorProcessor extends BaseWSAddr2005ResponseProcessor
+public class BAInitiatorProcessor extends BaseWSAddrResponseProcessor
{
/**
* The initiator singleton.
@@ -48,30 +48,29 @@
/**
* Handle a response response.
- * @param response The response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void handleResponse(final TestMessageType response, final AddressingContext addressingContext)
+ public void handleResponse(final AddressingProperties addressingProperties)
{
handleCallbacks(new CallbackExecutorAdapter() {
public void execute(final Callback callback) {
- ((BAInitiatorCallback)callback).response(response, addressingContext) ;
+ ((BAInitiatorCallback)callback).response(addressingProperties) ;
}
- }, getIDs(addressingContext)) ;
+ }, getIDs(addressingProperties)) ;
}
/**
* Register a SOAP fault response.
* @param soapFault The SOAP fault response.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
*/
- public void handleSoapFault(final SoapFault soapFault, final AddressingContext addressingContext)
+ public void handleSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties)
{
handleCallbacks(new CallbackExecutorAdapter() {
public void execute(final Callback callback) {
- ((BAInitiatorCallback)callback).soapFault(soapFault, addressingContext) ;
+ ((BAInitiatorCallback)callback).soapFault(soapFault, addressingProperties) ;
}
- }, getIDs(addressingContext)) ;
+ }, getIDs(addressingProperties)) ;
}
/**
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAParticipantProcessor.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAParticipantProcessor.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/processors/BAParticipantProcessor.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -22,12 +22,11 @@
import com.arjuna.ats.arjuna.common.Uid;
import com.arjuna.webservices.SoapFault;
-import com.arjuna.webservices.wsaddr2005.AddressingContext;
-import com.arjuna.webservices.wscoor11.CoordinationContextType;
-import com.arjuna.wst.messaging.engines.CoordinatorCompletionParticipant11Engine;
-import com.arjuna.wst.messaging.engines.ParticipantCompletionParticipant11Engine;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import com.arjuna.wst11.messaging.engines.CoordinatorCompletionParticipantEngine;
+import com.arjuna.wst11.messaging.engines.ParticipantCompletionParticipantEngine;
+import com.arjuna.webservices11.SoapFault11;
import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropUtil;
-import com.jboss.transaction.txinterop.webservices.bainterop.TestMessageType;
import com.jboss.transaction.txinterop.webservices.bainterop.participant.CancelParticipant;
import com.jboss.transaction.txinterop.webservices.bainterop.participant.CoordinatorCompleteCloseParticipant;
import com.jboss.transaction.txinterop.webservices.bainterop.participant.DropFirstCompensateParticipant;
@@ -37,6 +36,8 @@
import com.jboss.transaction.txinterop.webservices.bainterop.participant.CompletedParticipant;
import com.jboss.transaction.txinterop.webservices.bainterop.participant.FailedCompensateParticipant;
+import javax.xml.ws.addressing.AddressingProperties;
+
/**
* The Participant processor.
* @author kevin
@@ -59,12 +60,11 @@
/**
* Execute the Cancel
- * @param cancel The cancel request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType cancel(final TestMessageType cancel, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void cancel(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -73,115 +73,105 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Exit
- * @param exit The exit request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType exit(final TestMessageType exit, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void exit(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final ExitParticipant participant = new ExitParticipant() ;
- final CoordinatorCompletionParticipant11Engine engine = BAInteropUtil.registerCoordinatorCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final CoordinatorCompletionParticipantEngine engine = BAInteropUtil.registerCoordinatorCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Fail
- * @param fail The fail request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType fail(final TestMessageType fail, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void fail(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final FailParticipant participant = new FailParticipant() ;
- final ParticipantCompletionParticipant11Engine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the CannotComplete
- * @param cannotComplete The cannot complete request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType cannotComplete(final TestMessageType cannotComplete, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void cannotComplete(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final CannotCompleteParticipant participant = new CannotCompleteParticipant() ;
- final CoordinatorCompletionParticipant11Engine engine = BAInteropUtil.registerCoordinatorCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final CoordinatorCompletionParticipantEngine engine = BAInteropUtil.registerCoordinatorCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the ParticipantCompleteClose
- * @param participantCompleteClose The participant complete close request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType participantCompleteClose(final TestMessageType participantCompleteClose, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void participantCompleteClose(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final CompletedParticipant participant = new CompletedParticipant() ;
- final ParticipantCompletionParticipant11Engine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the CoordinatorCompleteClose
- * @param coordinatorCompleteClose The coordinator complete close request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType coordinatorCompleteClose(final TestMessageType coordinatorCompleteClose, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void coordinatorCompleteClose(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -190,115 +180,105 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the UnsolicitedComplete
- * @param unsolicitedComplete The unsolicited complete request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType unsolicitedComplete(final TestMessageType unsolicitedComplete, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void unsolicitedComplete(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final CompletedParticipant participant = new CompletedParticipant() ;
- final ParticipantCompletionParticipant11Engine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the Compensate
- * @param compensate The compensate request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType compensate(final TestMessageType compensate, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void compensate(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final CompletedParticipant participant = new CompletedParticipant() ;
- final ParticipantCompletionParticipant11Engine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the ParticipantCompensationFail
- * @param participantCompensationFail The participant compensation fail request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType participantCompensationFail(final TestMessageType participantCompensationFail, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void participantCompensationFail(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final FailedCompensateParticipant participant = new FailedCompensateParticipant() ;
- final ParticipantCompletionParticipant11Engine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the ParticipantCancelCompletedRace
- * @param participantCancelCompletedRace The participant cancel completed race request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType participantCancelCompletedRace(final TestMessageType participantCancelCompletedRace, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void participantCancelCompletedRace(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
{
final CompletedParticipant participant = new CompletedParticipant() ;
- final ParticipantCompletionParticipant11Engine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
+ final ParticipantCompletionParticipantEngine engine = BAInteropUtil.registerParticipantCompletion(coordinationContext, participant, new Uid().toString()) ;
participant.setEngine(engine) ;
participant.initialiseTimeout() ;
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the MessageLossAndRecovery
- * @param messageLossAndRecovery The message loss and recovery request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType messageLossAndRecovery(final TestMessageType messageLossAndRecovery, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void messageLossAndRecovery(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
try
@@ -307,21 +287,18 @@
}
catch (final Throwable th)
{
- throw new SoapFault(th) ;
+ throw new SoapFault11(th) ;
}
- return new TestMessageType() ;
}
/**
* Execute the MixedOutcome
- * @param mixedOutcome The mixed outcome request.
- * @param addressingContext The current addressing context.
+ * @param addressingProperties The current addressing context.
* @return The response.
* @throws SoapFault for errors during processing
*/
- public TestMessageType mixedOutcome(final TestMessageType mixedOutcome, final CoordinationContextType coordinationContext, final AddressingContext addressingContext)
+ public void mixedOutcome(final CoordinationContextType coordinationContext, final AddressingProperties addressingProperties)
throws SoapFault
{
- return new TestMessageType() ;
}
}
\ No newline at end of file
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/InitiatorPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/InitiatorPortTypeImpl.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/InitiatorPortTypeImpl.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,57 @@
+package com.jboss.transaction.txinterop.webservices.bainterop.sei;
+
+import com.jboss.transaction.txinterop.webservices.atinterop.processors.ATInitiatorProcessor;
+import com.jboss.transaction.txinterop.webservices.bainterop.processors.BAInitiatorProcessor;
+
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.annotation.Resource;
+
+/**
+ * Implementor class for OASIS WS-Interop 1.1 Initiator Service
+ */
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+
+
+/**
+ * Implementation class for WSTX 1.1 AT Interop Test Initiator service
+ */
+ at WebService(name = "InitiatorPortType",
+ targetNamespace = "http://fabrikam123.com/wsba",
+ portName = "InitiatorPortType",
+ wsdlLocation="/WEB-INF/wsdl/interopba-initiator-binding.wsdl",
+ serviceName="InitiatorService")
+// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file="initiatorhandlers.xml")
+public class InitiatorPortTypeImpl {
+
+ /**
+ * injected resource providing access to WSA addressing properties
+ */
+ @Resource
+ private WebServiceContext webServiceCtx;
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Response", action = "http://fabrikam123.com/wsba/Response")
+ @Oneway
+ @RequestWrapper(localName = "Response", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void response()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+
+ BAInitiatorProcessor.getInitiator().handleResponse(inboundAddressProperties) ;
+ }
+
+}
\ No newline at end of file
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/ParticipantPortTypeImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/ParticipantPortTypeImpl.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/sei/ParticipantPortTypeImpl.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,319 @@
+package com.jboss.transaction.txinterop.webservices.bainterop.sei;
+
+import com.jboss.transaction.txinterop.webservices.bainterop.client.InitiatorClient;
+import com.jboss.transaction.txinterop.webservices.bainterop.processors.BAParticipantProcessor;
+import com.jboss.transaction.txinterop.webservices.CoordinationContextManager;
+import com.arjuna.webservices.SoapFault;
+import com.arjuna.webservices11.wsaddr.AddressingHelper;
+import com.arjuna.webservices11.SoapFault11;
+import com.arjuna.wsc11.messaging.MessageId;
+
+import javax.jws.*;
+import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.ProtocolException;
+import javax.xml.ws.addressing.AddressingProperties;
+import javax.xml.ws.addressing.JAXWSAConstants;
+import javax.xml.ws.handler.MessageContext;
+import javax.annotation.Resource;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext;
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+
+import java.net.URI;
+
+
+/**
+ * Implementation class for WSTX 1.1 AT Interop Test Initiator service
+ */
+ at WebService(name = "ParticipantPortType",
+ targetNamespace = "http://fabrikam123.com/wsba",
+ portName="ParticipantPortType",
+ wsdlLocation="/WEB-INF/wsdl/interopba-participant-binding.wsdl",
+ serviceName="ParticipantService")
+// @EndpointConfig(configName = "Standard WSAddressing Endpoint")
+ at HandlerChain(file="participanthandlers.xml")
+public class ParticipantPortTypeImpl {
+
+ /**
+ * injected resource providing access to WSA addressing properties
+ */
+ @Resource
+ private WebServiceContext webServiceCtx;
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Cancel", action = "http://fabrikam123.com/wsba/Cancel")
+ @Oneway
+ @RequestWrapper(localName = "Cancel", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void cancel()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().cancel(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Exit", action = "http://fabrikam123.com/wsba/Exit")
+ @Oneway
+ @RequestWrapper(localName = "Exit", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void exit()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().exit(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Fail", action = "http://fabrikam123.com/wsba/Fail")
+ @Oneway
+ @RequestWrapper(localName = "Fail", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void fail()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().fail(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "CannotComplete", action = "http://fabrikam123.com/wsba/CannotComplete")
+ @Oneway
+ @RequestWrapper(localName = "CannotComplete", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void cannotComplete()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().cannotComplete(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "ParticipantCompleteClose", action = "http://fabrikam123.com/wsba/ParticipantCompleteClose")
+ @Oneway
+ @RequestWrapper(localName = "ParticipantCompleteClose", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void participantCompleteClose()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().participantCompleteClose(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "CoordinatorCompleteClose", action = "http://fabrikam123.com/wsba/CoordinatorCompleteClose")
+ @Oneway
+ @RequestWrapper(localName = "CoordinatorCompleteClose", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void coordinatorCompleteClose()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().coordinatorCompleteClose(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "UnsolicitedComplete", action = "http://fabrikam123.com/wsba/UnsolicitedComplete")
+ @Oneway
+ @RequestWrapper(localName = "UnsolicitedComplete", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void unsolicitedComplete()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().unsolicitedComplete(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "Compensate", action = "http://fabrikam123.com/wsba/Compensate")
+ @Oneway
+ @RequestWrapper(localName = "Compensate", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void compensate()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().compensate(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "CompensationFail", action = "http://fabrikam123.com/wsba/CompensationFail")
+ @Oneway
+ @RequestWrapper(localName = "CompensationFail", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void compensationFail()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().participantCompensationFail(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "ParticipantCancelCompletedRace", action = "http://fabrikam123.com/wsba/ParticipantCancelCompletedRace")
+ @Oneway
+ @RequestWrapper(localName = "ParticipantCancelCompletedRace", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void participantCancelCompletedRace()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().participantCancelCompletedRace(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "MessageLossAndRecovery", action = "http://fabrikam123.com/wsba/MessageLossAndRecovery")
+ @Oneway
+ @RequestWrapper(localName = "MessageLossAndRecovery", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void messageLossAndRecovery()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().messageLossAndRecovery(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ *
+ */
+ @WebMethod(operationName = "MixedOutcome", action = "http://fabrikam123.com/wsba/MixedOutcome")
+ @Oneway
+ @RequestWrapper(localName = "MixedOutcome", targetNamespace = "http://fabrikam123.com/wsba", className = "com.jboss.transaction.txinterop.webservices.bainterop.generated.TestMessageType")
+ public void mixedOutcome()
+ {
+ MessageContext ctx = webServiceCtx.getMessageContext();
+ AddressingProperties inboundAddressProperties = (AddressingProperties)ctx.get(JAXWSAConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
+ CoordinationContextType coordinationContext = CoordinationContextManager.getContext(ctx);
+ try {
+ BAParticipantProcessor.getParticipant().mixedOutcome(coordinationContext, inboundAddressProperties);
+ } catch (SoapFault sf) {
+ sendSoapFault(inboundAddressProperties, sf);
+ return;
+ }
+ sendResponse(inboundAddressProperties);
+ }
+
+ /**
+ * send an acknowledgement notifying a successfuly processed request
+ *
+ * @param inboundAddressProperties identifes who to reply to and what message id the response should relate to
+ */
+ private void sendResponse(AddressingProperties inboundAddressProperties)
+ {
+ AddressingProperties outboundAddressProperties = AddressingHelper.createResponseContext(inboundAddressProperties, MessageId.getMessageId());
+
+ try {
+ InitiatorClient.getClient().sendResponse(outboundAddressProperties);
+ } catch (Throwable th) {
+ URI uri = outboundAddressProperties.getTo().getURI();
+ System.out.println("com.jboss.transaction.txinterop.webservices.bainterop.sei.ParticipantPortTypeImpl_1: unable to send response to " + uri);
+ throw new ProtocolException(th);
+ }
+ }
+
+ /**
+ * send a soap fault notifying an unsuccessfuly processed request
+ *
+ * @param inboundAddressProperties identifes who to reply to and what message id the fault message should relate to
+ */
+ private void sendSoapFault(AddressingProperties inboundAddressProperties, SoapFault sf)
+ {
+ AddressingProperties outboundAddressProperties = AddressingHelper.createResponseContext(inboundAddressProperties, MessageId.getMessageId());
+
+ try {
+ InitiatorClient.getClient().sendSoapFault(outboundAddressProperties, sf);
+ } catch (Throwable th) {
+ System.out.println("com.jboss.transaction.txinterop.webservices.bainterop.sei.ParticipantPortTypeImpl_2: unable to log soap fault " + sf);
+ throw new ProtocolException(th);
+ }
+ }
+}
\ No newline at end of file
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAInitiatorInitialisation.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAInitiatorInitialisation.java 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAInitiatorInitialisation.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,13 +2,10 @@
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
-import com.arjuna.webservices.HandlerRegistry;
-import com.arjuna.webservices.SoapRegistry;
-import com.arjuna.webservices.SoapService;
-import com.arjuna.webservices.wsaddr2005.policy.AddressingPolicy;
+import com.arjuna.webservices11.ServiceRegistry;
import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropConstants;
-import com.jboss.transaction.txinterop.webservices.bainterop.policy.BAInitiatorPolicy;
/**
* Initialise the interop initiator service.
@@ -22,16 +19,12 @@
*/
public void contextInitialized(final ServletContextEvent servletContextEvent)
{
- final HandlerRegistry handlerRegistry = new HandlerRegistry() ;
-
- // Add WS-Addressing
- AddressingPolicy.register(handlerRegistry) ;
- // Add endpoint
- BAInitiatorPolicy.register(handlerRegistry) ;
-
- final SoapRegistry soapRegistry = SoapRegistry.getRegistry() ;
- soapRegistry.registerSoapService(BAInteropConstants.SERVICE_INITIATOR,
- new SoapService(handlerRegistry)) ;
+ ServletContext context = servletContextEvent.getServletContext();
+ String baseURI = context.getInitParameter("BaseURI");
+ final String uri = baseURI + "/BAInitiatorService";
+
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.registerServiceProvider(BAInteropConstants.SERVICE_INITIATOR, uri) ;
}
/**
@@ -40,5 +33,7 @@
*/
public void contextDestroyed(final ServletContextEvent servletContextEvent)
{
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.removeServiceProvider(BAInteropConstants.SERVICE_INITIATOR); ;
}
}
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAParticipantInitialisation.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAParticipantInitialisation.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/bainterop/server/BAParticipantInitialisation.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,40 @@
+package com.jboss.transaction.txinterop.webservices.bainterop.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContext;
+
+import com.arjuna.webservices11.ServiceRegistry;
+import com.jboss.transaction.txinterop.webservices.atinterop.ATInteropConstants;
+import com.jboss.transaction.txinterop.webservices.bainterop.BAInteropConstants;
+
+/**
+ * Initialise the interop initiator service.
+ * @author kevin
+ */
+public class BAParticipantInitialisation implements ServletContextListener
+{
+ /**
+ * The context has been initialized.
+ * @param servletContextEvent The servlet context event.
+ */
+ public void contextInitialized(final ServletContextEvent servletContextEvent)
+ {
+ ServletContext context = servletContextEvent.getServletContext();
+ String baseURI = context.getInitParameter("BaseURI");
+ final String uri = baseURI + "/BAParticipantService";
+
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.registerServiceProvider(BAInteropConstants.SERVICE_PARTICIPANT, uri) ;
+ }
+
+ /**
+ * The context is about to be destroyed.
+ * @param servletContextEvent The servlet context event.
+ */
+ public void contextDestroyed(final ServletContextEvent servletContextEvent)
+ {
+ final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
+ serviceRegistry.removeServiceProvider(ATInteropConstants.SERVICE_PARTICIPANT) ;
+ }
+}
\ No newline at end of file
Added: labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/handlers/CoordinationContextHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/handlers/CoordinationContextHandler.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/src/com/jboss/transaction/txinterop/webservices/handlers/CoordinationContextHandler.java 2008-04-23 16:42:53 UTC (rev 19700)
@@ -0,0 +1,204 @@
+package com.jboss.transaction.txinterop.webservices.handlers;
+
+import com.arjuna.webservices11.wscoor.CoordinationConstants;
+import com.jboss.transaction.txinterop.webservices.CoordinationContextManager;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.ProtocolException;
+import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPEnvelope;
+import javax.xml.soap.SOAPHeader;
+import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import java.util.Set;
+import java.util.Iterator;
+import java.util.Collections;
+import java.util.Map;
+
+import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType;
+import org.w3c.dom.Node;
+
+/**
+ * Handler to serialise and deserialise a coordination context to/from a SOAP header.
+ */
+public class CoordinationContextHandler implements SOAPHandler<SOAPMessageContext> {
+ /**
+ * Gets the header blocks that can be processed by this Handler
+ * instance.
+ *
+ * @return Set of QNames of header blocks processed by this
+ * handler instance. <code>QName</code> is the qualified
+ * name of the outermost element of the Header block.
+ */
+ public Set<QName> getHeaders()
+ {
+ return headers;
+ }
+
+ /**
+ * Handle an outgoing message by inserting any current arjuna context attached to the context into the message
+ * headers and handle an incoming message by retrieving the context from the headers and attaching it to the
+ * context,
+ *
+ * @param context the message context.
+ * @return Always return true
+ * @throws RuntimeException Causes the JAX-WS runtime to cease
+ * handler processing and generate a fault.
+ * @throws javax.xml.ws.ProtocolException Causes the JAX-WS runtime to switch to
+ * fault message processing.
+ */
+ public boolean handleMessage(SOAPMessageContext context) throws ProtocolException
+ {
+ final boolean outbound = (Boolean)context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
+ if (outbound) {
+ return handleMessageOutbound(context);
+ } else {
+ return handlemessageInbound(context);
+ }
+ }
+
+ /**
+ * check for an arjuna context attached to the message context and, if found, install its identifier as the value
+ * of a soap message header element
+ * @param context
+ * @return
+ * @throws ProtocolException
+ */
+ protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException
+ {
+ try {
+ CoordinationContextType coordinationContext = CoordinationContextManager.getThreadContext();
+ if (coordinationContext != null) {
+ final JAXBContext jaxbCtx = getJaxbContext();
+
+ // insert a header into the current message containing the coordination context
+ final SOAPMessage soapMessage = context.getMessage();
+ final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+ SOAPHeader soapHeader = soapEnvelope.getHeader() ;
+ if (soapHeader == null)
+ {
+ soapHeader = soapEnvelope.addHeader() ;
+ }
+ /*
+ * this does not work but it is what we want!!
+ *
+ * The problem here is that the marshaller creates plain old elements and inserts them top
+ * down as it goes along. but the soap header add child method checks its argument and
+ * replaces plain elements with soap header elements before inserting them. it copies the
+ * inserted element substructure into the rpelacement but since it does not exist at
+ * copy time the chiuldren get lost
+ Marshaller marshaller = jaxbCtx.createMarshaller();
+ marshaller.marshal(coordinationContext, soapHeader);
+ */
+ /*
+ * ok, here's the workaround -- marshall the object as a child of a dummy header, detach it and
+ * then insert it as a header element.
+ */
+ SOAPHeaderElement headerElement = soapHeader.addHeaderElement(getDummyQName());
+ Marshaller marshaller = jaxbCtx.createMarshaller();
+ marshaller.marshal(coordinationContext, headerElement);
+ soapHeader.replaceChild(headerElement.getChildNodes().item(0), headerElement);
+ // ok, now we need to locate the inserted node and set the mustunderstand attribute
+ Iterator<SOAPHeaderElement> iterator = soapHeader.examineAllHeaderElements();
+ while (iterator.hasNext()) {
+ headerElement = iterator.next();
+ if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME.equals(headerElement.getElementQName())) {
+ headerElement.setMustUnderstand(true);
+ break;
+ }
+ }
+ }
+ } catch (Exception se) {
+ throw new ProtocolException(se);
+ }
+
+ return true;
+ }
+
+ /**
+ * check for an arjuna instance identifier element embedded in the soap message headesr and, if found, use it to
+ * label an arjuna context attached to the message context
+ * @param context
+ * @return
+ * @throws ProtocolException
+ */
+ private boolean handlemessageInbound(SOAPMessageContext context) throws ProtocolException
+ {
+ try {
+ final SOAPMessage soapMessage = context.getMessage();
+ final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
+ Iterator<SOAPHeaderElement> iterator = soapEnvelope.getHeader().examineAllHeaderElements();
+ while (iterator.hasNext()) {
+ final SOAPHeaderElement headerElement = iterator.next();
+ if (CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME.equals(headerElement.getElementQName())) {
+ // found it - clear the must understand flag, retrieve the value and store an arjuna
+ // context in the message context
+ headerElement.setMustUnderstand(false);
+ final JAXBContext jaxbCtx = getJaxbContext();
+ final JAXBElement<CoordinationContextType> elt = jaxbCtx.createUnmarshaller().unmarshal(headerElement, CoordinationContextType.class);
+ final CoordinationContextType coordinationContext = elt.getValue();
+ CoordinationContextManager.setContext(context, coordinationContext);
+ }
+ }
+ } catch (Exception se) {
+ throw new ProtocolException(se);
+ }
+
+ return true;
+ }
+
+ /**
+ * this handler ignores faults but allows other handlers to deal with them
+ *
+ * @param context the message context
+ * @return true to allow fault handling to continue
+ */
+
+ public boolean handleFault(SOAPMessageContext context)
+ {
+ return true;
+ }
+
+ /**
+ * this hanlder ignores close messages
+ *
+ * @param context the message context
+ */
+ public void close(javax.xml.ws.handler.MessageContext context)
+ {
+ }
+
+ /**
+ * a singleton set containing the only header this handler is interested in
+ */
+ private static Set<QName> headers = Collections.singleton(CoordinationConstants.WSCOOR_ELEMENT_COORDINATION_CONTEXT_QNAME);
+
+ private static JAXBContext jaxbContext;
+ private synchronized JAXBContext getJaxbContext()
+ {
+ if (jaxbContext == null) {
+ try {
+ jaxbContext = JAXBContext.newInstance("org.oasis_open.docs.ws_tx.wscoor._2006._06");
+ } catch (JAXBException e) {
+ // TODO log error here
+ }
+ }
+
+ return jaxbContext;
+ }
+ private static QName dummyQName = null;
+ private synchronized QName getDummyQName()
+ {
+ if (dummyQName == null) {
+ dummyQName = new QName("http://transactions.jboss.com/xts/dummy/", "DummyElement", "dummy");
+ }
+
+ return dummyQName;
+ }
+}
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/web/index.jsp
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/web/index.jsp 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/web/index.jsp 2008-04-23 16:42:53 UTC (rev 19700)
@@ -2,12 +2,12 @@
pageEncoding="UTF-8"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Map"%>
-<%@page import="com.arjuna.webservices.SoapRegistry"%>
+<%@page import="com.arjuna.webservices11.ServiceRegistry"%>
<%@page import="com.jboss.transaction.txinterop.test.TestConstants"%>
<%@page import="com.jboss.transaction.txinterop.webservices.InteropConstants"%>
<%!
-private final static String SERVICE_URI = SoapRegistry.getRegistry().getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;%>
+private final static String SERVICE_URI = ServiceRegistry.getRegistry().getServiceURI(InteropConstants.SERVICE_PARTICIPANT) ;%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
@@ -15,7 +15,7 @@
<title>JBoss Transactions WS-TX Interop</title>
</head>
<body>
-<h1>JBoss Transactions WS-TX Interop</h1>
+<h1>JBoss Transactions WS-TX 1.1 Interop</h1>
<h2>Introduction</h2>
<p>This web application implements a set of interoperability tests specified by the <a href="http://www.oasis-open.org/apps/org/workgroup/ws-tx/">Oasis WS-TX Technical Committee</a> site.</p>
<p>Please send any queries to the <a href="mailto:kevin.conner at jboss.com?subject=Interop%20query">interop test contact</a></p>
@@ -23,9 +23,15 @@
<form action="test" method="post">
<p>Service URI: <input name="<%= TestConstants.PARAM_SERVICE_URI %>" maxlength="2000" size="100" value="<%= SERVICE_URI %>"/></p>
<p>Test timeout: <input name="<%= TestConstants.PARAM_TEST_TIMEOUT %>" maxlength="10" size="10" value="120000"/></p>
+<!-- the current JaxWS based interop11 tests only runs synchronous tests for now
<p>Asynchronous Test application: <input name="<%= TestConstants.PARAM_ASYNC_TEST %>" type="checkbox" checked="checked"/></p>
+-->
<select name="<%= TestConstants.PARAM_TEST %>">
+<!-- the JaxWS interop test code has two separate services, one for AT and one for BA. since we only have
+ one participant URL we have to assume it is either the AT server or the BA server and run either AT
+ tests or BA tests but not both
<option value="<%= TestConstants.NAME_ALL_TESTS %>">All tests</option>
+-->
<option value="<%= TestConstants.NAME_ALL_AT_TESTS %>">All AT tests</option>
<option value="<%= TestConstants.NAME_ALL_BA_TESTS %>">All BA tests</option>
<%
Modified: labs/jbosstm/workspace/interop/WSTX11-interop/web.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTX11-interop/web.xml 2008-04-23 16:31:33 UTC (rev 19699)
+++ labs/jbosstm/workspace/interop/WSTX11-interop/web.xml 2008-04-23 16:42:53 UTC (rev 19700)
@@ -1,57 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
<display-name>JBoss WSTX1.1 interop</display-name>
<description>JBoss WSTX1.1 interop</description>
- <!-- Initialise the Task Manager -->
+ <!-- hmm, how do we do this with the JaxWS services?
+ <filter>
+ <filter-name>HTTP Content Type filter</filter-name>
+ <filter-class>com.arjuna.webservices.transport.http.HttpContentTypeFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>HTTP Content Type filter</filter-name>
+ <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
+ </filter-mapping>
+ -->
+
+ <!-- base URL for location of Interop 1.1 services -->
<context-param>
- <param-name>TaskManager.minWorkerCount</param-name>
- <param-value>0</param-value>
+ <param-name>BaseURI</param-name>
+ <param-value>http://@HOST@:@PORT@/interop11</param-value>
</context-param>
- <context-param>
- <param-name>TaskManager.maxWorkerCount</param-name>
- <param-value>10</param-value>
- </context-param>
-
+
+ <!-- Initialise Interop 11 services -->
<listener>
- <listener-class>com.arjuna.services.framework.admin.TaskManagerInitialisation</listener-class>
+ <listener-class>com.jboss.transaction.txinterop.webservices.atinterop.server.ATParticipantInitialisation</listener-class>
</listener>
-
- <!-- Initialise the HTTP Client -->
<listener>
- <listener-class>com.arjuna.webservices.transport.http.HttpClientInitialisation</listener-class>
+ <listener-class>com.jboss.transaction.txinterop.webservices.atinterop.server.ATInitiatorInitialisation</listener-class>
</listener>
-
+ <listener>
+ <listener-class>com.jboss.transaction.txinterop.webservices.bainterop.server.BAParticipantInitialisation</listener-class>
+ </listener>
+ <listener>
+ <listener-class>com.jboss.transaction.txinterop.webservices.bainterop.server.BAInitiatorInitialisation</listener-class>
+ </listener>
+
+ <!-- Define Interop 11 Server Endpoints -->
<servlet>
- <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
- <servlet-class>com.arjuna.webservices.transport.http.HttpServiceMultiplexorServlet</servlet-class>
- <!--
- The BaseHttpURI and BaseHttpsURI parameters specify the default values
- used to generate the service URIs without reference to an incoming
- request.
- -->
- <init-param>
- <param-name>BaseHttpURI</param-name>
- <param-value>http://@HOST@:@PORT@/interop/soap/</param-value>
- </init-param>
- <!--
- <init-param>
- <param-name>BaseHttpsURI</param-name>
- <param-value>https://localhost:8080/arjuna/soap/</param-value>
- </init-param>
- <init-param>
- <param-name>LogPackets</param-name>
- <param-value>true</param-value>
- </init-param>
- -->
- <load-on-startup>1</load-on-startup>
+ <servlet-name>Interop 11 AT Initiator Service</servlet-name>
+ <servlet-class>com.jboss.transaction.txinterop.webservices.atinterop.sei.InitiatorPortTypeImpl</servlet-class>
+ <load-on-startup>1</load-on-startup>
</servlet>
-
<servlet>
+ <servlet-name>Interop 11 AT Participant Service</servlet-name>
+ <servlet-class>com.jboss.transaction.txinterop.webservices.atinterop.sei.ParticipantPortTypeImpl</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>Interop 11 BA Initiator Service</servlet-name>
+ <servlet-class>com.jboss.transaction.txinterop.webservices.bainterop.sei.InitiatorPortTypeImpl</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Interop 11 BA Participant Service</servlet-name>
+ <servlet-class>com.jboss.transaction.txinterop.webservices.bainterop.sei.ParticipantPortTypeImpl</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Define Interop 11 JaxWS Server Endpoint Mappings -->
+ <servlet-mapping>
+ <servlet-name>Interop 11 AT Initiator Service</servlet-name>
+ <url-pattern>/ATInitiatorService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Interop 11 AT Participant Service</servlet-name>
+ <url-pattern>/ATParticipantService</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>Interop 11 BA Initiator Service</servlet-name>
+ <url-pattern>/BAInitiatorService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Interop 11 BA Participant Service</servlet-name>
+ <url-pattern>/BAParticipantService</url-pattern>
+ </servlet-mapping>
+
+ <!-- define proxy, logging and junit test runner servlets -->
+ <servlet>
<servlet-name>HTTP Proxy Servlet</servlet-name>
<servlet-class>com.jboss.transaction.txinterop.proxy.ProxyListenerService</servlet-class>
<!--
@@ -59,7 +91,7 @@
-->
<init-param>
<param-name>proxyServiceURI</param-name>
- <param-value>http://@HOST@:@PORT@/interop/proxy</param-value>
+ <param-value>http://@HOST@:@PORT@/interop11/proxy</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
@@ -78,11 +110,6 @@
<!-- servlet mappings -->
<servlet-mapping>
- <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
- <url-pattern>/soap/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
<servlet-name>HTTP Proxy Servlet</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>
@@ -97,98 +124,6 @@
<url-pattern>/logs/*</url-pattern>
</servlet-mapping>
- <!-- Initialise WS-C services -->
- <listener>
- <listener-class>com.arjuna.webservices.wscoor11.server.ActivationCoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wscoor11.server.ActivationRequesterInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wscoor11.server.RegistrationCoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wscoor11.server.RegistrationRequesterInitialisation</listener-class>
- </listener>
-
- <!-- Initialise WS-C -->
- <listener>
- <listener-class>com.arjuna.wsc.messaging.deploy.Coordination11Initialisation</listener-class>
- </listener>
-
- <!-- Initialise WS-AT services -->
- <listener>
- <listener-class>com.arjuna.webservices.wsat11.server.CompletionCoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsat11.server.CompletionInitiatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsat11.server.CoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsat11.server.ParticipantInitialisation</listener-class>
- </listener>
-
- <!-- Initialise WS-BA services -->
- <listener>
- <listener-class>com.arjuna.webservices.wsba11.server.CoordinatorCompletionCoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsba11.server.CoordinatorCompletionParticipantInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsba11.server.ParticipantCompletionCoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsba11.server.ParticipantCompletionParticipantInitialisation</listener-class>
- </listener>
-
- <!-- Initialise JBossTX services -->
- <listener>
- <listener-class>com.arjuna.webservices.wsjbosstx.server.TerminationCoordinatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.arjuna.webservices.wsjbosstx.server.TerminationParticipantInitialisation</listener-class>
- </listener>
-
- <!-- Initialise WS-T -->
- <listener>
- <listener-class>com.arjuna.wst.messaging.deploy.Transaction11Initialisation</listener-class>
- </listener>
-
- <!-- Initialise WSCF -->
- <listener>
- <listener-class>com.arjuna.mw.wsc.deploy.WSCFInitialisation</listener-class>
- </listener>
-
- <!-- Initialise WSTX -->
- <listener>
- <listener-class>com.arjuna.mw.wst.deploy.WSTXInitialisation</listener-class>
- </listener>
-
- <filter>
- <filter-name>HTTP Content Type filter</filter-name>
- <filter-class>com.arjuna.webservices.transport.http.HttpContentTypeFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>HTTP Content Type filter</filter-name>
- <servlet-name>HTTP SOAP Service Multiplexor Servlet</servlet-name>
- </filter-mapping>
-
-
- <!-- Initialise interop services -->
- <listener>
- <listener-class>com.jboss.transaction.txinterop.webservices.server.ParticipantInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.jboss.transaction.txinterop.webservices.atinterop.server.ATInitiatorInitialisation</listener-class>
- </listener>
- <listener>
- <listener-class>com.jboss.transaction.txinterop.webservices.bainterop.server.BAInitiatorInitialisation</listener-class>
- </listener>
-
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
More information about the jboss-svn-commits
mailing list