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 the JAX-WS API to be used to invoke a web service from a JBI message. In other words, i.e., 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 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 follows:

...

 

The "@" annotation prevents the programmer from having to write a lot of boilerplate web service code. Essentiallyallows programmers to avoid writing boilerplate code. For example, @Webservice is a shorthand notation that says specificies this code class is a Web Service. When processed by a processor that understands Tools that understand the notation, such as , the apt processor tool in Java 1.5, much of will automatically generate the Web service code is automatically generated for the programmerartifacts including the WSDL file. This annotation is described in JSR 181.

...

Location of the ServiceMix JAX WS Components

  • Wiki MarkupThe 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 {{\
    where [servicemix_src_install_dir\]}} is the directory in which ServiceMix is installed.

Additional Resources

  • JAX-WS - JSR 224 Specification