You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Aki Yoshida <ay...@apache.org> on 2012/03/16 17:47:07 UTC

Re: svn commit: r1301636 - in /cxf/branches/2.5.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java

this was my first time to use DoMerge and somehow I make a mistake.

After the merge operation, I didn't commit directly from DoMerge
because I thought I should verify the merge result.  After verifying
the result, I used
the old fashioned
svn ci -F svnmerge-commit-messsage.txt

I thought DoMerge updated this text file, but it was just my previous
svnmerge text :-(. So, the wrong commit text went in and it was
attached to the wrong jira ticket.

I'll remark this in the corresponding jira tickets to avoid confusion.

regards, aki

2012/3/16  <ay...@apache.org>:
> Author: ay
> Date: Fri Mar 16 16:29:14 2012
> New Revision: 1301636
>
> URL: http://svn.apache.org/viewvc?rev=1301636&view=rev
> Log:
> Merged revisions 1299707 via svnmerge from
> https://svn.apache.org/repos/asf/cxf/trunk
>
> ........
>  r1299707 | ay | 2012-03-12 16:17:47 +0100 (Mon, 12 Mar 2012) | 1 line
>
>  handle null-EndpointReference in WS-RM Destination and Source for JMX monitor
> ........
>
> Modified:
>    cxf/branches/2.5.x-fixes/   (props changed)
>    cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
>    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
>
> Propchange: cxf/branches/2.5.x-fixes/
> ------------------------------------------------------------------------------
> Binary property 'svnmerge-integrated' - no diff available.
>
> Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java
> URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java?rev=1301636&r1=1301635&r2=1301636&view=diff
> ==============================================================================
> --- cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java (original)
> +++ cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JAXWSMethodInvoker.java Fri Mar 16 16:29:14 2012
> @@ -32,6 +32,7 @@ import org.apache.cxf.interceptor.Fault;
>  import org.apache.cxf.jaxws.context.WebServiceContextImpl;
>  import org.apache.cxf.jaxws.context.WrappedMessageContext;
>  import org.apache.cxf.message.Exchange;
> +import org.apache.cxf.message.MessageUtils;
>  import org.apache.cxf.service.invoker.Factory;
>  import org.apache.cxf.service.invoker.SingletonFactory;
>
> @@ -62,7 +63,7 @@ public class JAXWSMethodInvoker extends
>             }
>             res = CastUtils.cast((List<?>)super.invoke(exchange, serviceObject, m, params));
>             if ((serviceObject instanceof Provider)
> -                && Boolean.TRUE.equals(exchange.getInMessage().
> +                && MessageUtils.isTrue(exchange.getInMessage().
>                                        getContextualProperty("jaxws.provider.interpretNullAsOneway"))
>                 && (res != null && !res.isEmpty() && res.get(0) == null)) {
>                 // treat the non-oneway call as oneway when a provider returns null
>
> Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java
> URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java?rev=1301636&r1=1301635&r2=1301636&view=diff
> ==============================================================================
> --- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java (original)
> +++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/provider/InterpretNullAsOnewayProviderTest.java Fri Mar 16 16:29:14 2012
> @@ -43,6 +43,7 @@ public class InterpretNullAsOnewayProvid
>
>     private static final String ADDRESS1 = "http://localhost:" + PORT + "/test/nullable1";
>     private static final String ADDRESS2 = "http://localhost:" + PORT + "/test/nullable2";
> +    private static final String ADDRESS3 = "http://localhost:" + PORT + "/test/nullable3";
>
>     public static class Server extends AbstractBusTestServerBase {
>
> @@ -57,6 +58,12 @@ public class InterpretNullAsOnewayProvid
>             Endpoint ep2 = Endpoint.publish(ADDRESS2, servant2);
>             assertNotNull("endpoint published", ep2);
>             ep2.getProperties().put("jaxws.provider.interpretNullAsOneway", Boolean.TRUE);
> +
> +            // endpoint interpreting null as oneway
> +            NullProviderService servant3 = new NullProviderService();
> +            Endpoint ep3 = Endpoint.publish(ADDRESS3, servant3);
> +            assertNotNull("endpoint published", ep3);
> +            ep3.getProperties().put("jaxws.provider.interpretNullAsOneway", "true");
>         }
>
>         public static void main(String[] args) throws Exception {
> @@ -97,6 +104,12 @@ public class InterpretNullAsOnewayProvid
>         HttpURLConnection conn = postRequest(ADDRESS2);
>         assertEquals("http 202 must be returned", 202, conn.getResponseCode());
>     }
> +
> +    @Test
> +    public void testInterpretNullAsOneway2() throws Exception {
> +        HttpURLConnection conn = postRequest(ADDRESS3);
> +        assertEquals("http 202 must be returned", 202, conn.getResponseCode());
> +    }
>
>     private static HttpURLConnection postRequest(String address) throws Exception {
>         URL url = new URL(address);
>
>