servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r691067 - /servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/AbstractCreatePullPoint.java
Date Mon, 01 Sep 2008 21:30:08 GMT
Author: gnodet
Date: Mon Sep  1 14:30:08 2008
New Revision: 691067

URL: http://svn.apache.org/viewvc?rev=691067&view=rev
Log:
SM-1117: The pull point name generated by AbstractCreatePullpoint does not work well for some
JMS providers

Modified:
    servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/AbstractCreatePullPoint.java

Modified: servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/AbstractCreatePullPoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/AbstractCreatePullPoint.java?rev=691067&r1=691066&r2=691067&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/AbstractCreatePullPoint.java
(original)
+++ servicemix/components/engines/servicemix-wsn2005/trunk/src/main/java/org/apache/servicemix/wsn/AbstractCreatePullPoint.java
Mon Sep  1 14:30:08 2008
@@ -42,8 +42,6 @@
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.CreatePullPoint")
 public abstract class AbstractCreatePullPoint extends AbstractEndpoint implements CreatePullPoint
{
 
-    public static final QName PULL_POINT_NAME = new QName("http://servicemix.apache.org/wsn",
"PullPointName");
-
     private static Log log = LogFactory.getLog(AbstractCreatePullPoint.class);
 
     private IdGenerator idGenerator;
@@ -126,7 +124,14 @@
 
     protected String createPullPointName(org.oasis_open.docs.wsn.b_2.CreatePullPoint createPullPointRequest)
{
         // Let the creator decide which pull point name to use
-        String name = createPullPointRequest.getOtherAttributes().get(PULL_POINT_NAME);
+        String name = null;
+        for (Iterator it = createPullPointRequest.getAny().iterator(); it.hasNext();) {
+            Element el = (Element) it.next();
+            if ("name".equals(el.getLocalName())
+                    && "http://servicemix.apache.org/wsn2005/1.0".equals(el.getNamespaceURI()))
{
+                name = DOMUtil.getElementText(el).trim();
+            }
+        }
         if (name == null) {
             // If no name is given, just generate one
             name = idGenerator.generateSanitizedId();



Mime
View raw message