cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [1/2] git commit: Change wsn to use the WSDL whenever possible instead of relying on the service/schemas to built from the class. That makes sure the proper schema is used for validation and JAXB context creation and such. (and works around a bug in Mo
Date Wed, 16 Jul 2014 16:27:45 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 4cb5fa951 -> 8364fbf72


Change wsn to use the WSDL whenever possible instead of relying on the service/schemas to
built from the class.  That makes sure the proper schema is used for validation and JAXB context
creation and such.  (and works around a bug in Moxy)


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/8364fbf7
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/8364fbf7
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/8364fbf7

Branch: refs/heads/master
Commit: 8364fbf7208e7df11db6be71ffed9de70c09d0de
Parents: 2328915
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Jul 16 12:20:00 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Jul 16 12:26:26 2014 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/wsn/client/Consumer.java     |  6 ++++-
 .../org/apache/cxf/wsn/client/Publisher.java    | 19 +++++++++-----
 .../org/apache/cxf/wsn/util/CXFWSNHelper.java   | 24 +++++++++++++++++-
 .../java/org/apache/cxf/wsn/util/WSNHelper.java | 24 ++++++++++++++++++
 .../resources/org/apache/cxf/wsn/wsdl/wsn.wsdl  | 18 +++++++-------
 .../org/apache/cxf/wsn/AbstractEndpoint.java    |  9 ++++++-
 .../org/apache/cxf/wsn/EndpointManager.java     |  4 ++-
 .../cxf/wsn/services/JaxwsCreatePullPoint.java  |  4 +--
 .../cxf/wsn/services/JaxwsEndpointManager.java  | 26 +++++++++++++++++++-
 .../wsn/services/JaxwsNotificationBroker.java   |  4 +--
 .../apache/cxf/wsn/services/JaxwsPublisher.java |  4 +--
 .../apache/cxf/wsn/services/JaxwsPullPoint.java |  6 ++++-
 .../cxf/wsn/services/JaxwsSubscription.java     |  6 ++++-
 .../wsn/services/OSGiJaxwsEndpointManager.java  |  6 +++--
 .../java/org/apache/cxf/wsn/WsnBrokerTest.java  |  6 ++++-
 15 files changed, 135 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Consumer.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Consumer.java b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Consumer.java
index e894df1..4568ae7 100644
--- a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Consumer.java
+++ b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Consumer.java
@@ -33,7 +33,11 @@ import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
 import org.oasis_open.docs.wsn.b_2.Notify;
 import org.oasis_open.docs.wsn.bw_2.NotificationConsumer;
 
-@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.NotificationConsumer")
+@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.NotificationConsumer",
+    targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+    serviceName = "NotificationConsumerService",
+    portName = "NotificationConsumerPort"
+)
 public class Consumer implements NotificationConsumer, Referencable {
 
     public interface Callback {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Publisher.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Publisher.java b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Publisher.java
index d5748b3..64a13fa 100644
--- a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Publisher.java
+++ b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/client/Publisher.java
@@ -26,6 +26,7 @@ import javax.xml.ws.Endpoint;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
 import org.apache.cxf.wsn.util.IdGenerator;
+import org.apache.cxf.wsn.util.WSNHelper;
 import org.oasis_open.docs.wsn.b_2.GetCurrentMessage;
 import org.oasis_open.docs.wsn.b_2.GetCurrentMessageResponse;
 import org.oasis_open.docs.wsn.b_2.InvalidFilterFaultType;
@@ -61,7 +62,11 @@ import org.oasis_open.docs.wsrf.rw_2.ResourceUnknownFault;
  * Demand-based publisher.
  *
  */
-@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.NotificationProducer")
+@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.NotificationProducer",
+    targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+    serviceName = "NotificationProducerService",
+    portName = "NotificationProducerPort"
+)
 public class Publisher implements NotificationProducer, Referencable {
     public static final String WSN_URI = "http://docs.oasis-open.org/wsn/b-2";
     public static final QName QNAME_TOPIC_EXPRESSION = new QName(WSN_URI, "TopicExpression");
@@ -82,8 +87,7 @@ public class Publisher implements NotificationProducer, Referencable {
         if (callback == null || address == null) {
             this.endpoint = null;
         } else {
-            this.endpoint = Endpoint.create(this);
-            this.endpoint.publish(address);
+            this.endpoint = WSNHelper.getInstance().publish(address, this);
         }
     }
 
@@ -155,7 +159,11 @@ public class Publisher implements NotificationProducer, Referencable
{
         throw new NoCurrentMessageOnTopicFault("There is no current message on this topic.",
fault);
     }
 
-    @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.SubscriptionManager")
+    @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.SubscriptionManager",
+        targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+        serviceName = "SubscriptionManagerService",
+        portName = "SubscriptionManagerPort"
+        )
     protected class PublisherSubscription implements SubscriptionManager {
 
         private final String id;
@@ -165,8 +173,7 @@ public class Publisher implements NotificationProducer, Referencable {
         public PublisherSubscription(TopicExpressionType topic) {
             this.topic = topic;
             this.id = idGenerator.generateSanitizedId();
-            this.endpoint = Endpoint.create(this);
-            this.endpoint.publish(address + "/subscriptions/" + this.id);
+            this.endpoint = WSNHelper.getInstance().publish(address + "/subscriptions/" +
this.id, this);
         }
 
         public W3CEndpointReference getEpr() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/CXFWSNHelper.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/CXFWSNHelper.java
b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/CXFWSNHelper.java
index fefa78c..4a5b9f7 100644
--- a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/CXFWSNHelper.java
+++ b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/CXFWSNHelper.java
@@ -19,10 +19,16 @@
 
 package org.apache.cxf.wsn.util;
 
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.Endpoint;
 
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
@@ -52,7 +58,8 @@ public class CXFWSNHelper extends WSNHelper {
             jwfb.getClientFactoryBean().setWsdlURL(WSNWSDLLocator.getWSDLUrl().toExternalForm());
             jwfb.setServiceName(new QName("http://cxf.apache.org/wsn/jaxws", 
                                           serviceInterface.getSimpleName() + "Service"));
-            jwfb.setEndpointName(new QName("http://cxf.apache.org/wsn/jaxws", "Soap"));
+            jwfb.setEndpointName(new QName("http://cxf.apache.org/wsn/jaxws", 
+                                           serviceInterface.getSimpleName() + "Port"));
             jwfb.setAddress(address);
             if (extraClasses != null && extraClasses.length > 0) {
                 Map<String, Object> props = new HashMap<String, Object>();
@@ -71,6 +78,21 @@ public class CXFWSNHelper extends WSNHelper {
             props.put("jaxb.additionalContextClasses", extraClasses);
             endpoint.setProperties(props);
         }
+        URL wsdlLocation = WSNWSDLLocator.getWSDLUrl();
+        if (wsdlLocation != null) {
+            try {
+                if (endpoint.getProperties() == null) {
+                    endpoint.setProperties(new HashMap<String, Object>());
+                }
+                endpoint.getProperties().put("javax.xml.ws.wsdl.description", wsdlLocation.toExternalForm());
+                List<Source> mt = new ArrayList<Source>();
+                StreamSource src = new StreamSource(wsdlLocation.openStream(), wsdlLocation.toExternalForm());
+                mt.add(src);
+                endpoint.setMetadata(mt);
+            } catch (IOException e) {
+                //ignore, no wsdl really needed
+            }
+        }
         endpoint.publish(address);
         return endpoint;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/WSNHelper.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/WSNHelper.java b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/WSNHelper.java
index e008579..ce5dfb7 100644
--- a/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/WSNHelper.java
+++ b/services/wsn/wsn-api/src/main/java/org/apache/cxf/wsn/util/WSNHelper.java
@@ -18,8 +18,16 @@
  */
 package org.apache.cxf.wsn.util;
 
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
 import javax.xml.namespace.QName;
+import javax.xml.transform.Source;
 import javax.xml.transform.dom.DOMResult;
+import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.EndpointReference;
 import javax.xml.ws.Service;
@@ -76,6 +84,22 @@ public class WSNHelper {
             throw new UnsupportedOperationException("Pure JAX-WS does not support the extraClasses");
         }
         Endpoint endpoint = Endpoint.create(o);
+        URL wsdlLocation = WSNWSDLLocator.getWSDLUrl();
+        if (wsdlLocation != null) {
+            try {
+                if (endpoint.getProperties() == null) {
+                    endpoint.setProperties(new HashMap<String, Object>());
+                }
+                endpoint.getProperties().put("javax.xml.ws.wsdl.description", wsdlLocation.toExternalForm());
+                List<Source> mt = new ArrayList<Source>();
+                StreamSource src = new StreamSource(wsdlLocation.openStream(), wsdlLocation.toExternalForm());
+                mt.add(src);
+                endpoint.setMetadata(mt);
+            } catch (IOException e) {
+                //ignore, no wsdl really needed
+            }
+        }
+        
         endpoint.publish(address);
         return endpoint;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-api/src/main/resources/org/apache/cxf/wsn/wsdl/wsn.wsdl
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-api/src/main/resources/org/apache/cxf/wsn/wsdl/wsn.wsdl b/services/wsn/wsn-api/src/main/resources/org/apache/cxf/wsn/wsdl/wsn.wsdl
index 5ad4200..cf8c0c5 100644
--- a/services/wsn/wsn-api/src/main/resources/org/apache/cxf/wsn/wsdl/wsn.wsdl
+++ b/services/wsn/wsn-api/src/main/resources/org/apache/cxf/wsn/wsdl/wsn.wsdl
@@ -33,7 +33,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="NotificationConsumerService">
-        <wsdl:port name="Soap" binding="tns:NotificationConsumerSoap">
+        <wsdl:port name="NotificationConsumerPort" binding="tns:NotificationConsumerSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -99,7 +99,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="NotificationProducerService">
-        <wsdl:port name="Soap" binding="tns:NotificationProducerSoap">
+        <wsdl:port name="NotificationProducerPort" binding="tns:NotificationProducerSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -214,7 +214,7 @@
                  -->
     </wsdl:binding>
     <wsdl:service name="NotificationBrokerService">
-        <wsdl:port name="Soap" binding="tns:NotificationBrokerSoap">
+        <wsdl:port name="NotificationBrokerPort" binding="tns:NotificationBrokerSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -250,7 +250,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="SubscriptionManagerService">
-        <wsdl:port name="Soap" binding="tns:SubscriptionManagerSoap">
+        <wsdl:port name="SubscriptionManagerPort" binding="tns:SubscriptionManagerSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -315,7 +315,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="PausableSubscriptionManagerService">
-        <wsdl:port name="Soap" binding="tns:PausableSubscriptionManagerSoap">
+        <wsdl:port name="PausableSubscriptionManagerPort" binding="tns:PausableSubscriptionManagerSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -337,7 +337,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="PublisherRegistrationManagerService">
-        <wsdl:port name="Soap" binding="tns:PublisherRegistrationManagerSoap">
+        <wsdl:port name="PublisherRegistrationManagerPort" binding="tns:PublisherRegistrationManagerSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -356,7 +356,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="CreatePullPointService">
-        <wsdl:port name="Soap" binding="tns:CreatePullPointSoap">
+        <wsdl:port name="CreatePullPointPort" binding="tns:CreatePullPointSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -391,7 +391,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="PullPointService">
-        <wsdl:port name="Soap" binding="tns:PullPointSoap">
+        <wsdl:port name="PullPointPort" binding="tns:PullPointSoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>
@@ -416,7 +416,7 @@
         </wsdl:operation>
     </wsdl:binding>
     <wsdl:service name="GetResourcePropertyService">
-        <wsdl:port name="Soap" binding="tns:GetResourcePropertySoap">
+        <wsdl:port name="GetResourcePropertyPort" binding="tns:GetResourcePropertySoap">
             <soap:address location="http://cxf.apache.org/wsnotification"/>
         </wsdl:port>
     </wsdl:service>

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
index 23becb5..1cc869c 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/AbstractEndpoint.java
@@ -18,10 +18,14 @@
  */
 package org.apache.cxf.wsn;
 
+import java.net.URL;
+
 import javax.management.ObjectName;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
+import org.oasis_open.docs.wsn.bw_2.CreatePullPoint;
+
 public abstract class AbstractEndpoint implements EndpointMBean {
 
     protected final String name;
@@ -52,8 +56,11 @@ public abstract class AbstractEndpoint implements EndpointMBean {
         this.address = address;
     }
 
+    public final URL getWSDLLocation() {
+        return CreatePullPoint.class.getClassLoader().getResource("org/apache/cxf/wsn/wsdl/wsn.wsdl");

+    }
     public void register() throws EndpointRegistrationException {
-        endpoint = manager.register(getAddress(), this);
+        endpoint = manager.register(getAddress(), this, getWSDLLocation());
     }
 
     public void unregister() throws EndpointRegistrationException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/EndpointManager.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/EndpointManager.java b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/EndpointManager.java
index d60d888..c5ad514 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/EndpointManager.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/EndpointManager.java
@@ -18,12 +18,14 @@
  */
 package org.apache.cxf.wsn;
 
+import java.net.URL;
+
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.wsaddressing.W3CEndpointReference;
 
 public interface EndpointManager {
 
-    Endpoint register(String address, Object service) throws EndpointRegistrationException;
+    Endpoint register(String address, Object service, URL wsdlLocation) throws EndpointRegistrationException;
 
     void unregister(Endpoint endpoint, Object service) throws EndpointRegistrationException;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsCreatePullPoint.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsCreatePullPoint.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsCreatePullPoint.java
index 1eae510..a28d026 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsCreatePullPoint.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsCreatePullPoint.java
@@ -28,8 +28,8 @@ import org.apache.cxf.wsn.EndpointManager;
 import org.apache.cxf.wsn.jms.JmsCreatePullPoint;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.CreatePullPoint",
-            targetNamespace = "http://docs.oasis-open.org/wsn/bw-2",
-            serviceName = "CreatePullPoint",
+            targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+            serviceName = "CreatePullPointService",
             portName = "CreatePullPointPort")
 @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
 public class JaxwsCreatePullPoint extends JmsCreatePullPoint

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
index a478cb0..bd21816 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsEndpointManager.java
@@ -18,8 +18,16 @@
  */
 package org.apache.cxf.wsn.services;
 
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
 import javax.xml.ws.Endpoint;
 import javax.xml.ws.soap.SOAPBinding;
 import javax.xml.ws.spi.Provider;
@@ -40,7 +48,9 @@ public class JaxwsEndpointManager implements EndpointManager {
     }
     
     
-    public Endpoint register(String address, Object service) throws EndpointRegistrationException
{
+    public Endpoint register(String address, Object service, URL wsdlLocation)
+        throws EndpointRegistrationException {
+        
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         try {
             if (WSNHelper.getInstance().setClassLoader()) {
@@ -51,6 +61,20 @@ public class JaxwsEndpointManager implements EndpointManager {
                 bindingId = SOAPBinding.SOAP12HTTP_BINDING;
             }
             Endpoint endpoint = Endpoint.create(bindingId, service);
+            if (wsdlLocation != null) {
+                try {
+                    if (endpoint.getProperties() == null) {
+                        endpoint.setProperties(new HashMap<String, Object>());
+                    }
+                    endpoint.getProperties().put("javax.xml.ws.wsdl.description", wsdlLocation.toExternalForm());
+                    List<Source> mt = new ArrayList<Source>();
+                    StreamSource src = new StreamSource(wsdlLocation.openStream(), wsdlLocation.toExternalForm());
+                    mt.add(src);
+                    endpoint.setMetadata(mt);
+                } catch (IOException e) {
+                    //ignore, no wsdl really needed
+                }
+            }
             endpoint.publish(address);
             
             try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsNotificationBroker.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsNotificationBroker.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsNotificationBroker.java
index eba4902..4b88808 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsNotificationBroker.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsNotificationBroker.java
@@ -28,8 +28,8 @@ import org.apache.cxf.wsn.jms.JmsPublisher;
 import org.apache.cxf.wsn.jms.JmsSubscription;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.brw_2.NotificationBroker",
-            targetNamespace = "http://docs.oasis-open.org/wsn/brw-2",
-            serviceName = "NotificationBroker",
+            targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+            serviceName = "NotificationBrokerService",
             portName = "NotificationBrokerPort")
 @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
 public class JaxwsNotificationBroker extends JmsNotificationBroker 

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPublisher.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPublisher.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPublisher.java
index 9be08f5..8e0f317 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPublisher.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPublisher.java
@@ -39,8 +39,8 @@ import org.oasis_open.docs.wsn.bw_2.NotificationProducer;
 import org.oasis_open.docs.wsn.bw_2.SubscriptionManager;
 
 @WebService(endpointInterface = "org.oasis_open.docs.wsn.brw_2.PublisherRegistrationManager",
-            targetNamespace = "http://docs.oasis-open.org/wsn/brw-2",
-            serviceName = "PublisherRegistrationManager",
+            targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+            serviceName = "PublisherRegistrationManagerService",
             portName = "PublisherRegistrationManagerPort")
 @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
 public class JaxwsPublisher extends JmsPublisher {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPullPoint.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPullPoint.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPullPoint.java
index eaddd7d..ab71052 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPullPoint.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsPullPoint.java
@@ -22,7 +22,11 @@ import javax.jws.WebService;
 
 import org.apache.cxf.wsn.jms.JmsPullPoint;
 
-@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.PullPoint")
+@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.PullPoint",
+    targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+    serviceName = "PullPointService",
+    portName = "PullPointPort"
+)
 public class JaxwsPullPoint extends JmsPullPoint {
 
     public JaxwsPullPoint(String name) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsSubscription.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsSubscription.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsSubscription.java
index 2dea50a..6cac824 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsSubscription.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/JaxwsSubscription.java
@@ -37,7 +37,11 @@ import org.oasis_open.docs.wsn.bw_2.UnacceptableInitialTerminationTimeFault;
 import org.oasis_open.docs.wsn.bw_2.UnrecognizedPolicyRequestFault;
 import org.oasis_open.docs.wsn.bw_2.UnsupportedPolicyRequestFault;
 
-@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.PausableSubscriptionManager")
+@WebService(endpointInterface = "org.oasis_open.docs.wsn.bw_2.PausableSubscriptionManager",
+targetNamespace = "http://cxf.apache.org/wsn/jaxws",
+serviceName = "PausableSubscriptionManagerService",
+portName = "PausableSubscriptionManagerPort"
+)
 public class JaxwsSubscription extends JmsSubscription {
 
     private NotificationConsumer consumer;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/OSGiJaxwsEndpointManager.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/OSGiJaxwsEndpointManager.java
b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/OSGiJaxwsEndpointManager.java
index 878a261..4e217d7 100644
--- a/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/OSGiJaxwsEndpointManager.java
+++ b/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/OSGiJaxwsEndpointManager.java
@@ -19,8 +19,10 @@
 
 package org.apache.cxf.wsn.services;
 
+import java.net.URL;
 import java.util.Dictionary;
 import java.util.Properties;
+
 import javax.management.MBeanServer;
 import javax.xml.ws.Endpoint;
 
@@ -57,10 +59,10 @@ public class OSGiJaxwsEndpointManager extends JaxwsEndpointManager {
         this.container = c;
     }
 
-    public Endpoint register(String address, Object service) throws EndpointRegistrationException
{
+    public Endpoint register(String address, Object service, URL wsdlLocation) throws EndpointRegistrationException
{
         Object o = setCXFBus();
         try {
-            return super.register(address, service);
+            return super.register(address, service, wsdlLocation);
         } finally {
             restoreCXFBus(o);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8364fbf7/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java
----------------------------------------------------------------------
diff --git a/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java b/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java
index 8c2a5f2..c9d8d52 100644
--- a/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java
+++ b/services/wsn/wsn-core/src/test/java/org/apache/cxf/wsn/WsnBrokerTest.java
@@ -31,10 +31,12 @@ import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
+
 import javax.xml.bind.JAXBElement;
 import javax.xml.namespace.QName;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.wsn.client.Consumer;
 import org.apache.cxf.wsn.client.CreatePullPoint;
 import org.apache.cxf.wsn.client.NotificationBroker;
@@ -281,7 +283,9 @@ public abstract class WsnBrokerTest extends Assert {
                      WSNHelper.getInstance().getWSAAddress(message.getSubscriptionReference()));
         assertEquals(WSNHelper.getInstance().getWSAAddress(publisher.getEpr()),
                      WSNHelper.getInstance().getWSAAddress(message.getProducerReference()));
-        assertTrue(message.getMessage().getAny() instanceof CustomType);
+        assertNotNull(message.getMessage().getAny());
+        assertTrue(message.getMessage().getAny().getClass().getName(),
+                   message.getMessage().getAny() instanceof CustomType);
 
         subscription.unsubscribe();
         registration.destroy();


Mime
View raw message