Web services CXF jaxws端点相对发布地址

Web services CXF jaxws端点相对发布地址,web-services,spring,jax-ws,cxf,Web Services,Spring,Jax Ws,Cxf,在CXF web服务端点配置中使用相对发布地址时,我遇到了很多困难 我有一个简单的Java first JAX-WS项目,其中包含以下配置文件: applicationContent-cxf.xml: <beans xmlns=...> ... <jaxws:endpoint id="helloWorldService" implementorClass="org.helloworld.ws.HelloWorldServiceIm

在CXF web服务端点配置中使用相对发布地址时,我遇到了很多困难

我有一个简单的Java first JAX-WS项目,其中包含以下配置文件:

applicationContent-cxf.xml:

<beans xmlns=...>
    ...
    <jaxws:endpoint
        id="helloWorldService"
        implementorClass="org.helloworld.ws.HelloWorldServiceImpl"
        implementor="#helloWorldServiceImpl" <!-- spring managed -->
        endpointName="sayHello"
        address="HelloWorldService"/>
</beans>

...
难道不是吗

address="/HelloWorldService"

答案当然很简单(就是说,头撞桌子很简单)。在我的CXFBean定义中,我没有像这里看到的那样导入“cxfservlet.xml”文件。如果未导入此文件,cxf假定它应该使用嵌入式jetty实例,而不是我的cxf servlet。我猜jetty实例只适用于指定绝对发布地址的端点。

感谢您指出这一点。我确实尝试了/HelloWorldService,但它似乎仍然不起作用。请在端点和tryThanks中添加serviceName=“service'sName”。我没有提到我在我的web服务实现的JaxWS注释中配置了服务名称。
serviceName=HelloWorldService
对我不起作用,而且它需要在
HelloWorldService
之前加上一个方括号的namespac ein。感谢您发布解决方案,我遇到了完全相同的问题,几乎把头撞到了桌子上:-)
address="/HelloWorldService"