Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Swordfish Documentation: Generating Dynamic WSDL"
Line 27: | Line 27: | ||
</pre> | </pre> | ||
The http endpoint points to swordfishCxf:BookingServiceImpl service and it is managed and deployed by the JBI ServiceMix HTTP binding component. | The http endpoint points to swordfishCxf:BookingServiceImpl service and it is managed and deployed by the JBI ServiceMix HTTP binding component. | ||
− | The problem is that there is no default mechanism to access dynamically generated booking service WSDL document via the Http Endpoint facilities. In order to overcome this issue the [https://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk/org.eclipse.swordfish.plugins.ws.wsdlgenerator|org.eclipse.swordfish.plugins.ws.wsdlgenerator] project was created. | + | The problem is that there is no default mechanism to access dynamically generated booking service WSDL document via the Http Endpoint facilities. In order to overcome this issue the [https://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk/org.eclipse.swordfish.plugins.ws.wsdlgenerator| org.eclipse.swordfish.plugins.ws.wsdlgenerator] project was created. |
It performs the following steps: | It performs the following steps: | ||
<ol> | <ol> |
Revision as of 05:11, 29 May 2009
Generating Dynamic WSDL
This section contains instructions on implementing the dynamic WSDL generation feature.
Prerequisites
Eclipse Galileo M7 build or later. The examples described here are based on Eclipse Galileo M7.
About Dynamic WSDL Generation
This feature allows users to access dynamically generated WSDLs for JAX-WS endpoints deployed within the Swordfish.
Let's consider the following example:
The jaxws endpoint is deployed with the descriptor:
<jaxws:endpoint id="bookingService" implementor="org.eclipse.swordfish.samples.cxf.BookingServiceImpl" address="nmr:BookingService"/>
The http endpoint is used to access the jax-ws service externally:
<http:endpoint endpoint="httpConsumerEndpoint" service="httpConsumerEndpoint" targetService="swordfishCxf:BookingServiceImpl" soap="true" role="consumer" locationURI="http://0.0.0.0:8192/cxfsample/" defaultMep="http://www.w3.org/2004/08/wsdl/in-out" />
The http endpoint points to swordfishCxf:BookingServiceImpl service and it is managed and deployed by the JBI ServiceMix HTTP binding component. The problem is that there is no default mechanism to access dynamically generated booking service WSDL document via the Http Endpoint facilities. In order to overcome this issue the org.eclipse.swordfish.plugins.ws.wsdlgenerator project was created. It performs the following steps:
- Tracks all deployed http endpoionts
- Searches for the targeted jax-ws services. Please note that the http endpoint's deployment descriptor should contain targetService or targetEndpoint or targetInterface attributes, otherwise wsdlgenerator will not be able the find the corresponding jax-ws service
- Generates the wsdl for the service and injects it in the http endpoint
To leverage the use of the Swordfish Dynamic WSDL Generation feature the org.eclipse.swordfish.plugins.ws.wsdlgenerator project should be added to the target platform. To access the generated wsdl document for the http endpoint just add the "?wsdl" to the locationURI. For example httpConsumerEndpoint publishes its wsdl document on the address http://localhost:8192/cxfsample/?wsdl