Glassfish 服务器上的 WS 端点地址

发布于 2024-09-30 02:58:55 字数 44 浏览 1 评论 0原文

有没有办法仅使用注释在 glassfish 服务器上指定 ws 端点地址?

Is there any way to specify an ws endpoint address on glassfish server using annotations only?

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

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

发布评论

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

评论(2

遥远的绿洲 2024-10-07 02:58:55

请参阅 Web 服务元数据注释 (JSR 181)

@WebService 注释有一个参数:

wsdlLocation

指定 WSDL 的 Web 地址
定义 Web 服务的文档。
该网址可以是相对地址,也可以是
绝对。 (字符串)

Refer Web Services Metadata Annotations (JSR 181).

The @WebService annotation has a parameter:

wsdlLocation

Specifies the Web address of the WSDL
document that defines the Web service.
The Web address is either relative or
absolute. (String)

甜是你 2024-10-07 02:58:55

@WebService 注释上的“serviceName”属性是您想要的吗?

来自 http:// jax-ws.java.net/jax-ws-ea3/docs/annotations.html#2.1%20javax.jws.WebService|outline:

serviceName - Web 服务的服务名称:wsdl:服务
默认值:Java 类或接口的非限定名称 + “Service”

在此之前的任何上下文路径都将由您部署包含应用程序的 Web 应用程序的位置控制,域名即服务类“DoSomething”的域名也是如此部署在“my.webservice.com”主机容器中名为“myappcontext”的 Web 应用程序中。

https://my.webservice.com/myappcontext/DoSomethingService

Is the 'serviceName' attribute on the @WebService annotation what you are after?

From http://jax-ws.java.net/jax-ws-ea3/docs/annotations.html#2.1%20javax.jws.WebService|outline:

serviceName - The Service name of the web service: wsdl:service
Default: The unqualified name of the Java class or interface + “Service”

Any context path before that would be controlled by the location to which you deploy the web application containing the application, as would the domain name i.e for a service class 'DoSomething' deployed in a web application called 'myappcontext' in a host container of 'my.webservice.com'.

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