Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Spring Web Services 2.0.0 M3 released

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

    Default 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 at 05:43 AM.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  2. #2
    Join Date
    Aug 2005
    Posts
    39

    Default

    Hi Arjen,

    Where can we download the 2.0.0 M3 JARs? I can't find any download links for it anywhere.

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

    Default

    Quote 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.
    There are available here: http://www.springsource.com/download/community, as well as the maven repo shown above.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  4. #4
    Join Date
    Aug 2010
    Posts
    7

    Default

    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
    Last edited by hudi; Aug 20th, 2010 at 06:39 AM.

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

    Default

    Quote 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.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  6. #6
    Join Date
    Aug 2010
    Posts
    7

    Default

    I will try

  7. #7
    Join Date
    Oct 2006
    Posts
    16

    Wink

    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>

  8. #8
    Join Date
    Sep 2010
    Posts
    1

    Default

    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.

  9. #9
    Join Date
    Mar 2010
    Location
    Rotterdam
    Posts
    21

    Default 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!

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

    Default

    Quote 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 .
    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
  •