You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ch...@apache.org on 2006/03/03 10:48:31 UTC
svn commit: r382740 - in /webservices/axis2/trunk/java/modules:
addressing/src/org/apache/axis2/handlers/addressing/
core/src/org/apache/axis2/util/ integration/test/org/apache/axis2/engine/
integration/test/org/apache/axis2/mtom/ integration/test/org/...
Author: chinthaka
Date: Fri Mar 3 01:48:29 2006
New Revision: 382740
URL: http://svn.apache.org/viewcvs?rev=382740&view=rev
Log:
Fixing more test cases
Modified:
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=382740&r1=382739&r2=382740&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java Fri Mar 3 01:48:29 2006
@@ -52,8 +52,13 @@
public void invoke(MessageContext msgContext) throws AxisFault {
SOAPHeader header = msgContext.getEnvelope().getHeader();
- // if there are no headers or addressing version is already determined, pass through
- if (header == null || msgContext.getProperty(WS_ADDRESSING_VERSION) != null) {
+ // if there is some one who has already found addressing, do not do anything here.
+ if (msgContext.getProperty(WS_ADDRESSING_VERSION) != null) {
+ return;
+ }
+
+ // if there are not headers put a flag to disable addressing temporary
+ if (header == null) {
msgContext.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
return;
}
Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=382740&r1=382739&r2=382740&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java (original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java Fri Mar 3 01:48:29 2006
@@ -59,7 +59,9 @@
if (property == null && msgContext.getOperationContext() != null) {
// check in the IN message context, if available
MessageContext inMsgCtxt = msgContext.getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- property = (Boolean) inMsgCtxt.getProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+ if (inMsgCtxt != null) {
+ property = (Boolean) inMsgCtxt.getProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+ }
}
if (property != null && property.booleanValue()) {
log.info("Addressing is disbaled .....");
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java?rev=382740&r1=382739&r2=382740&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java Fri Mar 3 01:48:29 2006
@@ -137,6 +137,7 @@
axisOp.setMessageReceiver(messageReceiver);
axisOp.setStyle(WSDLService.STYLE_RPC);
service.addOperation(axisOp);
+ service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI+"/"+opName.getLocalPart(), axisOp);
return service;
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleTest.java?rev=382740&r1=382739&r2=382740&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleTest.java Fri Mar 3 01:48:29 2006
@@ -18,7 +18,6 @@
import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
-import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.client.async.AsyncResult;
@@ -125,6 +124,8 @@
Options options = new Options();
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setUseSeparateListener(true);
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
+
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
@@ -179,12 +180,14 @@
OMElement payload = TestingUtils.createDummyOMElement();
Options options = new Options();
options.setTo(targetEPR);
+
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setUseSeparateListener(true);
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo", null);
ServiceClient sender = new ServiceClient(configContext, null);
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
sender.setOptions(options);
for (int i = 0; i < 5; i++) {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java?rev=382740&r1=382739&r2=382740&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMTest.java Fri Mar 3 01:48:29 2006
@@ -45,7 +45,7 @@
import org.apache.ws.commons.soap.SOAPEnvelope;
import javax.activation.DataHandler;
-import java.awt.Image;
+import java.awt.*;
import java.io.InputStream;
public class EchoRawMTOMTest extends TestCase implements TestConstants {
@@ -128,6 +128,7 @@
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null);
ServiceClient sender = new ServiceClient(configContext, null);
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
sender.setOptions(options);
sender.sendReceiveNonblocking(payload, callback);
@@ -146,7 +147,7 @@
public void testEchoXMLSync() throws Exception {
OMElement payload = createEnvelope();
Options options = new Options();
- options.setProperty(MessageContext.CHARACTER_SET_ENCODING, "UTF-16");
+// options.setProperty(MessageContext.CHARACTER_SET_ENCODING, "UTF-16");
//options.setTimeOutInMilliSeconds(-1);
//options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(Integer.MAX_VALUE));
options.setTo(targetEPR);
@@ -156,6 +157,7 @@
ConfigurationContext configContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null);
ServiceClient sender = new ServiceClient(configContext,null);
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
sender.setOptions(options);
options.setTo(targetEPR);
OMElement result = sender.sendReceive(payload);
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java?rev=382740&r1=382739&r2=382740&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/tcp/TCPEchoRawXMLTest.java Fri Mar 3 01:48:29 2006
@@ -109,6 +109,7 @@
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_TCP);
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
@@ -151,7 +152,8 @@
Options options = new Options();
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_TCP);
-
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
+
ServiceClient sender = new ServiceClient(configContext, clientService);
sender.setOptions(options);
OMElement result = sender.sendReceive(operationName, payload);
@@ -172,7 +174,7 @@
Options options = new Options();
options.setTo(targetEPR);
- options.setAction(operationName.getLocalPart());
+ options.setAction(Constants.AXIS2_NAMESPACE_URI+"/"+operationName.getLocalPart());
options.setTransportInProtocol(Constants.TRANSPORT_TCP);
options.setUseSeparateListener(true);