Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

This component has been deprecated in favor to servicemix-jsr181 component.

...

 

ServiceMix provides several binding components that use the Java API for XML-based Web Services (JAX-WS API to make ). The ServiceMix JAX-WS components can invoke a web service client invocation or to can host a Java-based web service and expose it over multiple protocols. We currently test against the JAX-WS RI though will soon be also testing and plan to test against Celtix as well.

Making a

...

Web Service Invocation Through JBI

The JBI binding for JAX-WS allows a the JAX-WS API to be used to invoke a web service from a JBI message. , i.e. to use , the binding component uses JAX-WS to act as a web service client. The following example shows how to configure a service as a JAX-WS client.

...

:

...

 

To automatically generate the All that is required really is to point at the WSDL for the service and the client is automatically generated, point to the WSDL file. The above assumes the WSDL has only a single port available; if a WSDL exposes multiple ports then you need to must also supply the port QName.

Hosting a JAX-WS

...

Service Inside ServiceMix

The other option is to host an the actual Java and JAX-WS based web service implementation inside ServiceMix and then to expose it as an endpoint over one or more transport protocols.

...

...

 

The JAX-WS service needs to be defined with JAX-WS annotations as following.

...

follows:

...

 

The "@" annotation allows programmers to avoid writing boilerplate code. For example, @Webservice is a shorthand notation that specificies this class is a Web Service. Tools that understand the notation, such as the apt tool in Java 1.5, will automatically generate the Web service artifacts including the WSDL file. This annotation is described in JSR 181.

Location of the ServiceMix JAX WS Components

  • The source code for the ServiceMix 2.0.x JAX WS components can be found at:
    [servicemix_src_install_dir]\components\jaxws\src\main\java\org\servicemix\components\jaxws
    where [servicemix_src_install_dir] is the directory in which ServiceMix is installed.

Additional Resources

  • JAX-WS - JSR 224 Specification