Author: alessio.soldano(a)jboss.com
Date: 2013-06-06 14:26:55 -0400 (Thu, 06 Jun 2013)
New Revision: 17660
Modified:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java
Log:
Improving test
Modified:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java
===================================================================
---
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java 2013-06-06
18:25:43 UTC (rev 17659)
+++
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceIface.java 2013-06-06
18:26:55 UTC (rev 17660)
@@ -24,13 +24,10 @@
import javax.jws.WebMethod;
import javax.jws.WebService;
-import org.jboss.wsf.stack.cxf.policy.PolicySets;
-
@WebService
(
targetNamespace =
"http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy"
)
-@PolicySets("AsymmetricBinding_X509v1_GCM192OAEP_ProtectTokens")
public interface AnnotatedServiceIface
{
@WebMethod
Modified:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java
===================================================================
---
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java 2013-06-06
18:25:43 UTC (rev 17659)
+++
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedServiceImpl.java 2013-06-06
18:26:55 UTC (rev 17660)
@@ -25,6 +25,7 @@
import org.apache.cxf.annotations.EndpointProperties;
import org.apache.cxf.annotations.EndpointProperty;
+import org.jboss.wsf.stack.cxf.policy.PolicySets;
@WebService(
portName = "AnnotatedSecurityServicePort",
@@ -41,6 +42,7 @@
@EndpointProperty(key = "ws-security.callback-handler", value =
"org.jboss.test.ws.jaxws.samples.wsse.policy.basic.KeystorePasswordCallback")
}
)
+@PolicySets("AsymmetricBinding_X509v1_GCM192OAEP_ProtectTokens")
public class AnnotatedServiceImpl implements AnnotatedServiceIface
{
public String sayHello()
Modified:
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java
===================================================================
---
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java 2013-06-06
18:25:43 UTC (rev 17659)
+++
stack/cxf/branches/JBWS-3648/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsse/policy/basic/AnnotatedSignEncryptTestCase.java 2013-06-06
18:26:55 UTC (rev 17660)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.ws.jaxws.samples.wsse.policy.basic;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
import java.net.URL;
import javax.xml.namespace.QName;
@@ -48,6 +50,23 @@
return new JBossWSCXFTestSetup(AnnotatedSignEncryptTestCase.class,
"jaxws-samples-wsse-policy-sign-encrypt-gcm-code-first.war
jaxws-samples-wsse-policy-sign-encrypt-client.jar");
}
+ public void testWsdl() throws Exception
+ {
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
+ BufferedReader br = new BufferedReader(new InputStreamReader(wsdlURL.openStream(),
"UTF-8"));
+ StringBuilder sb = new StringBuilder();
+ try {
+ String s;
+ while ((s = br.readLine()) != null) {
+ sb.append(s);
+ }
+ } finally {
+ br.close();
+ }
+ String wsdl = sb.toString();
+
assertTrue(wsdl.contains("AsymmetricBinding_X509v1_GCM192OAEP_ProtectTokens_binding_policy"));
+ }
+
public void test() throws Exception
{
QName serviceName = new
QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy",
"AnnotatedSecurityService");