我已经使用 JAX-WS API 创建了一个 WebService。该服务使用 Endpoint 类运行没有任何问题。
main(String args[])
{
(...)
MyService service=new MyService();
service.setParam1("limit=100");
service.setParam2("hello");
service.setParam3("max-value=10");
Endpoint endpoint = Endpoint.create(service);
endpoint.publish("http://localhost:8090/ws");
(...)
}
现在,我想在 glassfish 中部署这项服务。但是,正如我在示例中所写,我想使用一些参数来初始化我的服务。我怎样才能做到这一点?我应该使用其他 API 吗?
提前谢谢了