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

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

  • #2
    Hi Arjen,

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

    Comment


    • #3
      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.

      Comment


      • #4
        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, 07:39 AM.

        Comment


        • #5
          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.

          Comment


          • #6
            I will try

            Comment


            • #7
              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>

              Comment


              • #8
                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.

                Comment


                • #9
                  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!

                  Comment


                  • #10
                    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 .

                    Comment


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

                      Comment


                      • #12
                        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/

                        Comment


                        • #13
                          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.

                          Comment


                          • #14
                            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.

                            Comment


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

                              Regards
                              Harsshi.

                              Comment

                              Working...
                              X