2013-10-25 95 views
0

我正在尝试使用wsdl第一种方法和CXF创建Web服务。我能够从wsdl生成java文件并将war文件部署到tomcat服务器。但是,我没有看到生成的文件中有任何soapaction。如何识别此Web服务的终点URL?如何识别cxf Web服务端点

感谢,

回答

0

通常在CXF使用Spring配置文件来配置端点,如JAX-WS Configuration描述。通常地址是相对的,例如

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:jaxws="http://cxf.apache.org/jaxws" 
    xsi:schemaLocation=" 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd 
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> 

    <jaxws:endpoint id="classImpl" 
     implementor="org.apache.cxf.jaxws.service.Hello" 
     address="/helloService"/> 

</beans> 

地址对于您的Web应用上下文根是本地的。

假设您的Web应用程序的名称是SomeWebApp并且服务器可用于localhost:8080那么Web服务应发布在http://localhost:8080/SomeWebApp/helloService。你可以在http://localhost:8080/SomeWebApp/helloService?wsdl上测试它检索WSDL。这个URL可以用来创建SOAP UI项目(我真的推荐用于探索和测试SOAP服务的工具)。

如果您没有使用Spring来配置端点,或者仍然无法访问Web服务,请提供有关您的配置的更多详细信息。