PROBLEM
A Spring DSL service may need to be JAX-WS enabled.
SOLUTION
Skyway Builder Web Services Edition has some accelerators for exposing the Spring DSL Services and Operations as JAX-WS web services. This makes it very easy to make the functionality of Spring Services accessible to other systems.
In the context of contract-first and contract-last development, in both cases there's a WSDL that defines the contract of the service. The only difference in contract-first development is that the WSDL was created first and the development artifacts were generated from them. Regardless of whether you implemented your service using a predefined service contract or not, the process for web service enabling the service is the same.
HOW IT WORKS
The Spring DSL has adopted the SOAP lexicon of services and operations, but that doesn't mean that the services are automatically exposed as SOAP services for invocation. The decision of exposing application logic as SOAP web services is left to the developer to decide based on their requirements.
Steps for publishing a JAX-WS service:
Open the Service editor for the Spring DSL Service that needs to web service enabled and switch to the JAX-WS tab.
Click on the Synchronize button to refresh the web service meta-data from the Spring DSL service meta-data.
Under Web Service Details, check the Publish Web Service option.
Deploy your application, and the service will be available as a SOAP service using JAX-WS.
The web service is preconfigured using common web service conventions for the service, operations and parameters, but the JAX-WS tab allows every option to be reconfigured. By default all the Operations in the Service are web service enabled. If you want to exclude certain operations, you can highlight the operation in the JAX-WS tab and check the "Exlude" option.
The WSDL for the service is dynamically generated, and the URL for
the WSDL is
http://server:port//context/jaxws/endpoint?wsdl
server - the name of the server hosting the web service (i.e. localhost or www.mycompany.com)
port - the TCP/IP port number of the hosted web service (i.e. 8080)
context - the context name of the application; the root context for the application hosting the service (i.e. myapp-Web)
endpoint - the address of the service
endpoint (the address is found in the
jaxws-web-context.xml
)
RELATED RECIPES