servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r935016 - in /servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src: main/java/org/apache/servicemix/camel/JbiEndpoint.java test/java/org/apache/servicemix/camel/JbiComponentTest.java
Date Fri, 16 Apr 2010 18:15:36 GMT
Author: gertv
Date: Fri Apr 16 18:15:35 2010
New Revision: 935016

URL: http://svn.apache.org/viewvc?rev=935016&view=rev
Log:
SMXCOMP-737: MEP parameter gets appended to service/endpoint name

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiComponentTest.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java?rev=935016&r1=935015&r2=935016&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
Fri Apr 16 18:15:35 2010
@@ -141,10 +141,12 @@ public class JbiEndpoint extends Default
                 mep = (String) params.get("mep");
                 if (mep != null && !mep.startsWith("http://www.w3.org/ns/wsdl/"))
{
                     mep = "http://www.w3.org/ns/wsdl/" + mep;
+                    params.remove("mep");
                 }
                 String oper = (String) params.get("operation");
                 if (StringUtils.hasLength(oper)) {
                     operation = oper;
+                    params.remove("operation");
                 }
                 this.destinationUri = destinationUri.substring(0, idx);
 

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiComponentTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiComponentTest.java?rev=935016&r1=935015&r2=935016&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiComponentTest.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiComponentTest.java
Fri Apr 16 18:15:35 2010
@@ -27,10 +27,20 @@ public class JbiComponentTest extends Te
     
     public void testGetUriWithMep() throws Exception {
         JbiComponent component = createJbiComponent();
-        JbiEndpoint endpoint = (JbiEndpoint) component.createEndpoint("jbi:endpoint:urn:test:service?mep=in-out");
-        assertEquals(IN_OUT, endpoint.getMep());        
+        JbiEndpoint endpoint =
+                (JbiEndpoint) component.createEndpoint("jbi:endpoint:urn:test:service:endpoint?mep=in-out");
+        assertEquals(IN_OUT, endpoint.getMep());
+        assertEquals("endpoint:urn:test:service:endpoint", endpoint.getEndpointUri());
     }
-    
+
+    public void testGetUriWithOperation() throws Exception {
+        JbiComponent component = createJbiComponent();
+        JbiEndpoint endpoint =
+                (JbiEndpoint) component.createEndpoint("jbi:endpoint:urn:test:service:endpoint?operation=doSomething");
+        assertEquals("doSomething", endpoint.getOperation());
+        assertEquals("endpoint:urn:test:service:endpoint", endpoint.getEndpointUri());
+    }
+
     public void testNullWhenNoJbiUri() throws Exception {
         assertNull(createJbiComponent().createEndpoint("somethingelse:service:urn:test"));
     }



Mime
View raw message