Change JAX-WS Service URL

前端 未结 2 757
无人及你
无人及你 2021-01-03 04:32

Is there any Possibility to change the Webservice URL when creating a JAX-WS webservice?

The automatic URL is (on Glassfish 3): http:///

2条回答
  •  暖寄归人
    2021-01-03 05:01

    You can specify the servlet mapping for your JAX-WS implementation class. By default, the servlet mapping is not required and JAX-WS framework generates it for you. As you want to provide a custom URL mapping for your web service service, you can provide a servlet mapping with the custom URL.

    Sample:

    
        CalculatorService
        CalculatorService
        
            org.apache.geronimo.samples.jws.CalculatorService
        
    
    
    
        CalculatorService
        /axis/services/calculator
    
    

    Refer to https://geronimo.apache.org/GMOxDOC20/simple-web-service-with-jax-ws.html and http://pic.dhe.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Ftwbs_customwebxml.html.

提交回复
热议问题