use of org.jboss.wsf.test.WrapThreadContextClassLoader in project jbossws-cxf by jbossws.
the class FastInfosetTestCase method testInfosetUsingFeatureProperties.
@Test
@RunAsClient
@WrapThreadContextClassLoader
@OperateOnDeployment(DEP1)
public void testInfosetUsingFeatureProperties() throws Exception {
URL wsdlURL = new URL(baseURL + "HelloWorldService/HelloWorldImpl?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldService");
QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldImplPort");
internalTestInfosetUsingFeatureProperties(wsdlURL, serviceName, portQName);
}
use of org.jboss.wsf.test.WrapThreadContextClassLoader in project jbossws-cxf by jbossws.
the class SchemaValidationTestCase method testClientSideSchemaValidationUsingConfiguration.
@Test
@RunAsClient
@WrapThreadContextClassLoader
public void testClientSideSchemaValidationUsingConfiguration() throws Exception {
try {
QName serviceName = new QName("http://jboss.org/schemavalidation", "HelloService");
URL wsdlURL = JBossWSTestHelper.getResourceURL("jaxws/samples/schemavalidation/validatingClient.wsdl");
Service service = Service.create(wsdlURL, serviceName);
Hello proxy = (Hello) service.getPort(new QName("http://jboss.org/schemavalidation", "HelloPort"), Hello.class);
((BindingProvider) proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, baseURL + "/hello");
// enable client side schema validation
ClientConfigUtil.setConfigProperties(proxy, "META-INF/jaxws-client-config.xml", "Test Validating Client Config");
HelloResponse hr = proxy.helloRequest("JBoss");
assertNotNull(hr);
assertEquals(2, hr.getReturn());
try {
proxy.helloRequest("number");
fail("validation error is expected");
} catch (Exception e) {
assertTrue("not respect to enumration error is expected", e.getMessage().contains("is not facet-valid with respect to enumeration"));
}
} finally {
}
}
use of org.jboss.wsf.test.WrapThreadContextClassLoader in project jbossws-cxf by jbossws.
the class SignTestCase method testEJB.
@Test
@RunAsClient
@WrapThreadContextClassLoader
@OperateOnDeployment(EJB3_DEPLOYMENT)
public void testEJB() throws Exception {
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
URL wsdlURL = new URL(baseURL + "/jaxws-samples-wsse-policy-sign-ejb/SecurityService/EJBServiceImpl?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
setupWsse(proxy);
assertEquals("EJB Secure Hello World!", proxy.sayHello());
}
use of org.jboss.wsf.test.WrapThreadContextClassLoader in project jbossws-cxf by jbossws.
the class SignTestCase method test.
@Test
@RunAsClient
@WrapThreadContextClassLoader
@OperateOnDeployment(POJO_DEPLOYMENT)
public void test() throws Exception {
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
URL wsdlURL = new URL(baseURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
setupWsse(proxy);
assertEquals("Secure Hello World!", proxy.sayHello());
}
use of org.jboss.wsf.test.WrapThreadContextClassLoader in project jbossws-cxf by jbossws.
the class MultipleClientsSignEncryptTestCase method testJohn.
@Test
@RunAsClient
@WrapThreadContextClassLoader
public void testJohn() throws Exception {
QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wssecuritypolicy", "SecurityService");
URL wsdlURL = new URL(baseURL + "/SecurityService?wsdl");
Service service = Service.create(wsdlURL, serviceName);
ServiceIface proxy = (ServiceIface) service.getPort(ServiceIface.class);
setupWsse(proxy, "john");
try {
assertEquals("Multiple Clients Secure Hello World!", proxy.sayHello());
} catch (SOAPFaultException e) {
throw new Exception("Error " + e.getMessage() + " - please check that the Bouncy Castle provider is installed.", e);
}
}
Aggregations