ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r264064 - in /webservices/sandesha/trunk: config/module.xml samples/interop/service.xml src/org/apache/sandesha2/Constants.java src/org/apache/sandesha2/RMMsgCreator.java test/org/apache/sandesha2/SimpleServerImpl.java
Date Mon, 29 Aug 2005 05:12:26 GMT
Author: chamikara
Date: Sun Aug 28 22:11:54 2005
New Revision: 264064

URL: http://svn.apache.org/viewcvs?rev=264064&view=rev
Log:
First Ping msg was sent :) (not acks yet)

Modified:
    webservices/sandesha/trunk/config/module.xml
    webservices/sandesha/trunk/samples/interop/service.xml
    webservices/sandesha/trunk/src/org/apache/sandesha2/Constants.java
    webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java
    webservices/sandesha/trunk/test/org/apache/sandesha2/SimpleServerImpl.java

Modified: webservices/sandesha/trunk/config/module.xml
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/config/module.xml?rev=264064&r1=264063&r2=264064&view=diff
==============================================================================
--- webservices/sandesha/trunk/config/module.xml (original)
+++ webservices/sandesha/trunk/config/module.xml Sun Aug 28 22:11:54 2005
@@ -15,6 +15,12 @@
 
     <operation name="CreateSequence" mep="http://www.w3.org/2004/08/wsdl/in-out">
         <messageReceiver class="org.apache.sandesha2.msgreceivers.RMMessageReceiver"/>
-    </operation>
+    </operation> 
 
+<!--
+    <operation name="CreateSequence" mep="http://www.w3.org/2004/08/wsdl/in-out">
+        <parameter name="Mapping">http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequence</parameter>
+        <messageReceiver class="org.apache.sandesha2.msgreceivers.RMMessageReceiver"/>
+    </operation>
+--> 
 </module>

Modified: webservices/sandesha/trunk/samples/interop/service.xml
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/samples/interop/service.xml?rev=264064&r1=264063&r2=264064&view=diff
==============================================================================
--- webservices/sandesha/trunk/samples/interop/service.xml (original)
+++ webservices/sandesha/trunk/samples/interop/service.xml Sun Aug 28 22:11:54 2005
@@ -6,11 +6,12 @@
     </description>
 
     <module ref="sandesha" />
-<!--
-    <operation name="ping" />  
+
+    <!-- <operation name="ping" />  
     <operation name="echoString" /> -->
 
-    	<operation name="ping">
+
+    <operation name="ping">
 		<messageReceiver class="org.apache.sandesha2.msgreceivers.RMMessageReceiver" />
 	</operation> 
     

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/Constants.java?rev=264064&r1=264063&r2=264064&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/Constants.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/Constants.java Sun Aug 28 22:11:54
2005
@@ -18,63 +18,107 @@
 package org.apache.sandesha2;
 
 /**
- * @author Saminda
- *
+ * @author  
  */
 
 public interface Constants {
 
-	public interface WSRM{
-		public static final String NS_PREFIX_RM = "wsrm";
-        public static final String NS_URI_RM = "http://schemas.xmlsoap.org/ws/2005/02/rm";
-        public static final String MSG_NUMBER = "MessageaNumber";
-        public static final String LAST_MSG = "LastMessage";
-        public static final String SEQUENCE = "Sequence";
-        public static final String SEQUENCE_OFFER = "Offer";
-        public static final String TERMINATE_SEQUENCE = "TerminateSequence";
-        public static final String FAULT_CODE = "FaultCode";
-        public static final String SEQUENCE_FAULT = "SequenceFault";
-        public static final String ACKS_TO = "AcksTo";
-        public static final String CREATE_SEQUENCE = "CreateSequence";
-        public static final String CREATE_SEQUENCE_RESPONSE = "CreateSequenceResponse";
-        public static final String ACK_REQUESTED = "AckRequested";
-        public static final String ACK_RANGE = "AcknowledgementRange";
-        public static final String UPPER = "Upper";
-        public static final String LOWER = "Lower";
-        public static final String NACK = "Nack";
-        public static final String SEQUENCE_ACK = "SequenceAcknowledgement";
-        public static final String IDENTIFIER = "Identifier";
-        public static final String ACCEPT = "Accept";
-    }
-
-      String RM_HEADERS="rmHeaders";
-      String SEQUENCE="sequence";
-      String MESSAGE_NUMBER="messageNumber";
-
-      String MESSAGE_TYPE ="messageType";
-
-      String CREATE_SEQ_REQ="createSequenceReq";
-      String CREATE_SEQ_RES="createSequenceRes";
-      String ACKNOWLEDGEMENT="acknowledgement";
-      String IN_MESSAGE="inMessage";
-      String OUT_MESSAGE="outMessage";
-      String FAULT_MESSAGE="faultMessage";
-      
-      int MESSAGE_TYPE_UNKNOWN = 0;
-      int MESSAGE_TYPE_CREATE_SEQ = 1;
-      int MESSAGE_TYPE_CREATE_SEQ_RESPONSE = 2;
-      int MESSAGE_TYPE_APPLICATION = 3;
-      int MESSAGE_TYPE_ACK = 4;
-      int MESSAGE_TYPE_TERMINATE_SEQ = 5;
-      int MAX_MSG_TYPE = 5;
-      
-      int MESSAGE_PART_UNKNOWN = 0;
-      int MESSAGE_PART_SEQUENCE = 1;
-      int MESSAGE_PART_SEQ_ACKNOWLEDGEMENT = 2;
-      int MESSAGE_PART_ADDR_HEADERS = 3;
-      int MESSAGE_PART_CREATE_SEQ = 4;
-      int MESSAGE_PART_CREATE_SEQ_RESPONSE = 5;
-      int MESSAGE_PART_TERMINATE_SEQ = 6;
-      int MAX_MSG_PART_ID = 6;
+	public interface WSRM {
+		String NS_PREFIX_RM = "wsrm";
 
-}
+		String NS_URI_RM = "http://schemas.xmlsoap.org/ws/2005/02/rm";
+
+		String NS_URI_CREATE_SEQ_RESPONSE = "http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse";
+		
+		String MSG_NUMBER = "MessageaNumber";
+
+		String LAST_MSG = "LastMessage";
+
+		String SEQUENCE = "Sequence";
+
+		String SEQUENCE_OFFER = "Offer";
+
+		String TERMINATE_SEQUENCE = "TerminateSequence";
+
+		String FAULT_CODE = "FaultCode";
+
+		String SEQUENCE_FAULT = "SequenceFault";
+
+		String ACKS_TO = "AcksTo";
+
+		String CREATE_SEQUENCE = "CreateSequence";
+
+		String CREATE_SEQUENCE_RESPONSE = "CreateSequenceResponse";
+
+		String ACK_REQUESTED = "AckRequested";
+
+		String ACK_RANGE = "AcknowledgementRange";
+
+		String UPPER = "Upper";
+
+		String LOWER = "Lower";
+
+		String NACK = "Nack";
+
+		String SEQUENCE_ACK = "SequenceAcknowledgement";
+
+		String IDENTIFIER = "Identifier";
+
+		String ACCEPT = "Accept";
+	}
+
+	public interface WSA {
+		String NS_URI_ANONYMOUS = "http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous";
+	}
+
+	String RM_HEADERS = "rmHeaders";
+
+	String SEQUENCE = "sequence";
+
+	String MESSAGE_NUMBER = "messageNumber";
+
+	String MESSAGE_TYPE = "messageType";
+
+	String CREATE_SEQ_REQ = "createSequenceReq";
+
+	String CREATE_SEQ_RES = "createSequenceRes";
+
+	String ACKNOWLEDGEMENT = "acknowledgement";
+
+	String IN_MESSAGE = "inMessage";
+
+	String OUT_MESSAGE = "outMessage";
+
+	String FAULT_MESSAGE = "faultMessage";
+
+	int MESSAGE_TYPE_UNKNOWN = 0;
+
+	int MESSAGE_TYPE_CREATE_SEQ = 1;
+
+	int MESSAGE_TYPE_CREATE_SEQ_RESPONSE = 2;
+
+	int MESSAGE_TYPE_APPLICATION = 3;
+
+	int MESSAGE_TYPE_ACK = 4;
+
+	int MESSAGE_TYPE_TERMINATE_SEQ = 5;
+
+	int MAX_MSG_TYPE = 5;
+
+	int MESSAGE_PART_UNKNOWN = 0;
+
+	int MESSAGE_PART_SEQUENCE = 1;
+
+	int MESSAGE_PART_SEQ_ACKNOWLEDGEMENT = 2;
+
+	int MESSAGE_PART_ADDR_HEADERS = 3;
+
+	int MESSAGE_PART_CREATE_SEQ = 4;
+
+	int MESSAGE_PART_CREATE_SEQ_RESPONSE = 5;
+
+	int MESSAGE_PART_TERMINATE_SEQ = 6;
+
+	int MAX_MSG_PART_ID = 6;
+
+}
\ No newline at end of file

Modified: webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java?rev=264064&r1=264063&r2=264064&view=diff
==============================================================================
--- webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java (original)
+++ webservices/sandesha/trunk/src/org/apache/sandesha2/RMMsgCreator.java Sun Aug 28 22:11:54
2005
@@ -26,6 +26,8 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.soap.SOAPEnvelope;
+import org.apache.axis2.soap.SOAPFactory;
+import org.apache.axis2.soap.impl.llom.soap11.SOAP11Factory;
 import org.apache.sandesha2.wsrm.Accept;
 import org.apache.sandesha2.wsrm.AcksTo;
 import org.apache.sandesha2.wsrm.CreateSequence;
@@ -48,24 +50,37 @@
 		
 		Identifier identifier = new Identifier();
 		// TODO : set the an appropriate id 
-		identifier.setIndentifer("temp-id-of-sandesha");
+		identifier.setIndentifer("uuid:temp-id-of-sandesha");
 		response.setIdentifier(identifier);
 		Accept accept = new Accept();
 		EndpointReference acksToEPR = createSeqMessage.getTo();  
 		AcksTo acksTo = new AcksTo(acksToEPR);
-		accept.setAcksTo(acksTo);
+		//accept.setAcksTo(acksTo);
 		response.setAccept(accept);
+	
+		SOAPEnvelope envolope1 = outMessage.getEnvelope();
 		
-		SOAPEnvelope envelope = createSeqMessage.getSOAPEnvelope();
-		envelope.getBody().getFirstChild().detach();
+	    /*try {
+		    XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
+		    envolope1.serialize(writer);
+	    }catch (Exception ex){
+		    ex.printStackTrace();
+	    }*/
+		
+		SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+		//envelope.getBody().getFirstChild().detach();
 		
 		response.toSOAPEnvelope(envelope);
-        EndpointReference fromEPR= new EndpointReference("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous");
-
-        outMessage.setFrom(fromEPR);
-        outMessage.setWSAAction("http://schemas.xmlsoap.org/ws/2005/02/rm/CreateSequenceResponse");
+       // EndpointReference fromEPR= createSeqMessage.getTo();  //new EndpointReference("http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous");
+        //EndpointReference toEPR = createSeqMessage.getFrom();
+        // outMessage.setFrom(fromEPR);
+        //outMessage.setTo(toEPR);
+        // outMessage.setFaultTo(fromEPR);
+        outMessage.setWSAAction(Constants.WSRM.NS_URI_CREATE_SEQ_RESPONSE);
+        outMessage.setMessageID("uuid:msg-id-of-create-seq-res-msg");
+        //outMessage.setF
         
-        /*try {
+       /* try {
 			XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
 			envelope.serialize(writer);
 		}catch (Exception ex){

Modified: webservices/sandesha/trunk/test/org/apache/sandesha2/SimpleServerImpl.java
URL: http://svn.apache.org/viewcvs/webservices/sandesha/trunk/test/org/apache/sandesha2/SimpleServerImpl.java?rev=264064&r1=264063&r2=264064&view=diff
==============================================================================
--- webservices/sandesha/trunk/test/org/apache/sandesha2/SimpleServerImpl.java (original)
+++ webservices/sandesha/trunk/test/org/apache/sandesha2/SimpleServerImpl.java Sun Aug 28
22:11:54 2005
@@ -19,5 +19,6 @@
     public static void main(String[] args) throws IOException {
         SimpleHTTPServer sas= new SimpleHTTPServer("E:\\Program Files\\Apache Software Foundation\\Tomcat
5.0\\webapps\\axis2\\WEB-INF",8080);
         sas.start();
-      }
+        System.out.println ("Sandesha2 Simple Axis Server Started....");
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message