Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add config fragment

...

The implementation of the single template Number service needs a mechanism to dynamically determine its current state or value at runtime. It gets this from CXF based on the target EndpointReference. It then proceeds to determine if the current value is even and returns the result to the caller.

...

WS-A provides a transport/protocol neutral approach to state transfer and is the default mechanism for multiplexing supported by CXF. However some transports, notably HTTP, have implicit support for multiplexing in the form of contexts and query parameters. The CXF HTTP transport supports a multiplexWithAddress configuration attribute that when enabled, negates the use of WS-A and forces the state to be embedded in the URL context.

For example, in the Number scenario above, the single Number service endpoint would publish a URL of the form: http://host:port/NumberService/Number/ with a URL matching strategy of stem. A call to NumberFactory.create(22) would result in an EPR that contained the address element http://localhost:9080/NumberService/Number/22. In this way, the multiplex state becomes a natural part of the HTTP endpoint address URL which can be consumed by native HTTP clients.

The multiplexWithAddress property for HTTP is enabled by adding the following to cxf.xml

No Format

 <bean name="<port name>.http-destination" abstract="true">
   <property name="multiplexWithAddress" value="true"/>
 </bean>

 <!-- or for all http ports (using a wildcard, since rev-534945) -->
 <bean name="*" abstract="true" class="JettyHTTPDestination">
   <property name="multiplexWithAddress" value="true"/>
 </bean>
Using EndpointRefernces with a JAX-WS Service

...