Methods Summary |
---|
private com.sun.xml.ws.api.model.wsdl.WSDLModel | parseConfigFile(java.lang.String configFile)
URL url = PolicyUtils.ConfigFile.loadFromClasspath("assembler/" + configFile);
return PolicyConfigParser.parseModel(url, true);
|
public void | testCreateClientNull()
try {
final BindingID bindingId = BindingID.SOAP11_HTTP;
final PipelineAssemblerFactoryImpl factory = new PipelineAssemblerFactoryImpl();
final PipelineAssembler assembler = factory.doCreate(bindingId);
final Pipe pipe = assembler.createClient(null);
fail("Expected NullPointerException");
} catch (NullPointerException e) {
}
|
public void | testCreateDispatchClientAllFeaturesConfig()Test client creation with parameters that correspond to a dispatch client
with wsit-client.xml.
Pipe pipe = testDispatch("allfeatures.xml");
assertNotNull(pipe);
|
public void | testCreateDispatchClientNoConfig()Test client creation with parameters that correspond to a dispatch client
with no wsit-client.xml.
final BindingID bindingId = BindingID.SOAP11_HTTP;
final WSBinding binding = bindingId.createBinding();
final EndpointAddress address = new EndpointAddress(ADDRESS_URL);
final WSDLPort port = null;
final WSService service = null;
final Container container = Container.NONE;
final ClientPipeAssemblerContext context = new ClientPipeAssemblerContext(
address, port, service, binding, container);
final PipelineAssemblerFactoryImpl factory = new PipelineAssemblerFactoryImpl();
final PipelineAssembler assembler = factory.doCreate(bindingId);
final Pipe pipe = assembler.createClient(context);
assertNotNull(pipe);
|
public void | testCreateDispatchClientNoPoliciesConfig()Test client creation with parameters that correspond to a dispatch client
with wsit-client.xml.
Pipe pipe = testDispatch("nopolicies.xml");
assertNotNull(pipe);
|
public void | testCreateDispatchClientNoServiceMatchConfig()Test client creation with parameters that correspond to a dispatch client
with wsit-client.xml.
Pipe pipe = testDispatch("noservicematch.xml");
assertNotNull(pipe);
|
public void | testCreateServerNull()
try {
final BindingID bindingId = BindingID.SOAP11_HTTP;
final PipelineAssemblerFactoryImpl factory = new PipelineAssemblerFactoryImpl();
final PipelineAssembler assembler = factory.doCreate(bindingId);
final Pipe pipe = assembler.createServer(null);
fail("Expected NullPointerException");
} catch (NullPointerException e) {
}
|
private com.sun.xml.ws.api.pipe.Pipe | testDispatch(java.lang.String configFileName)Execute a sequence that corresponds to:
Service.createService(null, serviceName);
Service.addPort(portName, bindingId, address);
final URL wsdlLocation = null;
final QName serviceName = new QName(NAMESPACE, "Service1Service");
// Corresponds to Service.createService(wsdlLocation, serviceName)
final WSServiceDelegate serviceDelegate = new WSServiceDelegate(wsdlLocation, serviceName, Service.class);
final QName portName = new QName(NAMESPACE, "Service1Port");
final BindingID bindingId = BindingID.SOAP11_HTTP;
// Corresponds to Service.addPort(portName, bindingId, address)
serviceDelegate.addPort(portName, bindingId.toString(), ADDRESS_URL.toString());
final EndpointAddress address = new EndpointAddress(ADDRESS_URL);
final WSDLPort port = null;
final WSDLModel clientModel = parseConfigFile(configFileName);
final WSDLPolicyMapWrapper mapWrapper = clientModel.getExtension(WSDLPolicyMapWrapper.class);
final PolicyMap map = mapWrapper.getPolicyMap();
final WSPortInfo portInfo = serviceDelegate.safeGetPort(portName);
final PolicyFeature feature = new PolicyFeature(map, clientModel, portInfo);
final WSBinding binding = bindingId.createBinding(feature);
final Container container = Container.NONE;
final ClientPipeAssemblerContext context = new ClientPipeAssemblerContext(
address, port, serviceDelegate, binding, container);
final PipelineAssemblerFactoryImpl factory = new PipelineAssemblerFactoryImpl();
final PipelineAssembler assembler = factory.doCreate(bindingId);
return assembler.createClient(context);
|