Announcement Announcement Module
Collapse
No announcement yet.
JAXRPC - Custom Type Mappings Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JAXRPC - Custom Type Mappings

    Working on a JAXRPC Client using Axis.

    There appear to be two ways of handling Custom Type Mappings with Spring and JAXRPC

    either [a la Pro Spring] extending JaxRpcPortProxyFactoryBean with a custom implementation that overrides postProcessJaxRpcService(Service service) to do the mapping.

    or [a la samples/jpetstore] to implement JaxRpcServicePostProcessor and then set this implementation using the
    <property name="servicePostProcessors">
    <list>
    ...
    on the JaxRpcPortProxyFactoryBean.

    Any one care to discuss the pros and cons of each approach?

  • #2
    As far as I can see...

    The advantage of the (jpetstore) approach which implements JaxRpcServicePostProcessor is that such mappings can then be reused in combination with others.

    While, with the (Pro Spring) approach, extending JaxRpcPortProxyFactoryBean, the custom mappings can only be reused as they are defined in that implementation.

    The latter approach seems more succinct in terms of coding and saves a few lines of configuration but these benefits don't seem to me enough to outweigh the reusability of the former approach.

    Still appreciate any comments.

    Comment


    • #3
      Have seen from the javadoc that my hunch about the reusability of the JaxRpcServicePostProcessor approach was correct.

      Am surprised though that Spring doesn't include a generic AxisBeanMappingServicePostProcessor, where the mappings (Class, name) can be configured using DI rather than hard coding them.

      Comment

      Working...
      X