删除 Axis 中的 client-config.wsdd

发布于 2024-08-07 00:39:31 字数 427 浏览 3 评论 0原文

我正在设置我的测试环境,我需要以编程方式注册我的处理程序/传输,而不是使用 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>

您知道这是否可能吗?

提前致谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

失退 2024-08-14 00:39:31

好的,我已经检查了 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;
    }
}

就是这样。我希望它能帮助某人。

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.

你是年少的欢喜 2024-08-14 00:39:31

另一方面,您可以将新的 client-config.wsdd 文件添加到资源目录中。

in the other hand, you can add a new client-config.wsdd file to resource directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文