I am setting up my test environment and I need to programmatically register my handler/transport instead of using a client-config.wsdd:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<handler name="MyClient" type="java:foo.bar.MyClient"/>
<transport name="MyTransport" pivot="MyClient"/>
</deployment>
Would you know if it's possible?
Thanks in advance.
The server-config. wsdd file is generated by the wsdl2java tool from Axis. So, some developer used the tool and copied the file inside your Tomcat conf, where it belongs.
Introduction. Apache Axis is an implementation of the SOAP ("Simple Object Access Protocol") submission to W3C. From the draft W3C specification: SOAP is a lightweight protocol for exchanging structured information in a decentralized, distributed environment.
Apache Axis (Apache eXtensible Interaction System) is an open-source, XML based Web service framework. It consists of a Java and a C++ implementation of the SOAP server, and various utilities and APIs for generating and deploying Web service applications.
OK, I've checked Axis sources and the following code solved my problem:
AxisProperties.setProperty(EngineConfigurationFactory.SYSTEM_PROPERTY_NAME, "foo.bar.MyEngineConfigurationFactory");
...
import org.apache.axis.EngineConfiguration;
import org.apache.axis.EngineConfigurationFactory;
import org.apache.axis.configuration.BasicClientConfig;
public class MyEngineConfigurationFactory implements EngineConfigurationFactory {
public static EngineConfigurationFactory newFactory(Object param) {
return new MyEngineConfigurationFactory();
}
public EngineConfiguration getClientEngineConfig() {
BasicClientConfig cfg = new BasicClientConfig();
cfg.deployTransport("MyTransport", new MyClient());
return cfg;
}
public EngineConfiguration getServerEngineConfig() {
return null;
}
}
That's it. I hope it helps someone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With