Added: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsemantic.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsemantic.java?view=auto&rev=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsemantic.java
 (added)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsemantic.java
 Sun Feb  6 15:47:09 2005
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ws.eventing.app.client;
+
+import org.apache.ws.eventing.Publisher;
+
+import javax.swing.*;
+import javax.swing.tree.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+public class PubSubWSsemantic extends JPanel{
+    public  JTabbedPane notebook        = null ;
+    public JTextField filterstr =null;
+    public JTextField filtername =null;
+    public JButton subscribeButton= null;
+    public JButton publishButton= null;
+    public JTextArea pubtext=null;
+    public JList subs=null;
+    public JTree tree=null;
+    public SubListModel sublistmodel=    new SubListModel();
+    
+    public JList nots=null;
+    public SubListModel notlistmodel=    new SubListModel();
+    
+    private PubSubWSmanager pman;
+    
+    public PubSubWSsemantic(JTabbedPane _notebook, PubSubWSmanager _pman) {
+        try{
+            this.pman=_pman;
+            notebook = _notebook ;
+            
+            this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) );
+            
+            // 1st component is just a row of labels and 1-line entry fields
+            
/////////////////////////////////////////////////////////////////////
+            JPanel top = new JPanel();
+            
+            top.setLayout( new FlowLayout() );
+            top.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+            
+            DefaultTreeCellRenderer renderer2 = new DefaultTreeCellRenderer();
+            renderer2.setOpenIcon(null);
+            renderer2.setClosedIcon(null);
+            renderer2.setLeafIcon(null);
+            
+            DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
+            DefaultMutableTreeNode child1 = new DefaultMutableTreeNode("Child 
1");
+            root.add(child1);
+            DefaultMutableTreeNode child2 = new DefaultMutableTreeNode("Child 
2");
+            root.add(child2);
+            tree = new JTree(root);
+            tree.setCellRenderer(renderer2);
+            top.add(tree);
+            top.add(subscribeButton = new JButton("Subscribe"));
+            subscribeButton.addActionListener( new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    //if ( removeSelected.equals(event.getActionCommand()) ) {
+                    //   remove();
+                    //}
+                    //                    TreePath[] ts 
=tree.getSelectionModel().getSelectionPaths();
+                    //                  for(int i=0;i<ts.length;i++)
+                    //                    System.out.println( 
ts[i].toString());
+                    String Tfilterstr = "/"+tree.getSelectionPath().toString();
+                    try{
+                        org.apache.ws.pubsub.Filter[] fs=new 
org.apache.ws.pubsub.Filter[1];
+                        fs[0] = new 
org.apache.ws.eventing.TopicFilter(Tfilterstr);
+                        org.apache.ws.pubsub.Subscription s =  
pman.nprod.subscribe(new 
PopUpConsumer("http://localhost:9090/axis/services/NotificationPort",notlistmodel),fs,java.util.Calendar.getInstance(),null,null);
+                        sublistmodel.addData(s);
+                    }catch(Exception e){
+                        e.printStackTrace();
+                    }
+                    
+                    
+                }
+            }
+            );
+            
+            this.add(top );
+            this.add( Box.createRigidArea(new Dimension(0, 10)) );
+            JPanel top2 = new JPanel();
+            top2.add( new JLabel("Message", SwingConstants.RIGHT ) );
+            top2.add(pubtext = new JTextArea("<?xml version=\"1.0\" 
?>\n<a><b/></a>",10,30));
+            top2.add(publishButton = new JButton("Publish"));
+            
+            publishButton.addActionListener( new ActionListener() {
+                public void actionPerformed(ActionEvent event) {
+                    //if ( removeSelected.equals(event.getActionCommand()) ) {
+                    //   remove();
+                    //}
+                    try{
+                        
Publisher.publish("http://localhost:7070/axis/services/NotificationPort";, 
pubtext.getText());
+                    }catch(Exception e){
+                        e.printStackTrace();
+                    }
+                }
+            }
+            );
+            
+            this.add( top2);
+            this.add( Box.createRigidArea(new Dimension(0, 10)) );
+            
+            JPanel ls = new JPanel();
+            ls.setLayout( new FlowLayout() );
+            
+            subs = new JList();
+            subs.setModel(sublistmodel);
+            JScrollPane scrollPane = new JScrollPane(subs);
+            ls.add(scrollPane);
+            
+            ls.add( Box.createRigidArea(new Dimension(0, 10)) );
+            
+            nots = new JList();
+            nots.setModel(notlistmodel);
+            JScrollPane scrollPane2 = new JScrollPane(nots);
+            MouseListener mouseListener = new MouseAdapter() {
+                public void mouseClicked(MouseEvent e) {
+                    if (e.getClickCount() == 2) {
+                        int index = nots.locationToIndex(e.getPoint());
+                        
JOptionPane.showMessageDialog(notebook,((notentry)notlistmodel.getElementAt(index)).content,"Notification
 detail",JOptionPane.INFORMATION_MESSAGE);
+                    }
+                }
+            };
+            nots.addMouseListener(mouseListener);
+            ls.add(scrollPane2);
+            
+            this.add(ls);
+            notebook.addTab( "PubSubWSsemantic", this );
+            // start();
+        }catch(Exception e){
+            e.printStackTrace();
+        }
+    }
+}
+

Added: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsyntactic.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsyntactic.java?view=auto&rev=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsyntactic.java
 (added)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/PubSubWSsyntactic.java
 Sun Feb  6 15:47:09 2005
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ws.eventing.app.client;
+
+import org.apache.ws.eventing.Publisher;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
+public class PubSubWSsyntactic extends JPanel{
+    public  JTabbedPane notebook        = null ;
+    public JTextField filterstr =null;
+    public JTextField filtername =null;
+    public JButton subscribeButton= null;
+    public JButton unsubscribeButton= null;
+    public JButton publishButton= null;
+    public JTextArea pubtext=null;
+    public JList subs=null;
+    public SubListModel sublistmodel=    new SubListModel();
+    
+    public JList nots=null;
+    public SubListModel notlistmodel=    new SubListModel();
+        
+    private PubSubWSmanager pman;
+    
+    public PubSubWSsyntactic(JTabbedPane _notebook, PubSubWSmanager _pman) {
+        try{
+            this.pman=_pman;
+        notebook = _notebook ;
+
+        
+        this.setLayout( new BoxLayout(this, BoxLayout.Y_AXIS) );
+        
+        // 1st component is just a row of labels and 1-line entry fields
+        /////////////////////////////////////////////////////////////////////
+        JPanel top = new JPanel();
+        
+        top.setLayout( new FlowLayout() );
+        top.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+        
+        top.add( new JLabel("Filter", SwingConstants.RIGHT ) );
+        top.add( filterstr = new JTextField("//a/b", 10));
+        top.add( Box.createRigidArea(new Dimension(5, 0)) );
+        top.add( new JLabel("Name", SwingConstants.RIGHT ) );
+        top.add( filtername = new JTextField(10));
+        top.add( Box.createRigidArea(new Dimension(5, 0)) );
+        
+        top.add(subscribeButton = new JButton("Subscribe"));
+        subscribeButton.addActionListener( new ActionListener() {
+            public void actionPerformed(ActionEvent event) {
+                //if ( removeSelected.equals(event.getActionCommand()) ) {
+                //   remove();
+                //} 
+                try{ 
+                    org.apache.ws.pubsub.Filter[] fs=new 
org.apache.ws.pubsub.Filter[1];
+                    fs[0] = new 
org.apache.ws.eventing.XPathFilter(filterstr.getText());
+                    String notifyTo 
="http://"+java.net.InetAddress.getLocalHost().getHostAddress()+":"+pman.inportL+"/axis/services/NotificationPort";
+                    System.out.println(notifyTo);
+                    org.apache.ws.pubsub.Subscription s =  
pman.nprod.subscribe(new 
PopUpConsumer(notifyTo,notlistmodel),fs,java.util.Calendar.getInstance(),null,null);
+                    sublistmodel.addData(s);
+                }catch(Exception e){
+                    e.printStackTrace();
+                }
+
+                
+            }
+        }
+        );
+        
+        this.add(top );
+        this.add( Box.createRigidArea(new Dimension(0, 10)) );
+        JPanel top2 = new JPanel();
+        top2.add( new JLabel("Message", SwingConstants.RIGHT ) );
+        top2.add(pubtext = new JTextArea("<?xml version=\"1.0\" 
?>\n<a><b/></a>",10,30));
+        top2.add(publishButton = new JButton("Publish"));
+        
+        publishButton.addActionListener( new ActionListener() {
+            public void actionPerformed(ActionEvent event) {
+                //if ( removeSelected.equals(event.getActionCommand()) ) {
+                //   remove();
+                //}
+                try{
+                  //  
Publisher.publish("http://localhost:"+pman.outport+"/axis/services/NotificationPort";,
 pubtext.getText());
+                }catch(Exception e){
+                    e.printStackTrace();
+                }
+            }
+        }
+        );
+        
+        this.add( top2);
+        this.add( Box.createRigidArea(new Dimension(0, 10)) );
+       
+        JPanel ls = new JPanel();
+        ls.setLayout( new FlowLayout() );
+        
+        subs = new JList();
+        subs.setModel(sublistmodel);
+        JScrollPane scrollPane = new JScrollPane(subs);
+        ls.add(scrollPane);
+        
+        ls.add( Box.createRigidArea(new Dimension(0, 10)) );
+        
+        nots = new JList();
+        nots.setModel(notlistmodel);
+        JScrollPane scrollPane2 = new JScrollPane(nots); 
+         MouseListener mouseListener = new MouseAdapter() {
+          public void mouseClicked(MouseEvent e) {
+            if (e.getClickCount() == 2) {
+               int index = nots.locationToIndex(e.getPoint());
+               
JOptionPane.showMessageDialog(notebook,((notentry)notlistmodel.getElementAt(index)).content,"Notification
 detail",JOptionPane.INFORMATION_MESSAGE);
+            }
+          }
+         };
+         nots.addMouseListener(mouseListener);        
+        ls.add(scrollPane2);        
+        
+        this.add(ls);
+        this.add(unsubscribeButton = new JButton("Unsubscribe"));
+        unsubscribeButton.addActionListener( new ActionListener() {
+            public void actionPerformed(ActionEvent event) {
+                if(subs.getSelectedIndex()!=-1){
+                    org.apache.ws.pubsub.Subscription s = 
(org.apache.ws.pubsub.Subscription)sublistmodel.getElementAt(subs.getSelectedIndex());
+                    s.unsubscribe();
+                }
+            }
+        }
+        );
+        
+        notebook.addTab( "PubSubWSsyntactic", this );
+        // start();
+        }catch(Exception e){
+            e.printStackTrace();
+        }
+    }
+}
+
+class SubListModel extends AbstractListModel
+{
+    private java.util.Vector myData;
+
+    public SubListModel()
+    {
+        myData=new java.util.Vector();
+    }
+    
+    public int  getSize() { return myData.size();}
+    public Object getElementAt(int i) { return myData.elementAt(i);}
+
+    public void addData(Object obj)
+    {
+        myData.add(obj);    //Add data to the vector.
+        fireContentsChanged(this,0,myData.size()-1);    //fire event so that 
List updates itself.
+    }
+}

Added: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/WEB-INF/server-config.wsdd
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/WEB-INF/server-config.wsdd?view=auto&rev=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/WEB-INF/server-config.wsdd
 (added)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/app/client/WEB-INF/server-config.wsdd
 Sun Feb  6 15:47:09 2005
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="http://xml.apache.org/axis/wsdd/"; 
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
+ <globalConfiguration>
+  <parameter name="adminPassword" value="admin"/>
+  <parameter name="disablePrettyXML" value="true"/>
+  <parameter name="sendXsiTypes" value="true"/>
+  <parameter name="sendMultiRefs" value="true"/>
+  <parameter name="sendXMLDeclaration" value="true"/>
+  <requestFlow>
+   <handler 
type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
+  </requestFlow>
+  <responseFlow>
+   <handler 
type="java:org.apache.axis.message.addressing.handler.AddressingHandler"/>
+  </responseFlow>
+ </globalConfiguration>
+ <handler name="LocalResponder" 
type="java:org.apache.axis.transport.local.LocalResponder"/>
+ <handler name="URLMapper" 
type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="Authenticate" 
type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+
+ <service name="AdminService" provider="java:MSG">
+  <parameter name="allowedMethods" value="AdminService"/>
+  <parameter name="enableRemoteAdmin" value="false"/>
+  <parameter name="className" value="org.apache.axis.utils.Admin"/>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+  <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+ </service>
+
+ <service name="Version" provider="java:RPC">
+  <parameter name="allowedMethods" value="getVersion"/>
+  <parameter name="className" value="org.apache.axis.Version"/>
+ </service>
+
+ <service name="SubscriptionEndPort" provider="java:RPC" style="document" 
use="literal">
+  <parameter name="allowedMethods" value="*"/>
+  <parameter name="wsdlPortType" value="SubscriptionEnd"/>
+  <parameter name="className" 
value="org.apache.ws.eventing.services.subscriber.SubscriptionEndPort"/>
+  <parameter name="wsdlServicePort" value="SubscriptionEndPort"/>
+  <parameter name="wsdlTargetNamespace" 
value="http://schemas.xmlsoap.org/ws/2004/08/eventing/services"/>
+  <parameter name="wsdlServiceElement" value="EventingService"/>
+</service>
+
+ <service name="NotificationPort" provider="java:MSG" style="message" 
use="literal">
+  <parameter name="allowedMethods" value="filter"/>
+  <parameter name="wsdlPortType" value="Notification"/>
+  <parameter name="className" 
value="org.apache.ws.eventing.services.subscriber.NotificationPort"/>
+  <parameter name="wsdlServicePort" value="NotificationPort"/>
+  <parameter name="wsdlTargetNamespace" 
value="http://schemas.xmlsoap.org/ws/2004/08/eventing/services"/>
+  <parameter name="wsdlServiceElement" value="NotificationService"/>
+ </service>
+
+ <transport name="http">
+  <requestFlow>
+   <handler type="URLMapper"/>
+   <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+  </requestFlow>
+  <parameter name="qs:list" 
value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs:wsdl" 
value="org.apache.axis.transport.http.QSWSDLHandler"/>
+  <parameter name="qs.list" 
value="org.apache.axis.transport.http.QSListHandler"/>
+  <parameter name="qs.method" 
value="org.apache.axis.transport.http.QSMethodHandler"/>
+  <parameter name="qs:method" 
value="org.apache.axis.transport.http.QSMethodHandler"/>
+  <parameter name="qs.wsdl" 
value="org.apache.axis.transport.http.QSWSDLHandler"/>
+ </transport>
+
+ <transport name="local">
+  <responseFlow>
+   <handler type="LocalResponder"/>
+  </responseFlow>
+ </transport>
+
+</deployment>

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/EventSourcePortType.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/EventSourcePortType.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/EventSourcePortType.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/EventSourcePortType.java
 Sun Feb  6 15:47:09 2005
@@ -1,5 +1,18 @@
-/* Generated by Together */
-
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ws.eventing.porttype;
 
 import java.rmi.RemoteException;
@@ -13,7 +26,7 @@
  */
 public interface EventSourcePortType {
     /**
-     *
+     * Subscribe
      * @param body
      * @throws RemoteException
      * @return

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionEndPortType.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionEndPortType.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionEndPortType.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionEndPortType.java
 Sun Feb  6 15:47:09 2005
@@ -1,5 +1,18 @@
-/* Generated by Together */
-
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ws.eventing.porttype;
 
 import java.rmi.RemoteException;

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionManagerPortType.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionManagerPortType.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionManagerPortType.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/SubscriptionManagerPortType.java
 Sun Feb  6 15:47:09 2005
@@ -1,5 +1,18 @@
-/* Generated by Together */
-
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ws.eventing.porttype;
 
 import java.rmi.RemoteException;
@@ -11,9 +24,9 @@
 
 
 public interface SubscriptionManagerPortType {
-    RenewResponseDocument renewMsg(RenewDocument body) throws RemoteException;
+    RenewResponseDocument renew(RenewDocument body) throws RemoteException;
 
-    void unsubscribeMsg(UnsubscribeDocument body) throws RemoteException;
+    void unsubscribe(UnsubscribeDocument body) throws RemoteException;
 
-    GetStatusResponseDocument getStatusMsg(GetStatusDocument body) throws 
RemoteException;
+    GetStatusResponseDocument getStatus(GetStatusDocument body) throws 
RemoteException;
 }

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/EventSourcePortTypeImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/EventSourcePortTypeImpl.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/EventSourcePortTypeImpl.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/EventSourcePortTypeImpl.java
 Sun Feb  6 15:47:09 2005
@@ -15,37 +15,42 @@
  */
 
 package org.apache.ws.eventing.porttype.impl;
-import org.apache.ws.addressing.*;
-
-import org.apache.ws.eventing.YFilterStore;
-import org.apache.ws.eventing.RemoteSubscription;
 
 import org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscribeDocument;
 import org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscribeResponseDocument;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+
+import org.apache.ws.XmlObjectWrapper;
 
 import javax.xml.namespace.QName;
 import java.rmi.RemoteException;
 
 import org.apache.ws.eventing.porttype.EventSourcePortType;
+import org.apache.ws.eventing.RemoteSubscription;
+import org.apache.ws.eventing.RemoteSubscriptionHome;
 
-public class EventSourcePortTypeImpl implements EventSourcePortType {
+import org.apache.ws.eventing.ForwardConsumer;
 
-    public SubscribeResponseDocument subscribe(SubscribeDocument body) throws 
RemoteException {
-        //create Subscription
-        Context initialContext = new InitialContext(  );
-        RemoteSubscriptionHome sH = (RemoteSubscriptionHome) 
initialContext.lookup( SubscriptionHome.HOME_LOCATION );
+import javax.naming.Context;
+import javax.naming.InitialContext;
 
-        RemoteSubscription subscription = sH.create(, getResourceKey(), 
((AbstractResourceContext)getResourceContext()).getResourceHomeLocation());
+public class EventSourcePortTypeImpl implements EventSourcePortType {
+    
+    public SubscribeResponseDocument subscribe(SubscribeDocument body) throws 
RemoteException {
         try{
-            YFilterStore b = YFilterStore.instance();
-            RemoteSubscription s = new RemoteSubscription(body);
+            //create Subscription
+            Context initialContext = new InitialContext(  );
+            System.out.println("get RemoteResourceSubscriptionHome " + 
RemoteSubscriptionHome.HOME_LOCATION);
+            RemoteSubscriptionHome sH = (RemoteSubscriptionHome) 
initialContext.lookup( RemoteSubscriptionHome.HOME_LOCATION );
             
-            String id = b.addSubscription(s);
-
+            RemoteSubscription subscription = sH.create(body);
+            subscription.setNotificationConsumer(new ForwardConsumer());
             //build response
             SubscribeResponseDocument responseDom= 
SubscribeResponseDocument.Factory.newInstance();
-            SubscribeResponseDocument.SubscribeResponse response = 
responseDom.addNewSubscribeResponse(); 
+            SubscribeResponseDocument.SubscribeResponse response = 
responseDom.addNewSubscribeResponse();
             
+            response.setSubscriptionManager((EndpointReferenceType) 
((XmlObjectWrapper)subscription.getEpr()).getXmlObject());
+/*
             org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType 
e = response.addNewSubscriptionManager();
             org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI auri = 
e.addNewAddress();
             
auri.setStringValue("http://localhost:7070/axis/services/SubscriptionManagerPort";);
@@ -53,9 +58,9 @@
             org.apache.ws.util.XmlBeanUtils.addChildElement(rp,new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing";, 
"Identifier"));
             //wrapper
             //EndpointReference ep= new XmlBeansEndpointReference(e);
-            
+  */          
             //TODO why not ExpirationType???
-            //ExpirationType et = response.aExpirationType.Factory.("now"); 
+            //ExpirationType et = response.aExpirationType.Factory.("now");
             
             return responseDom;
         }catch(Exception e){
@@ -64,6 +69,5 @@
         }
         //TODO error
         return null;
-    }
-    
+    } 
 }

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/NotificationPortTypeImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/NotificationPortTypeImpl.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/NotificationPortTypeImpl.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/NotificationPortTypeImpl.java
 Sun Feb  6 15:47:09 2005
@@ -18,16 +18,15 @@
 
 import org.apache.axis.message.*;
 
-import org.apache.ws.eventing.SubscriberStore;
-
-
 public class NotificationPortTypeImpl{
      
     //TODO maybe remove Axis dep
+    //TODO use WSRF Provider with Message styler
     public void filter(SOAPEnvelope req, SOAPEnvelope resp){
-        SubscriberStore b = SubscriberStore.instance();
+/*        SubscriberStore b = SubscriberStore.instance();
         System.out.println("Notifier.filter()");
         b.notify(req);
+ */
     }     
 }
 

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/SubscriptionManagerPortTypeImpl.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/SubscriptionManagerPortTypeImpl.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/SubscriptionManagerPortTypeImpl.java
 (original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/porttype/impl/SubscriptionManagerPortTypeImpl.java
 Sun Feb  6 15:47:09 2005
@@ -1,10 +1,18 @@
-/**
- * SubscriptionManagerBindingImpl.java
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.2RC2 Dec 19, 2004 (04:36:14 CET) WSDL2Java emitter.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
 package org.apache.ws.eventing.porttype.impl;
 import org.apache.ws.addressing.*;
 
@@ -12,35 +20,23 @@
 import org.w3c.dom.NodeList;
 import javax.xml.soap.SOAPHeader;
 
-import org.apache.ws.eventing.Subscription;
-import org.apache.ws.eventing.YFilterStore;
+import org.apache.ws.eventing.RemoteSubscription;
 
 import org.xmlsoap.schemas.ws.x2004.x08.eventing.*;
 import java.rmi.RemoteException;
 import org.apache.ws.eventing.porttype.SubscriptionManagerPortType;
+import org.apache.ws.resource.ResourceContext;
+import 
org.apache.ws.resource.properties.v1_2.porttype.impl.AbstractResourcePropertiesPortType;
 
-public class SubscriptionManagerPortTypeImpl implements 
SubscriptionManagerPortType {
-    
-    public static String extractIdentifier() /*throws 
javax.xml.soap.SOAPException*/{
-        //TODO !!!! extract identifier from Header
-        //first try to become wse:Identifier
-/*        
-        MessageContext mC = MessageContext.getCurrentContext();
-        SOAPHeader h =mC.getMessage().getSOAPHeader();
-        NodeList it = 
h.getElementsByTagNameNS("http://schemas.xmlsoap.org/ws/2004/08/eventing";, 
"Identifier");
-        if(it.getLength()==0)
-            throw new javax.xml.soap.SOAPException("<wse:Identifier> Tag is 
missing in the Header.... i dunno which Subscription you mean");
-        Node idnode = it.item(0);
-        
if((idnode.getFirstChild()!=null)&&(idnode.getFirstChild().getNodeType()==Node.TEXT_NODE))
-            return(idnode.getFirstChild().getNodeValue());
-        else
-            throw new javax.xml.soap.SOAPException("<wse:Identifier> Tag is 
empty in the Header.... i dunno which Subscription you mean");
- **/
-        return("1");
-    }
+public class SubscriptionManagerPortTypeImpl extends 
AbstractResourcePropertiesPortType implements SubscriptionManagerPortType {
+
+    public SubscriptionManagerPortTypeImpl( ResourceContext resourceContext )
+    {        
+        super( resourceContext );
+    }    
     
-    public RenewResponseDocument renewMsg(RenewDocument body) throws 
RemoteException {
-        String id = extractIdentifier();
+    public RenewResponseDocument renew(RenewDocument body) throws 
RemoteException {
+/*        String id = extractIdentifier();
 
         YFilterStore b = YFilterStore.instance();
         Subscription s = 
(org.apache.ws.eventing.Subscription)b.getSubscription(id);
@@ -54,10 +50,13 @@
         response.setExpires(s.getTerminationTime());
         
         return(responseDom);
+ */
+        //TODO
+        return null;
     }
     
-    public GetStatusResponseDocument getStatusMsg(GetStatusDocument body) 
throws RemoteException {
-//        try{
+    public GetStatusResponseDocument getStatus(GetStatusDocument body) throws 
RemoteException {
+/*//        try{
             String id = extractIdentifier();
             //ask the Broker about the Status
             YFilterStore b = YFilterStore.instance();
@@ -69,15 +68,20 @@
             //TODO check calendar
             response.setExpires(s.getTerminationTime());
             return(responseDom);
+ */
 /*        }catch(Exception e){
             e.printStackTrace();
             throw new java.rmi.RemoteException("getStatusMsg",e);
         }
  **/
+                //TODO
+        return null;
     }
     
-    public void unsubscribeMsg(UnsubscribeDocument body) throws 
RemoteException {
-        try{
+    public void unsubscribe(UnsubscribeDocument body) throws RemoteException {
+        RemoteSubscription subscription = (RemoteSubscription) getResource();
+        subscription.unsubscribe();
+        /*        try{
             String id = extractIdentifier();
             System.out.println("unsubscribe Subscription: "+id);
             YFilterStore b = YFilterStore.instance();
@@ -87,6 +91,8 @@
             e.printStackTrace();
             throw new java.rmi.RemoteException("unsubscribeMsg",e);
         }
+ */
     }
+    
     
 }

Added: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/AbstractService.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/AbstractService.java?view=auto&rev=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/AbstractService.java
 (added)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/AbstractService.java
 Sun Feb  6 15:47:09 2005
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ws.eventing.services;
+
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import org.apache.ws.resource.handler.WsrfService;
+import org.apache.ws.resource.ResourceContext;
+
+import javax.xml.namespace.QName;
+
+import org.apache.ws.resource.handler.WsrfService;
+/**
+ *
+ * @author  Stefan Lischke
+ */
+public class AbstractService implements WsrfService{
+    
+    protected ResourceContext m_resourceContext;
+    /**
+     * DOCUMENT_ME
+     */
+    protected ServiceSoapMethodNameMap m_methodNameMap;
+    
+    /**
+     * DOCUMENT_ME
+     */
+    protected boolean m_isInitialized;
+    
+    
+    
+    /**
+     * DOCUMENT_ME
+     *
+     * @param requestQname DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public String getMethodName( QName requestQname ) {
+        if ( !m_isInitialized ) {
+            init(  );
+        }
+        
+        return m_methodNameMap.getMethodName( requestQname );
+    }
+    
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public ResourceContext getResourceContext(  ) {
+        return m_resourceContext;
+    }
+    
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    public final SoapMethodNameMap getMethodNameMap(  ) {
+        return m_methodNameMap;
+    }
+    
+    /**
+     * DOCUMENT_ME
+     */
+    public void init(  ) {
+        m_methodNameMap    = new ServiceSoapMethodNameMap( getResourceContext( 
 ) );
+        m_isInitialized      = true;
+    }
+    
+    
+    /**
+     * DOCUMENT_ME
+     *
+     * @return DOCUMENT_ME
+     */
+    protected final boolean isInitialized(  ) {
+        return m_isInitialized;
+    }
+}

Added: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/publisher/PublisherService.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/publisher/PublisherService.java?view=auto&rev=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/publisher/PublisherService.java
 (added)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/services/publisher/PublisherService.java
 Sun Feb  6 15:47:09 2005
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ws.eventing.services.publisher;
+
+import org.apache.ws.eventing.services.AbstractService;
+import org.apache.ws.resource.ResourceContext;
+
+import org.apache.ws.eventing.porttype.EventSourcePortType;
+import org.apache.ws.eventing.porttype.impl.EventSourcePortTypeImpl;
+
+import org.apache.ws.eventing.porttype.SubscriptionManagerPortType;
+import org.apache.ws.eventing.porttype.impl.SubscriptionManagerPortTypeImpl;
+
+public class PublisherService extends AbstractService implements  
EventSourcePortType, SubscriptionManagerPortType {
+    
+   public PublisherService( ResourceContext resourceContext )
+   {
+      m_resourceContext = resourceContext;
+      init();
+   }
+      
+    
+    public org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscribeResponseDocument 
subscribe(org.xmlsoap.schemas.ws.x2004.x08.eventing.SubscribeDocument body) 
throws java.rmi.RemoteException {
+        return new EventSourcePortTypeImpl().subscribe(body);
+    }
+    
+    public org.xmlsoap.schemas.ws.x2004.x08.eventing.GetStatusResponseDocument 
getStatus(org.xmlsoap.schemas.ws.x2004.x08.eventing.GetStatusDocument body) 
throws java.rmi.RemoteException {
+        return new 
SubscriptionManagerPortTypeImpl(getResourceContext()).getStatus(body);
+    }
+
+    public org.xmlsoap.schemas.ws.x2004.x08.eventing.RenewResponseDocument 
renew(org.xmlsoap.schemas.ws.x2004.x08.eventing.RenewDocument body) throws 
java.rmi.RemoteException {
+        return new 
SubscriptionManagerPortTypeImpl(getResourceContext()).renew(body);
+    }
+
+    
+    public void 
unsubscribe(org.xmlsoap.schemas.ws.x2004.x08.eventing.UnsubscribeDocument body) 
throws java.rmi.RemoteException {
+        new 
SubscriptionManagerPortTypeImpl(getResourceContext()).unsubscribe(body); 
+    }
+    
+}

Modified: 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/wsaSOAPConnection.java
URL: 
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/eventing/wsaSOAPConnection.java?view=diff&r1=151641&r2=151642
==============================================================================
--- 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/wsaSOAPConnection.java 
(original)
+++ 
incubator/hermes/trunk/src/java/org/apache/ws/eventing/wsaSOAPConnection.java 
Sun Feb  6 15:47:09 2005
@@ -1,19 +1,18 @@
-/*=============================================================================*
- *  Copyright 2004 The Apache Software Foundation
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
  *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- 
*=============================================================================*/
-
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.ws.eventing;
 
 /**
@@ -37,9 +36,18 @@
        return new wsaSOAPConnection();
     }
     
-    public SOAPMessage call(SOAPMessage request, EndpointReference epr ) 
throws SOAPException{
+    public SOAPMessage call(SOAPMessage request, String url ) throws 
SOAPException{       
         SOAPConnectionFactory sconF= SOAPConnectionFactory.newInstance();
         SOAPConnection scon = sconF.createConnection();
-        return(scon.call(request, epr.getAddress()));
+        //TODO remove
+        System.out.println("Call: "+request.toString());
+        return(scon.call(request, url));
+    }
+    public SOAPMessage call(SOAPMessage request,String url, String id) throws 
SOAPException{
+        //if epr contains ReferenceProperty add WSA header
+        SOAPHeader sH = request.getSOAPHeader();
+        //TODO remove string
+        
sH.addChildElement("Identifier","even","http://schemas.xmlsoap.org/ws/2004/08/eventing";).addTextNode(id);
+        return(call(request,url));
     }
 }



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

Reply via email to