You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by bs...@apache.org on 2008/01/31 08:12:33 UTC
svn commit: r617027 - in /servicemix/smx3/trunk:
common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/
common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/
core/servicemix-core/src/main/java/org/apache/servicem...
Author: bsnyder
Date: Wed Jan 30 23:12:25 2008
New Revision: 617027
URL: http://svn.apache.org/viewvc?rev=617027&view=rev
Log:
SM-1201 - Move mock classes from servicemix-soap2 subproject to a better location.
Added:
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockExchangeFactory.java
- copied, changed from r617013, servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockExchangeFactory.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockMessageExchange.java
- copied, changed from r617013, servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockMessageExchange.java
servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockNormalizedMessage.java
- copied, changed from r617013, servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockNormalizedMessage.java
Removed:
servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockExchangeFactory.java
servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockMessageExchange.java
servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockNormalizedMessage.java
Modified:
servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/HelloWorldSoapTest.java
servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/PersonHttpTest.java
servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/JbiInInterceptorTest.java
Modified: servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/HelloWorldSoapTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/HelloWorldSoapTest.java?rev=617027&r1=617026&r2=617027&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/HelloWorldSoapTest.java (original)
+++ servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/HelloWorldSoapTest.java Wed Jan 30 23:12:25 2008
@@ -48,12 +48,12 @@
import org.apache.servicemix.soap.core.MessageImpl;
import org.apache.servicemix.soap.core.PhaseInterceptorChain;
import org.apache.servicemix.soap.interceptors.jbi.JbiConstants;
-import org.apache.servicemix.soap.interceptors.jbi.MockExchangeFactory;
-import org.apache.servicemix.soap.interceptors.jbi.MockMessageExchange;
import org.apache.servicemix.soap.util.DomUtil;
import org.apache.servicemix.soap.wsdl.BindingFactory;
import org.apache.servicemix.soap.wsdl.WSDLUtils;
import org.apache.servicemix.soap.wsdl.validator.WSIBPValidator;
+import org.apache.servicemix.tck.mock.MockExchangeFactory;
+import org.apache.servicemix.tck.mock.MockMessageExchange;
public class HelloWorldSoapTest extends TestCase {
private static transient Log log = LogFactory.getLog(HelloWorldSoapTest.class);
Modified: servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/PersonHttpTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/PersonHttpTest.java?rev=617027&r1=617026&r2=617027&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/PersonHttpTest.java (original)
+++ servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/PersonHttpTest.java Wed Jan 30 23:12:25 2008
@@ -39,9 +39,9 @@
import org.apache.servicemix.soap.bindings.http.HttpConstants;
import org.apache.servicemix.soap.core.MessageImpl;
import org.apache.servicemix.soap.core.PhaseInterceptorChain;
-import org.apache.servicemix.soap.interceptors.jbi.MockExchangeFactory;
import org.apache.servicemix.soap.util.DomUtil;
import org.apache.servicemix.soap.wsdl.BindingFactory;
+import org.apache.servicemix.tck.mock.MockExchangeFactory;
import org.apache.woden.WSDLException;
import org.apache.woden.WSDLFactory;
import org.apache.woden.WSDLReader;
Modified: servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/JbiInInterceptorTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/JbiInInterceptorTest.java?rev=617027&r1=617026&r2=617027&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/JbiInInterceptorTest.java (original)
+++ servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/JbiInInterceptorTest.java Wed Jan 30 23:12:25 2008
@@ -31,6 +31,7 @@
import org.apache.servicemix.soap.api.Interceptor;
import org.apache.servicemix.soap.api.Message;
import org.apache.servicemix.soap.core.MessageImpl;
+import org.apache.servicemix.tck.mock.MockExchangeFactory;
public class JbiInInterceptorTest extends TestCase {
Copied: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockExchangeFactory.java (from r617013, servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockExchangeFactory.java)
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockExchangeFactory.java?p2=servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockExchangeFactory.java&p1=servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockExchangeFactory.java&r1=617013&r2=617027&rev=617027&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockExchangeFactory.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockExchangeFactory.java Wed Jan 30 23:12:25 2008
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.servicemix.soap.interceptors.jbi;
+package org.apache.servicemix.tck.mock;
import java.net.URI;
@@ -29,6 +29,11 @@
public class MockExchangeFactory implements MessageExchangeFactory {
+ public static final URI IN_ONLY = URI.create("http://www.w3.org/2004/08/wsdl/in-only");
+ public static final URI IN_OUT = URI.create("http://www.w3.org/2004/08/wsdl/in-out");
+ public static final URI IN_OPTIONAL_OUT = URI.create("http://www.w3.org/2004/08/wsdl/in-opt-out");
+ public static final URI ROBUST_IN_ONLY = URI.create("http://www.w3.org/2004/08/wsdl/robust-in-only");
+
public MessageExchange createExchange(QName serviceName, QName operationName) throws MessagingException {
throw new UnsupportedOperationException();
}
@@ -39,13 +44,13 @@
pattern = URI.create(str);
}
MessageExchange me;
- if (JbiConstants.IN_ONLY.equals(pattern)) {
+ if (IN_ONLY.equals(pattern)) {
me = createInOnlyExchange();
- } else if (JbiConstants.IN_OUT.equals(pattern)) {
+ } else if (IN_OUT.equals(pattern)) {
me = createInOutExchange();
- } else if (JbiConstants.IN_OPTIONAL_OUT.equals(pattern)) {
+ } else if (IN_OPTIONAL_OUT.equals(pattern)) {
me = createInOptionalOutExchange();
- } else if (JbiConstants.ROBUST_IN_ONLY.equals(pattern)) {
+ } else if (ROBUST_IN_ONLY.equals(pattern)) {
me = createRobustInOnlyExchange();
} else {
throw new IllegalArgumentException("Unhandled pattern: " + pattern);
@@ -74,4 +79,4 @@
}
public static class MockRobustInOnly extends MockMessageExchange implements RobustInOnly {
}
-}
\ No newline at end of file
+}
Copied: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockMessageExchange.java (from r617013, servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockMessageExchange.java)
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockMessageExchange.java?p2=servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockMessageExchange.java&p1=servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockMessageExchange.java&r1=617013&r2=617027&rev=617027&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockMessageExchange.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockMessageExchange.java Wed Jan 30 23:12:25 2008
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.servicemix.soap.interceptors.jbi;
+package org.apache.servicemix.tck.mock;
import java.net.URI;
import java.util.HashMap;
@@ -43,7 +43,7 @@
private NormalizedMessage inMessage;
private NormalizedMessage outMessage;
private Fault fault;
- private Map<String,Object> properties = new HashMap<String,Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
/**
* @return the endpoint
Copied: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockNormalizedMessage.java (from r617013, servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockNormalizedMessage.java)
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockNormalizedMessage.java?p2=servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockNormalizedMessage.java&p1=servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockNormalizedMessage.java&r1=617013&r2=617027&rev=617027&view=diff
==============================================================================
--- servicemix/smx3/trunk/common/servicemix-soap2/src/test/java/org/apache/servicemix/soap/interceptors/jbi/MockNormalizedMessage.java (original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/tck/mock/MockNormalizedMessage.java Wed Jan 30 23:12:25 2008
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.servicemix.soap.interceptors.jbi;
+package org.apache.servicemix.tck.mock;
import java.util.HashMap;
import java.util.Map;
@@ -29,7 +29,7 @@
public class MockNormalizedMessage implements NormalizedMessage {
private Source content;
- private Map<String,Object> properties = new HashMap<String, Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
private Map<String, DataHandler> attachments = new HashMap<String, DataHandler>();
private Subject securitySubject;
@@ -37,7 +37,7 @@
* @return the content
*/
public Source getContent() {
- return content;
+ return this.content;
}
/**
* @param content the content to set
@@ -57,8 +57,8 @@
public void setSecuritySubject(Subject securitySubject) {
this.securitySubject = securitySubject;
}
- public void addAttachment(String id, DataHandler content) throws MessagingException {
- attachments.put(id, content);
+ public void addAttachment(String id, DataHandler data) throws MessagingException {
+ attachments.put(id, data);
}
public DataHandler getAttachment(String id) {
return attachments.get(id);