Vote count:
0
My problem is that I have a web service that gets published by jboss at http://localhost:8080/A, where A is the service implementation class; I want a custom url http://localhost:8080/B/C/D.ws.
In the wsdl, soap:address is correctly set http://localhost:8080/B/C/D.ws.
During war deployment, service gets published at the "wrong" address:
INFO [org.jboss.ws.cxf.metadata] Adding service endpoint metadata: id=org.example.ServiceImpl
address=http://localhost:8080/ServiceImpl
...
The best I got was jboss publishing the ws at the wrong url, and then the address changed through a servlet; but a SOAP call to the "right" url returned a 404. This is /WEB-INF/cxf-servlet.xml:
<?xml ... >
<beans ...
xmlns:jaxws="http://ift.tt/1ej3bYY" ... >
<jaxws:endpoint
id="someId"
implementor="org.example.ServiceImpl"
address="/B/C/D.ws" />
</beans>
With the following url-pattern in web.xml:
<servlet>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
This was the log:
17:41:53,648 INFO [org.jboss.ws.cxf.metadata] Adding service endpoint metadata: id=org.example.ServiceImpl
address=http://localhost:8080/ServiceImpl
...
17:41:59,307 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] Creating Service {... targetNamespace ...}ServiceImplService from class org.example.ServicePort
17:41:59,572 INFO [org.apache.cxf.endpoint.ServerImpl] Setting the server's publish address to be /B/C/D.ws
Thanks
asked 4 mins ago
Remap JAX-WS address
Aucun commentaire:
Enregistrer un commentaire