Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Swordfish Documentation: Creating JAX-WS Client"
(→Prerequisites) |
(→Creating the Client) |
||
Line 25: | Line 25: | ||
<import resource="classpath:META-INF/org/eclipse/swordfish/plugins/cxf/support/nmr-transport.xml" /> | <import resource="classpath:META-INF/org/eclipse/swordfish/plugins/cxf/support/nmr-transport.xml" /> | ||
+ | </pre></li> | ||
+ | <li>Add the JAX-WS client entry:<br> | ||
+ | <pre> | ||
+ | <jaxws:client id="<<The name of the client>>" | ||
+ | serviceClass="<<The interface class of the web service deployed>>" | ||
+ | serviceName="<<The serviceName QName (service element in the wsdl)>>" | ||
+ | interfaceName="<<The interfaceName QName (portType element in the wsdl)>>" | ||
+ | address="nmr:<<The name of the webservice's nmr endpoint>>" /> | ||
</pre></li> | </pre></li> | ||
<li>Provide the necessary ImportPackage and Require-Bundle statements in the MANIFEST.MF file as it is done in http://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk/org.eclipse.swordfish.samples/org.eclipse.swordfish.samples.cxfendpoint/META-INF/MANIFEST.MF</li> | <li>Provide the necessary ImportPackage and Require-Bundle statements in the MANIFEST.MF file as it is done in http://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk/org.eclipse.swordfish.samples/org.eclipse.swordfish.samples.cxfendpoint/META-INF/MANIFEST.MF</li> | ||
</ol> | </ol> |
Revision as of 05:23, 30 June 2009
Creating the JAX-WS Client
This section contains instructions on creating the JAX-WS client for the JAX-WS service deployed into the NMR.
Prerequisites
Eclipse Galileo M7 build or later.
The target platform should contain the Apache CXF and the org.eclipse.swordfish.plugins.cxf.support bundles
The examples described here are based on Eclipse Galileo M7.
About JAX-WS Client
For the general information of how to configure the JAX-WS client please look at
http://cwiki.apache.org/CXF20DOC/jax-ws-configuration.html (Configuring a Spring Client section)
It is used to create the java proxy based on the supplied interface class.
This proxy transforms method call into the SOAP request and sends it to the web service
Creating the Client
The sample that shows how to create the JAX-WS client is located at http://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk/org.eclipse.swordfish.samples/org.eclipse.swordfish.samples.cxfendpoint/
To create the client:
- Create the spring xml configuration file
- Add the following spring imports:
<import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/org/eclipse/swordfish/plugins/cxf/support/nmr-transport.xml" />
- Add the JAX-WS client entry:
<jaxws:client id="<<The name of the client>>" serviceClass="<<The interface class of the web service deployed>>" serviceName="<<The serviceName QName (service element in the wsdl)>>" interfaceName="<<The interfaceName QName (portType element in the wsdl)>>" address="nmr:<<The name of the webservice's nmr endpoint>>" />
- Provide the necessary ImportPackage and Require-Bundle statements in the MANIFEST.MF file as it is done in http://dev.eclipse.org/svnroot/rt/org.eclipse.swordfish/trunk/org.eclipse.swordfish.samples/org.eclipse.swordfish.samples.cxfendpoint/META-INF/MANIFEST.MF