好的,我检查了 Axis 来源,以下代码解决了我的问题:
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;
}
}
就是这样。我希望它可以帮助某人。