From jbossws-commits at lists.jboss.org Thu Feb 22 08:05:00 2007 Content-Type: multipart/mixed; boundary="===============2958117831570612264==" MIME-Version: 1.0 From: jbossws-commits at lists.jboss.org To: jbossws-commits at lists.jboss.org Subject: [jbossws-commits] JBossWS SVN: r2440 - trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssecurity. Date: Thu, 22 Feb 2007 08:05:00 -0500 Message-ID: --===============2958117831570612264== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: mageshbk Date: 2007-02-22 08:05:00 -0500 (Thu, 22 Feb 2007) New Revision: 2440 Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wssec= urity/StorePassEncryptTestCase.java Log: [JBWS-1329] Fix StorePassEncryptTestCase for jbossas-5.0 Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/sample= s/wssecurity/StorePassEncryptTestCase.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wsse= curity/StorePassEncryptTestCase.java 2007-02-22 10:30:16 UTC (rev 2439) +++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/wsse= curity/StorePassEncryptTestCase.java 2007-02-22 13:05:00 UTC (rev 2440) @@ -37,14 +37,16 @@ = import org.jboss.test.ws.JBossWSTest; import org.jboss.test.ws.JBossWSTestSetup; +import org.jboss.ws.core.StubExt; import org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl; import org.jboss.ws.core.jaxrpc.client.ServiceImpl; import org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerOutbound; = /** - * This test simulates simulates the usage of a jboss-ws-security keystore= and truststore use cases + * This test simulates the usage of a jboss-ws-security keystore and trust= store use cases + * using encrypted passwords for the store passwords. * - * @author magesh.bojan(a)jboss.com + * @author Magesh Kumar B * @version $Revision$ */ public class StorePassEncryptTestCase extends JBossWSTest @@ -61,7 +63,7 @@ { if (port =3D=3D null) { - if (isTargetJBoss()) + if (isTargetJBoss42() || isTargetJBoss40()) { InitialContext iniCtx =3D getInitialContext(); Service service =3D (Service)iniCtx.lookup("java:comp/env/serv= ice/HelloService"); @@ -73,30 +75,17 @@ URL wsdlURL =3D new File("resources/jaxrpc/samples/wssecurity/= WEB-INF/wsdl/HelloService.wsdl").toURL(); URL mappingURL =3D new File("resources/jaxrpc/samples/wssecuri= ty/WEB-INF/jaxrpc-mapping.xml").toURL(); URL securityURL =3D new File("resources/jaxrpc/samples/wssecur= ity/store-pass-encrypt/META-INF/jboss-wsse-client.xml").toURL(); - - QName serviceName =3D new QName("http://org.jboss.ws/samples/w= ssecurity", "HelloService"); - QName portName =3D new QName("http://org.jboss.ws/samples/wsse= curity", "HelloPort"); - ServiceImpl service =3D (ServiceImpl)factory.createService(wsd= lURL, serviceName, mappingURL, securityURL); - - HandlerRegistry registry =3D service.getDynamicHandlerRegistry= (); - List infos =3D registry.getHandlerChain(portName); - infos.add(new HandlerInfo(WSSecurityHandlerOutbound.class, new= HashMap(), new QName[] {})); - registry.setHandlerChain(portName, infos); - + QName qname =3D new QName("http://org.jboss.ws/samples/wssecur= ity", "HelloService"); + ServiceImpl service =3D (ServiceImpl)factory.createService(wsd= lURL, qname, mappingURL, securityURL); port =3D (Hello)service.getPort(Hello.class); ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "htt= p://" + getServerHost() + ":8080/jaxrpc-samples-store-pass-encrypt"); + ((StubExt)port).setConfigName("Standard WSSecurity Client"); } } } = public void testEndpoint() throws Exception { - if (isTargetJBoss50()) - { - System.out.println("FIXME: [JBWS-1329] Fix StorePassEncryptTestCa= se for jbossas-5.0"); - return; - } - = UserType in0 =3D new UserType("Kermit"); UserType retObj =3D port.echoUserType(in0); assertEquals(in0, retObj); --===============2958117831570612264==--