You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ml...@apache.org on 2007/05/16 14:11:42 UTC
svn commit: r538555 - in /webservices/sandesha/trunk/java/modules:
core/src/main/java/org/apache/sandesha2/
core/src/main/java/org/apache/sandesha2/client/
core/src/main/java/org/apache/sandesha2/msgprocessors/ mar/
tests/src/test/java/org/apache/sande...
Author: mlovett
Date: Wed May 16 05:11:42 2007
New Revision: 538555
URL: http://svn.apache.org/viewvc?view=rev&rev=538555
Log:
Ignore the anonOutIn operation when deciding if we should offer a sequence. If we don't ignore this operation then we actually send an offer for all services, which fails to interoperate with some one-way services.
Modified:
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/client/SandeshaClient.java
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
webservices/sandesha/trunk/java/modules/mar/module.xml
webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/RMScenariosTest.java
Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java?view=diff&rev=538555&r1=538554&r2=538555
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java Wed May 16 05:11:42 2007
@@ -24,6 +24,7 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
+import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisDescription;
@@ -226,7 +227,8 @@
String name = null;
QName qName = op.getName();
if(qName != null) name = qName.getLocalPart();
- if(name != null && name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX))
+ if((name != null && name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) ||
+ ServiceClient.ANON_OUT_IN_OP.equals(qName))
break;
// If we get to here then we must have one of the user's operations, so
@@ -238,14 +240,15 @@
}
}
} else if(axisDescription instanceof AxisOperation) {
- AxisOperation op = (AxisOperation) axisDescription;
- log.debug("Examining operation " + op.getName() + ", mep " + op.getAxisSpecifMEPConstant());
-
- String name = null;
- QName qName = op.getName();
- if(qName != null) name = qName.getLocalPart();
- if(name != null && !name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) {
-
+ AxisOperation op = (AxisOperation) axisDescription;
+ log.debug("Examining operation " + op.getName() + ", mep " + op.getAxisSpecifMEPConstant());
+
+ String name = null;
+ QName qName = op.getName();
+ if(qName != null) name = qName.getLocalPart();
+ if((name != null && !name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) &&
+ !ServiceClient.ANON_OUT_IN_OP.equals(qName)) {
+
// If we get to here then we must have one of the user's operations, so
// check the MEP.
if(op.getAxisSpecifMEPConstant() == WSDLConstants.MEP_CONSTANT_OUT_IN) {
Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/client/SandeshaClient.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/client/SandeshaClient.java?view=diff&rev=538555&r1=538554&r2=538555
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/client/SandeshaClient.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/client/SandeshaClient.java Wed May 16 05:11:42 2007
@@ -490,9 +490,7 @@
} else {
options.setAction(Sandesha2Constants.SPEC_2005_02.Actions.ACTION_LAST_MESSAGE);
options.setProperty(SandeshaClientConstants.LAST_MESSAGE, Constants.VALUE_TRUE);
-
- //the server should also reply with a last message
- serviceClient.sendReceive (null);
+ serviceClient.fireAndForget(null);
}
} catch (AxisFault e) {
Modified: webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java?view=diff&rev=538555&r1=538554&r2=538555
==============================================================================
--- webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java (original)
+++ webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java Wed May 16 05:11:42 2007
@@ -69,7 +69,6 @@
public InvocationResponse processSequenceHeader(RMMsgContext rmMsgCtx) throws AxisFault {
if (log.isDebugEnabled())
log.debug("Enter: SequenceProcessor::processSequenceHeader");
- System.out.println("*********** ResponseWritten1" + rmMsgCtx.getProperty(Constants.RESPONSE_WRITTEN));
InvocationResponse result = InvocationResponse.CONTINUE;
Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
Modified: webservices/sandesha/trunk/java/modules/mar/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/mar/module.xml?view=diff&rev=538555&r1=538554&r2=538555
==============================================================================
--- webservices/sandesha/trunk/java/modules/mar/module.xml (original)
+++ webservices/sandesha/trunk/java/modules/mar/module.xml Wed May 16 05:11:42 2007
@@ -42,6 +42,9 @@
<!-- namespaces for the 2005-02 spec -->
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/SequenceAcknowledgement</actionMapping>
+ <!-- For interopability purposes. Some WSRM implementations tend to send this as the LastMessage -->
+ <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/LastMessage</actionMapping>
+
<!-- namespaces for the 2007-02 spec -->
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/SequenceAcknowledgement</actionMapping>
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/fault</actionMapping>
@@ -58,9 +61,6 @@
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/AckRequested</actionMapping>
- <!-- For interoparability perposes. Some WSRM implementations tend to send this as the LastMessage -->
- <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/rm/LastMessage</actionMapping>
-
<!-- namespaces for the 2007-02 spec -->
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/CreateSequence</actionMapping>
<actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200702/CloseSequence</actionMapping>
Modified: webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/RMScenariosTest.java
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/RMScenariosTest.java?view=diff&rev=538555&r1=538554&r2=538555
==============================================================================
--- webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/RMScenariosTest.java (original)
+++ webservices/sandesha/trunk/java/modules/tests/src/test/java/org/apache/sandesha2/scenarios/RMScenariosTest.java Wed May 16 05:11:42 2007
@@ -106,11 +106,14 @@
clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);
runEcho(clientOptions, false, false, true,true,false);
-// // Test sync echo with an offer, and the 1.0 spec. In this case the offer is automatic
+// // Test sync echo with an offer, and the 1.0 spec. The offer is not automatic as this
+// // is a client that hasn't been built from WSDL. If the user's operations had been
+// // modelled properly then the offer would happen automatically.
// clientOptions = new Options();
+// clientOptions.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID,SandeshaUtil.getUUID());
// clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_0);
// runEcho(clientOptions, false, false, true,false,false);
-
+
// Test sync echo with no offer, and the 1.1 spec
clientOptions = new Options();
clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org