Results 1 to 10 of 18

Thread: Spring Web Services 2.0.0 M3 released

Hybrid View

  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 2010
    Posts
    2

    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.
    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.
    I love spring

  8. #8
    Join Date
    Jan 2010
    Posts
    8

    Default

    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.

Posting Permissions

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