Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Improving the spring-ws client

  1. #1
    Join Date
    Aug 2007
    Location
    San Diego, CA, USA
    Posts
    18

    Default Improving the spring-ws client

    I have been tracking spring-ws for a while and I am beginning to use it pretty extensively. One thing that keeps coming up is that the web-service client support (imho) could use some improvement. I wanted to float the idea of trying to refactor the client package to be less complicated, more capable, and easier to use. I've got an idea for how to do that and, with Arjen's permission, I would like to submit it as a contribution.

    As an intellectual exercise for myself I have already done a good portion of the refactoring work. But before I submit it or do any more work I wanted to get a feeling for what other people thought. Is this something that would be valuable?

  2. #2
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Well, if you have a good idea, I'm certainly open to it. But since we're really to close to 1.0, I cannot change too much.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #3
    Join Date
    Aug 2007
    Location
    San Diego, CA, USA
    Posts
    18

    Default

    Do you have a preference on how I submit it? Should I create a branch and commit it into subversion or would you prefer I upload a zip file somewhere? Its going to be 10-20 files including unit tests.

  4. #4
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    The best thing to do is to create a JIRA issue, and attach the code to it.

    Could you also give a brief explanation as to what the improvements are?
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  5. #5
    Join Date
    Aug 2007
    Location
    San Diego, CA, USA
    Posts
    18

    Default

    Ok. I'll do that.

    There are two main improvements. The first is an approach to solving SWS-148. The rest are what I would consider structural improvements. I'll see if I can explain the strucutral approach.

    There are two base interfaces, WebServiceClient and WebServiceClientFactory. As one might imagine, the factory creates the clients. The WebServiceClient interface has two methods for sending WebServiceMessages. Extending these two interfaces are two more interfaces: MarshallingWebServiceClient and MarshallingWebServiceClientFactory. Same pattern, but adding marshalling-related methods.

    There are four implementation classes which realize all of the interfaces described above: BaseWebServiceClient, BaseWebServiceClientFactory, OxmMarshallingWebServiceClient, and OxmMarshallingWebServiceClientFactory. The BaseWebServiceClient supports the use of multiple WebServiceInterceptors. The WebServiceInterceptor interface supports two methods which allow full access to the message before it is sent and after it is received.

    Clear as mud?

  6. #6
    Join Date
    Aug 2007
    Location
    San Diego, CA, USA
    Posts
    18

    Default

    I should add, my expectation was that people using these classes would inject one of the factory implementations into their code. They would then be able to create as many clients as their runtime operations needed. This was one of the other main improvements. I was trying to account for the scenario where the application does not know what endpoint it will be talking before runtime.

  7. #7
    Join Date
    Aug 2007
    Location
    San Diego, CA, USA
    Posts
    18

  8. #8
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Thanks for the code. It looks interesting!

    Unfortunately, we are too far in the 1.0 release cycle to add this new feature now. We will probable add it in the post 1.0 timeframe, either in a minor update (1.0.x), or - more likely - 1.1.

    Remember, if you want to see this functionality in SWS as soon as possible, vote for the issue!
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  9. #9

    Default

    Do these proposed changes include support for multiple marshallers? The problem I'm running into is I need to have multiple marshallers/adapters on the server (which it does) but I cannot replicate that on the client. Until then I have to shove 30! objects into the same package.
    Last edited by mmccaskill; Nov 4th, 2007 at 02:17 PM. Reason: grammar

  10. #10
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Yes, this will probably include the possibility of multiple marshallers.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •