Announcement Announcement Module
Collapse
No announcement yet.
Architectural & Performance Questions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Architectural & Performance Questions

    Hello - I'm evaluating the Spring Web Services for use in a high-volume, response-time sensitive application, and I have a couple questions that I was hoping to get answered...

    Concern #1 - The API is very payload-centric. My problem is that we are dealing with an industry-standard WSDL that has known gaps. The third parties that we are dealing with have chosen to address these gaps by adding non-standard request attributes to the SOAP header. This precludes us from using the various payload endpoints unless we declare them as "request" scope and inject the soap header values via an interceptor. Our other (cleaner) alternative is to write our own MessageEndpoint so that we can gain access to the whole soap message. If we do the latter, what do we give up? What are the risks?

    Concern #2 - The soap message is managed internally via SAAJ, but the various payload endpoints typically transform the message into a different form (e.g., DOM4J, JDOM, etc.). What are the repercussions oof this additional transform (vs. me writing a servlet and parsing straight into DOM4J for example)?

    Thanks in advance for any information/corrections you might be able to provide me on these concerns.

  • #2
    My thought on your #1 item is it probably doesn't matter too much either way. Depending on how many different technologies you want to deal with XML/Java bindings, and which ones you are using, you might reinvent a lot of stuff that the payload endpt base classes give you. An alternative to request scope is to use ThreadLocal via an interceptor, and have your own extensions off of whatever payload endpoint classes you want to use deal with whatever out-of-band data the interceptors are passing in/out. Then your endpoints can still be stateless. But you certainly can have your own MessageEndpoint extension - it works fine as well. You'd probably have to pass the non-standard header data you pull out into whatever method your subclasses implement since the endpoints are typically stateless, so that might be a bit ugly.

    On #2, if you need high-volume/low resp time, I'd go with using Axis message factories instead of the default SAAJ. Then your requests/responses go straight from XML to whatever your payload endpoint binds it to. It will scale and perform a lot faster.

    Comment

    Working...
    X