Announcement Announcement Module
Collapse
No announcement yet.
Spring Web Services 2.0.0 M3 released Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Arjen Poutsma
    started a topic Spring Web Services 2.0.0 M3 released

    Spring Web Services 2.0.0 M3 released

    Dear Spring community,

    I'm pleased to announce that Spring Web Services 2.0 Milestone 3 has been released!

    This is the third milestone release in the 2.0 release cycle. The most important new feature in this release is inclusion of a client-side Web service testing framework. This testing framework is very similar to EasyMock 2, offering a 'fluent' API for all you testing needs!
    For example:

    Code:
    import org.junit.Before;
    import org.junit.Test;
    import org.junit.runner.RunWith;
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.test.context.ContextConfiguration;
    import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
    import org.springframework.xml.transform.StringSource;
    import static org.springframework.ws.mock.client.WebServiceMock.*;
    
    
    @RunWith(SpringJUnit4ClassRunner.class)
    @ContextConfiguration("applicationContext.xml")
    public class IntegrationTest {
    
      // MyWebServiceClient extends WebServiceGatewaySupport, and is configured in applicationContext.xml
      @Autowired
      private MyWebServiceClient client;
    
      @Before
      public void setUpMocks() throws Exception {
        mockWebServiceTemplate(client.getWebServiceTemplate());
      }
    
      @Test
      public void getCustomerCount() throws Exception {
        Source requestPayload =
          new StringSource("<customerCountRequest xmlns='http://springframework.org/spring-ws/test' />";
        Source responsePayload = new StringSource("<customerCountResponse xmlns='http://springframework.org/spring-wstest'>" +
          "<customerCount>10</customerCount>" +
          "</customerCountResponse>");
    
        expect(payload(requestPayload)).andRespond(withPayload(responsePayload));
    
        // client.getCustomerCount() uses the WebServiceTemplate
        int customerCount = client.getCustomerCount();
        assertEquals(10, response.getCustomerCount());
    
        verifyConnections();
      }
    }
    The WebServiceMock API has a lot more features than I can describe here, I suggest you try out the new testing module today! Please leave feedback through JIRA or as a reply to this thread.

    Many thanks to Lukáš Křečan for helping out with this testing framework. It would not have been possible without him.

    Please see the changelog for more details. If you have any further requests/issues, please use JIRA or reply to this post.

    Spring Web Services 2.0 is due in the third quarter of 2010.

    For more information, see http://static.springframework.org/spring-ws/site/

    Note that this milestone will not be uploaded to Maven Central, but only to our own milestone repo:

    Code:
    <repository>
      <id>spring-maven-milestone</id>
      <name>Springframework Maven Repository</name>
      <url>http://maven.springframework.org/milestone</url>
    </repository>
    When 2.0 reaches GA, we will upload the jars to maven central as usual.
    Last edited by Arjen Poutsma; Aug 18th, 2010, 06:43 AM.

  • teamoo
    replied
    Hey guys,

    we are working with M3 on a project for university using maven. As M3 switched over to xml-sec version 3.0 (com.sun.xml.wss), could someone be so kind to upload the 3.0 version to the maven spring-ext resource repo?

    Greetings,

    teamoo

    Leave a comment:


  • Paul Nyheim
    replied
    Before you go ahead with the RC's of Spring Web Services, I would like to point you to this issue registered against spring-oxm: https://jira.springframework.org/browse/SPR-7696

    I would consider this a regression against spring-ws 2.0, because this is something that worked under 1.5.9, and is now not working with 2.0.0-M3 with dependency to spring-oxm-3.0.5.RELEASE

    Regards,
    Paul Nyheim

    Leave a comment:


  • Arjen Poutsma
    replied
    Originally posted by harshi View Post
    Hi Arjen,
    When are you planning to release final version? I have been using milestone no problems yet.
    That's good to hear. I plan to release RC1 right after SpringOne. We will also require a RC2, as there is not going to be any (new) documentation in RC1. Depending on how many issues are found, we will release further RCs if necessary.

    Leave a comment:


  • harshi
    replied
    Hi Arjen,
    When are you planning to release final version? I have been using milestone no problems yet.

    Regards
    Harsshi.

    Leave a comment:


  • eva123
    replied
    Originally posted by skaffman View Post
    Hi Arjen,

    Where can we download the 2.0.0 M3 JARs? I can't find any download links for it anywhere.
    Any chance you've got some more information on the testing/mocking you describe in this post? I can't seem to find information on the spring-ws reference page.

    Leave a comment:


  • alibkord
    replied
    After hours of debugging Spring-ws code line-by-line to see how it works and get a simple web service working (Due to lack of documentation about new DefaultMethodEndpointAdapter and MethodArgumentResolver and PayloadMethodProcessor implementations and how to use different annotations, etc.), I have to admit it is an impressing piece of software.
    Well Done guys!
    Looking forward to the final release and updated documentation.

    Leave a comment:


  • evandongen
    replied
    I had some trouble finding the unit tests you mentioned in the jars from the maven repository. After some googling I found the svn repo though

    For anyone else who is looking for some examples, take a look here:
    https://src.springframework.org/svn/...ework/ws/mock/

    Leave a comment:


  • evandongen
    replied
    Cool, I hadn't thought of the unit tests yet. Thanks, I'll give it a go!

    Leave a comment:


  • Arjen Poutsma
    replied
    Originally posted by evandongen View Post
    Great work again, everything seems to be working like a charm. Any chance you've got some more information on the testing/mocking you describe in this post? I can't seem to find information on the spring-ws reference page.
    There is no documentation as of yet, as the API might still change in the milestone phase. We plan to write documentation when we enter the RC phase.

    That said, you can get a good idea as to what is supported by looking at the various unit tests that come with the new testing module. Also, the fact that it's a fluent API means that you can basically ctrl-space your way through .

    Leave a comment:


  • evandongen
    replied
    Testing / mocking

    Hi Arjen,

    Great work again, everything seems to be working like a charm. Any chance you've got some more information on the testing/mocking you describe in this post? I can't seem to find information on the spring-ws reference page.

    Thanks!

    Leave a comment:


  • armed
    replied
    Hi.

    Tried to add repository (http://maven.springframework.org/milestone) to our local nexus, but it seems to be unavailable. Nexus can see list of folders if I add http://maven.springframework.org without "milestone", hovewer it says that "milestone" folder is not found. Is there another repository, where I can get 2.0.0.M3?

    Thanx.

    Leave a comment:


  • lafeuil
    replied
    You must add this dependency in your pom.
    Code:
    <dependency>
      <groupId>org.springframework.ws</groupId>
      <artifactId>spring-ws-test</artifactId>
      <version>2.0.0-M3</version>
      <scope>test</scope>
    </dependency>

    Leave a comment:


  • hudi
    replied
    I will try

    Leave a comment:


  • Arjen Poutsma
    replied
    Originally posted by hudi View Post
    Is there method to send whole soap message not just the body ? because If I send SOAP message it doesnt work

    java.lang.AssertionError: Messages are different, org.custommonkey.xmlunit.Diff
    [different] Expected namespace URI
    Can you create a JIRA issue for this please? With the code that gets you this error attached?

    Thanks.

    Leave a comment:

Working...
X