Hello,
I'd like to deploy a soap service on runtime. I've written my own provider,
the SpringBeanProvider. It delegates requests to the before generated proxy
(java.reflect.Proxy). I execute following code:
Object myProxy = ...;
/**
* Create soap service.
*/
SpringBeanProvider springBeanProvider
= new SpringBeanProvider(myProxy);
SOAPService soapService = new SOAPService(springBeanProvider);
/**
* Configure soap service for axis.
*/
String namespaceUri = ...;
String soapServiceName = ...;
String soapPortName = ...;
String soapClassName = InterfaceWhichProxyImplements.class;
String soapAllowedMethods = "*";
soapService.setName(soapServiceName );
soapService.setStyle(Style.WRAPPED);
soapService.setUse(Use.LITERAL);
soapService.setOption(
SpringBeanProvider.OPTION_WSDL_TARGETNAMESPACE, namespaceUri);
soapService.setOption(
SpringBeanProvider.OPTION_WSDL_SERVICEELEMENT, soapServiceName);
soapService.setOption(
SpringBeanProvider.OPTION_WSDL_SERVICEPORT, soapPortName);
soapService.setOption(
SpringBeanProvider.OPTION_CLASSNAME, soapClassName);
soapService.setOption(
SpringBeanProvider.OPTION_ALLOWEDMETHODS, soapAllowedMethods);
/**
* Register soap service in axis.
*/
AxisServer axisServer =
retrieveEngineFromJavaxServletServletContext();
QName soapServiceQName = new QName(namespaceUri, soapServiceName);
SimpleProvider sp
= new SimpleProvider(axisServer.getConfig());
sp.deployService(soapServiceName, soapService);
try {
sp.configureEngine(axisServer);
axisServer.refreshGlobalOptions();
} catch (ConfigurationException e) {
throw new RuntimeException(
"Could not configure new soap service.", e);
}
When I have a look at the deployed services of "EngineConfiguration config =
axisServer.getConfig();" my new soap service is not deployed.
Does anyone see what I'm doing wrong?
Thanks a lot!
Cheers,
Martin