// Register the service
s_service = new Service();
client = (Call) s_service.createCall();
SOAPService service = new SOAPService(null, new RPCProvider(), null);
service.setName("TestOutParamsService");
service.setOption("className", "test.outparams2.TestOutParams2");
service.setOption("allowedMethods", "serviceMethod");
ServiceDesc description = new JavaServiceDesc();
OperationDesc operation = new OperationDesc();
operation.setName("serviceMethod");
ParameterDesc out1 = new ParameterDesc();
out1.setName("out1");
out1.setMode(ParameterDesc.OUT);
operation.addParameter(out1);
ParameterDesc in1 = new ParameterDesc();
in1.setName("in1");
in1.setMode(ParameterDesc.IN);
operation.addParameter(in1);
description.addOperationDesc(operation);
service.setServiceDescription(description);
EngineConfiguration defaultConfig = (new DefaultEngineConfigurationFactory())
.getServerEngineConfig();
SimpleProvider config = new SimpleProvider(defaultConfig);
config.deployService("outParamsTest", service);
provider.deployService("outParamsTest", service);
// Make sure the local transport uses the server we just configured
client.setTransport(new LocalTransport(server));
Message msg = new Message(message, false);
SOAPEnvelope env = msg.getSOAPEnvelope();
// invoke
client.invoke(env);
assertTrue(this.called);