use of org.jboss.ws.api.configuration.ClientConfigFeature in project jbossws-cxf by jbossws.
the class Helper method testCustomClientConfigurationOnDispatchFromFileUsingFeature.
public boolean testCustomClientConfigurationOnDispatchFromFileUsingFeature() throws Exception {
Service service = Service.create(new URL(address + "?wsdl"), serviceName);
Dispatch<SOAPMessage> dispatch = service.createDispatch(portName, SOAPMessage.class, Mode.MESSAGE, new ClientConfigFeature("META-INF/jaxws-client-config.xml", "Custom Client Config", true));
return ((DispatchImpl<?>) dispatch).getClient().getEndpoint().get("propA").equals("fileValueA");
}
use of org.jboss.ws.api.configuration.ClientConfigFeature in project jbossws-cxf by jbossws.
the class Helper method testCustomClientConfigurationFromFileUsingFeature.
public boolean testCustomClientConfigurationFromFileUsingFeature() throws Exception {
Service service = Service.create(new URL(address + "?wsdl"), serviceName);
Endpoint port = (Endpoint) service.getPort(Endpoint.class, new ClientConfigFeature("META-INF/jaxws-client-config.xml", "Custom Client Config", true));
return ClientProxy.getClient(port).getEndpoint().get("propA").equals("fileValueA");
}
use of org.jboss.ws.api.configuration.ClientConfigFeature in project jbossws-cxf by jbossws.
the class Helper method testCustomClientConfigurationUsingFeature.
public boolean testCustomClientConfigurationUsingFeature() throws Exception {
final URL wsdlURL = new URL(address + "?wsdl");
final String testConfigName = "MyTestConfig";
try {
// -- add test client configuration
TestUtils.addTestCaseClientConfiguration(testConfigName);
// --
Service service = Service.create(wsdlURL, serviceName);
Endpoint port = (Endpoint) service.getPort(Endpoint.class, new ClientConfigFeature(null, testConfigName, true));
org.apache.cxf.endpoint.Endpoint ep = ClientProxy.getClient(port).getEndpoint();
ep.put("propZ", "valueZ");
return (ep.get("propT").equals("valueT") && ep.get("propZ").equals("valueZ"));
} finally {
// -- remove test client configuration --
TestUtils.removeTestCaseClientConfiguration(testConfigName);
// --
}
}
Aggregations