JBossWS SVN: r4698 - stack/native/trunk/src/main/etc.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-09 04:01:03 -0400 (Tue, 09 Oct 2007)
New Revision: 4698
Modified:
stack/native/trunk/src/main/etc/component-info.xml
Log:
export jboss-jaxws-ext.jar
Modified: stack/native/trunk/src/main/etc/component-info.xml
===================================================================
--- stack/native/trunk/src/main/etc/component-info.xml 2007-10-09 08:00:40 UTC (rev 4697)
+++ stack/native/trunk/src/main/etc/component-info.xml 2007-10-09 08:01:03 UTC (rev 4698)
@@ -9,6 +9,7 @@
<artifact id="jbossws-core.jar"/>
<artifact id="jboss-jaxrpc.jar"/>
<artifact id="jboss-jaxws.jar"/>
+ <artifact id="jboss-jaxws-ext.jar"/>
<artifact id="jboss-saaj.jar"/>
<artifact id="jbossws-core-src.zip"/>
<artifact id="jbossws-core-scripts.zip"/>
@@ -55,6 +56,7 @@
<include input="jbossws-core.jar"/>
<include input="jboss-jaxrpc.jar"/>
<include input="jboss-jaxws.jar"/>
+ <include input="jboss-jaxws-ext.jar"/>
<include input="jboss-saaj.jar"/>
</export>
17 years, 2 months
JBossWS SVN: r4697 - stack/native/trunk.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-09 04:00:40 -0400 (Tue, 09 Oct 2007)
New Revision: 4697
Modified:
stack/native/trunk/version.properties
Log:
javassist 3.6.0.GA
Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties 2007-10-09 04:48:47 UTC (rev 4696)
+++ stack/native/trunk/version.properties 2007-10-09 08:00:40 UTC (rev 4697)
@@ -55,7 +55,7 @@
eclipse-compiler=3.2.2
gnu-getopt=1.0.10
hibernate=3.2.1.GA
-javassist=3.5.0.CR1
+javassist=3.6.0.GA
jaxbintros=1.0.0.beta2
jaxen=1.1-beta-10
jboss-common-core=2.0.2.GA
17 years, 2 months
JBossWS SVN: r4696 - in stack/native/branches/tdiesler/trunk: ant-import and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-09 00:48:47 -0400 (Tue, 09 Oct 2007)
New Revision: 4696
Modified:
stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml
stack/native/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml
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/extensions/security/WSSecurityDispatcher.java
stack/native/branches/tdiesler/trunk/version.properties
Log:
partial commit
Modified: stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml 2007-10-08 18:26:57 UTC (rev 4695)
+++ stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml 2007-10-09 04:48:47 UTC (rev 4696)
@@ -56,6 +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-resources.zip" dest="${thirdparty.dir}/jbossws-jboss42-resources.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/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml
===================================================================
--- stack/native/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml 2007-10-08 18:26:57 UTC (rev 4695)
+++ stack/native/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml 2007-10-09 04:48:47 UTC (rev 4696)
@@ -160,7 +160,6 @@
<include name="jboss-xml-binding.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"/>
@@ -212,7 +211,7 @@
<fileset dir="${jboss42.home}/server/${jboss.server.instance}/lib">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
- <include name="jboss-jaxws-ext.jar"/>
+ <include name="jboss-jaxws-ext.jar"/>
<include name="jboss-saaj.jar"/>
<!-- Remove only, do not deploy -->
<include name="jbossws-integration.jar"/>
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-08 18:26:57 UTC (rev 4695)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-09 04:48:47 UTC (rev 4696)
@@ -48,7 +48,6 @@
import javax.xml.ws.WebServiceException;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.handler.Handler;
-import javax.xml.ws.handler.HandlerResolver;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.PortInfo;
import javax.xml.ws.http.HTTPBinding;
@@ -70,6 +69,7 @@
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;
@@ -177,7 +177,7 @@
{
Object retObj = null;
- MessageAbstraction reqMsg = getRequestMessage(obj);
+ SOAPMessageImpl reqMsg = (SOAPMessageImpl)getRequestMessage(obj);
String targetAddress = epMetaData.getEndpointAddress();
// R2744 A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field
@@ -207,6 +207,8 @@
// Associate a message context with the current thread
CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
MessageContextAssociation.pushMessageContext(msgContext);
+ msgContext.setEndpointMetaData(epMetaData);
+ msgContext.setSOAPMessage(reqMsg);
// 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
@@ -223,7 +225,7 @@
handlerPass = handlerPass && callRequestHandlerChain(portName, handlerType[2]);
// Handlers might have replaced the message
- reqMsg = msgContext.getMessageAbstraction();
+ reqMsg = (SOAPMessageImpl)msgContext.getSOAPMessage();
MessageAbstraction resMsg = null;
if (handlerPass)
@@ -257,11 +259,11 @@
}
finally
{
- MessageContextAssociation.popMessageContext();
-
closeHandlerChain(portName, handlerType[2]);
closeHandlerChain(portName, handlerType[1]);
closeHandlerChain(portName, handlerType[0]);
+
+ MessageContextAssociation.popMessageContext();
}
return retObj;
}
Modified: stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-10-08 18:26:57 UTC (rev 4695)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/extensions/security/WSSecurityDispatcher.java 2007-10-09 04:48:47 UTC (rev 4696)
@@ -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/branches/tdiesler/trunk/version.properties
===================================================================
--- stack/native/branches/tdiesler/trunk/version.properties 2007-10-08 18:26:57 UTC (rev 4695)
+++ stack/native/branches/tdiesler/trunk/version.properties 2007-10-09 04:48:47 UTC (rev 4696)
@@ -28,6 +28,7 @@
jbossws-common=1.0.0.GA
jbossws-framework=2.0.1.GA
jbossws-jboss40=2.0.1.GA
+jbossws-jboss42=2.0.1.GA
# JBossAS-5.0
jboss-jbossxb-jboss50=2.0.0.CR4
17 years, 2 months
JBossWS SVN: r4695 - in stack/native/trunk/src/test: resources and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-10-08 14:26:57 -0400 (Mon, 08 Oct 2007)
New Revision: 4695
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java
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/UserAccountService.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt
Log:
[JBWS-1799] reparing services
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java 2007-10-08 16:24:35 UTC (rev 4694)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java 2007-10-08 18:26:57 UTC (rev 4695)
@@ -22,6 +22,8 @@
package org.jboss.test.ws.jaxws.jbws1799;
import javax.ejb.Remote;
+import javax.jws.WebParam;
+import javax.jws.WebService;
/**
* First service interface
@@ -31,7 +33,11 @@
* @since Oct 8, 2007
*/
@Remote
+@WebService
public interface IUserAccountService
{
- public boolean authenticate(String aUsername);
+ public boolean authenticate
+ (
+ @WebParam(name="username") String username
+ );
}
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-08 16:24:35 UTC (rev 4694)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java 2007-10-08 18:26:57 UTC (rev 4695)
@@ -22,6 +22,8 @@
package org.jboss.test.ws.jaxws.jbws1799;
import javax.ejb.Remote;
+import javax.jws.WebParam;
+import javax.jws.WebService;
/**
* Second service interface
@@ -31,7 +33,12 @@
* @since Oct 8, 2007
*/
@Remote
+@WebService
public interface IUserAccountServiceExt
{
- public boolean authenticate(String aUsername, String aPassword);
+ public boolean authenticate
+ (
+ @WebParam(name="username") String username,
+ @WebParam(name="password") String password
+ );
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java 2007-10-08 16:24:35 UTC (rev 4694)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java 2007-10-08 18:26:57 UTC (rev 4695)
@@ -61,9 +61,9 @@
@TransactionAttribute(javax.ejb.TransactionAttributeType.SUPPORTS)
public boolean authenticate
(
- @WebParam(name="username") String aUsername
+ @WebParam(name="username") String username
)
{
- return true;
+ return "authorized".equals(username);
}
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java 2007-10-08 16:24:35 UTC (rev 4694)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java 2007-10-08 18:26:57 UTC (rev 4695)
@@ -65,6 +65,6 @@
@WebParam(name="password") String password
)
{
- return true;
+ return "authorized".equals(username) && "password".equals(password);
}
}
Modified: stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt
===================================================================
--- stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt 2007-10-08 16:24:35 UTC (rev 4694)
+++ stack/native/trunk/src/test/resources/test-excludes-jboss40.no.ejb3.txt 2007-10-08 18:26:57 UTC (rev 4695)
@@ -19,6 +19,7 @@
org/jboss/test/ws/jaxws/jbws1581/**
org/jboss/test/ws/jaxws/jbws1665/**
org/jboss/test/ws/jaxws/jbws1694/**
+org/jboss/test/ws/jaxws/jbws1799/**
org/jboss/test/ws/jaxws/jbws771/**
org/jboss/test/ws/jaxws/jbws944/**
org/jboss/test/ws/jaxws/jbws981/**
17 years, 2 months
JBossWS SVN: r4694 - in stack/native/branches/tdiesler/trunk: ant-import and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-08 12:24:35 -0400 (Mon, 08 Oct 2007)
New Revision: 4694
Modified:
stack/native/branches/tdiesler/trunk/ant-import/build-bin-dist.xml
stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml
stack/native/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml
stack/native/branches/tdiesler/trunk/build.xml
stack/native/branches/tdiesler/trunk/version.properties
Log:
Remove dependency on jbossws-jboss42
Modified: stack/native/branches/tdiesler/trunk/ant-import/build-bin-dist.xml
===================================================================
--- stack/native/branches/tdiesler/trunk/ant-import/build-bin-dist.xml 2007-10-08 14:43:53 UTC (rev 4693)
+++ stack/native/branches/tdiesler/trunk/ant-import/build-bin-dist.xml 2007-10-08 16:24:35 UTC (rev 4694)
@@ -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/branches/tdiesler/trunk/ant-import/build-thirdparty.xml
===================================================================
--- stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml 2007-10-08 14:43:53 UTC (rev 4693)
+++ stack/native/branches/tdiesler/trunk/ant-import/build-thirdparty.xml 2007-10-08 16:24:35 UTC (rev 4694)
@@ -56,9 +56,6 @@
<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/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml
===================================================================
--- stack/native/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml 2007-10-08 14:43:53 UTC (rev 4693)
+++ stack/native/branches/tdiesler/trunk/ant-import/macros-deploy-native.xml 2007-10-08 16:24:35 UTC (rev 4694)
@@ -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,11 +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"/>
@@ -199,7 +193,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,10 +210,9 @@
<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"/>
+ <include name="jboss-jaxws-ext.jar"/>
<include name="jboss-saaj.jar"/>
<!-- Remove only, do not deploy -->
<include name="jbossws-integration.jar"/>
Modified: stack/native/branches/tdiesler/trunk/build.xml
===================================================================
--- stack/native/branches/tdiesler/trunk/build.xml 2007-10-08 14:43:53 UTC (rev 4693)
+++ stack/native/branches/tdiesler/trunk/build.xml 2007-10-08 16:24:35 UTC (rev 4694)
@@ -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/branches/tdiesler/trunk/version.properties
===================================================================
--- stack/native/branches/tdiesler/trunk/version.properties 2007-10-08 14:43:53 UTC (rev 4693)
+++ stack/native/branches/tdiesler/trunk/version.properties 2007-10-08 16:24:35 UTC (rev 4694)
@@ -28,7 +28,6 @@
jbossws-common=1.0.0.GA
jbossws-framework=2.0.1.GA
jbossws-jboss40=2.0.1.GA
-jbossws-jboss42=2.0.1.GA
# JBossAS-5.0
jboss-jbossxb-jboss50=2.0.0.CR4
17 years, 2 months
JBossWS SVN: r4693 - in stack/native/trunk: src/test/java/org/jboss/test/ws/jaxws and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-10-08 10:43:53 -0400 (Mon, 08 Oct 2007)
New Revision: 4693
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java
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/UserAccountService.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
Modified:
stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
Log:
[JBWS-1799] creating test services
Modified: stack/native/trunk/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-10-08 11:14:59 UTC (rev 4692)
+++ stack/native/trunk/ant-import-tests/build-jars-jaxws.xml 2007-10-08 14:43:53 UTC (rev 4693)
@@ -380,6 +380,13 @@
</fileset>
</copy>
+ <jar destfile="${tests.output.dir}/libs/jaxws-jbws1799.jar">
+ <fileset dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1799/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbws1799/*TestCase.class"/>
+ </fileset>
+ </jar>
+
<!-- jaxws namespace -->
<war warfile="${tests.output.dir}/libs/jaxws-namespace.war" webxml="${tests.output.dir}/resources/jaxws/namespace/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/classes">
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java 2007-10-08 14:43:53 UTC (rev 4693)
@@ -0,0 +1,37 @@
+/*
+ * 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 javax.ejb.Remote;
+
+/**
+ * First service interface
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 8, 2007
+ */
+@Remote
+public interface IUserAccountService
+{
+ public boolean authenticate(String aUsername);
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: 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 (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java 2007-10-08 14:43:53 UTC (rev 4693)
@@ -0,0 +1,37 @@
+/*
+ * 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 javax.ejb.Remote;
+
+/**
+ * Second service interface
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 8, 2007
+ */
+@Remote
+public interface IUserAccountServiceExt
+{
+ public boolean authenticate(String aUsername, String aPassword);
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/IUserAccountServiceExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java 2007-10-08 14:43:53 UTC (rev 4693)
@@ -0,0 +1,69 @@
+/*
+ * 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 javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * First service implementation
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 8, 2007
+ */
+@Stateless
+@WebService
+(
+ name="UserAccountServiceEndPoint",
+ targetNamespace="namespace1",
+ serviceName="UserAccountService1.0"
+)
+@SOAPBinding
+(
+ style=SOAPBinding.Style.DOCUMENT,
+ use=SOAPBinding.Use.LITERAL
+)
+@WebContext
+(
+ transportGuarantee="NONE",
+ contextRoot="/svc-useracctv1.0",
+ urlPattern="/UserAccountService1.0"
+)
+public class UserAccountService implements IUserAccountService
+{
+ @WebMethod
+ @TransactionAttribute(javax.ejb.TransactionAttributeType.SUPPORTS)
+ public boolean authenticate
+ (
+ @WebParam(name="username") String aUsername
+ )
+ {
+ return true;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java 2007-10-08 14:43:53 UTC (rev 4693)
@@ -0,0 +1,70 @@
+/*
+ * 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 javax.ejb.Stateless;
+import javax.ejb.TransactionAttribute;
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+import org.jboss.wsf.spi.annotation.WebContext;
+
+/**
+ * Second service implementation
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Oct 8, 2007
+ */
+@Stateless
+@WebService
+(
+ name="UserAccountServiceExtEndPoint",
+ targetNamespace="namespaceExt",
+ serviceName="UserAccountServiceExt1.0"
+)
+@SOAPBinding
+(
+ style=SOAPBinding.Style.DOCUMENT,
+ use=SOAPBinding.Use.LITERAL
+)
+@WebContext
+(
+ transportGuarantee="NONE",
+ contextRoot="/svc-useracctv1.0",
+ urlPattern="/UserAccountServiceExt1.0"
+)
+public class UserAccountServiceExt implements IUserAccountServiceExt
+{
+ @WebMethod
+ @TransactionAttribute(javax.ejb.TransactionAttributeType.SUPPORTS)
+ public boolean authenticate
+ (
+ @WebParam(name="username") String username,
+ @WebParam(name="password") String password
+ )
+ {
+ return true;
+ }
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/jbws1799/UserAccountServiceExt.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 2 months
JBossWS SVN: r4692 - stack/native/trunk/src/main/java/javax.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-08 07:14:59 -0400 (Mon, 08 Oct 2007)
New Revision: 4692
Removed:
stack/native/trunk/src/main/java/javax/annotation/
Log:
JBCTS-308: javax.annotation.sig_1.0.javaee. Remove javax/annotation/* from jboss-jaxws.jar
17 years, 2 months
JBossWS SVN: r4691 - framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2007-10-08 05:25:20 -0400 (Mon, 08 Oct 2007)
New Revision: 4691
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
Log:
Fix test output
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-08 09:16:54 UTC (rev 4690)
+++ framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2007-10-08 09:25:20 UTC (rev 4691)
@@ -69,11 +69,11 @@
Process p = executeCommand(command);
// check status code
- assertStatusCode(p);
+ assertStatusCode(p, "wsconsume");
File javaSource = new File("wsconsume/java/org/openuri/_2004/_04/helloworld/EndpointInterface.java");
- assertTrue("Sevice endpoint interface not generated", javaSource.exists());
+ assertTrue("Service endpoint interface not generated", javaSource.exists());
}
public void testWSProvideFromCommandLine() throws Exception
@@ -89,7 +89,7 @@
Process p = executeCommand(command);
// check status code
- assertStatusCode(p);
+ assertStatusCode(p, "wsprovide");
File outputDir = new File("wsprovide/java");
File javaSource = new File(
@@ -114,12 +114,12 @@
return p;
}
- private void assertStatusCode(Process p)
+ private void assertStatusCode(Process p, String s)
throws InterruptedException
{
// check status code
int status = p.waitFor();
- assertTrue("wsprovide did exit with status " + status, status==0);
+ assertTrue(s +" did exit with status " + status, status==0);
}
private boolean isWindowsOS()
17 years, 2 months
JBossWS SVN: r4690 - in stack/native/trunk: src/main/java/org/jboss/ws/core and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-08 05:16:54 -0400 (Mon, 08 Oct 2007)
New Revision: 4690
Modified:
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/jaxws/client/DispatchImpl.java
stack/native/trunk/version.properties
Log:
rollback partial commit
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-08 09:12:20 UTC (rev 4689)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/ConfigProvider.java 2007-10-08 09:16:54 UTC (rev 4690)
@@ -50,14 +50,4 @@
* 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-08 09:12:20 UTC (rev 4689)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/StubExt.java 2007-10-08 09:16:54 UTC (rev 4690)
@@ -126,4 +126,14 @@
* 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/jaxws/client/DispatchImpl.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-08 09:12:20 UTC (rev 4689)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-08 09:16:54 UTC (rev 4690)
@@ -29,40 +29,36 @@
import java.util.concurrent.Future;
import javax.xml.bind.JAXBContext;
-import javax.xml.namespace.QName;
import javax.xml.soap.MimeHeaders;
-import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPFactory;
import javax.xml.soap.SOAPFault;
-import javax.xml.soap.SOAPMessage;
+import javax.xml.soap.SOAPException;
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.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.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.HTTPRemotingConnection;
import org.jboss.ws.core.client.RemotingConnection;
import org.jboss.ws.core.client.SOAPRemotingConnection;
import org.jboss.ws.core.jaxws.binding.BindingProviderImpl;
-import org.jboss.ws.metadata.config.ConfigurationProvider;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
-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.ws.metadata.config.ConfigurationProvider;
/**
* The Dispatch interface provides support for the dynamic invocation of a service endpoint operations.
@@ -71,7 +67,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 04-Jul-2006
*/
-public class DispatchImpl<T> implements Dispatch<T>, ConfigProvider
+public class DispatchImpl<T> implements Dispatch<T>
{
// provide logging
private final Logger log = Logger.getLogger(DispatchImpl.class);
@@ -80,7 +76,6 @@
private EndpointMetaData epMetaData;
private JAXBContext jaxbContext;
private ExecutorService executor;
- private String securityConfig;
private Class type;
private Mode mode;
@@ -384,53 +379,4 @@
{
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);
- }
- }
- }
- }
}
Modified: stack/native/trunk/version.properties
===================================================================
--- stack/native/trunk/version.properties 2007-10-08 09:12:20 UTC (rev 4689)
+++ stack/native/trunk/version.properties 2007-10-08 09:16:54 UTC (rev 4690)
@@ -29,14 +29,15 @@
jbossws-framework=2.0.1.GA
jbossws-jboss40=2.0.1.GA
jbossws-jboss42=2.0.1.GA
+jbossws-jboss50=2.0.1.GA
# JBossAS-5.0
jboss-jbossxb-jboss50=2.0.0.CR4
jboss-remoting-jboss50=2.2.2.SP1
# JBossAS-4.2
-jboss-jbossxb-jboss42=1.0.0.GA
-jboss-remoting-jboss42=2.2.2.SP1
+jboss-jbossxb-jboss42=1.0.0.CR11
+jboss-remoting-jboss42=2.2.1.GA
# JBossAS-4.0
jboss-jbossxb-jboss40=1.0.0.CR11
17 years, 2 months
JBossWS SVN: r4689 - in stack/native/branches/tdiesler/trunk/src: main/java/org/jboss/ws/core/jaxws/binding and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-10-08 05:12:20 -0400 (Mon, 08 Oct 2007)
New Revision: 4689
Added:
stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java
Modified:
stack/native/branches/tdiesler/trunk/src/main/java/javax/xml/ws/Binding21.java
stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java
stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
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/metadata/umdm/ClientEndpointMetaData.java
Log:
partial commit
Modified: stack/native/branches/tdiesler/trunk/src/main/java/javax/xml/ws/Binding21.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/javax/xml/ws/Binding21.java 2007-10-07 12:05:28 UTC (rev 4688)
+++ stack/native/branches/tdiesler/trunk/src/main/java/javax/xml/ws/Binding21.java 2007-10-08 09:12:20 UTC (rev 4689)
@@ -21,6 +21,8 @@
*/
package javax.xml.ws;
+// $Id:$
+
/**
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
Modified: stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java 2007-10-07 12:05:28 UTC (rev 4688)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/BindingExt.java 2007-10-08 09:12:20 UTC (rev 4689)
@@ -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/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-10-07 12:05:28 UTC (rev 4688)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-10-08 09:12:20 UTC (rev 4689)
@@ -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/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-07 12:05:28 UTC (rev 4688)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/core/jaxws/client/DispatchImpl.java 2007-10-08 09:12:20 UTC (rev 4689)
@@ -24,6 +24,8 @@
// $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;
@@ -45,24 +47,37 @@
import javax.xml.ws.Response;
import javax.xml.ws.WebServiceException;
import javax.xml.ws.Service.Mode;
+import javax.xml.ws.handler.Handler;
+import javax.xml.ws.handler.HandlerResolver;
+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 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.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.metadata.config.ConfigurationProvider;
+import org.jboss.ws.metadata.umdm.ClientEndpointMetaData;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
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.
@@ -77,17 +92,20 @@
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;
@@ -97,7 +115,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;
@@ -119,11 +137,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
{
+ 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;
+
MessageAbstraction reqMsg = 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.
@@ -132,22 +188,88 @@
// 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);
+
+ // 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
+ {
+ // 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 = msgContext.getMessageAbstraction();
+
+ 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);
+ resMsg = getRemotingConnection().invoke(reqMsg, targetAddress, 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
+ {
+ MessageContextAssociation.popMessageContext();
+
+ closeHandlerChain(portName, handlerType[2]);
+ closeHandlerChain(portName, handlerType[1]);
+ closeHandlerChain(portName, handlerType[0]);
+ }
+ 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;
@@ -266,7 +388,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)
@@ -327,7 +449,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;
@@ -404,7 +526,7 @@
{
epMetaData.setConfigName(configName, configFile);
}
-
+
public String getSecurityConfig()
{
return securityConfig;
@@ -413,7 +535,7 @@
public void setSecurityConfig(String securityConfig)
{
this.securityConfig = securityConfig;
-
+
if (securityConfig != null)
{
ServiceMetaData serviceMetaData = epMetaData.getServiceMetaData();
@@ -433,4 +555,36 @@
}
}
}
+
+ 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/branches/tdiesler/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java
===================================================================
--- stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-10-07 12:05:28 UTC (rev 4688)
+++ stack/native/branches/tdiesler/trunk/src/main/java/org/jboss/ws/metadata/umdm/ClientEndpointMetaData.java 2007-10-08 09:12:20 UTC (rev 4689)
@@ -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:");
Added: 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 (rev 0)
+++ stack/native/branches/tdiesler/trunk/src/test/java/org/jboss/test/ws/jaxws/samples/wssecurity/SimpleDispatchTestCase.java 2007-10-08 09:12:20 UTC (rev 4689)
@@ -0,0 +1,101 @@
+/*
+ * 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.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * 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'/>";
+ dispatch.invoke(new StreamSource(new StringReader(payload)));
+ }
+}
\ No newline at end of file
17 years, 2 months