[jboss-svn-commits] JBL Code SVN: r33780 - in labs/jbosstm/workspace/interop/WSTFSC02-interop: dd/sc002 and 11 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jul 8 10:53:33 EDT 2010
Author: adinn
Date: 2010-07-08 10:53:31 -0400 (Thu, 08 Jul 2010)
New Revision: 33780
Added:
labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/envelope.xsd
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java
Modified:
labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml
labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc002/build.sh
labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh
labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003.wsdl
labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002Client.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002ClientHandler.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java
labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml
labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp
Log:
updated WSTF sc002 and sc003 tests to run on AS 6.0.0.M3 using Native and AS 6.0.0.trunk using CXF -- only some of the sc003 async tests are broken : Native fails on 3, 4, 7 and 8 while CFX fails on 2, .. 8
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/build.xml 2010-07-08 14:53:31 UTC (rev 33780)
@@ -48,8 +48,9 @@
<!--
<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="jboss.compile.client.libs" value="jaxb-api.jar jboss-javaee.jar jbossws-native-jaxrpc.jar
- jbossws-native-jaxws.jar jbossws-client.jar stax-api.jar jbossws-native-saaj.jar
+ <property name="jboss.compile.client.libs"
+ value="jaxb-api.jar jboss-javaee.jar jboss-servlet-api_3.0_spec.jar
+ jbossws-native-jaxrpc.jar jbossws-native-jaxws.jar jbossws-client.jar stax-api.jar jbossws-native-saaj.jar
jbossws-native-jaxws-ext.jar jbossws-native-core.jar jbossws-common.jar"/>
<property name="dist.compile.libs" value="junit.jar saxon.jar"/>
@@ -99,14 +100,14 @@
<copy toDir="${build.classes.dir}/org/wstf/docs/scenarios/sc003"
overwrite="yes">
<fileset dir="${dd.dir}/sc003/"
- includes="wsdl/sc003.wsdl wsdl/sc002.xsd"/>
+ includes="wsdl/sc003.wsdl wsdl/sc003Response.wsdl wsdl/sc002.xsd wsdl/envelope.xsd"/>
</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}"/>
<webinf dir="${dd.dir}/sc002" includes="wsdl/sc002.wsdl wsdl/sc002.xsd"/>
- <webinf dir="${dd.dir}/sc003" includes="wsdl/sc003.wsdl wsdl/sc002.xsd"/>
+ <webinf dir="${dd.dir}/sc003" includes="wsdl/sc003.wsdl wsdl/sc003Response.wsdl wsdl/sc002.xsd wsdl/envelope.xsd"/>
<fileset dir="${web.dir}"/>
</war>
</target>
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc002/build.sh
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc002/build.sh 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc002/build.sh 2010-07-08 14:53:31 UTC (rev 33780)
@@ -18,4 +18,5 @@
rm -rf tmp/classes/* tmp/src/*
-$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc002.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc002.wsdl
+#$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc002.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc002.wsdl
+$JBOSS_HOME/bin/wsconsume.sh -v -k -wsdllocation wsdl/sc002.wsdl -o tmp/classes -s tmp/src wsdl/sc002.wsdl
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/build.sh 2010-07-08 14:53:31 UTC (rev 33780)
@@ -18,8 +18,8 @@
rm -rf tmp/classes/* tmp/src/*
-$GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc003.wsdl
-# $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003Response.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc003Response.wsdl
- $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003Response.wsdl -d tmp/classes -s tmp/src -target 2.0 wsdl/sc003Response.wsdl
+# $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003.wsdl -d tmp/classes -s tmp/src -target 2.0 -extension wsdl/sc003.wsdl
+# $GF_HOME/bin/wsimport -verbose -keep -wsdllocation wsdl/sc003Response.wsdl -d tmp/classes -s tmp/src -target 2.0 wsdl/sc003Response.wsdl
-# ${JBOSS_HOME}/bin/wsconsume.sh --verbose --keep --wsdlLocation=wsdl/sc003.wsdl --source=tmp/src --output=tmp/classes --target=2.0 --extension wsdl/sc003.wsdl
+$JBOSS_HOME/bin/wsconsume.sh -v -k -w wsdl/sc003.wsdl -o tmp/classes -s tmp/src wsdl/sc003.wsdl
+$JBOSS_HOME/bin/wsconsume.sh -v -k -w wsdl/sc003Response.wsdl -o tmp/classes -s tmp/src wsdl/sc003Response.wsdl
Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/envelope.xsd (from rev 33745, labs/jbosstm/trunk/XTS/WS-T/dev/dd/wscoor1.1/wsdl/envelope.xsd)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/envelope.xsd (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/envelope.xsd 2010-07-08 14:53:31 UTC (rev 33780)
@@ -0,0 +1,126 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!-- Schema for the SOAP/1.1 envelope
+
+Portions © 2001 DevelopMentor.
+© 2001 W3C (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.
+
+This document is governed by the W3C Software License [1] as described in the FAQ [2].
+[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
+
+Permission to use, copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
+
+1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
+
+2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © 2001 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/"
+
+3. Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
+
+Original W3C files; http://www.w3.org/2001/06/soap-envelope
+Changes made:
+ - reverted namespace to http://schemas.xmlsoap.org/soap/envelope/
+ - reverted mustUnderstand to only allow 0 and 1 as lexical values
+ - made encodingStyle a global attribute 20020825
+ - removed default value from mustUnderstand attribute declaration
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
+
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:tns="http://schemas.xmlsoap.org/soap/envelope/"
+ targetNamespace="http://schemas.xmlsoap.org/soap/envelope/" >
+
+
+ <!-- Envelope, header and body -->
+ <xs:element name="Envelope" type="tns:Envelope" />
+ <xs:complexType name="Envelope" >
+ <xs:sequence>
+ <xs:element ref="tns:Header" minOccurs="0" />
+ <xs:element ref="tns:Body" minOccurs="1" />
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax" />
+ </xs:complexType>
+
+ <xs:element name="Header" type="tns:Header" />
+ <xs:complexType name="Header" >
+ <xs:sequence>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax" />
+ </xs:complexType>
+
+ <xs:element name="Body" type="tns:Body" />
+ <xs:complexType name="Body" >
+ <xs:sequence>
+ <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax" >
+ <xs:annotation>
+ <xs:documentation>
+ Prose in the spec does not specify that attributes are allowed on the Body element
+ </xs:documentation>
+ </xs:annotation>
+ </xs:anyAttribute>
+ </xs:complexType>
+
+
+ <!-- Global Attributes. The following attributes are intended to be usable via qualified attribute names on any complex type referencing them. -->
+ <xs:attribute name="mustUnderstand" >
+ <xs:simpleType>
+ <xs:restriction base='xs:boolean'>
+ <xs:pattern value='0|1' />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="actor" type="xs:anyURI" />
+
+ <xs:simpleType name="encodingStyle" >
+ <xs:annotation>
+ <xs:documentation>
+ 'encodingStyle' indicates any canonicalization conventions followed in the contents of the containing element. For example, the value 'http://schemas.xmlsoap.org/soap/encoding/' indicates the pattern described in SOAP specification
+ </xs:documentation>
+ </xs:annotation>
+ <xs:list itemType="xs:anyURI" />
+ </xs:simpleType>
+
+ <xs:attribute name="encodingStyle" type="tns:encodingStyle" />
+ <xs:attributeGroup name="encodingStyle" >
+ <xs:attribute ref="tns:encodingStyle" />
+ </xs:attributeGroup>
+
+ <xs:element name="Fault" type="tns:Fault" />
+ <xs:complexType name="Fault" final="extension" >
+ <xs:annotation>
+ <xs:documentation>
+ Fault reporting structure
+ </xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="faultcode" type="xs:QName" />
+ <xs:element name="faultstring" type="xs:string" />
+ <xs:element name="faultactor" type="xs:anyURI" minOccurs="0" />
+ <xs:element name="detail" type="tns:detail" minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="detail">
+ <xs:sequence>
+ <xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax" />
+ </xs:complexType>
+
+</xs:schema>
+
+
+
+
+
+
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003.wsdl 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003.wsdl 2010-07-08 14:53:31 UTC (rev 33780)
@@ -15,6 +15,7 @@
<xs:element name="Notify" type="sc002:NotifyType"/>
<xs:element name="Echo" type="sc002:EchoType"/>
<xs:element name="EchoResponse" type="sc002:EchoResponseType"/>
+ <xs:element name="SessionData" type="sc002:SessionDataType"/>
</xs:schema>
</wsdl:types>
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/dd/sc003/wsdl/sc003Response.wsdl 2010-07-08 14:53:31 UTC (rev 33780)
@@ -13,7 +13,7 @@
<wsdl:types>
<xs:schema targetNamespace="http://www.wstf.org/docs/scenarios/sc002">
<xs:import namespace="http://schemas.xmlsoap.org/soap/envelope/"
- schemaLocation="http://schemas.xmlsoap.org/soap/envelope"/>
+ schemaLocation="envelope.xsd"/>
<xs:include schemaLocation="sc002.xsd"/>
<xs:element name="EchoResponse" type="sc002:EchoResponseType"/>
</xs:schema>
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003AsyncTestCase.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -1,5 +1,6 @@
package com.jboss.transaction.wstf.interop;
+import com.jboss.transaction.wstf.proxy.ProxyURIRewriting;
import com.jboss.transaction.wstf.webservices.ServiceRegistry;
import com.jboss.transaction.wstf.webservices.sc003.client.Sc003Client;
import com.jboss.transaction.wstf.webservices.sc003.client.callback.EchoResponseCallback;
@@ -75,8 +76,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -125,8 +126,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getSc003ResponseServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -183,8 +184,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
@@ -246,8 +247,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
@@ -305,8 +306,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -363,8 +364,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -420,8 +421,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
@@ -478,8 +479,8 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
- final String responseURI = getSc003ResponseServiceURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
+ final String responseURI = getSc003ResponseServiceURI() ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/interop/Sc003TestCase.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -1,5 +1,6 @@
package com.jboss.transaction.wstf.interop;
+import com.jboss.transaction.wstf.proxy.ProxyURIRewriting;
import com.jboss.transaction.wstf.webservices.ServiceRegistry;
import com.jboss.transaction.wstf.webservices.sc003.client.Sc003Client;
import com.jboss.transaction.wstf.webservices.sc003.Sc003Constants;
@@ -56,7 +57,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -87,7 +88,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -133,7 +134,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
@@ -175,7 +176,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
@@ -221,7 +222,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -253,7 +254,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_NOTIFY;
SessionDataType session = new SessionDataType();
NotifyType notifyType = new NotifyType();
@@ -299,7 +300,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
@@ -336,7 +337,7 @@
final String conversationId = getConversationId() ;
try
{
- final String serviceURI = getParticipantURI(); // ProxyURIRewriting.rewriteURI(conversationId, getParticipantURI()) ;
+ final String serviceURI = ProxyURIRewriting.rewriteURI(conversationId, getSc003ServiceURI()) ;
final String action = Sc003Constants.SC003_ACTION_ECHO;
SessionDataType session = new SessionDataType();
EchoType echoType = new EchoType();
Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java (from rev 33739, labs/jbosstm/trunk/XTS/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/AddressingProxySAXHandler.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -0,0 +1,179 @@
+/*
+ * 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 Lesser General Public License, v. 2.1.
+ * 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 Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 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.
+ */
+/*
+ * Created on 20-Jan-2005
+ */
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+
+/**
+ * Sax parser for rewriting the XML via the proxy.
+ * @author kevin
+ */
+public class AddressingProxySAXHandler extends BaseHandler
+{
+ /**
+ * The WS-Addressing namespace URI.
+ */
+ private static final String WSA_NAMESPACE_URI = AddressingConstants.WSA_NAMESPACE ;
+ /**
+ * The WS-Addressing To element.
+ */
+ private static final String WSA_ELEMENT_TO = AddressingConstants.WSA_ELEMENT_TO ;
+ /**
+ * The WS-Addressing Address element.
+ */
+ private static final String WSA_ELEMENT_ADDRESS = AddressingConstants.WSA_ELEMENT_ADDRESS ;
+
+ /**
+ * Are we in a rewrite element?
+ */
+ private boolean inRewriteElement ;
+ /**
+ * Are we in a to element?
+ */
+ private boolean inToElement ;
+ /**
+ * The to address.
+ */
+ private String toAddress ;
+ /**
+ * The identifier.
+ */
+ private String identifier ;
+ /**
+ * The string buffer for text element content.
+ */
+ private StringBuffer characterContent = new StringBuffer() ;
+
+ /**
+ * The current conversation identifier.
+ */
+ private final String conversationIdentifier ;
+
+ /**
+ * Construct the SAX handler with the output writer.
+ * @param nextHandler The next content handler.
+ * @param conversationIdentifier The conversation identifier.
+ */
+ public AddressingProxySAXHandler(final ContentHandler nextHandler, final String conversationIdentifier)
+ {
+ super(nextHandler) ;
+ this.conversationIdentifier = conversationIdentifier ;
+ }
+
+ /**
+ * Start an element.
+ * @param uri The uri.
+ * @param localName The local name.
+ * @param qName The qualified name.
+ * @param attributes The element attributes.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startElement(final String uri, final String localName, final String qName,
+ final Attributes attributes)
+ throws SAXException
+ {
+ if (WSA_NAMESPACE_URI.equals(uri))
+ {
+ if (WSA_ELEMENT_ADDRESS.equals(localName))
+ {
+ inRewriteElement = true ;
+ }
+ else if (WSA_ELEMENT_TO.equals(localName))
+ {
+ inRewriteElement = true ;
+ inToElement = true ;
+ }
+ }
+
+ getNextHandler().startElement(uri, localName, qName, attributes) ;
+ }
+
+ /**
+ * End an element.
+ * @param uri The uri.
+ * @param localName The local name.
+ * @param qName The qualified name.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endElement(final String uri, final String localName, final String qName)
+ throws SAXException
+ {
+ if (characterContent.length() > 0)
+ {
+ if (inRewriteElement)
+ {
+ final String newValue = ProxyURIRewriting.rewriteURI(conversationIdentifier, characterContent.toString().trim()) ;
+ getNextHandler().characters(newValue.toCharArray(), 0, newValue.length()) ;
+ if (inToElement)
+ {
+ toAddress = newValue ;
+ inToElement = false;
+ }
+ inRewriteElement = false;
+ }
+ characterContent.setLength(0) ;
+ }
+ getNextHandler().endElement(uri, localName, qName) ;
+ }
+
+ /**
+ * Process character text.
+ * @param chars The character array.
+ * @param start The start index.
+ * @param length The length of this section.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void characters(char[] chars, int start, int length)
+ throws SAXException
+ {
+ if (inRewriteElement)
+ {
+ characterContent.append(chars, start, length) ;
+ }
+ else
+ {
+ getNextHandler().characters(chars, start, length) ;
+ }
+ }
+
+ /**
+ * Return the to address from the processing.
+ * @return The to address.
+ */
+ public String getToAddress()
+ {
+ return toAddress ;
+ }
+
+ /**
+ * Return the identifier from the processing.
+ * @return The identifier.
+ */
+ public String getIdentifier()
+ {
+ return identifier ;
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java (from rev 33739, labs/jbosstm/trunk/XTS/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/BaseHandler.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -0,0 +1,187 @@
+/*
+ * 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 Lesser General Public License, v. 2.1.
+ * 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 Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 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.
+ */
+/*
+ * Created on 20-Jan-2005
+ */
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+/**
+ * Sax parser for rewriting the XML via the proxy.
+ * @author kevin
+ */
+public class BaseHandler implements ContentHandler
+{
+ /**
+ * The next handler in the sequence.
+ */
+ private final ContentHandler nextHandler ;
+
+ /**
+ * Construct the base handler.
+ * @param nextHandler The next content handler.
+ */
+ protected BaseHandler(final ContentHandler nextHandler)
+ {
+ this.nextHandler = nextHandler ;
+ }
+
+ /**
+ * Set the document locator.
+ * @param locator The document locator.
+ */
+ public void setDocumentLocator(final Locator locator)
+ {
+ nextHandler.setDocumentLocator(locator) ;
+ }
+
+ /**
+ * Handle the procesing instruction.
+ * @param target The pi target.
+ * @param data The pi data.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void processingInstruction(final String target, final String data)
+ throws SAXException
+ {
+ nextHandler.processingInstruction(target, data) ;
+ }
+
+ /**
+ * Start the document.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startDocument()
+ throws SAXException
+ {
+ nextHandler.startDocument() ;
+ }
+
+ /**
+ * End the document.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endDocument()
+ throws SAXException
+ {
+ nextHandler.endDocument() ;
+ }
+
+ /**
+ * Start a prefix mapping.
+ * @param prefix The namespace prefix.
+ * @param uri The namespace uri.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startPrefixMapping(final String prefix, final String uri)
+ throws SAXException
+ {
+ nextHandler.startPrefixMapping(prefix, uri) ;
+ }
+
+ /**
+ * End the prefix mapping.
+ * @param prefix The namespace prefix.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endPrefixMapping(final String prefix)
+ throws SAXException
+ {
+ nextHandler.endPrefixMapping(prefix) ;
+ }
+
+ /**
+ * Start an element.
+ * @param uri The uri.
+ * @param localName The local name.
+ * @param qName The qualified name.
+ * @param attributes The element attributes.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startElement(final String uri, final String localName, final String qName,
+ final Attributes attributes)
+ throws SAXException
+ {
+ nextHandler.startElement(uri, localName, qName, attributes) ;
+ }
+
+ /**
+ * End an element.
+ * @param uri The uri.
+ * @param localName The local name.
+ * @param qName The qualified name.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endElement(final String uri, final String localName, final String qName)
+ throws SAXException
+ {
+ nextHandler.endElement(uri, localName, qName) ;
+ }
+
+ /**
+ * Process character text.
+ * @param chars The character array.
+ * @param start The start index.
+ * @param length The length of this section.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void characters(char[] chars, int start, int length)
+ throws SAXException
+ {
+ nextHandler.characters(chars, start, length) ;
+ }
+
+ /**
+ * Process ignorable white space.
+ * @param chars The character array.
+ * @param start The start index.
+ * @param length The length of this section.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void ignorableWhitespace(char[] chars, int start, int length)
+ throws SAXException
+ {
+ nextHandler.ignorableWhitespace(chars, start, length) ;
+ }
+
+ /**
+ * Skip an entity.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void skippedEntity(final String name)
+ throws SAXException
+ {
+ nextHandler.skippedEntity(name) ;
+ }
+
+ /**
+ * Get the next handler.
+ * @return The next handler.
+ */
+ protected final ContentHandler getNextHandler()
+ {
+ return nextHandler ;
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java (from rev 33739, labs/jbosstm/trunk/XTS/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyListenerService.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -0,0 +1,426 @@
+/*
+ * 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 Lesser General Public License, v. 2.1.
+ * 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 Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 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.
+ */
+/*
+ * Copyright (c) 2002, 2003, Arjuna Technologies Limited.
+ *
+ * $Id: DummyListenerService.java,v 1.2 2004/06/24 13:52:53 nmcl Exp $
+ */
+
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.Enumeration;
+
+public class ProxyListenerService extends HttpServlet
+{
+ /**
+ * The SOAP 1.1 content type.
+ */
+ private static final String SOAP_11_CONTENT_TYPE = "text/xml" ;
+ /**
+ * The SOAP 1.2 content type.
+ */
+ private static final String SOAP_12_CONTENT_TYPE = "application/soap+xml" ;
+ /**
+ * The name of the SOAP Action header.
+ */
+ 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 ;
+
+ /**
+ * Initialise the servlet.
+ * @param config The servlet configuration.
+ */
+ public void init(final ServletConfig config)
+ throws ServletException
+ {
+ super.init(config);
+
+ // Initialise the local host:port/urlstub for the proxy.
+ final String proxyServiceURI = config.getInitParameter("proxyServiceURI") ;
+ if (proxyServiceURI == null)
+ {
+ throw new ServletException("Proxy service URI missing") ;
+ }
+ ProxyURIRewriting.setProxyURI(proxyServiceURI) ;
+ }
+
+ /**
+ * Handle the post request.
+ * @param httpServletRequest The current HTTP servlet request.
+ * @param httpServletResponse The current HTTP servlet response.
+ */
+ public void doPost(final HttpServletRequest httpServletRequest, final HttpServletResponse httpServletResponse)
+ throws ServletException, IOException
+ {
+ final String conversationIdentifier = getConversationIdentifier(httpServletRequest) ;
+
+ final byte[] requestContents = getContents(httpServletRequest.getInputStream()) ;
+ final String soapAction = httpServletRequest.getHeader(SOAP_ACTION_HEADER) ;
+ final boolean jbossClient = ProxyConversation.isInternalConversationId(conversationIdentifier) ;
+ final String alternateConversationIdentifier = ProxyConversation.getAlternateConversationId(conversationIdentifier) ;
+
+ final ProxyConversationState state = ProxyConversation.getConversationState(conversationIdentifier) ;
+
+System.out.println("KEV: processing SOAP action " + trimAction(soapAction)) ;
+ // Search header for wsa:To and wsa:Address elements, changing their URL parts as we go.
+ // Get the target URL from the to.
+ try
+ {
+ final StringWriter newMessageWriter = new StringWriter() ;
+ final WriterSAXHandler writerHandler = new WriterSAXHandler(newMessageWriter) ;
+ final AddressingProxySAXHandler addressingHandler = new AddressingProxySAXHandler(writerHandler, alternateConversationIdentifier) ;
+
+ ContentHandler stateHandler = (state == null ? null : state.getHandler(addressingHandler)) ;
+ ContentHandler parserHandler = (stateHandler == null ? addressingHandler : stateHandler) ;
+
+ final XMLReader xmlReader = XMLReaderFactory.createXMLReader() ;
+ xmlReader.setContentHandler(parserHandler) ;
+ xmlReader.parse(new InputSource(new ByteArrayInputStream(requestContents))) ;
+
+ final StringBuffer newMessageBuffer = newMessageWriter.getBuffer() ;
+ final StringBuffer messageBuffer = (jbossClient ? newMessageBuffer : new StringBuffer(new String(requestContents))) ;
+
+ ProxyConversation.appendConversation(conversationIdentifier, checkForXMLDecl(messageBuffer)) ;
+
+ final String identifier = addressingHandler.getIdentifier() ;
+ if ((state != null) && state.handleAction(trimAction(soapAction), identifier))
+ {
+ httpServletResponse.setStatus(HttpServletResponse.SC_ACCEPTED) ;
+ httpServletResponse.flushBuffer() ;
+ return ;
+ }
+
+ // parse input stream
+
+ final URL destURL = new URL(addressingHandler.getToAddress()) ;
+ final HttpURLConnection destConnection = (HttpURLConnection)destURL.openConnection() ;
+ try
+ {
+ destConnection.setDoOutput(true) ;
+ destConnection.setUseCaches(false) ;
+
+ // copy the headers
+ final Enumeration headerNameEnum = httpServletRequest.getHeaderNames() ;
+ while(headerNameEnum.hasMoreElements())
+ {
+ final String name = (String)headerNameEnum.nextElement() ;
+ if (name.equalsIgnoreCase(TRANSFER_ENCODING_HEADER))
+ {
+ // 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
+ {
+ final String value = httpServletRequest.getHeader(name) ;
+ destConnection.setRequestProperty(name, value) ;
+ }
+ }
+
+ // Set content length
+ destConnection.setRequestProperty("Content-Length", Integer.toString(newMessageBuffer.length())) ;
+ final int port = destURL.getPort() ;
+ final String host = (port > 0 ? destURL.getHost() + ":" + port : destURL.getHost()) ;
+ destConnection.setRequestProperty("Host", host) ;
+ destConnection.setRequestMethod("POST") ;
+ // Connect
+ destConnection.connect() ;
+ // Write the new request
+ final OutputStream os = destConnection.getOutputStream() ;
+ os.write(newMessageBuffer.toString().getBytes()) ;
+ os.flush() ;
+ os.close() ;
+
+ final int responseCode = destConnection.getResponseCode() ;
+ final String fullContentType = destConnection.getContentType() ;
+ final String contentType = getContentType(fullContentType) ;
+ switch (responseCode)
+ {
+ case HttpServletResponse.SC_OK:
+ case HttpServletResponse.SC_ACCEPTED:
+ if ((contentType != null) && !(SOAP_11_CONTENT_TYPE.equals(contentType) ||
+ SOAP_12_CONTENT_TYPE.equals(contentType)))
+ {
+ httpServletResponse.setStatus(HttpServletResponse.SC_ACCEPTED) ;
+ httpServletResponse.flushBuffer() ;
+ break ;
+ }
+ // FALL THRU
+ default:
+ // Pass the response back.
+ httpServletResponse.setStatus(destConnection.getResponseCode()) ;
+ if (fullContentType != null)
+ {
+ httpServletResponse.setContentType(fullContentType) ;
+ }
+
+ // Copy data
+ final int datasize = DEFAULT_DATA_SIZE ;
+ final char[] data = new char[datasize] ;
+ int readCount ;
+
+ final InputStream is ;
+ if (responseCode == HttpURLConnection.HTTP_INTERNAL_ERROR)
+ {
+ is = destConnection.getErrorStream() ;
+ }
+ else
+ {
+ is = destConnection.getInputStream() ;
+ }
+ if (is != null) {
+ final byte[] responseBytes = getContents(is) ;
+ if (responseBytes.length > 0) {
+ try
+ {
+ 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()) ;
+ }
+ finally
+ {
+ is.close() ;
+ }
+ } else {
+ httpServletResponse.setContentLength(0) ;
+ }
+ } else {
+ httpServletResponse.setContentLength(0) ;
+ }
+ break ;
+ }
+ }
+ finally
+ {
+ destConnection.disconnect() ;
+ }
+ }
+ catch (Exception exception)
+ {
+ System.err.println("Proxy Listener Service: " + exception);
+ exception.printStackTrace() ;
+ }
+ catch (Error error)
+ {
+ System.err.println("Proxy Listener Service: " + error);
+ error.printStackTrace() ;
+ }
+ }
+
+ /**
+ * Trim quotes from the action.
+ * @param action The action.
+ * @return The trimmed action.
+ */
+ private static String trimAction(final String action)
+ {
+ final int length = (action == null ? 0 : action.length()) ;
+ if ((length < 2) || (action.charAt(0) != '"') || (action.charAt(length-1) != '"'))
+ {
+ return action ;
+ }
+ return action.substring(1, length-1) ;
+ }
+
+ /**
+ * Get the content type part.
+ * @param fullContentType The full content type.
+ * @return The content type.
+ */
+ private static String getContentType(final String fullContentType)
+ {
+ if (fullContentType == null)
+ {
+ return null ;
+ }
+ final int separatorIndex = fullContentType.indexOf(';') ;
+ return (separatorIndex == -1 ? fullContentType : fullContentType.substring(0, separatorIndex)) ;
+ }
+
+ /**
+ * Get the conversation identifier from the request.
+ * @return The conversation identifier.
+ */
+ private static String getConversationIdentifier(final HttpServletRequest httpServletRequest)
+ {
+ final String pathInfo = httpServletRequest.getPathInfo() ;
+ final int separator = pathInfo.indexOf('/', 1) ;
+ return pathInfo.substring(1, separator) ;
+ }
+
+ /**
+ * Get the contents of the input stream
+ * @param is The input stream.
+ * @return The contents.
+ * @throws java.io.IOException for errors.
+ */
+ private byte[] getContents(final InputStream is)
+ throws IOException
+ {
+ final ByteArrayOutputStream baos = new ByteArrayOutputStream() ;
+ final byte[] buffer = new byte[1024] ;
+ int readCount ;
+ do
+ {
+ readCount = is.read(buffer, 0, buffer.length) ;
+ if (readCount > 0)
+ {
+ baos.write(buffer, 0, readCount) ;
+ }
+ }
+ while(readCount > 0) ;
+ return baos.toByteArray() ;
+ }
+
+ /**
+ * Check for the XML declaration and remove.
+ * This method is only used if we are intending to log the SOAP message so that it is easy to combine the XML without creating invalid documents.
+ * @param contents The current stream contents.
+ * @return The stream contents as a string.
+ */
+ private static String checkForXMLDecl(final StringBuffer contents)
+ {
+ int count = 0 ;
+ try
+ {
+ while(Character.isWhitespace(contents.charAt(count))) count++ ;
+ if (contents.charAt(count) == '<')
+ {
+ if (contents.charAt(count+1) == '?')
+ {
+ count+=2 ;
+ while(contents.charAt(count++) != '>') ;
+ }
+ }
+ if (count > 0)
+ {
+ contents.delete(0, count) ;
+ }
+ }
+ catch (final StringIndexOutOfBoundsException sioobe) {}
+
+ return contents.toString() ;
+ }
+
+ /**
+ * Escape the contents of the string.
+ * @param contents The original contents.
+ * @return The escaped contents.
+ */
+ private static String escapeContents(final String contents)
+ {
+ final int length = contents.length() ;
+ StringWriter escapedContents = null ;
+
+ for(int count = 0 ; count < length ; count++)
+ {
+ final char ch = contents.charAt(count) ;
+ if ((ch == '<') || (ch == '>') || (ch == '&') || (ch == '"'))
+ {
+ if (escapedContents == null)
+ {
+ escapedContents = new StringWriter(length) ;
+ if (count > 0)
+ {
+ escapedContents.write(contents, 0, count-1) ;
+ }
+ }
+ if (ch == '<')
+ {
+ escapedContents.write("<") ;
+ }
+ else if (ch == '>')
+ {
+ escapedContents.write(">") ;
+ }
+ else if (ch == '&')
+ {
+ escapedContents.write("&") ;
+ }
+ else if (ch == '"')
+ {
+ escapedContents.write(""") ;
+ }
+ }
+ else if (escapedContents != null)
+ {
+ escapedContents.write(ch) ;
+ }
+ }
+ return (escapedContents == null ? contents : escapedContents.toString()) ;
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java (from rev 33739, labs/jbosstm/trunk/XTS/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/ProxyURIRewriting.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -0,0 +1,159 @@
+/*
+ * 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 Lesser General Public License, v. 2.1.
+ * 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 Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 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.wstf.proxy;
+
+
+/**
+ * @author kevin
+ */
+public class ProxyURIRewriting
+{
+ /**
+ * The base URI of the proxy.
+ */
+ private static String PROXY_URI ;
+
+ /**
+ * Set the proxy URI.
+ * @param proxyURI The proxy URI.
+ */
+ public static synchronized void setProxyURI(final String proxyURI)
+ {
+ PROXY_URI = proxyURI ;
+ }
+
+ /**
+ * Get the proxy URI.
+ * @return The proxy URI.
+ */
+ public static synchronized String getProxyURI()
+ {
+ return PROXY_URI ;
+ }
+
+ /**
+ * Rewrite the URI.
+ * @param conversationIdentifier The conversation identifier.
+ * @param uri The uri to be rewritten.
+ * @return The replacement URI.
+ */
+ public static String rewriteURI(final String conversationIdentifier, final String uri)
+ {
+ final String proxyURI = getProxyURI() ;
+
+ if (uri != null)
+ {
+ if (uri.startsWith(proxyURI))
+ {
+ final int separatorIndex = uri.indexOf('/', proxyURI.length()+1) ;
+ final String remainder = uri.substring(separatorIndex+1) ;
+ return decodeURI(remainder) ;
+ }
+ else if (!uri.startsWith("http://www.w3.org/"))
+ {
+ return proxyURI + "/" + conversationIdentifier + "/" + encodeURI(uri) ;
+ }
+ }
+ return uri ;
+ }
+
+ /**
+ * Decode a URI that has been encoded.
+ * @param uri The encoded URI.
+ * @return The decoded URI.
+ */
+ public static String decodeURI(final String uri)
+ {
+ if (uri == null)
+ {
+ return null ;
+ }
+ final StringBuffer result = new StringBuffer() ;
+ final int length = uri.length() ;
+ int separatorCount = 0 ;
+ for(int count = 0 ; count < length ; count++)
+ {
+ final char ch = uri.charAt(count) ;
+ if (separatorCount < 3)
+ {
+ if (ch == '-')
+ {
+ result.append("/") ;
+ separatorCount++ ;
+ continue ;
+ }
+ else if (ch == '_')
+ {
+ result.append(":") ;
+ continue ;
+ }
+ result.append(ch) ;
+ }
+ else
+ {
+ result.append(ch) ;
+ }
+ }
+ return result.toString() ;
+ }
+
+ /**
+ * Encode a URI.
+ * @param uri The URI.
+ * @return The encoded URI.
+ */
+ public static String encodeURI(final String uri)
+ {
+ if (uri == null)
+ {
+ return "" ;
+ }
+
+ final StringBuffer result = new StringBuffer() ;
+ final int length = uri.length() ;
+ int separatorCount = 0 ;
+ for(int count = 0 ; count < length ; count++)
+ {
+ final char ch = uri.charAt(count) ;
+ if (separatorCount < 3)
+ {
+ if (ch == '/')
+ {
+ separatorCount++ ;
+ result.append("-") ;
+ }
+ else if (ch == ':')
+ {
+ result.append("_") ;
+ }
+ else
+ {
+ result.append(ch) ;
+ }
+ }
+ else
+ {
+ result.append(ch) ;
+ }
+ }
+ return result.toString() ;
+ }
+}
\ No newline at end of file
Copied: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java (from rev 33739, labs/jbosstm/trunk/XTS/interop/WSTFSC07-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java)
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java (rev 0)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/proxy/WriterSAXHandler.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -0,0 +1,409 @@
+/*
+ * 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 Lesser General Public License, v. 2.1.
+ * 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 Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 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.
+ */
+/*
+ * Created on 20-Jan-2005
+ */
+package com.jboss.transaction.wstf.proxy;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.ContentHandler;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.util.*;
+
+/**
+ * Sax parser for rewriting the XML via the proxy.
+ * @author kevin
+ */
+public class WriterSAXHandler implements ContentHandler
+{
+ /**
+ * Do we need to end the start tag?
+ */
+ private boolean endStartTag ;
+ /**
+ * The to address.
+ */
+ private String toAddress ;
+ /**
+ * The identifier.
+ */
+ private String identifier ;
+ /**
+ * The string buffer for text element content.
+ */
+ private StringBuffer characterContent = new StringBuffer() ;
+ /**
+ * The new namespaces.
+ */
+ private List newNamespaces = new ArrayList() ;
+ /**
+ * The stack of active namespaces.
+ */
+ private Stack namespaceStack = new Stack() ;
+ /**
+ * The active namespaces.
+ */
+ private Map activeNamespaces = new HashMap() ;
+
+ /**
+ * The writer for output.
+ */
+ private final PrintWriter printWriter ;
+
+ /**
+ * Construct the SAX handler with the output writer.
+ * @param writer The writer for output.
+ */
+ public WriterSAXHandler(final Writer writer)
+ {
+ this.printWriter = new PrintWriter(writer) ;
+ }
+
+ /**
+ * Set the document locator.
+ * @param locator The document locator.
+ */
+ public void setDocumentLocator(final Locator locator)
+ {
+ }
+
+ /**
+ * Handle the procesing instruction.
+ * @param target The pi target.
+ * @param data The pi data.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void processingInstruction(final String target, final String data)
+ throws SAXException
+ {
+ }
+
+ /**
+ * Start the document.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startDocument()
+ throws SAXException
+ {
+ }
+
+ /**
+ * End the document.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endDocument()
+ throws SAXException
+ {
+ printWriter.flush() ;
+ }
+
+ /**
+ * Start a prefix mapping.
+ * @param prefix The namespace prefix.
+ * @param uri The namespace uri.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startPrefixMapping(final String prefix, final String uri)
+ throws SAXException
+ {
+ newNamespaces.add(new NamespaceInfo(prefix, uri)) ;
+ }
+
+ /**
+ * End the prefix mapping.
+ * @param prefix The namespace prefix.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endPrefixMapping(final String prefix)
+ throws SAXException
+ {
+ }
+
+ /**
+ * Start an element.
+ * @param uri The uri.
+ * @param localName The local name.
+ * @param qName The qualified name.
+ * @param attributes The element attributes.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void startElement(final String uri, final String localName, final String qName,
+ final Attributes attributes)
+ throws SAXException
+ {
+ checkEndStartTag() ;
+
+ namespaceStack.push(activeNamespaces) ;
+ final Iterator newNamespacesIter = newNamespaces.iterator() ;
+ final String namespaces ;
+ if (newNamespacesIter.hasNext())
+ {
+ final HashMap newActiveNamespaces = new HashMap(activeNamespaces) ;
+ final StringBuffer namespacesValue = new StringBuffer() ;
+ do
+ {
+ final NamespaceInfo namespaceInfo = (NamespaceInfo)newNamespacesIter.next() ;
+ final String namespacePrefix = namespaceInfo.getPrefix() ;
+ final String namespaceURI = namespaceInfo.getURI() ;
+ newActiveNamespaces.put(namespaceURI, namespacePrefix) ;
+
+ namespacesValue.append(" xmlns") ;
+ if ((namespacePrefix != null) && (namespacePrefix.length() > 0))
+ {
+ namespacesValue.append(':') ;
+ namespacesValue.append(namespacePrefix) ;
+ }
+ namespacesValue.append("=\"") ;
+ namespacesValue.append(namespaceURI) ;
+ namespacesValue.append('"') ;
+ }
+ while(newNamespacesIter.hasNext()) ;
+ newNamespaces.clear() ;
+ activeNamespaces = newActiveNamespaces ;
+ namespaces = namespacesValue.toString() ;
+ }
+ else
+ {
+ namespaces = null ;
+ }
+
+ printWriter.write('<') ;
+ printWriter.write(getQName(uri, localName, qName)) ;
+ if (namespaces != null)
+ {
+ printWriter.write(namespaces) ;
+ }
+
+ final int numAttributes = attributes.getLength() ;
+ if (numAttributes > 0)
+ {
+ for(int count = 0 ; count < numAttributes ; count++)
+ {
+ printWriter.write(' ') ;
+ final String attributeQName = getQName(attributes.getURI(count), attributes.getLocalName(count), attributes.getQName(count)) ;
+ printWriter.write(attributeQName) ;
+ printWriter.write("=\"") ;
+ final String value = attributes.getValue(count) ;
+ escapeTextContent(value.toCharArray(), 0, value.length()) ;
+ printWriter.write('"') ;
+ }
+ }
+
+ endStartTag = true ;
+ }
+
+ /**
+ * End an element.
+ * @param uri The uri.
+ * @param localName The local name.
+ * @param qName The qualified name.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void endElement(final String uri, final String localName, final String qName)
+ throws SAXException
+ {
+ characterContent.setLength(0) ;
+ if (endStartTag)
+ {
+ printWriter.write("/>") ;
+ }
+ else
+ {
+ printWriter.write("</") ;
+ printWriter.write(qName) ;
+ printWriter.write('>') ;
+ }
+ activeNamespaces = (Map)namespaceStack.pop() ;
+ endStartTag = false ;
+ }
+
+ /**
+ * Process character text.
+ * @param chars The character array.
+ * @param start The start index.
+ * @param length The length of this section.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void characters(char[] chars, int start, int length)
+ throws SAXException
+ {
+ checkEndStartTag() ;
+ escapeTextContent(chars, start, length) ;
+ }
+
+ /**
+ * Process ignorable white space.
+ * @param chars The character array.
+ * @param start The start index.
+ * @param length The length of this section.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void ignorableWhitespace(char[] chars, int start, int length)
+ throws SAXException
+ {
+ checkEndStartTag() ;
+ printWriter.write(chars, start, length) ;
+ }
+
+ /**
+ * Skip an entity.
+ * @throws org.xml.sax.SAXException for any errors.
+ */
+ public void skippedEntity(final String name)
+ throws SAXException
+ {
+ }
+
+ /**
+ * Get the qualified name of the element/attribute.
+ * @param uri The qualifed namespace uri or empty string.
+ * @param localName The qualified local name.
+ * @param qName The qualified name.
+ * @return The qualified name of the element/attribute.
+ */
+ private String getQName(final String uri, final String localName, final String qName)
+ {
+ if (uri.length() > 0)
+ {
+ final String prefix = (String)activeNamespaces.get(uri) ;
+ if (prefix.length() > 0)
+ {
+ return prefix + ":" + localName ;
+ }
+ else
+ {
+ return localName ;
+ }
+ }
+ else
+ {
+ return qName ;
+ }
+ }
+
+ /**
+ * Check to see if the end of the start tag has been processed.
+ */
+ private void checkEndStartTag()
+ {
+ if (endStartTag)
+ {
+ printWriter.write('>') ;
+ endStartTag = false ;
+ }
+ }
+
+ /**
+ * Escape the contents of a text element.
+ * @param chars The character array.
+ * @param start The start index.
+ * @param length The length of this section.
+ */
+ private void escapeTextContent(final char[] chars, final int start, final int length)
+ {
+ final int end = start + length ;
+ for(int count = start ; count < end ; count++)
+ {
+ final char ch = chars[count] ;
+ switch(ch)
+ {
+ case '<':
+ printWriter.print("<") ;
+ break ;
+ case '>':
+ printWriter.print(">") ;
+ break ;
+ case '&':
+ printWriter.print("&") ;
+ break ;
+ case '"':
+ printWriter.print(""") ;
+ break ;
+ default:
+ printWriter.print(ch) ;
+ break ;
+ }
+ }
+ }
+
+ /**
+ * Return the to address from the processing.
+ * @return The to address.
+ */
+ public String getToAddress()
+ {
+ return toAddress ;
+ }
+
+ /**
+ * Return the identifier from the processing.
+ * @return The identifier.
+ */
+ public String getIdentifier()
+ {
+ return identifier ;
+ }
+
+ private static final class NamespaceInfo
+ {
+ /**
+ * The namespace prefix.
+ */
+ private final String prefix ;
+ /**
+ * The namespace uri.
+ */
+ private final String uri ;
+
+ /**
+ * Construct the namespace information.
+ * @param prefix The namespace prefix.
+ * @param uri The namespace uri.
+ */
+ NamespaceInfo(final String prefix, final String uri)
+ {
+ this.prefix = prefix ;
+ this.uri = uri ;
+ }
+
+ /**
+ * Get the namespace prefix.
+ * @return The namespace prefix.
+ */
+ String getPrefix()
+ {
+ return prefix ;
+ }
+
+ /**
+ * Get the namespace URI.
+ * @return The namespace URI.
+ */
+ String getURI()
+ {
+ return uri ;
+ }
+ }
+}
\ No newline at end of file
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002Client.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002Client.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002Client.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -50,7 +50,7 @@
List<Handler> customHandlerChain = new ArrayList<Handler>();
customHandlerChain.add(new Sc002ClientHandler());
bindingProvider.getBinding().setHandlerChain(customHandlerChain);
-
+
Map<String, Object> requestContext = bindingProvider.getRequestContext();
requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, toUri);
requestContext.put(Sc002Constants.SC002_CONVERSATION_IDENTIFIER, conversationId);
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002ClientHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002ClientHandler.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/client/Sc002ClientHandler.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -53,7 +53,7 @@
SOAPMessage message = context.getMessage();
handleMustUnderstand(context, message);
- handleConversation(context, message);
+ // handleConversation(context, message);
return true;
}
@@ -83,7 +83,7 @@
// no need to add must understand ehaders for faults just append to the conversation
- handleConversation(context, message);
+ // handleConversation(context, message);
return true;
}
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc002/sei/Sc002PortImpl.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -4,6 +4,7 @@
import javax.jws.*;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import javax.xml.namespace.QName;
@@ -30,6 +31,7 @@
*/
@WebMethod(operationName = "Begin", action = "http://www.wstf.org/docs/scenarios/sc002/Begin")
@WebResult(name = "BeginResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "BeginResponse")
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/Begin", output="http://www.wstf.org/docs/scenarios/sc002/BeginResponse")
public BeginResponseType begin(@WebParam(name = "Begin", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Begin")
BeginType begin, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
SessionDataType sessionData) {
@@ -44,6 +46,7 @@
*/
@WebMethod(operationName = "Notify", action = "http://www.wstf.org/docs/scenarios/sc002/Notify")
@Oneway
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/Notify")
public void notify(@WebParam(name = "Notify", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Notify")
NotifyType notify, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
SessionDataType sessionData) {
@@ -63,6 +66,7 @@
*/
@WebMethod(operationName = "Echo", action = "http://www.wstf.org/docs/scenarios/sc002/Echo")
@WebResult(name = "EchoResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EchoResponse")
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/Echo", output="http://www.wstf.org/docs/scenarios/sc002/EchoResponse")
public EchoResponseType echo(@WebParam(name = "Echo", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Echo")
EchoType echo, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
SessionDataType sessionData) {
@@ -85,6 +89,7 @@
*/
@WebMethod(operationName = "End", action = "http://www.wstf.org/docs/scenarios/sc002/End")
@WebResult(name = "EndResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EndResponse")
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/End", output="http://www.wstf.org/docs/scenarios/sc002/EndResponse")
public EndResponseType end(@WebParam(name = "End", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "End")
EndType end, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
SessionDataType sessionData) {
@@ -99,6 +104,7 @@
*/
@WebMethod(operationName = "SendMessages", action = "http://www.wstf.org/docs/scenarios/sc002/SendMessages")
@WebResult(name = "SendMessagesResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "SendMessagesResponse")
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/SendMessages", output="http://www.wstf.org/docs/scenarios/sc002/SendMessagesResponse")
public SendMessagesResponseType sendMessages(@WebParam(name = "SendMessages", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "SendMessages")
SendMessagesType sendMessages) {
W3CEndpointReference epr = sendMessages.getEpr();
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/Sc003Constants.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -10,6 +10,15 @@
public interface Sc003Constants
{
/**
+ * The sc002 Namespace.
+ */
+ final static public String SC002_NAMESPACE = Sc002Constants.SC002_NAMESPACE;
+ /**
+ * The sc003 namespace prefix.
+ */
+ final static public String SC002_PREFIX = Sc002Constants.SC002_PREFIX ;
+
+ /**
* The sc003 Namespace.
*/
final static public String SC003_NAMESPACE = "http://www.wstf.org/docs/scenarios/sc003" ;
@@ -64,9 +73,9 @@
/**
* The sc003 Notify action
*/
- final static public String SC003_ACTION_NOTIFY = SC003_NAMESPACE + "/Notify";
+ final static public String SC003_ACTION_NOTIFY = SC002_NAMESPACE + "/Notify";
/**
* The sc003 Echo action
*/
- final static public String SC003_ACTION_ECHO = SC003_NAMESPACE + "/Echo";
+ final static public String SC003_ACTION_ECHO = SC002_NAMESPACE + "/Echo";
}
\ No newline at end of file
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003Client.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -1,9 +1,11 @@
package com.jboss.transaction.wstf.webservices.sc003.client;
+import org.jboss.wsf.common.addressing.MAP;
+import org.jboss.wsf.common.addressing.MAPBuilder;
+import org.jboss.wsf.common.addressing.MAPBuilderFactory;
import org.wstf.docs.scenarios.sc003.Sc003Service;
import org.wstf.docs.scenarios.sc003.Sc003Port;
-import javax.xml.ws.addressing.*;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder;
@@ -37,7 +39,7 @@
/**
* builder used to construct addressing info for calls
*/
- private static AddressingBuilder builder = AddressingBuilder.getAddressingBuilder();
+ private static MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();
/**
* fetch an Sc003 service unique to the current thread
@@ -77,68 +79,38 @@
bindingProvider.getBinding().setHandlerChain(customHandlerChain);
Map<String, Object> requestContext = bindingProvider.getRequestContext();
- AddressingProperties addressingProperties;
- addressingProperties = createAddressingProperties(toUri, replyUri, faultUri, messageId, conversationId, action);
- 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);
requestContext.put(Sc002Constants.SC002_CONVERSATION_IDENTIFIER, conversationId);
requestContext.put(Sc002Constants.SC002_ADDMU_HEADER, addMUHeader);
+
+ MAP map = createMAP(toUri, replyUri, faultUri, messageId, action);
+ map.installOutboundMapOnClientSide(requestContext, map);
+
return port;
}
- public static AddressingProperties createAddressingProperties(String toUri, String replyUri, String faultUri, String messageId, String conversationId, String action)
+ public static MAP createMAP(String toUri, String replyUri, String faultUri, String messageId, String action)
{
- AddressingProperties addressingProperties = builder.newAddressingProperties();
- try {
- addressingProperties.setTo(builder.newURI(toUri));
- } catch (URISyntaxException e) {
- // ignore
- System.out.println("exception setting To: " + toUri + " : " + e);
+ MAP map = builder.newMap();
+ map.setTo(toUri);
+ if (replyUri != null) {
+ if (replyUri.equals("")) {
+ replyUri = builder.newConstants().getAnonymousURI();
+ }
}
- try {
- addressingProperties.setMessageID(builder.newURI(messageId));
- } catch (URISyntaxException e) {
- // ignore
- System.out.println("exception setting MessageId: " + messageId + " : " + e);
+ if (faultUri != null) {
+ map.setFaultTo(builder.newEndpoint(faultUri));
}
- try {
- addressingProperties.setAction(builder.newURI(action));
- } catch (URISyntaxException e) {
- // ignore
- System.out.println("exception setting Action: " + messageId + " : " + e);
+ if (messageId != null) {
+ map.setMessageID(messageId);
}
- try {
- if (replyUri == null) {
- replyUri = builder.newAddressingConstants().getNoneURI();
- } else if ("".equals(replyUri)) {
- replyUri = builder.newAddressingConstants().getAnonymousURI();
- }
- AttributedURI reply = builder.newURI(replyUri);
- EndpointReference replyTo= builder.newEndpointReference(reply.getURI());
- SOAPElement refParam = createReferenceParameter(conversationId);
- replyTo.getReferenceParameters().addElement(refParam);
- addressingProperties.setReplyTo(replyTo);
- } catch (URISyntaxException e) {
- // ignore
- System.out.println("exception setting ReplyTo: " + replyUri + " : " + e);
+
+ if (action != null) {
+ map.setAction(action);
}
- try {
- if (faultUri != null) {
- AttributedURI fault = builder.newURI(faultUri);
- EndpointReference faultTo= builder.newEndpointReference(fault.getURI());
- SOAPElement refParam = createReferenceParameter(conversationId);
- faultTo.getReferenceParameters().addElement(refParam);
- addressingProperties.setFaultTo(faultTo);
- }
- } catch (URISyntaxException e) {
- // ignore
- System.out.println("exception setting FaultTo: " + faultUri + " : " + e);
- }
- return addressingProperties;
+ return map;
}
public static W3CEndpointReference getSc003ResponseEndpoint(String conversationId)
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/client/Sc003ClientHandler.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -53,7 +53,7 @@
SOAPMessage message = context.getMessage();
handleMustUnderstand(context, message);
- handleConversation(context, message);
+ // handleConversation(context, message);
return true;
}
@@ -83,7 +83,7 @@
// no need to add must understand ehaders for faults just append to the conversation
- handleConversation(context, message);
+ // handleConversation(context, message);
return true;
}
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003PortImpl.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -6,7 +6,10 @@
import javax.jws.*;
import javax.jws.soap.SOAPBinding;
+import javax.xml.ws.Action;
+import javax.xml.ws.FaultAction;
import javax.xml.ws.WebServiceException;
+import javax.xml.ws.soap.Addressing;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
import javax.xml.namespace.QName;
import java.util.*;
@@ -15,7 +18,7 @@
/**
- * Imnplementation class for WSTF scenario sc002 port SEI Scoo2Port
+ * Imnplementation class for WSTF scenario sc003 port SEI Scoo3Port
*/
@WebService(name = "sc003Port",
targetNamespace = "http://www.wstf.org/docs/scenarios/sc003",
@@ -24,7 +27,7 @@
serviceName="sc003Service")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
//@HandlerChain(file="sc003responsehandlers.xml")
- at EndpointConfig(configName="Standard WSAddressing Endpoint")
+ at Addressing(required=true)
public class Sc003PortImpl implements Sc003Port
{
/**
@@ -33,6 +36,7 @@
*/
@WebMethod(operationName = "Notify", action = "http://www.wstf.org/docs/scenarios/sc002/Notify")
@Oneway
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/Notify", fault= {@FaultAction(className = WebServiceException.class, value = "http://schemas.xmlsoap.org/wsdl/soap/envelope/fault")})
public void notify(@WebParam(name = "Notify", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Notify")
NotifyType notify, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
SessionDataType sessionData) {
@@ -52,6 +56,7 @@
*/
@WebMethod(operationName = "Echo", action = "http://www.wstf.org/docs/scenarios/sc002/Echo")
@WebResult(name = "EchoResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EchoResponse")
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/Echo", output="http://www.wstf.org/docs/scenarios/sc002/EchoResponse", fault= {@FaultAction(className = WebServiceException.class, value = "http://schemas.xmlsoap.org/wsdl/soap/envelope/fault")} )
public EchoResponseType echo(@WebParam(name = "Echo", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "Echo")
EchoType echo, @WebParam(name = "SessionData", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", header = true, partName = "SessionData")
SessionDataType sessionData) {
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/com/jboss/transaction/wstf/webservices/sc003/sei/Sc003ResponsePortImpl.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -1,9 +1,11 @@
package com.jboss.transaction.wstf.webservices.sc003.sei;
+import org.jboss.wsf.common.addressing.MAP;
+import org.jboss.wsf.common.addressing.MAPBuilderFactory;
+import org.jboss.wsf.common.addressing.MAPRelatesTo;
import org.wstf.docs.scenarios.sc003.Sc003ResponsePort;
import org.wstf.docs.scenarios.sc002.EchoResponseType;
import org.xmlsoap.schemas.soap.envelope.Fault;
-import org.jboss.ws.annotation.EndpointConfig;
import javax.jws.*;
import javax.jws.soap.SOAPBinding;
@@ -11,11 +13,10 @@
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPConstants;
import javax.xml.soap.SOAPException;
+import javax.xml.ws.Action;
import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.addressing.AddressingProperties;
-import javax.xml.ws.addressing.JAXWSAConstants;
-import javax.xml.ws.addressing.Relationship;
import javax.annotation.Resource;
+import javax.xml.ws.soap.Addressing;
import com.jboss.transaction.wstf.webservices.sc003.client.callback.EchoResponseCallbackHandler;
@@ -24,12 +25,12 @@
*/
@WebService(name = "sc003ResponsePort",
targetNamespace = "http://www.wstf.org/docs/scenarios/sc003",
- wsdlLocation="/WEB-INF/wsdl/sc003.wsdl",
+ wsdlLocation="/WEB-INF/wsdl/sc003Response.wsdl",
portName = "soap11port",
serviceName="sc003ResponseService")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
- at HandlerChain(file="sc003responsehandlers.xml")
- at EndpointConfig(configName="Standard WSAddressing Endpoint")
+// @HandlerChain(file="sc003responsehandlers.xml")
+ at Addressing(required = true)
public class Sc003ResponsePortImpl implements Sc003ResponsePort
{
@Resource
@@ -40,30 +41,28 @@
*/
@WebMethod(operationName = "EchoResponse", action = "http://www.wstf.org/docs/scenarios/sc002/EchoResponse")
@Oneway
+ @Action(input="http://www.wstf.org/docs/scenarios/sc002/EchoResponse")
public void echoResponse(@WebParam(name = "EchoResponse", targetNamespace = "http://www.wstf.org/docs/scenarios/sc002", partName = "EchoResponse")
EchoResponseType echoResponse) {
- AddressingProperties addressingProperties = (AddressingProperties)context.getMessageContext().get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
- Relationship[] relatesTo = addressingProperties.getRelatesTo();
- for (Relationship rel : relatesTo) {
- String messageId = rel.getID().toString();
- EchoResponseCallbackHandler.echoResponse(messageId, echoResponse);
- }
+ MAP map = MAPBuilderFactory.getInstance().getBuilderInstance().inboundMap(context.getMessageContext());
+ MAPRelatesTo relatesTo = map.getRelatesTo();
+ String messageId = relatesTo.getRelatesTo();
+ EchoResponseCallbackHandler.echoResponse(messageId, echoResponse);
}
/**
* @param fault
*/
@WebMethod(action = "http://schemas.xmlsoap.org/wsdl/soap/envelope/fault")
@Oneway
+ @Action(input="http://schemas.xmlsoap.org/wsdl/soap/envelope/fault")
public void fault(
@WebParam(name = "Fault", targetNamespace = "http://schemas.xmlsoap.org/soap/envelope/", partName = "fault")
Fault fault) {
- AddressingProperties addressingProperties = (AddressingProperties)context.getMessageContext().get(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_INBOUND);
- Relationship[] relatesTo = addressingProperties.getRelatesTo();
+ MAP map = MAPBuilderFactory.getInstance().getBuilderInstance().inboundMap(context.getMessageContext());
+ MAPRelatesTo relatesTo = map.getRelatesTo();
+ String mid = relatesTo.getRelatesTo();
SOAPFault soapFault = soapFaultFromFault(fault);
- for (Relationship rel : relatesTo) {
- String messageId = rel.getID().toString();
- EchoResponseCallbackHandler.fault(messageId, soapFault);
- }
+ EchoResponseCallbackHandler.fault(mid, soapFault);
}
SOAPFault soapFaultFromFault(Fault fault)
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/src/org/wstf/docs/scenarios/sc003/Sc003Service.java 2010-07-08 14:53:31 UTC (rev 33780)
@@ -8,7 +8,7 @@
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.Service21;
+import javax.xml.ws.Service;
/**
@@ -20,7 +20,7 @@
@WebServiceClient(name = "sc003Service", targetNamespace = "http://www.wstf.org/docs/scenarios/sc003", wsdlLocation = "wsdl/sc003.wsdl")
public class Sc003Service
// modified generated code o we can specify the WS Addressing feature
- extends Service21
+ extends Service
{
private final static URL SC003SERVICE_WSDL_LOCATION;
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web/sc003/index.jsp 2010-07-08 14:53:31 UTC (rev 33780)
@@ -28,7 +28,7 @@
<select name="<%= TestConstants.PARAM_TEST %>">
<option value="<%= TestConstants.NAME_ALL_TESTS_SC003 %>">All Sc003 tests</option>
<option value="<%= TestConstants.NAME_ALL_TESTS_SC003_SYNC %>">All Sc003 synchronous tests</option>
- <option value="<%= TestConstants.NAME_ALL_TESTS_SC003 %>">All Sc003 asynchronous tests</option>
+ <option value="<%= TestConstants.NAME_ALL_TESTS_SC003_ASYNC %>">All Sc003 asynchronous tests</option>
<%
final Map descriptions = TestConstants.DESCRIPTIONS_SC003 ;
Modified: labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml
===================================================================
--- labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml 2010-07-08 14:15:33 UTC (rev 33779)
+++ labs/jbosstm/workspace/interop/WSTFSC02-interop/web.xml 2010-07-08 14:53:31 UTC (rev 33780)
@@ -29,60 +29,78 @@
<!-- Define WSTF Server Endpoints -->
<servlet>
- <servlet-name>WSTF Sc002 Service</servlet-name>
+ <servlet-name>WSTF_Sc002_Service</servlet-name>
<servlet-class>com.jboss.transaction.wstf.webservices.sc002.sei.Sc002PortImpl</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
- <servlet-name>WSTF Sc003 Service</servlet-name>
+ <servlet-name>WSTF_Sc003_Service</servlet-name>
<servlet-class>com.jboss.transaction.wstf.webservices.sc003.sei.Sc003PortImpl</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
- <servlet-name>WSTF Sc003 Response Service</servlet-name>
+ <servlet-name>WSTF_Sc003_Response_Service</servlet-name>
<servlet-class>com.jboss.transaction.wstf.webservices.sc003.sei.Sc003ResponsePortImpl</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- define proxy, logging and junit test runner servlets -->
<servlet>
- <servlet-name>JUnit test servlet</servlet-name>
+ <servlet-name>HTTPProxyServlet</servlet-name>
+ <servlet-class>com.jboss.transaction.wstf.proxy.ProxyListenerService</servlet-class>
+ <!--
+ The base URI of the proxy servlet.
+ -->
+ <init-param>
+ <param-name>proxyServiceURI</param-name>
+ <param-value>http://@HOST@:@PORT@/wstf/proxy</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>JUnit_test_servlet</servlet-name>
<servlet-class>com.jboss.transaction.wstf.test.TestServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
- <servlet-name>Log servlet</servlet-name>
+ <servlet-name>Log_servlet</servlet-name>
<servlet-class>com.jboss.transaction.wstf.test.TestLogServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Define WSTF JaxWS Server Endpoint Mappings -->
<servlet-mapping>
- <servlet-name>WSTF Sc002 Service</servlet-name>
+ <servlet-name>WSTF_Sc002_Service</servlet-name>
<url-pattern>/sc002/Sc002Service</url-pattern>
</servlet-mapping>
<servlet-mapping>
- <servlet-name>WSTF Sc003 Service</servlet-name>
+ <servlet-name>WSTF_Sc003_Service</servlet-name>
<url-pattern>/sc003/Sc003Service</url-pattern>
</servlet-mapping>
<servlet-mapping>
- <servlet-name>WSTF Sc003 Response Service</servlet-name>
+ <servlet-name>WSTF_Sc003_Response_Service</servlet-name>
<url-pattern>/sc003/Sc003ResponseService</url-pattern>
</servlet-mapping>
<!-- define logging and junit test runner servlet mappings -->
<servlet-mapping>
- <servlet-name>JUnit test servlet</servlet-name>
+ <servlet-name>HTTPProxyServlet</servlet-name>
+ <url-pattern>/proxy/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>JUnit_test_servlet</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
<servlet-mapping>
- <servlet-name>Log servlet</servlet-name>
+ <servlet-name>Log_servlet</servlet-name>
<url-pattern>/logs/*</url-pattern>
</servlet-mapping>
More information about the jboss-svn-commits
mailing list