Author: scamp
Date: Tue Feb  1 09:34:58 2005
New Revision: 149423

URL: http://svn.apache.org/viewcvs?view=rev&rev=149423
Log:
updated for new XmlObject version of SOAPEnvelope....

Modified:
    
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/porttype/impl/NotificationProducerPortTypeImpl.java
    
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/TopicSpaceSet.java
    
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/TopicSpaceSetImpl.java

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/porttype/impl/NotificationProducerPortTypeImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/porttype/impl/NotificationProducerPortTypeImpl.java?view=diff&r1=149422&r2=149423
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/porttype/impl/NotificationProducerPortTypeImpl.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/v1_2/porttype/impl/NotificationProducerPortTypeImpl.java
 Tue Feb  1 09:34:58 2005
@@ -134,7 +134,6 @@
         SubscribeResponseDocument subscribeResponseDocument = 
SubscribeResponseDocument.Factory.newInstance();
         SubscribeResponseDocument.SubscribeResponse subscribeResponse = 
subscribeResponseDocument.addNewSubscribeResponse();
         subscribeResponse.setSubscriptionReference( epr);
-
         return subscribeResponseDocument;
     }
 
@@ -147,7 +146,7 @@
         Collection collection = null;
         try
         {
-            collection = 
topicSpaceSet.evaluateExpression(topicExpr,getResourceContext().getSOAPMessage().getSOAPPart().getEnvelope());
+            collection = topicSpaceSet.evaluateExpression(topicExpr);
         }
         catch (TopicExpressionException e)
         {

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/TopicSpaceSet.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/TopicSpaceSet.java?view=diff&r1=149422&r2=149423
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/TopicSpaceSet.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/TopicSpaceSet.java
 Tue Feb  1 09:34:58 2005
@@ -36,5 +36,5 @@
 
     TopicSpace[] getTopicSpaces();
 
-    Collection evaluateExpression( TopicExpression topicExpr, SOAPEnvelope 
envelope ) throws TopicExpressionException;
+    Collection evaluateExpression(TopicExpression topicExpr) throws 
TopicExpressionException;
 }

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/TopicSpaceSetImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/TopicSpaceSetImpl.java?view=diff&r1=149422&r2=149423
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/TopicSpaceSetImpl.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/notification/topics/impl/TopicSpaceSetImpl.java
 Tue Feb  1 09:34:58 2005
@@ -1,15 +1,16 @@
 package org.apache.ws.notification.topics.impl;
 
+import org.apache.ws.XmlObjectWrapper;
 import org.apache.ws.notification.topics.Topic;
 import org.apache.ws.notification.topics.TopicExpression;
 import org.apache.ws.notification.topics.TopicSpace;
 import org.apache.ws.notification.topics.TopicSpaceSet;
 import 
org.apache.ws.notification.topics.topicexpression.impl.TopicExpressionException;
-import org.apache.xml.utils.PrefixResolverDefault;
+import org.apache.xmlbeans.XmlCursor;
+import org.apache.xmlbeans.XmlObject;
 import org.w3c.dom.Text;
 
 import javax.xml.rpc.JAXRPCException;
-import javax.xml.soap.SOAPEnvelope;
 import java.util.Collection;
 import java.util.Hashtable;
 import java.util.Iterator;
@@ -58,13 +59,11 @@
         return (TopicSpace[]) m_topicSpaces.values().toArray(new 
TopicSpace[0]);
     }
 
-    public Collection evaluateExpression(TopicExpression topicExpr, 
SOAPEnvelope envelope)
+    public Collection evaluateExpression(TopicExpression topicExpr)
             throws TopicExpressionException
     {
-        if(envelope == null)
-        {
-            throw new JAXRPCException("The SOAPEnvelope cannot be null.  
Unable to evaluate TopicExpression");
-        }
+
+        XmlObject xmlObjectTopicExpr = 
((XmlObjectWrapper)topicExpr).getXmlObject();
         Text content = (Text) topicExpr.getContent();
         String nodeValue = content.getNodeValue();
         String prefix = nodeValue.substring(0, nodeValue.indexOf(":"));
@@ -72,8 +71,11 @@
         {
             throw new JAXRPCException("Unable to determine namespace prefix 
for: " + nodeValue);
         }
-        PrefixResolverDefault prefixResolver = new 
PrefixResolverDefault(envelope);
-        String namespaceForPrefix = 
prefixResolver.getNamespaceForPrefix(prefix);
+        
+        XmlCursor xmlCursor = xmlObjectTopicExpr.newCursor();
+        String namespaceForPrefix = xmlCursor.namespaceForPrefix(prefix);
+        xmlCursor.dispose();
+
         if(namespaceForPrefix == null || namespaceForPrefix.equals(""))
         {
             throw new JAXRPCException("Unable to determine namespace for 
prefix: " + prefix);



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to