JBossWS SVN: r4708 - in legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws: metadata/umdm and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-09 09:42:41 -0400 (Tue, 09 Oct 2007)
New Revision: 4708
Modified:
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java
legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
Log:
Fix JBWS-1833: ConfigObserver was causing a memory leak
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-09 13:11:26 UTC (rev 4707)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-09 13:42:41 UTC (rev 4708)
@@ -55,6 +55,7 @@
{
this.epMetaData = epMetaData;
initBinding(epMetaData.getBindingId(), epMetaData.getType());
+ this.epMetaData.registerConfigObserver(this);
configure();
}
Modified: legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-10-09 13:11:26 UTC (rev 4707)
+++ legacy/branches/jbossws-1.2.1.GA_CP/jbossws-core/src/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-10-09 13:42:41 UTC (rev 4708)
@@ -52,6 +52,8 @@
import java.lang.reflect.Method;
import java.util.*;
+import java.lang.ref.WeakReference;
+
/**
* A Service component describes a set of endpoints.
*
@@ -604,9 +606,6 @@
if (config == null)
initEndpointConfig();
- // register any configurable with the ConfigProvider
- configObservable.addObserver(configurable);
-
// SOAPBinding configuration
if (configurable instanceof CommonBindingProvider)
{
@@ -715,11 +714,51 @@
class ConfigObservable extends Observable
{
+
+ private List<WeakReference<Observer>> observer = new ArrayList<WeakReference<Observer>>();
+
public void doNotify(Object object)
{
setChanged();
notifyObservers(object);
}
+
+ public synchronized void addObserver(Observer o)
+ {
+ observer.add( new WeakReference(o));
+ }
+
+ public synchronized void deleteObserver(Observer o)
+ {
+ for(WeakReference<Observer> w : observer)
+ {
+ Observer tmp = w.get();
+ if(tmp.equals(o))
+ {
+ observer.remove(o);
+ break;
+ }
+
+ }
+ }
+
+ public void notifyObservers()
+ {
+ notifyObservers(null);
+ }
+
+ public void notifyObservers(Object arg)
+ {
+ if(hasChanged())
+ {
+ for(WeakReference<Observer> w : observer)
+ {
+ Observer tmp = w.get();
+ tmp.update(this, arg);
+
+ }
+ }
+ }
}
public List<UnifiedPortComponentRefMetaData> getServiceRefContrib()
17 years, 2 months
JBossWS SVN: r4707 - stack/native/trunk/src/main/java/org/jboss/ws/core.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-09 09:11:26 -0400 (Tue, 09 Oct 2007)
New Revision: 4707
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
Log:
Javadocs
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-09 12:46:22 UTC (rev 4706)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-09 13:11:26 UTC (rev 4707)
@@ -40,10 +40,6 @@
/**
* Provides access to the protocol binding.
- * <p>
- * <b>NOTE</b>: CommonBindingProvider registers with EndpointMetaData through a observer pattern.
- * Which means the meta data model holds a strong reference to the binding provider which can
- * easily cause memory problems. Handle with care.
*
* @author Thomas.Diesler(a)jboss.com
* @author Heiko.Braun(a)jboss.com
17 years, 2 months
JBossWS SVN: r4706 - in stack/native/trunk/src: main/java/org/jboss/ws/metadata/umdm and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-09 08:46:22 -0400 (Tue, 09 Oct 2007)
New Revision: 4706
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java
stack/native/trunk/src/test/resources/benchmark/jmeter/JBossWS_Benchmark.jmx
Log:
Fix JBWS-1833: ConfigObserver was causing a memory leak
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-09 12:22:04 UTC (rev 4705)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/CommonBindingProvider.java 2007-10-09 12:46:22 UTC (rev 4706)
@@ -40,8 +40,13 @@
/**
* Provides access to the protocol binding.
- *
+ * <p>
+ * <b>NOTE</b>: CommonBindingProvider registers with EndpointMetaData through a observer pattern.
+ * Which means the meta data model holds a strong reference to the binding provider which can
+ * easily cause memory problems. Handle with care.
+ *
* @author Thomas.Diesler(a)jboss.com
+ * @author Heiko.Braun(a)jboss.com
* @since 04-Jul-2006
*/
public class CommonBindingProvider implements Configurable
@@ -55,6 +60,8 @@
{
this.epMetaData = epMetaData;
initBinding(epMetaData.getBindingId(), epMetaData.getType());
+
+ this.epMetaData.registerConfigObserver(this);
configure();
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-10-09 12:22:04 UTC (rev 4705)
+++ stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/EndpointMetaData.java 2007-10-09 12:46:22 UTC (rev 4706)
@@ -24,6 +24,7 @@
// $Id$
import java.lang.reflect.Method;
+import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -35,6 +36,7 @@
import java.util.Observable;
import java.util.Properties;
import java.util.Set;
+import java.util.Observer;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.xml.namespace.QName;
@@ -614,9 +616,6 @@
if (config == null)
initEndpointConfig();
- // register any configurable with the ConfigProvider
- configObservable.addObserver(configurable);
-
// SOAPBinding configuration
if (configurable instanceof CommonBindingProvider)
{
@@ -733,11 +732,51 @@
class ConfigObservable extends Observable
{
+
+ private List<WeakReference<Observer>> observer = new ArrayList<WeakReference<Observer>>();
+
public void doNotify(Object object)
{
setChanged();
notifyObservers(object);
}
+
+ public synchronized void addObserver(Observer o)
+ {
+ observer.add( new WeakReference(o));
+ }
+
+ public synchronized void deleteObserver(Observer o)
+ {
+ for(WeakReference<Observer> w : observer)
+ {
+ Observer tmp = w.get();
+ if(tmp.equals(o))
+ {
+ observer.remove(o);
+ break;
+ }
+
+ }
+ }
+
+ public void notifyObservers()
+ {
+ notifyObservers(null);
+ }
+
+ public void notifyObservers(Object arg)
+ {
+ if(hasChanged())
+ {
+ for(WeakReference<Observer> w : observer)
+ {
+ Observer tmp = w.get();
+ tmp.update(this, arg);
+
+ }
+ }
+ }
}
public List<UnifiedPortComponentRefMetaData> getServiceRefContrib()
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java 2007-10-09 12:22:04 UTC (rev 4705)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxrpc/jbws626/ServerHandler.java 2007-10-09 12:46:22 UTC (rev 4706)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxrpc.jbws626;
+import org.jboss.ws.core.CommonMessageContext;
+
import java.util.Iterator;
import javax.xml.namespace.QName;
@@ -83,6 +85,10 @@
wasName = soapElement.getElementName();
assertElementName(expName, wasName);
}
+
+ // for testing the CommonBindingProvider memory leak. Not related to this test...
+ ((CommonMessageContext)msgContext).setModified(true);
+
}
catch (SOAPException ex)
{
Modified: stack/native/trunk/src/test/resources/benchmark/jmeter/JBossWS_Benchmark.jmx
===================================================================
--- stack/native/trunk/src/test/resources/benchmark/jmeter/JBossWS_Benchmark.jmx 2007-10-09 12:22:04 UTC (rev 4705)
+++ stack/native/trunk/src/test/resources/benchmark/jmeter/JBossWS_Benchmark.jmx 2007-10-09 12:46:22 UTC (rev 4706)
@@ -21,7 +21,7 @@
<stringProp name="TestPlan.comments"></stringProp>
</TestPlan>
<hashTree>
- <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Model1_JAXWS" enabled="true">
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Model1_JAXWS" enabled="false">
<longProp name="ThreadGroup.start_time">1144146988000</longProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="ThreadGroup.duration"></stringProp>
@@ -46,6 +46,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -55,7 +56,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -65,6 +65,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -74,7 +75,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -86,8 +86,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -95,8 +95,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -156,6 +156,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -165,7 +166,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -175,6 +175,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -184,7 +185,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -196,8 +196,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -205,8 +205,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -259,6 +259,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -271,7 +272,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -281,6 +281,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -293,7 +294,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -305,8 +305,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -314,8 +314,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -354,10 +354,10 @@
<longProp name="ThreadGroup.start_time">1144146988000</longProp>
<stringProp name="ThreadGroup.delay"></stringProp>
<stringProp name="ThreadGroup.duration"></stringProp>
- <stringProp name="ThreadGroup.num_threads">10</stringProp>
+ <stringProp name="ThreadGroup.num_threads">1</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
- <stringProp name="LoopController.loops">2000</stringProp>
+ <stringProp name="LoopController.loops">1</stringProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
<longProp name="ThreadGroup.end_time">1144146988000</longProp>
@@ -368,6 +368,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -380,7 +381,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -390,6 +390,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -402,7 +403,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -414,8 +414,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -423,8 +423,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -477,6 +477,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC2.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -489,7 +490,6 @@
</ns1:echoArrayOfSimpleUserType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -499,6 +499,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC2.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -511,7 +512,6 @@
</ns1:echoArrayOfSimpleUserType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -523,8 +523,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -532,8 +532,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -593,6 +593,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.1" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -602,7 +603,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -612,6 +612,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -621,7 +622,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -633,8 +633,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -642,8 +642,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -703,6 +703,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.1" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -712,7 +713,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -722,6 +722,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -731,7 +732,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -743,8 +743,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -752,8 +752,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -806,6 +806,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.1" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -818,7 +819,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -828,6 +828,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -840,7 +841,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -852,8 +852,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -861,8 +861,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -915,6 +915,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.1" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -927,7 +928,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -937,6 +937,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -949,7 +950,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -961,8 +961,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -970,10 +970,112 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
+ </ResponseAssertion>
+ <hashTree/>
+ <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
+ <objProp>
+ <value class="SampleSaveConfiguration">
+ <time>true</time>
+ <latency>true</latency>
+ <timestamp>true</timestamp>
+ <success>true</success>
+ <label>true</label>
+ <code>true</code>
+ <message>true</message>
+ <threadName>true</threadName>
+ <dataType>true</dataType>
+ <encoding>false</encoding>
+ <assertions>true</assertions>
+ <subresults>true</subresults>
+ <responseData>false</responseData>
+ <samplerData>false</samplerData>
+ <xml>true</xml>
+ <fieldNames>false</fieldNames>
+ <responseHeaders>false</responseHeaders>
+ <requestHeaders>false</requestHeaders>
+ <responseDataOnError>false</responseDataOnError>
+ <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
+ <assertionsResultsToSave>0</assertionsResultsToSave>
+ </value>
+ <name>saveConfig</name>
+ </objProp>
+ <stringProp name="filename"></stringProp>
+ <boolProp name="ResultCollector.error_logging">false</boolProp>
+ </ResultCollector>
+ <hashTree/>
+ </hashTree>
+ <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Mem" enabled="true">
+ <longProp name="ThreadGroup.start_time">1144146988000</longProp>
+ <stringProp name="ThreadGroup.delay"></stringProp>
+ <stringProp name="ThreadGroup.duration"></stringProp>
+ <stringProp name="ThreadGroup.num_threads">10</stringProp>
+ <boolProp name="ThreadGroup.scheduler">false</boolProp>
+ <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
+ <stringProp name="LoopController.loops">2000</stringProp>
+ <boolProp name="LoopController.continue_forever">false</boolProp>
+ </elementProp>
+ <longProp name="ThreadGroup.end_time">1144146988000</longProp>
+ <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">1</stringProp>
+ </ThreadGroup>
+ <hashTree>
+ <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="Sample" enabled="true">
+ <stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
+ <stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
+ <stringProp name="HTTPSamper.xml_data"><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:jbw="http://org.jboss.test.webservice/jbws626">
+ <soapenv:Header/>
+ <soapenv:Body><jbw:echoArray><arrayOfValueObj_1><value><s1>1</s1><s2>2</s2></value></arrayOfValueObj_1></jbw:echoArray></soapenv:Body>
+</soapenv:Envelope>
+</stringProp>
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
+ <collectionProp name="Arguments.arguments"/>
+ </elementProp>
+ <stringProp name="SoapSampler.URL_DATA">http://localhost:8080/jaxrpc-jbws626/DemoBean</stringProp>
+ </SoapSampler>
+ <hashTree/>
+ <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
+ <stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
+ <stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
+ <stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
+ <env:Header/>
+ <env:Body>
+ <ns1:echoSimpleType xmlns:ns1='http://org.jboss.ws/benchmark/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
+ <SimpleUserType_1>
+ <f>1.0</f>
+ <i>1</i>
+ <s>test</s>
+ </SimpleUserType_1>
+ </ns1:echoSimpleType>
+ </env:Body>
+</env:Envelope></stringProp>
+ <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
+ <collectionProp name="Arguments.arguments"/>
+ </elementProp>
+ <stringProp name="SoapSampler.URL_DATA">http://localhost:8080/benchmark-doc-ejb</stringProp>
+ </SoapSampler>
+ <hashTree/>
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Code Assertion" enabled="true">
+ <collectionProp name="Asserion.test_strings">
+ <stringProp name="49586">200</stringProp>
+ </collectionProp>
+ <stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
<stringProp name="Assertion.assume_success">false</stringProp>
+ <intProp name="Assertion.test_type">2</intProp>
</ResponseAssertion>
<hashTree/>
+ <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
+ <collectionProp name="Asserion.test_strings">
+ <stringProp name="-1984138256">Envelope</stringProp>
+ </collectionProp>
+ <stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
+ <intProp name="Assertion.test_type">2</intProp>
+ </ResponseAssertion>
+ <hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
<objProp>
<value class="SampleSaveConfiguration">
@@ -1024,6 +1126,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC2.1" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1036,7 +1139,6 @@
</ns1:echoArrayOfSimpleUserType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1046,6 +1148,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC2.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1058,7 +1161,6 @@
</ns1:echoArrayOfSimpleUserType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1070,8 +1172,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -1079,8 +1181,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -1140,6 +1242,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1149,7 +1252,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1159,6 +1261,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1168,7 +1271,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1180,8 +1282,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -1189,8 +1291,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -1250,6 +1352,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1259,7 +1362,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1269,6 +1371,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC1.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1278,7 +1381,6 @@
</ns1:getOrder>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1290,8 +1392,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -1299,8 +1401,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
@@ -1353,6 +1455,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1365,7 +1468,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1375,6 +1477,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1387,7 +1490,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1399,8 +1501,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -1408,8 +1510,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
@@ -1462,6 +1564,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.1-JAXWS" enabled="true">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1474,7 +1577,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1484,6 +1586,7 @@
<SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="DOC3.2" enabled="false">
<stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
<stringProp name="SoapSampler.xml_data_file"></stringProp>
+ <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<stringProp name="HTTPSamper.xml_data"><env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<env:Header/>
<env:Body>
@@ -1496,7 +1599,6 @@
</ns1:echoSimpleType>
</env:Body>
</env:Envelope></stringProp>
- <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@@ -1508,8 +1610,8 @@
<stringProp name="49586">200</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_code</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Envelope Assertion" enabled="true">
@@ -1517,8 +1619,8 @@
<stringProp name="-1984138256">Envelope</stringProp>
</collectionProp>
<stringProp name="Assertion.test_field">Assertion.response_data</stringProp>
+ <stringProp name="Assertion.assume_success">false</stringProp>
<intProp name="Assertion.test_type">2</intProp>
- <stringProp name="Assertion.assume_success">false</stringProp>
</ResponseAssertion>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="false">
17 years, 2 months
JBossWS SVN: r4705 - in stack/metro/trunk: ant-import and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-09 08:22:04 -0400 (Tue, 09 Oct 2007)
New Revision: 4705
Modified:
stack/metro/trunk/ant-import/build-bin-dist.xml
stack/metro/trunk/ant-import/build-thirdparty.xml
stack/metro/trunk/ant-import/macros-deploy-sunri.xml
stack/metro/trunk/build.xml
Log:
Remove dependency on jbossws-jboss42.jar
Modified: stack/metro/trunk/ant-import/build-bin-dist.xml
===================================================================
--- stack/metro/trunk/ant-import/build-bin-dist.xml 2007-10-09 11:11:11 UTC (rev 4704)
+++ stack/metro/trunk/ant-import/build-bin-dist.xml 2007-10-09 12:22:04 UTC (rev 4705)
@@ -101,7 +101,6 @@
<include name="jbossws-sunri50.sar"/>
</fileset>
<fileset dir="${thirdparty.dir}">
- <include name="jbossws-jboss42.jar"/>
<include name="FastInfoset.jar"/>
<include name="http.jar"/>
<include name="jaxb-api.jar"/>
Modified: stack/metro/trunk/ant-import/build-thirdparty.xml
===================================================================
--- stack/metro/trunk/ant-import/build-thirdparty.xml 2007-10-09 11:11:11 UTC (rev 4704)
+++ stack/metro/trunk/ant-import/build-thirdparty.xml 2007-10-09 12:22:04 UTC (rev 4705)
@@ -46,7 +46,6 @@
<get src="${jboss.repository}/jboss/jbossws-framework/${jbossws-framework}/lib/jbossws-framework.jar" dest="${thirdparty.dir}/jbossws-framework.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-framework/${jbossws-framework}/lib/jbossws-framework-scripts.zip" dest="${thirdparty.dir}/jbossws-framework-scripts.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar" dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar" dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true" verbose="true"/>
Modified: stack/metro/trunk/ant-import/macros-deploy-sunri.xml
===================================================================
--- stack/metro/trunk/ant-import/macros-deploy-sunri.xml 2007-10-09 11:11:11 UTC (rev 4704)
+++ stack/metro/trunk/ant-import/macros-deploy-sunri.xml 2007-10-09 12:22:04 UTC (rev 4705)
@@ -111,7 +111,6 @@
<include name="jbossws-sunri-client.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
- <include name="jbossws-jboss42.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxb-xjc.jar"/>
@@ -131,11 +130,6 @@
<include name="jaxb-impl.jar"/>
</fileset>
</copy>
- <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{thirdpartylibs}">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
- </copy>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar" src="@{stacklibs}/jbossws-sunri42.sar"/>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
@@ -159,13 +153,8 @@
<include name="jsr181-api.jar"/>
<include name="saaj-api.jar"/>
<include name="saaj-impl.jar"/>
-
- <include name="jbossws-jboss42.jar"/>
<include name="jbossws-sunri-client.jar"/>
</fileset>
- <fileset dir="${jboss42.home}/server/${jboss.server.instance}/lib">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
</delete>
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws-sunri.sar"/>
<delete dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
Modified: stack/metro/trunk/build.xml
===================================================================
--- stack/metro/trunk/build.xml 2007-10-09 11:11:11 UTC (rev 4704)
+++ stack/metro/trunk/build.xml 2007-10-09 12:22:04 UTC (rev 4705)
@@ -212,7 +212,6 @@
<include name="jbossws-sunri.jar"/>
</fileset>
<fileset dir="${thirdparty.dir}">
- <include name="jbossws-jboss42.jar"/>
<include name="FastInfoset.jar"/>
<include name="http.jar"/>
<include name="jaxb-api.jar"/>
17 years, 2 months
JBossWS SVN: r4704 - in stack/native/trunk/src/test/java/org/jboss/test/ws: tools/jaxws and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-10-09 07:11:11 -0400 (Tue, 09 Oct 2007)
New Revision: 4704
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/JBWS1799TestCase.java
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java
stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
Log:
[JBWS-1799] fixing tests
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java 2007-10-09 11:09:28 UTC (rev 4703)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java 2007-10-09 11:11:11 UTC (rev 4704)
@@ -38,7 +38,7 @@
{
public boolean authenticate
(
- @WebParam(name="username") String username,
+ @WebParam(name="username") String username,
@WebParam(name="password") String password
);
}
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/JBWS1799TestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/JBWS1799TestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/JBWS1799TestCase.java 2007-10-09 11:11:11 UTC (rev 4704)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.jbws1799;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-1799] Two ejb3s exposed as 2 different web services in the same ear file.
+ * Can't have same methods with different parameters in two separate EJBs.
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 8, 2007
+ */
+public class JBWS1799TestCase extends JBossWSTest
+{
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1799TestCase.class, "jaxws-jbws1799.jar");
+ }
+
+ public void testFirstService() throws Exception
+ {
+ QName serviceName = new QName("namespace1", "UserAccountService1.0");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/svc-useracctv1.0/UserAccountService1.0?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ IUserAccountService proxy = (IUserAccountService)service.getPort(IUserAccountService.class);
+
+ assertTrue(proxy.authenticate("authorized"));
+ assertFalse(proxy.authenticate("unauthorized"));
+ }
+
+ public void testSecondService() throws Exception
+ {
+ QName serviceName = new QName("namespaceExt", "UserAccountServiceExt1.0");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/svc-useracctv1.0/UserAccountServiceExt1.0?wsdl");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ IUserAccountServiceExt proxy = (IUserAccountServiceExt)service.getPort(IUserAccountServiceExt.class);
+
+ assertTrue(proxy.authenticate("authorized", "password"));
+ assertFalse(proxy.authenticate("unauthorized", "password"));
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/JBWS1799TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-10-09 11:09:28 UTC (rev 4703)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java 2007-10-09 11:11:11 UTC (rev 4704)
@@ -60,8 +60,8 @@
private void checkWrapperSource(File outputDir, boolean shouldExist)
{
- File file1 = new File(outputDir, "org/jboss/test/ws/tools/jaxws/jaxws/SubmitPO.java");
- File file2 = new File(outputDir, "org/jboss/test/ws/tools/jaxws/jaxws/SubmitPOResponse.java");
+ File file1 = new File(outputDir, "org/jboss/test/ws/tools/jaxws/jaxws/generated_978001231/SubmitPO.java");
+ File file2 = new File(outputDir, "org/jboss/test/ws/tools/jaxws/jaxws/generated_978001231/SubmitPOResponse.java");
assertEquals(shouldExist, file1.exists());
assertEquals(shouldExist, file2.exists());
}
@@ -72,12 +72,12 @@
URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()}, Thread.currentThread().getContextClassLoader());
// Check request wrapper
- Class wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.tools.jaxws.jaxws.SubmitPO", classLoader);
+ Class wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.tools.jaxws.jaxws.generated_978001231.SubmitPO", classLoader);
wrapper.getMethod("setPurchaseOrder", PurchaseOrder.class);
assertEquals(PurchaseOrder.class.getName(), wrapper.getMethod("getPurchaseOrder").getReturnType().getName());
// Check response wrapper
- wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.tools.jaxws.jaxws.SubmitPOResponse", classLoader);
+ wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.tools.jaxws.jaxws.generated_978001231.SubmitPOResponse", classLoader);
wrapper.getMethod("setPurchaseOrderAck", PurchaseOrderAck.class);
assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
}
17 years, 2 months
JBossWS SVN: r4703 - framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-10-09 07:09:28 -0400 (Tue, 09 Oct 2007)
New Revision: 4703
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java
Log:
[JBWS-1799] fixing tests
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2007-10-09 11:07:28 UTC (rev 4702)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2007-10-09 11:09:28 UTC (rev 4703)
@@ -94,7 +94,7 @@
File outputDir = new File("wsprovide/java");
File javaSource = new File(
outputDir.getAbsolutePath()+
- "/org/jboss/test/ws/jaxws/smoke/tools/jaxws/AddResponse.java"
+ "/org/jboss/test/ws/jaxws/smoke/tools/jaxws/generated__432967231/AddResponse.java"
);
assertTrue("Response wrapper not generated", javaSource.exists());
Modified: framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java
===================================================================
--- framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java 2007-10-09 11:07:28 UTC (rev 4702)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java 2007-10-09 11:09:28 UTC (rev 4703)
@@ -98,7 +98,7 @@
{
File javaSource = new File(
directory.getAbsolutePath()+
- "/org/jboss/test/ws/jaxws/smoke/tools/jaxws/AddResponse.java"
+ "/org/jboss/test/ws/jaxws/smoke/tools/jaxws/generated__432967231/AddResponse.java"
);
assertTrue("Source not generated", javaSource.exists());
@@ -112,7 +112,7 @@
{
provide();
ClassLoader loader = getArtefactClassLoader();
- Class responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
+ Class responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.generated__432967231.AddResponse");
XmlRootElement rootElement = (XmlRootElement) responseWrapper.getAnnotation(XmlRootElement.class);
assertNotNull("@XmlRootElement missing form response wrapper", rootElement);
assertEquals("Wrong namespace", rootElement.namespace(), "http://foo.bar.com/calculator");
@@ -199,7 +199,7 @@
System.out.println("-- End captured output --");
assertTrue("Provider messages not correctly redirected",
- messageOut.indexOf("org/jboss/test/ws/jaxws/smoke/tools/jaxws/Add.class") != -1 );
+ messageOut.indexOf("org/jboss/test/ws/jaxws/smoke/tools/jaxws/generated__432967231/Add.class") != -1 );
}
private void provide() throws Exception
17 years, 2 months
JBossWS SVN: r4702 - stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-10-09 07:07:28 -0400 (Tue, 09 Oct 2007)
New Revision: 4702
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
Log:
[JBWS-1799] fix of the issue
Modified: stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-10-09 10:58:37 UTC (rev 4701)
+++ stack/native/trunk/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilder.java 2007-10-09 11:07:28 UTC (rev 4702)
@@ -362,7 +362,7 @@
if (requestWrapperType == null)
{
String packageName = JavaUtils.getPackageName(method.getDeclaringClass());
- requestWrapperType = packageName + ".jaxws." + JavaUtils.capitalize(method.getName());
+ requestWrapperType = packageName + ".jaxws." + generateId(method) + "." + JavaUtils.capitalize(method.getName());
}
// JAX-WS p.37 pg.1, the annotation only affects the element name, not the type name
@@ -372,7 +372,29 @@
return wrapperParameter;
}
-
+
+ /**
+ * Generates unique string used for package name creation
+ */
+ private static String generateId(Method method)
+ {
+ int hashCode = 17;
+ hashCode = 37 * hashCode + method.getDeclaringClass().getName().hashCode();
+ hashCode = 37 * hashCode + method.getName().hashCode();
+ hashCode = 37 * hashCode + generateId(method.getParameterTypes());
+ return ("generated_" + hashCode).replace('-', '_');
+ }
+
+ private static int generateId(Class<?>[] args)
+ {
+ int result = 17;
+ for (int i = 0; i < args.length; i++)
+ {
+ result = 37 * result + args[i].getName().hashCode();
+ }
+ return result;
+ }
+
private ParameterMetaData createResponseWrapper(OperationMetaData operation, Method method)
{
QName operationQName = operation.getQName();
@@ -395,7 +417,7 @@
if (responseWrapperType == null)
{
String packageName = JavaUtils.getPackageName(method.getDeclaringClass());
- responseWrapperType = packageName + ".jaxws." + JavaUtils.capitalize(method.getName()) + "Response";
+ responseWrapperType = packageName + ".jaxws." + generateId(method) + "." + JavaUtils.capitalize(method.getName()) + "Response";
}
ParameterMetaData retMetaData = new ParameterMetaData(operation, xmlName, xmlType, responseWrapperType);
17 years, 2 months
JBossWS SVN: r4701 - in stack/native/trunk: ant-import and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-09 06:58:37 -0400 (Tue, 09 Oct 2007)
New Revision: 4701
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java
Modified:
stack/native/trunk/ant-import/build-bin-dist.xml
stack/native/trunk/ant-import/build-thirdparty.xml
stack/native/trunk/ant-import/macros-deploy-native.xml
stack/native/trunk/build.xml
stack/native/trunk/src/main/java/javax/xml/ws/Binding21.java
stack/native/trunk/src/main/java/org/jboss/ws/core/ConfigProvider.java
stack/native/trunk/src/main/java/org/jboss/ws/core/StubExt.java
stack/native/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
Log:
[JBWS-1817] WS-Security with JAX-WS Dispatch
Remove dependency on jbossws-jboss42
Modified: stack/native/trunk/ant-import/build-bin-dist.xml
===================================================================
--- stack/native/trunk/ant-import/build-bin-dist.xml 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/ant-import/build-bin-dist.xml 2007-10-09 10:58:37 UTC (rev 4701)
@@ -92,7 +92,6 @@
<include name="jbossws-framework.jar"/>
<include name="jbossws-framework-scripts.zip"/>
<include name="jbossws-spi.jar"/>
- <include name="jbossws-jboss42.jar"/>
<include name="jbossws-jboss40.jar"/>
</fileset>
<fileset dir="${core.dir}/output/lib">
Modified: stack/native/trunk/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/trunk/ant-import/build-thirdparty.xml 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/ant-import/build-thirdparty.xml 2007-10-09 10:58:37 UTC (rev 4701)
@@ -56,9 +56,7 @@
<get src="${jboss.repository}/jboss/jbossws-jboss40/${jbossws-jboss40}/lib/jbossws-jboss40.jar" dest="${thirdparty.dir}/jbossws-jboss40.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss40/${jbossws-jboss40}/lib/jbossws-jboss40-resources.zip" dest="${thirdparty.dir}/jbossws-jboss40-resources.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss40/${jbossws-jboss40}/lib/jbossws-jboss40-src.zip" dest="${thirdparty.dir}/jbossws-jboss40-src.zip" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42.jar" dest="${thirdparty.dir}/jbossws-jboss42.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.zip" usetimestamp="true" verbose="true"/>
- <get src="${jboss.repository}/jboss/jbossws-jboss42/${jbossws-jboss42}/lib/jbossws-jboss42-src.zip" dest="${thirdparty.dir}/jbossws-jboss42-src.zip" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/apache-ant/${apache-ant}/lib/ant.jar" dest="${thirdparty.dir}/ant.jar" usetimestamp="true" verbose="true"/>
<get src="${jboss.repository}/apache-collections/${apache-collections}/lib/commons-collections.jar" dest="${thirdparty.dir}/commons-collections.jar" usetimestamp="true" verbose="true"/>
Modified: stack/native/trunk/ant-import/macros-deploy-native.xml
===================================================================
--- stack/native/trunk/ant-import/macros-deploy-native.xml 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/ant-import/macros-deploy-native.xml 2007-10-09 10:58:37 UTC (rev 4701)
@@ -141,7 +141,6 @@
<include name="jbossws-client.jar"/>
</fileset>
<fileset dir="@{thirdpartylibs}">
- <include name="jbossws-jboss42.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxb-xjc.jar"/>
@@ -161,12 +160,6 @@
<include name="jboss-xml-binding.jar"/>
</fileset>
</copy>
- <copy todir="${jboss42.home}/server/${jboss.server.instance}/lib" overwrite="true">
- <fileset dir="@{thirdpartylibs}">
- <include name="jbossws-jboss42.jar"/>
- </fileset>
- </copy>
-
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
<unjar dest="${jboss42.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native42.sar"/>
<mkdir dir="${jboss42.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
@@ -199,7 +192,6 @@
<include name="jboss-jaxws-ext.jar"/>
<include name="jboss-saaj.jar"/>
<include name="jbossws-client.jar"/>
- <include name="jbossws-jboss42.jar"/>
<include name="policy.jar"/>
<include name="stax-ex.jar"/>
<include name="streambuffer.jar"/>
@@ -217,7 +209,6 @@
<include name="jbossws-integration.jar"/>
</fileset>
<fileset dir="${jboss42.home}/server/${jboss.server.instance}/lib">
- <include name="jbossws-jboss42.jar"/>
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-jaxws-ext.jar"/>
Modified: stack/native/trunk/build.xml
===================================================================
--- stack/native/trunk/build.xml 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/build.xml 2007-10-09 10:58:37 UTC (rev 4701)
@@ -331,7 +331,6 @@
<include name="jbossws-core.jar"/>
</fileset>
<fileset dir="${core.dir}/thirdparty">
- <include name="jbossws-jboss42.jar"/>
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="policy.jar"/>
Modified: stack/native/trunk/src/main/java/javax/xml/ws/Binding21.java
===================================================================
--- stack/native/trunk/src/main/java/javax/xml/ws/Binding21.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/javax/xml/ws/Binding21.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -21,6 +21,8 @@
*/
package javax.xml.ws;
+// $Id$
+
/**
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/ConfigProvider.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/ConfigProvider.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/ConfigProvider.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -50,4 +50,14 @@
* Set the port configuration name and file
*/
void setConfigName(String configName, String configFile);
+
+ /**
+ * Get the WS-Security configuration
+ */
+ String getSecurityConfig();
+
+ /**
+ * Set the WS-Security configuration
+ */
+ void setSecurityConfig(String securityConfig);
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/StubExt.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/StubExt.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/StubExt.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -126,14 +126,4 @@
* Creates a new empty AttachmentPart object.
*/
AttachmentPart createAttachmentPart();
-
- /**
- * Get the WS-Security configuration
- */
- String getSecurityConfig();
-
- /**
- * Set the WS-Security configuration
- */
- void setSecurityConfig(String securityConfig);
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -38,6 +38,7 @@
{
private String targetAddress;
private Map<String, Object> properties;
+
public EndpointInfo(EndpointMetaData epMetaData, String targetAddress, Map<String, Object> callProps)
{
this.targetAddress = targetAddress;
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -21,15 +21,15 @@
*/
package org.jboss.ws.core.jaxws.binding;
+//$Id$
+
import java.util.List;
-import javax.xml.ws.Binding;
import javax.xml.ws.Binding21;
import javax.xml.ws.handler.Handler;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-// $Id$
/**
* Extension to JAXWS protocol bindings.
@@ -39,7 +39,9 @@
*/
public interface BindingExt extends Binding21
{
+ /** Get the handler chain for a given type */
List<Handler> getHandlerChain(HandlerType handlerType);
-
+
+ /** Set the handler chain for a given type */
void setHandlerChain(List<Handler> handlerChain, HandlerType handlerType);
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -37,7 +37,6 @@
import javax.xml.ws.BindingProvider;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.wsaddressing.BindingProvider21;
import javax.xml.ws.handler.Handler;
import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.MessageContext;
@@ -47,6 +46,7 @@
import javax.xml.ws.http.HTTPException;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.soap.SOAPFaultException;
+import javax.xml.ws.wsaddressing.BindingProvider21;
import org.jboss.logging.Logger;
import org.jboss.remoting.transport.http.HTTPMetadataConstants;
@@ -59,11 +59,11 @@
import org.jboss.ws.core.jaxws.handler.HandlerChainExecutor;
import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
-import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.core.soap.MessageContextAssociation;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
@@ -79,22 +79,21 @@
// provide logging
private static Logger log = Logger.getLogger(ClientImpl.class);
- // the associated endpoint meta data
- private final EndpointMetaData epMetaData;
+ // the associated endpoint meta data
+ private final ClientEndpointMetaData epMetaData;
- // Keep a handle on the resolver so that updateConfig calls may revisit the associated chains
- private final HandlerResolver handlerResolver;
-
- private Map<HandlerType, HandlerChainExecutor> executorMap = new HashMap<HandlerType, HandlerChainExecutor>();
+ // Keep a handle on the resolver so that updateConfig calls may revisit the associated chains
+ private final HandlerResolver handlerResolver;
- private static HandlerType[] HANDLER_TYPES = new HandlerType[] {HandlerType.PRE, HandlerType.ENDPOINT, HandlerType.POST};
-
- public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
+ private Map<HandlerType, HandlerChainExecutor> executorMap = new HashMap<HandlerType, HandlerChainExecutor>();
+ private static HandlerType[] HANDLER_TYPES = new HandlerType[] { HandlerType.PRE, HandlerType.ENDPOINT, HandlerType.POST };
+
+ public ClientImpl(EndpointMetaData epMetaData, HandlerResolver handlerResolver)
{
super(epMetaData);
setTargetEndpointAddress(epMetaData.getEndpointAddress());
- this.epMetaData = epMetaData;
+ this.epMetaData = (ClientEndpointMetaData)epMetaData;
this.handlerResolver = handlerResolver;
initBindingHandlerChain(false);
@@ -112,31 +111,31 @@
{
BindingExt binding = (BindingExt)getBindingProvider().getBinding();
- PortInfo portInfo = getPortInfo(epMetaData);
+ PortInfo portInfo = epMetaData.getPortInfo();
- if (handlerResolver != null)
- {
+ if (handlerResolver != null)
+ {
- boolean jbossHandlerResolver = handlerResolver instanceof HandlerResolverImpl;
-
- if (jbossHandlerResolver) // knows about PRE and POST handlers
- {
- HandlerResolverImpl impl = (HandlerResolverImpl)handlerResolver;
- impl.initHandlerChain(epMetaData, HandlerType.PRE, clearExistingHandlers);
- impl.initHandlerChain(epMetaData, HandlerType.ENDPOINT, clearExistingHandlers);
- impl.initHandlerChain(epMetaData, HandlerType.POST, clearExistingHandlers);
+ boolean jbossHandlerResolver = handlerResolver instanceof HandlerResolverImpl;
- List<Handler> preChain = impl.getHandlerChain(portInfo, HandlerType.PRE);
- List<Handler> postChain = impl.getHandlerChain(portInfo, HandlerType.POST);
-
- binding.setHandlerChain(postChain, HandlerType.POST);
- binding.setHandlerChain(preChain, HandlerType.PRE);
- }
+ if (jbossHandlerResolver) // knows about PRE and POST handlers
+ {
+ HandlerResolverImpl impl = (HandlerResolverImpl)handlerResolver;
+ impl.initHandlerChain(epMetaData, HandlerType.PRE, clearExistingHandlers);
+ impl.initHandlerChain(epMetaData, HandlerType.ENDPOINT, clearExistingHandlers);
+ impl.initHandlerChain(epMetaData, HandlerType.POST, clearExistingHandlers);
- // The regular handler chain
- List<Handler> endpointChain = handlerResolver.getHandlerChain(portInfo);
- binding.setHandlerChain(endpointChain);
- }
+ List<Handler> preChain = impl.getHandlerChain(portInfo, HandlerType.PRE);
+ List<Handler> postChain = impl.getHandlerChain(portInfo, HandlerType.POST);
+
+ binding.setHandlerChain(postChain, HandlerType.POST);
+ binding.setHandlerChain(preChain, HandlerType.PRE);
+ }
+
+ // The regular handler chain
+ List<Handler> endpointChain = handlerResolver.getHandlerChain(portInfo);
+ binding.setHandlerChain(endpointChain);
+ }
}
/**
@@ -389,26 +388,26 @@
configProvider.setConfigName(configName, configFile);
}
- /**
- * Retrieve header names that can be processed by this binding
- * @return
- */
- public Set<QName> getHeaders()
+ /**
+ * Retrieve header names that can be processed by this binding
+ * @return
+ */
+ public Set<QName> getHeaders()
{
- Set<QName> headers = new HashSet<QName>();
+ Set<QName> headers = new HashSet<QName>();
- BindingExt binding = (BindingExt)getBinding();
+ BindingExt binding = (BindingExt)getBinding();
- for(HandlerType type : HANDLER_TYPES)
- {
- for(Handler bindingHandler : binding.getHandlerChain(type))
- {
- if(bindingHandler instanceof SOAPHandler)
- headers.addAll( ((SOAPHandler)bindingHandler).getHeaders());
- }
- }
-
- return headers;
+ for (HandlerType type : HANDLER_TYPES)
+ {
+ for (Handler bindingHandler : binding.getHandlerChain(type))
+ {
+ if (bindingHandler instanceof SOAPHandler)
+ headers.addAll(((SOAPHandler)bindingHandler).getHeaders());
+ }
+ }
+
+ return headers;
}
@Override
@@ -417,13 +416,4 @@
Object bool = getRequestContext().get(BindingProvider.SESSION_MAINTAIN_PROPERTY);
return Boolean.TRUE.equals(bool);
}
-
- private PortInfo getPortInfo(EndpointMetaData epMetaData)
- {
- QName serviceName = epMetaData.getServiceMetaData().getServiceName();
- QName portName = epMetaData.getPortName();
- String bindingID = epMetaData.getBindingId();
- PortInfo portInfo = new PortInfoImpl(serviceName, portName, bindingID);
- return portInfo;
- }
}
\ No newline at end of file
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -24,41 +24,61 @@
// $Id$
import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import javax.xml.bind.JAXBContext;
+import javax.xml.namespace.QName;
import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import javax.xml.transform.Source;
import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Binding;
+import javax.xml.ws.Binding21;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Dispatch;
import javax.xml.ws.EndpointReference;
import javax.xml.ws.Response;
import javax.xml.ws.WebServiceException;
-import javax.xml.ws.Binding21;
import javax.xml.ws.Service.Mode;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.PortInfo;
import javax.xml.ws.http.HTTPBinding;
import javax.xml.ws.soap.SOAPFaultException;
-import javax.xml.namespace.QName;
import org.jboss.logging.Logger;
import org.jboss.util.NotImplementedException;
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.CommonMessageContext;
+import org.jboss.ws.core.ConfigProvider;
import org.jboss.ws.core.MessageAbstraction;
-import org.jboss.ws.core.ConfigProvider;
-import org.jboss.ws.core.soap.SOAPFaultImpl;
+import org.jboss.ws.core.client.EndpointInfo;
import org.jboss.ws.core.client.HTTPRemotingConnection;
import org.jboss.ws.core.client.RemotingConnection;
import org.jboss.ws.core.client.SOAPRemotingConnection;
+import org.jboss.ws.core.jaxws.binding.BindingExt;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
+import org.jboss.ws.core.jaxws.handler.HandlerChainExecutor;
+import org.jboss.ws.core.jaxws.handler.HandlerResolverImpl;
+import org.jboss.ws.core.jaxws.handler.MessageContextJAXWS;
+import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
+import org.jboss.ws.core.soap.MessageContextAssociation;
+import org.jboss.ws.core.soap.SOAPMessageImpl;
+import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-import org.jboss.ws.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.umdm.ServiceMetaData;
+import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
+import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
+import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
/**
* The Dispatch interface provides support for the dynamic invocation of a service endpoint operations.
@@ -67,22 +87,26 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2006
*/
-public class DispatchImpl<T> implements Dispatch<T>
+public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider
{
// provide logging
private final Logger log = Logger.getLogger(DispatchImpl.class);
private BindingProvider bindingProvider;
- private EndpointMetaData epMetaData;
+ private HandlerResolverImpl handlerResolver;
+ private ClientEndpointMetaData epMetaData;
private JAXBContext jaxbContext;
private ExecutorService executor;
+ private String securityConfig;
private Class type;
private Mode mode;
+ private Map<HandlerType, HandlerChainExecutor> executorMap = new HashMap<HandlerType, HandlerChainExecutor>();
+
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, Class<T> type, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = epMetaData;
+ this.epMetaData = (ClientEndpointMetaData)epMetaData;
this.executor = executor;
this.type = type;
this.mode = mode;
@@ -92,7 +116,7 @@
public DispatchImpl(ExecutorService executor, EndpointMetaData epMetaData, JAXBContext jbc, Mode mode)
{
this.bindingProvider = new BindingProviderImpl(epMetaData);
- this.epMetaData = epMetaData;
+ this.epMetaData = (ClientEndpointMetaData)epMetaData;
this.executor = executor;
this.type = Object.class;
this.jaxbContext = jbc;
@@ -114,11 +138,49 @@
return retObj;
}
- private Object invokeInternal(Object obj, Map<String, Object> resContext) throws IOException
+ private Object invokeInternal(Object obj, Map<String, Object> resContext) throws Exception
{
- MessageAbstraction reqMsg = getRequestMessage(obj);
+ Object retObj = null;
+
+ BindingExt binding = (BindingExt)bindingProvider.getBinding();
+
+ String bindingID = binding.getBindingID();
+ if (bindingID.indexOf("soap") > 0)
+ {
+ // Init the handler chain
+ if (handlerResolver == null)
+ {
+ handlerResolver = new HandlerResolverImpl();
+ handlerResolver.initHandlerChain(epMetaData, HandlerType.PRE, true);
+ handlerResolver.initHandlerChain(epMetaData, HandlerType.ENDPOINT, true);
+ handlerResolver.initHandlerChain(epMetaData, HandlerType.POST, true);
+
+ PortInfo portInfo = epMetaData.getPortInfo();
+ List<Handler> preChain = handlerResolver.getHandlerChain(portInfo, HandlerType.PRE);
+ List<Handler> epChain = handlerResolver.getHandlerChain(portInfo, HandlerType.ENDPOINT);
+ List<Handler> postChain = handlerResolver.getHandlerChain(portInfo, HandlerType.POST);
+
+ binding.setHandlerChain(preChain, HandlerType.PRE);
+ binding.setHandlerChain(epChain, HandlerType.ENDPOINT);
+ binding.setHandlerChain(postChain, HandlerType.POST);
+ }
+
+ retObj = invokeInternalSOAP(obj);
+ }
+ else
+ {
+ retObj = invokeInternalNonSOAP(obj);
+ }
+ return retObj;
+ }
+
+ private Object invokeInternalSOAP(Object obj) throws Exception
+ {
+ Object retObj = null;
+
+ SOAPMessageImpl reqMsg = (SOAPMessageImpl)getRequestMessage(obj);
String targetAddress = epMetaData.getEndpointAddress();
-
+
// R2744 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
// with a quoted value equal to the value of the soapAction attribute of
// soapbind:operation, if present in the corresponding WSDL description.
@@ -127,22 +189,92 @@
// with a quoted empty string value, if in the corresponding WSDL description,
// the soapAction attribute of soapbind:operation is either not present, or
// present with an empty string as its value.
- String bindingID = ((Binding21)bindingProvider.getBinding()).getBindingID();
- if (bindingID.indexOf("soap") > 0)
+ String soapAction = null;
+ Map<String, Object> reqContext = getRequestContext();
+ Boolean useSOAPAction = (Boolean)reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
+ if (Boolean.TRUE.equals(useSOAPAction))
{
- String soapAction = null;
- Map<String, Object> reqContext = getRequestContext();
- Boolean useSOAPAction = (Boolean)reqContext.get(BindingProvider.SOAPACTION_USE_PROPERTY);
- if (Boolean.TRUE.equals(useSOAPAction))
+ soapAction = (String)reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);
+ if (soapAction == null)
+ throw new IllegalStateException("Cannot obtain: " + BindingProvider.SOAPACTION_URI_PROPERTY);
+ }
+ MimeHeaders mimeHeaders = reqMsg.getMimeHeaders();
+ mimeHeaders.addHeader("SOAPAction", soapAction != null ? soapAction : "");
+
+ // Get the order of pre/post handlerchains
+ HandlerType[] handlerType = new HandlerType[] { HandlerType.PRE, HandlerType.ENDPOINT, HandlerType.POST };
+ HandlerType[] faultType = new HandlerType[] { HandlerType.PRE, HandlerType.ENDPOINT, HandlerType.POST };
+
+ // Associate a message context with the current thread
+ CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
+ MessageContextAssociation.pushMessageContext(msgContext);
+ msgContext.setEndpointMetaData(epMetaData);
+ msgContext.setSOAPMessage(reqMsg);
+ msgContext.putAll(reqContext);
+
+ // The contents of the request context are used to initialize the message context (see section 9.4.1)
+ // prior to invoking any handlers (see chapter 9) for the outbound message. Each property within the
+ // request context is copied to the message context with a scope of HANDLER.
+ msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, Boolean.TRUE);
+
+ QName portName = epMetaData.getPortName();
+ try
+ {
+ // Call the request handlers
+ boolean handlerPass = callRequestHandlerChain(portName, handlerType[0]);
+ handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[1]);
+ handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[2]);
+
+ // Handlers might have replaced the message
+ reqMsg = (SOAPMessageImpl)msgContext.getSOAPMessage();
+
+ MessageAbstraction resMsg = null;
+ if (handlerPass)
{
- soapAction = (String)reqContext.get(BindingProvider.SOAPACTION_URI_PROPERTY);
- if (soapAction == null)
- throw new IllegalStateException("Cannot obtain: " + BindingProvider.SOAPACTION_URI_PROPERTY);
+ Map<String, Object> callProps = new HashMap<String, Object>(getRequestContext());
+ EndpointInfo epInfo = new EndpointInfo(epMetaData, targetAddress, callProps);
+ resMsg = getRemotingConnection().invoke(reqMsg, epInfo, false);
+
+ // Call the response handler chain, removing the fault type entry will not call handleFault for that chain
+ handlerPass = callResponseHandlerChain(portName, handlerType[2]);
+ faultType[2] = null;
+ handlerPass = handlerPass && callResponseHandlerChain(portName, handlerType[1]);
+ faultType[1] = null;
+ handlerPass = handlerPass && callResponseHandlerChain(portName, handlerType[0]);
+ faultType[0] = null;
}
- MimeHeaders mimeHeaders = reqMsg.getMimeHeaders();
- mimeHeaders.addHeader("SOAPAction", soapAction != null ? soapAction : "");
+
+ if (handlerPass)
+ {
+ retObj = getReturnObject(resMsg);
+ }
}
-
+ catch (Exception ex)
+ {
+ if (faultType[2] != null)
+ callFaultHandlerChain(portName, faultType[2], ex);
+ if (faultType[1] != null)
+ callFaultHandlerChain(portName, faultType[1], ex);
+ if (faultType[0] != null)
+ callFaultHandlerChain(portName, faultType[0], ex);
+
+ throw ex;
+ }
+ finally
+ {
+ closeHandlerChain(portName, handlerType[2]);
+ closeHandlerChain(portName, handlerType[1]);
+ closeHandlerChain(portName, handlerType[0]);
+
+ MessageContextAssociation.popMessageContext();
+ }
+ return retObj;
+ }
+
+ private Object invokeInternalNonSOAP(Object obj) throws IOException
+ {
+ MessageAbstraction reqMsg = getRequestMessage(obj);
+ String targetAddress = epMetaData.getEndpointAddress();
MessageAbstraction resMsg = getRemotingConnection().invoke(reqMsg, targetAddress, false);
Object retObj = getReturnObject(resMsg);
return retObj;
@@ -261,7 +393,7 @@
{
SOAPFactory factory = SOAPFactory.newInstance();
SOAPFault fault = factory.createFault("Request object cannot be null", new QName("http://org.jboss.ws", "Dispatch"));
- fault.setFaultActor("client");
+ fault.setFaultActor("client");
throw new SOAPFaultException(fault);
}
catch (SOAPException e)
@@ -322,7 +454,7 @@
throw new IllegalArgumentException("Async response cannot be null");
if (payload == null)
throw new IllegalArgumentException("Async payload cannot be null");
-
+
this.response = response;
this.handler = handler;
this.payload = payload;
@@ -379,4 +511,85 @@
{
throw new NotImplementedException();
}
+
+ public String getConfigFile()
+ {
+ return epMetaData.getConfigFile();
+ }
+
+ public String getConfigName()
+ {
+ return epMetaData.getConfigName();
+ }
+
+ public void setConfigName(String configName)
+ {
+ epMetaData.setConfigName(configName);
+ }
+
+ public void setConfigName(String configName, String configFile)
+ {
+ epMetaData.setConfigName(configName, configFile);
+ }
+
+ public String getSecurityConfig()
+ {
+ return securityConfig;
+ }
+
+ public void setSecurityConfig(String securityConfig)
+ {
+ this.securityConfig = securityConfig;
+
+ if (securityConfig != null)
+ {
+ ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
+ if (serviceMetaData.getSecurityConfiguration() == null)
+ {
+ try
+ {
+ WSSecurityConfigFactory wsseConfFactory = WSSecurityConfigFactory.newInstance();
+ UnifiedVirtualFile vfsRoot = serviceMetaData.getUnifiedMetaData().getRootFile();
+ WSSecurityConfiguration config = wsseConfFactory.createConfiguration(vfsRoot, securityConfig);
+ serviceMetaData.setSecurityConfiguration(config);
+ }
+ catch (IOException ex)
+ {
+ WSException.rethrow("Cannot set security config", ex);
+ }
+ }
+ }
+ }
+
+ private boolean callRequestHandlerChain(QName portName, HandlerType type)
+ {
+ BindingExt binding = (BindingExt)bindingProvider.getBinding();
+ HandlerChainExecutor executor = new HandlerChainExecutor(epMetaData, binding.getHandlerChain(type));
+ executorMap.put(type, executor);
+
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ return executor.handleMessage(msgContext);
+ }
+
+ private boolean callResponseHandlerChain(QName portName, HandlerType type)
+ {
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ HandlerChainExecutor executor = executorMap.get(type);
+ return (executor != null ? executor.handleMessage(msgContext) : true);
+ }
+
+ private boolean callFaultHandlerChain(QName portName, HandlerType type, Exception ex)
+ {
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ HandlerChainExecutor executor = executorMap.get(type);
+ return (executor != null ? executor.handleFault(msgContext, ex) : true);
+ }
+
+ private void closeHandlerChain(QName portName, HandlerType type)
+ {
+ MessageContext msgContext = (MessageContext)MessageContextAssociation.peekMessageContext();
+ HandlerChainExecutor executor = executorMap.get(type);
+ if (executor != null)
+ executor.close(msgContext);
+ }
}
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -83,13 +83,13 @@
return newList;
}
- private static Config getConfig(WSSecurityConfiguration config, String portName, String operationName)
+ private static Config getConfig(WSSecurityConfiguration config, String portName, String opName)
{
Port port = config.getPorts().get(portName);
if (port == null)
return config.getDefaultConfig();
- Operation operation = port.getOperations().get(operationName);
+ Operation operation = port.getOperations().get(opName);
if (operation == null)
{
Config portConfig = port.getDefaultConfig();
@@ -230,26 +230,29 @@
WSSecurityConfiguration config = getSecurityConfig(ctx);
SOAPMessageImpl soapMessage = (SOAPMessageImpl)ctx.getSOAPMessage();
+ EndpointMetaData epMetaData = ctx.getEndpointMetaData();
+ String port = epMetaData.getPortName().getLocalPart();
+
+ String opName = null;
OperationMetaData opMetaData = ctx.getOperationMetaData();
- String operation = opMetaData.getQName().toString();
- String port = opMetaData.getEndpointMetaData().getPortName().getLocalPart();
+ if (opMetaData != null)
+ opName = opMetaData.getQName().toString();
- Config operationConfig = getConfig(config, port, operation);
-
- log.debug("WS-Security config: " + operationConfig);
+ Config opConfig = getConfig(config, port, opName);
+ log.debug("WS-Security config: " + opConfig);
// Nothing to process
- if (operationConfig == null)
+ if (opConfig == null)
return;
ArrayList<OperationDescription<EncodingOperation>> operations = new ArrayList<OperationDescription<EncodingOperation>>();
- Timestamp timestamp = operationConfig.getTimestamp();
+ Timestamp timestamp = opConfig.getTimestamp();
if (timestamp != null)
{
operations.add(new OperationDescription<EncodingOperation>(TimestampOperation.class, null, null, timestamp.getTtl(), null));
}
- if (operationConfig.getUsername() != null)
+ if (opConfig.getUsername() != null)
{
Object user = ctx.get(Stub.USERNAME_PROPERTY);
Object pass = ctx.get(Stub.PASSWORD_PROPERTY);
@@ -267,7 +270,7 @@
}
}
- Sign sign = operationConfig.getSign();
+ Sign sign = opConfig.getSign();
if (sign != null)
{
List<Target> targets = convertTargets(sign.getTargets());
@@ -283,7 +286,7 @@
operations.add(new OperationDescription<EncodingOperation>(SignatureOperation.class, targets, sign.getAlias(), null, null));
}
- Encrypt encrypt = operationConfig.getEncrypt();
+ Encrypt encrypt = opConfig.getEncrypt();
if (encrypt != null)
{
List<Target> targets = convertTargets(encrypt.getTargets());
Modified: stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-10-09 10:03:27 UTC (rev 4700)
+++ stack/native/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -23,10 +23,12 @@
// $Id$
+import org.jboss.ws.core.jaxws.handler.PortInfoImpl;
import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import javax.xml.namespace.QName;
+import javax.xml.ws.handler.PortInfo;
/**
* Client side endpoint meta data.
@@ -60,6 +62,15 @@
this.endpointAddress = endpointAddress;
}
+ public PortInfo getPortInfo()
+ {
+ QName serviceName = getServiceMetaData().getServiceName();
+ QName portName = getPortName();
+ String bindingID = getBindingId();
+ PortInfo portInfo = new PortInfoImpl(serviceName, portName, bindingID);
+ return portInfo;
+ }
+
public String toString()
{
StringBuilder buffer = new StringBuilder("\nClientEndpointMetaData:");
Copied: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java (from rev 4700, stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java)
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java 2007-10-09 10:58:37 UTC (rev 4701)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.samples.wssecurity;
+
+import java.io.File;
+import java.io.StringReader;
+import java.net.URL;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Dispatch;
+import javax.xml.ws.Service;
+import javax.xml.ws.Service.Mode;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.ConfigProvider;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
+
+/**
+ * WS-Security with JAX-WS Dispatch
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1817
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 02-Oct-2007
+ */
+public class SimpleDispatchTestCase extends JBossWSTest
+{
+ private static Dispatch dispatch;
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(SimpleDispatchTestCase.class, "jaxws-samples-wssecurity-username.war");
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ if (dispatch == null)
+ {
+ URL wsdlURL = new File("resources/jaxws/samples/wssecurity/simple-username/META-INF/wsdl/UsernameService.wsdl").toURL();
+ URL securityURL = new File("resources/jaxws/samples/wssecurity/simple-username/META-INF/jboss-wsse-client.xml").toURL();
+ QName serviceName = new QName("http://org.jboss.ws/samples/wssecurity", "UsernameService");
+ QName portName = new QName("http://org.jboss.ws/samples/wssecurity", "UsernameEndpointPort");
+
+ Service service = Service.create(wsdlURL, serviceName);
+ dispatch = service.createDispatch(portName, Source.class, Mode.PAYLOAD);
+
+ ((ConfigProvider)dispatch).setSecurityConfig(securityURL.toExternalForm());
+ ((ConfigProvider)dispatch).setConfigName("Standard WSSecurity Client");
+ }
+ }
+
+ public void testUsernameTokenNegative() throws Exception
+ {
+ try
+ {
+ String payload = "<ns1:getUsernameToken xmlns:ns1='http://org.jboss.ws/samples/wssecurity'/>";
+ dispatch.invoke(new StreamSource(new StringReader(payload)));
+ fail("Server should respond with [401] - Unauthorized");
+ }
+ catch (Exception ex)
+ {
+ // this should be ok
+ }
+ }
+
+ public void testUsernameToken() throws Exception
+ {
+ Map<String, Object> reqContext = dispatch.getRequestContext();
+ reqContext.put(BindingProvider.USERNAME_PROPERTY, "kermit");
+ reqContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
+
+ String payload = "<ns1:getUsernameToken xmlns:ns1='http://org.jboss.ws/samples/wssecurity'/>";
+ Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload)));
+
+ Element docElement = DOMUtils.sourceToElement(retObj);
+ Element retElement = DOMUtils.getFirstChildElement(docElement);
+ String retPayload = DOMWriter.printNode(retElement, false);
+ assertEquals("<return>kermit</return>", retPayload);
+ }
+}
\ No newline at end of file
17 years, 2 months
JBossWS SVN: r4700 - in stack/native/branches/tdiesler/trunk/src: main/java/org/jboss/ws/core/jaxws/client and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-09 06:03:27 -0400 (Tue, 09 Oct 2007)
New Revision: 4700
Modified:
stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java
Log:
[JBWS-1817] WS-Security with JAX-WS Dispatch
Modified: stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2007-10-09 08:23:00 UTC (rev 4699)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/client/EndpointInfo.java 2007-10-09 10:03:27 UTC (rev 4700)
@@ -38,6 +38,7 @@
{
private String targetAddress;
private Map<String, Object> properties;
+
public EndpointInfo(EndpointMetaData epMetaData, String targetAddress, Map<String, Object> callProps)
{
this.targetAddress = targetAddress;
Modified: stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-09 08:23:00 UTC (rev 4699)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-09 10:03:27 UTC (rev 4700)
@@ -59,6 +59,7 @@
import org.jboss.ws.core.CommonMessageContext;
import org.jboss.ws.core.ConfigProvider;
import org.jboss.ws.core.MessageAbstraction;
+import org.jboss.ws.core.client.EndpointInfo;
import org.jboss.ws.core.client.HTTPRemotingConnection;
import org.jboss.ws.core.client.RemotingConnection;
import org.jboss.ws.core.client.SOAPRemotingConnection;
@@ -209,12 +210,12 @@
MessageContextAssociation.pushMessageContext(msgContext);
msgContext.setEndpointMetaData(epMetaData);
msgContext.setSOAPMessage(reqMsg);
+ msgContext.putAll(reqContext);
// The contents of the request context are used to initialize the message context (see section 9.4.1)
// prior to invoking any handlers (see chapter 9) for the outbound message. Each property within the
// request context is copied to the message context with a scope of HANDLER.
msgContext.put(MessageContextJAXWS.MESSAGE_OUTBOUND_PROPERTY, Boolean.TRUE);
- msgContext.putAll(reqContext);
QName portName = epMetaData.getPortName();
try
@@ -230,7 +231,9 @@
MessageAbstraction resMsg = null;
if (handlerPass)
{
- resMsg = getRemotingConnection().invoke(reqMsg, targetAddress, false);
+ Map<String, Object> callProps = new HashMap<String, Object>(getRequestContext());
+ EndpointInfo epInfo = new EndpointInfo(epMetaData, targetAddress, callProps);
+ resMsg = getRemotingConnection().invoke(reqMsg, epInfo, false);
// Call the response handler chain, removing the fault type entry will not call handleFault for that chain
handlerPass = callResponseHandlerChain(portName, handlerType[2]);
Modified: stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java 2007-10-09 08:23:00 UTC (rev 4699)
+++ stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java 2007-10-09 10:03:27 UTC (rev 4700)
@@ -37,8 +37,11 @@
import junit.framework.Test;
import org.jboss.ws.core.ConfigProvider;
+import org.jboss.wsf.common.DOMUtils;
+import org.jboss.wsf.common.DOMWriter;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
+import org.w3c.dom.Element;
/**
* WS-Security with JAX-WS Dispatch
@@ -96,6 +99,11 @@
reqContext.put(BindingProvider.PASSWORD_PROPERTY, "thefrog");
String payload = "<ns1:getUsernameToken xmlns:ns1='http://org.jboss.ws/samples/wssecurity'/>";
- dispatch.invoke(new StreamSource(new StringReader(payload)));
+ Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader(payload)));
+
+ Element docElement = DOMUtils.sourceToElement(retObj);
+ Element retElement = DOMUtils.getFirstChildElement(docElement);
+ String retPayload = DOMWriter.printNode(retElement, false);
+ assertEquals("<return>kermit</return>", retPayload);
}
}
\ No newline at end of file
17 years, 2 months
JBossWS SVN: r4699 - stack/native/trunk/src/main/etc.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-10-09 04:23:00 -0400 (Tue, 09 Oct 2007)
New Revision: 4699
Modified:
stack/native/trunk/src/main/etc/wsrunclient.sh
Log:
changing the classpath elements order to be identical with Windows one - see http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092751#4092751
Modified: stack/native/trunk/src/main/etc/wsrunclient.sh
===================================================================
--- stack/native/trunk/src/main/etc/wsrunclient.sh 2007-10-09 08:01:03 UTC (rev 4698)
+++ stack/native/trunk/src/main/etc/wsrunclient.sh 2007-10-09 08:23:00 UTC (rev 4699)
@@ -30,6 +30,14 @@
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
+while [ $# -ge 1 ]; do
+ case $1 in
+ "-classpath") WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$2"; shift;;
+ *) args="$args \"$1\"";;
+ esac
+ shift
+done
+
# Setup JBOSS_HOME
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
@@ -66,14 +74,6 @@
# JBossAS-4.2 subset of jbossall-client.jar
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-common-client.jar"
-while [ $# -ge 1 ]; do
- case $1 in
- "-classpath") WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$2"; shift;;
- *) args="$args \"$1\"";;
- esac
- shift
-done
-
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
17 years, 2 months