You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/09/15 21:07:03 UTC
svn commit: r289289 [31/134] - in /webservices/axis2/trunk/java: ./ etc/
modules/addressing/ modules/addressing/src/META-INF/
modules/addressing/src/org/apache/axis2/handlers/addressing/
modules/addressing/test-resources/ modules/addressing/test/org/ap...
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java Thu Sep 15 11:52:11 2005
@@ -1,53 +1,53 @@
-/*
- * Copyright 2004,2005 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.axis2.deployment;
-
-import org.apache.axis2.AbstractTestCase;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.phaseresolver.PhaseException;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-public class TransportDeploymentTest extends AbstractTestCase {
- /**
- * Constructor.
- */
- public TransportDeploymentTest(String testName) {
- super(testName);
- }
-
- public void testTransports() throws AxisFault,
- PhaseException,
- DeploymentException,
- XMLStreamException {
- DeploymentEngine engine = new DeploymentEngine(
- testResourceDir + "/deployment", "server-transport.xml");
- engine.load();
- AxisConfiguration er = engine.getAxisConfig();
- TransportInDescription transport = er.getTransportIn(new QName("http"));
- assertNotNull(transport);
- // assertNotNull(transport.getInFlow());
- TransportOutDescription transport1 = er.getTransportOut(
- new QName("http"));
- assertNotNull(transport1);
- // assertNotNull(transport1.getOutFlow());
- }
-}
+/*
+ * Copyright 2004,2005 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.axis2.deployment;
+
+import org.apache.axis2.AbstractTestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.phaseresolver.PhaseException;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+public class TransportDeploymentTest extends AbstractTestCase {
+ /**
+ * Constructor.
+ */
+ public TransportDeploymentTest(String testName) {
+ super(testName);
+ }
+
+ public void testTransports() throws AxisFault,
+ PhaseException,
+ DeploymentException,
+ XMLStreamException {
+ DeploymentEngine engine = new DeploymentEngine(
+ testResourceDir + "/deployment", "server-transport.xml");
+ engine.load();
+ AxisConfiguration er = engine.getAxisConfig();
+ TransportInDescription transport = er.getTransportIn(new QName("http"));
+ assertNotNull(transport);
+ // assertNotNull(transport.getInFlow());
+ TransportOutDescription transport1 = er.getTransportOut(
+ new QName("http"));
+ assertNotNull(transport1);
+ // assertNotNull(transport1.getOutFlow());
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/TransportDeploymentTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/MockFlow.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/MockFlow.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/MockFlow.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/MockFlow.java Thu Sep 15 11:52:11 2005
@@ -1,35 +1,35 @@
-/*
- * Copyright 2004,2005 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.axis2.description;
-
-import org.apache.axis2.phaseresolver.PhaseMetadata;
-import org.apache.axis2.util.Utils;
-
-
-public class MockFlow extends FlowImpl implements Flow {
- public MockFlow(String message, int length) {
- super();
- for (int i = 0; i < length; i++) {
- SpeakingHandler1 h1 = new SpeakingHandler1(
- "Executing " + i + " inside " + message);
- Utils.addHandler(this,
- h1,
- PhaseMetadata.PHASE_POLICY_DETERMINATION);
- }
- }
-
-}
+/*
+ * Copyright 2004,2005 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.axis2.description;
+
+import org.apache.axis2.phaseresolver.PhaseMetadata;
+import org.apache.axis2.util.Utils;
+
+
+public class MockFlow extends FlowImpl implements Flow {
+ public MockFlow(String message, int length) {
+ super();
+ for (int i = 0; i < length; i++) {
+ SpeakingHandler1 h1 = new SpeakingHandler1(
+ "Executing " + i + " inside " + message);
+ Utils.addHandler(this,
+ h1,
+ PhaseMetadata.PHASE_POLICY_DETERMINATION);
+ }
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/MockFlow.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/RegistryTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler.java Thu Sep 15 11:52:11 2005
@@ -1,54 +1,54 @@
-/*
- * Copyright 2004,2005 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.axis2.description;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.Handler;
-import org.apache.axis2.handlers.AbstractHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-
-public class SpeakingHandler extends AbstractHandler implements Handler {
- private Log log = LogFactory.getLog(getClass());
- private String message;
- private QName name;
-
- public SpeakingHandler() {
- this.message = "Hi I amtesting ";
- }
-
- public QName getName() {
- return name;
- }
-
- public void invoke(MessageContext msgContext) throws
- AxisFault {
- log.info("I am " + message + " Handler Running :)");
- }
-
- public void revoke(MessageContext msgContext) {
- log.info("I am " + message + " Handler Running :)");
- }
-
- public void setName(QName name) {
- this.name = name;
- }
-
-}
+/*
+ * Copyright 2004,2005 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.axis2.description;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.Handler;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+
+public class SpeakingHandler extends AbstractHandler implements Handler {
+ private Log log = LogFactory.getLog(getClass());
+ private String message;
+ private QName name;
+
+ public SpeakingHandler() {
+ this.message = "Hi I amtesting ";
+ }
+
+ public QName getName() {
+ return name;
+ }
+
+ public void invoke(MessageContext msgContext) throws
+ AxisFault {
+ log.info("I am " + message + " Handler Running :)");
+ }
+
+ public void revoke(MessageContext msgContext) {
+ log.info("I am " + message + " Handler Running :)");
+ }
+
+ public void setName(QName name) {
+ this.name = name;
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler1.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler1.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler1.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler1.java Thu Sep 15 11:52:11 2005
@@ -1,53 +1,53 @@
-/*
- * Copyright 2004,2005 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.axis2.description;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.Handler;
-import org.apache.axis2.handlers.AbstractHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.xml.namespace.QName;
-
-public class SpeakingHandler1 extends AbstractHandler implements Handler {
- private Log log = LogFactory.getLog(getClass());
- private String message;
- private QName name;
-
- public SpeakingHandler1(String message) {
- this.message = message;
- }
-
- public QName getName() {
- return name;
- }
-
- public void invoke(MessageContext msgContext) throws AxisFault {
- log.info("I am " + message + " Handler Running :)");
- }
-
- public void revoke(MessageContext msgContext) {
- log.info("I am " + message + " Handler Running :)");
- }
-
- public void setName(QName name) {
- this.name = name;
- }
-
-}
+/*
+ * Copyright 2004,2005 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.axis2.description;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.Handler;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
+
+public class SpeakingHandler1 extends AbstractHandler implements Handler {
+ private Log log = LogFactory.getLog(getClass());
+ private String message;
+ private QName name;
+
+ public SpeakingHandler1(String message) {
+ this.message = message;
+ }
+
+ public QName getName() {
+ return name;
+ }
+
+ public void invoke(MessageContext msgContext) throws AxisFault {
+ log.info("I am " + message + " Handler Running :)");
+ }
+
+ public void revoke(MessageContext msgContext) {
+ log.info("I am " + message + " Handler Running :)");
+ }
+
+ public void setName(QName name) {
+ this.name = name;
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingHandler1.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingProvider.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingProvider.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingProvider.java Thu Sep 15 11:52:11 2005
@@ -1,37 +1,37 @@
-/*
- * Copyright 2004,2005 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.axis2.description;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.MessageReceiver;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class SpeakingProvider implements MessageReceiver {
- private Log log = LogFactory.getLog(getClass());
- private String message;
-
- public SpeakingProvider() {
- }
-
-
- public void receive(MessageContext msgContext) throws AxisFault {
- log.info("I am Speaking Provider Running :)");
- }
-
-}
+/*
+ * Copyright 2004,2005 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.axis2.description;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SpeakingProvider implements MessageReceiver {
+ private Log log = LogFactory.getLog(getClass());
+ private String message;
+
+ public SpeakingProvider() {
+ }
+
+
+ public void receive(MessageContext msgContext) throws AxisFault {
+ log.info("I am Speaking Provider Running :)");
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/description/SpeakingProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java Thu Sep 15 11:52:11 2005
@@ -1,66 +1,66 @@
-/*
- * Copyright 2004,2005 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.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
-
-public class AbstractEngineTest extends TestCase {
-// protected ArrayList executedHandlers = new ArrayList();
-// protected AxisConfiguration engineRegistry;
-// protected QName serviceName = new QName("axis/services/NullService");
-// protected QName opearationName = new QName("NullOperation");
-// protected ServiceDescription service;
-
- public AbstractEngineTest() {
- }
-
- public AbstractEngineTest(String arg0) {
- super(arg0);
- }
-
- // public class TempHandler extends AbstractHandler {
- // private Integer index;
- // private boolean pause = false;
- // public TempHandler(int index, boolean pause) {
- // this.index = new Integer(index);
- // this.pause = pause;
- // }
- // public TempHandler(int index) {
- // this.index = new Integer(index);
- // }
- //
- // public void invoke(MessageContext msgContext) throws AxisFault {
- // executedHandlers.add(index);
- // if (pause) {
- // msgContext.setPaused(true);
- // }
- // }
- //
- // }
-
- public class NullMessageReceiver extends AbstractInOutSyncMessageReceiver {
-
- public void invokeBusinessLogic(MessageContext inMessage,
- MessageContext outMessage)
- throws AxisFault {
-
- }
- }
-}
+/*
+ * Copyright 2004,2005 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.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+
+public class AbstractEngineTest extends TestCase {
+// protected ArrayList executedHandlers = new ArrayList();
+// protected AxisConfiguration engineRegistry;
+// protected QName serviceName = new QName("axis/services/NullService");
+// protected QName opearationName = new QName("NullOperation");
+// protected ServiceDescription service;
+
+ public AbstractEngineTest() {
+ }
+
+ public AbstractEngineTest(String arg0) {
+ super(arg0);
+ }
+
+ // public class TempHandler extends AbstractHandler {
+ // private Integer index;
+ // private boolean pause = false;
+ // public TempHandler(int index, boolean pause) {
+ // this.index = new Integer(index);
+ // this.pause = pause;
+ // }
+ // public TempHandler(int index) {
+ // this.index = new Integer(index);
+ // }
+ //
+ // public void invoke(MessageContext msgContext) throws AxisFault {
+ // executedHandlers.add(index);
+ // if (pause) {
+ // msgContext.setPaused(true);
+ // }
+ // }
+ //
+ // }
+
+ public class NullMessageReceiver extends AbstractInOutSyncMessageReceiver {
+
+ public void invokeBusinessLogic(MessageContext inMessage,
+ MessageContext outMessage)
+ throws AxisFault {
+
+ }
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AbstractEngineTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AxisStorageTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AxisStorageTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AxisStorageTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AxisStorageTest.java Thu Sep 15 11:52:11 2005
@@ -1,59 +1,59 @@
-package org.apache.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.engine.AxisEngine;
-
-import javax.xml.stream.XMLStreamException;
-/*
-* Copyright 2004,2005 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.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Aug 29, 2005
- * Time: 1:45:17 PM
- */
-public class AxisStorageTest extends TestCase {
-
- ConfigurationContext cc;
-
- public void testStorage() throws
- DeploymentException,
- AxisFault,
- XMLStreamException {
- String filename = "./target/test-resources/deployment";
- ConfigurationContextFactory builder = new ConfigurationContextFactory();
- cc = builder.buildConfigurationContext(filename);
- AxisEngine engine =new AxisEngine(cc);
- assertNotNull(engine);
- String myTestVal = "There is a value";
- String key = (String)engine.store(cc,myTestVal);
- assertNotNull(key);
-
- String val = (String)engine.retrieve(cc,key);
- assertEquals(val,myTestVal);
- Parameter para = cc.getAxisConfiguration().getAxisStorage().getParameter("StoreLocation");
- assertNotNull(para);
- }
-
-}
+package org.apache.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.deployment.DeploymentException;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.engine.AxisEngine;
+
+import javax.xml.stream.XMLStreamException;
+/*
+* Copyright 2004,2005 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.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Aug 29, 2005
+ * Time: 1:45:17 PM
+ */
+public class AxisStorageTest extends TestCase {
+
+ ConfigurationContext cc;
+
+ public void testStorage() throws
+ DeploymentException,
+ AxisFault,
+ XMLStreamException {
+ String filename = "./target/test-resources/deployment";
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ cc = builder.buildConfigurationContext(filename);
+ AxisEngine engine =new AxisEngine(cc);
+ assertNotNull(engine);
+ String myTestVal = "There is a value";
+ String key = (String)engine.store(cc,myTestVal);
+ assertNotNull(key);
+
+ String val = (String)engine.retrieve(cc,key);
+ assertEquals(val,myTestVal);
+ Parameter para = cc.getAxisConfiguration().getAxisStorage().getParameter("StoreLocation");
+ assertNotNull(para);
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/AxisStorageTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/DispatchingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/DispatchingTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/DispatchingTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/DispatchingTest.java Thu Sep 15 11:52:11 2005
@@ -1,70 +1,70 @@
-package org.apache.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.phaseresolver.PhaseMetadata;
-
-import java.util.ArrayList;
-/*
-* Copyright 2004,2005 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.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Sep 13, 2005
- * Time: 4:34:27 PM
- */
-public class DispatchingTest extends TestCase {
-
- AxisConfiguration ar;
- String repo ="./test-resources/deployment/dispatch_repo";
-
-
-
- public void testDispatch() throws Exception {
- ConfigurationContextFactory builder = new ConfigurationContextFactory();
- ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
- ArrayList list = ar.getInPhasesUptoAndIncludingPostDispatch();
- for (int i = 0; i < list.size(); i++) {
- Phase phase = (Phase) list.get(i);
- if(PhaseMetadata.PHASE_DISPATCH.equals(phase.getPhaseName())){
- assertEquals(3,phase.getHandlerCount());
- ArrayList handler = phase.getHandlers();
- for (int j = 0; j < handler.size(); j++) {
- Handler handler1 = (Handler) handler.get(j);
- switch(j){
- case 0: {
- assertEquals(handler1.getHandlerDesc().getName().
- getLocalPart(),"AddressingBasedDispatcher");
- break;
- }
- case 1 : {
- assertEquals(handler1.getHandlerDesc().getName().
- getLocalPart(),"SOAPActionBasedDispatcher");
- break;
- }
- case 2 : {
- assertEquals(handler1.getHandlerDesc().getName().
- getLocalPart(),"SOAPMessageBodyBasedDispatcher");
- break;
- }
- }
- }
- }
- }
- }
-}
+package org.apache.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.phaseresolver.PhaseMetadata;
+
+import java.util.ArrayList;
+/*
+* Copyright 2004,2005 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.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Sep 13, 2005
+ * Time: 4:34:27 PM
+ */
+public class DispatchingTest extends TestCase {
+
+ AxisConfiguration ar;
+ String repo ="./test-resources/deployment/dispatch_repo";
+
+
+
+ public void testDispatch() throws Exception {
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
+ ArrayList list = ar.getInPhasesUptoAndIncludingPostDispatch();
+ for (int i = 0; i < list.size(); i++) {
+ Phase phase = (Phase) list.get(i);
+ if(PhaseMetadata.PHASE_DISPATCH.equals(phase.getPhaseName())){
+ assertEquals(3,phase.getHandlerCount());
+ ArrayList handler = phase.getHandlers();
+ for (int j = 0; j < handler.size(); j++) {
+ Handler handler1 = (Handler) handler.get(j);
+ switch(j){
+ case 0: {
+ assertEquals(handler1.getHandlerDesc().getName().
+ getLocalPart(),"AddressingBasedDispatcher");
+ break;
+ }
+ case 1 : {
+ assertEquals(handler1.getHandlerDesc().getName().
+ getLocalPart(),"SOAPActionBasedDispatcher");
+ break;
+ }
+ case 2 : {
+ assertEquals(handler1.getHandlerDesc().getName().
+ getLocalPart(),"SOAPMessageBodyBasedDispatcher");
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/DispatchingTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java Thu Sep 15 11:52:11 2005
@@ -1,175 +1,175 @@
-/*
- * Copyright 2004,2005 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.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.*;
-import org.apache.axis2.handlers.AbstractHandler;
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.soap.SOAPFactory;
-import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
-import org.apache.wsdl.WSDLService;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-
-public class EnginePausingTest extends TestCase {
-
- private QName serviceName = new QName("NullService");
- private QName operationName = new QName("DummyOp");
- private ConfigurationContext engineContext;
-
- private TransportOutDescription transportOut;
- private TransportInDescription transportIn;
- private MessageContext mc;
- private ArrayList executedHandlers;
-
- public EnginePausingTest(String arg0) throws AxisFault {
- super(arg0);
- executedHandlers = new ArrayList();
- AxisConfiguration engineRegistry = new AxisConfigurationImpl();
- ((AxisConfigurationImpl)engineRegistry).setDefaultDispatchers();
- engineContext = new ConfigurationContext(engineRegistry);
- transportOut = new TransportOutDescription(new QName("null"));
- transportOut.setSender(new CommonsHTTPTransportSender());
- transportIn = new TransportInDescription(new QName("null"));
-
- }
-
- protected void setUp() throws Exception {
-
- ServiceDescription service = new ServiceDescription(serviceName);
- service.setStyle(WSDLService.STYLE_DOC);
- engineContext.getAxisConfiguration().addService(service);
-
- OperationDescription axisOp = new OperationDescription(operationName);
- axisOp.setMessageReceiver(new MessageReceiver() {
- public void receive(MessageContext messgeCtx) throws AxisFault {
-
- }
- });
- service.addOperation(axisOp);
-
- mc = new MessageContext(engineContext, transportIn, transportOut);
-
- mc.setTransportOut(transportOut);
- mc.setServerSide(true);
- mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
- SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
- mc.setEnvelope(omFac.getDefaultEnvelope());
-
- Phase phase1 = new Phase("1");
- phase1.addHandler(new TempHandler(1));
- phase1.addHandler(new TempHandler(2));
- phase1.addHandler(new TempHandler(3));
- phase1.addHandler(new TempHandler(4));
- phase1.addHandler(new TempHandler(5));
- phase1.addHandler(new TempHandler(6));
- phase1.addHandler(new TempHandler(7));
- phase1.addHandler(new TempHandler(8));
- phase1.addHandler(new TempHandler(9));
-
- Phase phase2 = new Phase("2");
- phase2.addHandler(new TempHandler(10));
- phase2.addHandler(new TempHandler(11));
- phase2.addHandler(new TempHandler(12));
- phase2.addHandler(new TempHandler(13));
- phase2.addHandler(new TempHandler(14));
- phase2.addHandler(new TempHandler(15, true));
- phase2.addHandler(new TempHandler(16));
- phase2.addHandler(new TempHandler(17));
- phase2.addHandler(new TempHandler(18));
-
- Phase phase3 = new Phase("3");
- phase3.addHandler(new TempHandler(19));
- phase3.addHandler(new TempHandler(20));
- phase3.addHandler(new TempHandler(21));
- phase3.addHandler(new TempHandler(22));
- phase3.addHandler(new TempHandler(23));
- phase3.addHandler(new TempHandler(24));
- phase3.addHandler(new TempHandler(25));
- phase3.addHandler(new TempHandler(26));
- phase3.addHandler(new TempHandler(27));
-
-// ServiceContext serviceContext = new ServiceContext(service,
-// engineContext);
-// engineContext.registerServiceContext(
-// serviceContext.getServiceInstanceID(), serviceContext);
-
- //TODO
- axisOp.getRemainingPhasesInFlow().add(phase1);
- axisOp.getRemainingPhasesInFlow().add(phase2);
- axisOp.getRemainingPhasesInFlow().add(phase3);
-
- mc.setWSAAction(operationName.getLocalPart());
- mc.setSoapAction(operationName.getLocalPart());
- System.out.flush();
-
- }
-
- public void testReceive() throws Exception {
- mc.setTo(
- new EndpointReference("axis2/services/NullService"));
- mc.setWSAAction("DummyOp");
- AxisEngine engine = new AxisEngine(engineContext);
- engine.receive(mc);
- assertEquals(executedHandlers.size(), 14);
- for (int i = 0; i < 14; i++) {
- assertEquals(((Integer) executedHandlers.get(i)).intValue(),
- i + 1);
- }
- engine.receive(mc);
-
- assertEquals(27,executedHandlers.size());
- for (int i = 15; i < 27; i++) {
- assertEquals(((Integer) executedHandlers.get(i)).intValue(),
- i + 1);
- }
-
- }
-
- public class TempHandler extends AbstractHandler {
- private Integer index;
- private boolean pause = false;
-
- public TempHandler(int index, boolean pause) {
- this.index = new Integer(index);
- this.pause = pause;
- init(new HandlerDescription(new QName("handler" + index)));
- }
-
- public TempHandler(int index) {
- this.index = new Integer(index);
- init(new HandlerDescription(new QName("handler" + index)));
- }
-
- public void invoke(MessageContext msgContext) throws AxisFault {
- String paused = "paused";
- if (pause && msgContext.getProperty(paused) == null) {
- msgContext.setProperty(paused, "true");
- msgContext.setPausedTrue(getName());
- } else {
- executedHandlers.add(index);
- }
- }
-
- }
-}
+/*
+ * Copyright 2004,2005 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.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.*;
+import org.apache.axis2.handlers.AbstractHandler;
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.soap.SOAPFactory;
+import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
+import org.apache.wsdl.WSDLService;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+public class EnginePausingTest extends TestCase {
+
+ private QName serviceName = new QName("NullService");
+ private QName operationName = new QName("DummyOp");
+ private ConfigurationContext engineContext;
+
+ private TransportOutDescription transportOut;
+ private TransportInDescription transportIn;
+ private MessageContext mc;
+ private ArrayList executedHandlers;
+
+ public EnginePausingTest(String arg0) throws AxisFault {
+ super(arg0);
+ executedHandlers = new ArrayList();
+ AxisConfiguration engineRegistry = new AxisConfigurationImpl();
+ ((AxisConfigurationImpl)engineRegistry).setDefaultDispatchers();
+ engineContext = new ConfigurationContext(engineRegistry);
+ transportOut = new TransportOutDescription(new QName("null"));
+ transportOut.setSender(new CommonsHTTPTransportSender());
+ transportIn = new TransportInDescription(new QName("null"));
+
+ }
+
+ protected void setUp() throws Exception {
+
+ ServiceDescription service = new ServiceDescription(serviceName);
+ service.setStyle(WSDLService.STYLE_DOC);
+ engineContext.getAxisConfiguration().addService(service);
+
+ OperationDescription axisOp = new OperationDescription(operationName);
+ axisOp.setMessageReceiver(new MessageReceiver() {
+ public void receive(MessageContext messgeCtx) throws AxisFault {
+
+ }
+ });
+ service.addOperation(axisOp);
+
+ mc = new MessageContext(engineContext, transportIn, transportOut);
+
+ mc.setTransportOut(transportOut);
+ mc.setServerSide(true);
+ mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
+ SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
+ mc.setEnvelope(omFac.getDefaultEnvelope());
+
+ Phase phase1 = new Phase("1");
+ phase1.addHandler(new TempHandler(1));
+ phase1.addHandler(new TempHandler(2));
+ phase1.addHandler(new TempHandler(3));
+ phase1.addHandler(new TempHandler(4));
+ phase1.addHandler(new TempHandler(5));
+ phase1.addHandler(new TempHandler(6));
+ phase1.addHandler(new TempHandler(7));
+ phase1.addHandler(new TempHandler(8));
+ phase1.addHandler(new TempHandler(9));
+
+ Phase phase2 = new Phase("2");
+ phase2.addHandler(new TempHandler(10));
+ phase2.addHandler(new TempHandler(11));
+ phase2.addHandler(new TempHandler(12));
+ phase2.addHandler(new TempHandler(13));
+ phase2.addHandler(new TempHandler(14));
+ phase2.addHandler(new TempHandler(15, true));
+ phase2.addHandler(new TempHandler(16));
+ phase2.addHandler(new TempHandler(17));
+ phase2.addHandler(new TempHandler(18));
+
+ Phase phase3 = new Phase("3");
+ phase3.addHandler(new TempHandler(19));
+ phase3.addHandler(new TempHandler(20));
+ phase3.addHandler(new TempHandler(21));
+ phase3.addHandler(new TempHandler(22));
+ phase3.addHandler(new TempHandler(23));
+ phase3.addHandler(new TempHandler(24));
+ phase3.addHandler(new TempHandler(25));
+ phase3.addHandler(new TempHandler(26));
+ phase3.addHandler(new TempHandler(27));
+
+// ServiceContext serviceContext = new ServiceContext(service,
+// engineContext);
+// engineContext.registerServiceContext(
+// serviceContext.getServiceInstanceID(), serviceContext);
+
+ //TODO
+ axisOp.getRemainingPhasesInFlow().add(phase1);
+ axisOp.getRemainingPhasesInFlow().add(phase2);
+ axisOp.getRemainingPhasesInFlow().add(phase3);
+
+ mc.setWSAAction(operationName.getLocalPart());
+ mc.setSoapAction(operationName.getLocalPart());
+ System.out.flush();
+
+ }
+
+ public void testReceive() throws Exception {
+ mc.setTo(
+ new EndpointReference("axis2/services/NullService"));
+ mc.setWSAAction("DummyOp");
+ AxisEngine engine = new AxisEngine(engineContext);
+ engine.receive(mc);
+ assertEquals(executedHandlers.size(), 14);
+ for (int i = 0; i < 14; i++) {
+ assertEquals(((Integer) executedHandlers.get(i)).intValue(),
+ i + 1);
+ }
+ engine.receive(mc);
+
+ assertEquals(27,executedHandlers.size());
+ for (int i = 15; i < 27; i++) {
+ assertEquals(((Integer) executedHandlers.get(i)).intValue(),
+ i + 1);
+ }
+
+ }
+
+ public class TempHandler extends AbstractHandler {
+ private Integer index;
+ private boolean pause = false;
+
+ public TempHandler(int index, boolean pause) {
+ this.index = new Integer(index);
+ this.pause = pause;
+ init(new HandlerDescription(new QName("handler" + index)));
+ }
+
+ public TempHandler(int index) {
+ this.index = new Integer(index);
+ init(new HandlerDescription(new QName("handler" + index)));
+ }
+
+ public void invoke(MessageContext msgContext) throws AxisFault {
+ String paused = "paused";
+ if (pause && msgContext.getProperty(paused) == null) {
+ msgContext.setProperty(paused, "true");
+ msgContext.setPausedTrue(getName());
+ } else {
+ executedHandlers.add(index);
+ }
+ }
+
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EnginePausingTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java Thu Sep 15 11:52:11 2005
@@ -1,133 +1,133 @@
-/*
- * Copyright 2004,2005 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.axis2.engine;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.OperationContextFactory;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.ServiceDescription;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.soap.SOAPFactory;
-import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
-import org.apache.wsdl.WSDLConstants;
-import org.apache.wsdl.WSDLService;
-
-import javax.xml.namespace.QName;
-import java.util.ArrayList;
-
-public class EngineWithoutPhaseResolvingTest extends AbstractEngineTest {
- private MessageContext mc;
- private ArrayList executedHandlers = new ArrayList();
- private AxisConfiguration engineRegistry;
- private QName serviceName = new QName("axis/services/NullService");
- private QName opearationName = new QName("NullOperation");
- private ServiceDescription service;
- private ConfigurationContext engineContext;
- private OperationDescription axisOp;
-
- public EngineWithoutPhaseResolvingTest() {
- }
-
- public EngineWithoutPhaseResolvingTest(String arg0) {
- super(arg0);
- }
-
- protected void setUp() throws Exception {
-
- engineRegistry = new AxisConfigurationImpl();
- engineContext = new ConfigurationContext(engineRegistry);
-
- TransportOutDescription transport = new TransportOutDescription(
- new QName("null"));
- transport.setSender(new CommonsHTTPTransportSender());
-
- TransportInDescription transportIn = new TransportInDescription(
- new QName("null"));
- axisOp = new OperationDescription(opearationName);
-
- service = new ServiceDescription(serviceName);
- axisOp.setMessageReceiver(new MessageReceiver() {
- public void receive(MessageContext messgeCtx) throws AxisFault {
- // TODO Auto-generated method stub
-
- }
- });
- engineRegistry.addService(service);
- service.setStyle(WSDLService.STYLE_DOC);
- service.addOperation(axisOp);
-
-// ServiceContext serviceContext = engineContext.createServiceContext(
-// serviceName);
-
- mc =
- new MessageContext(engineContext,
- transportIn,
- transport);
-
- mc.setOperationContext(
- OperationContextFactory.createOperationContext(
- WSDLConstants.MEP_CONSTANT_IN_OUT,
- axisOp
- ));
- mc.setTransportOut(transport);
- mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
- mc.setServerSide(true);
- SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
- mc.setEnvelope(omFac.getDefaultEnvelope());
-
-
- mc.setWSAAction(opearationName.getLocalPart());
- mc.setSoapAction(opearationName.getLocalPart());
- System.out.flush();
- }
-
-// public void testServerSend() throws Exception {
-// AxisEngine engine = new AxisEngine(engineContext);
-// mc.setServerSide(true);
-//
-// mc.setServiceContext(engineContext.createServiceContext(serviceName));
-// engine.send(mc);
-// }
-//
-// public void testClientSend() throws Exception {
-// AxisEngine engine = new AxisEngine(engineContext);
-// mc.setServerSide(false);
-// mc.setServiceContext(engineContext.createServiceContext(serviceName));
-// engine.send(mc);
-// }
-
- public void testServerReceive() throws Exception {
- mc.setTo(
- new EndpointReference("axis/services/NullService"));
- AxisEngine engine = new AxisEngine(engineContext);
- mc.setServerSide(true);
- engine.receive(mc);
- }
-//
-// public void testClientReceive() throws Exception {
-// mc.setServiceContext(engineContext.createServiceContext(serviceName));
-// mc.setOperationContext(axisOp.findOperationContext(mc,mc.getServiceContext(),false));
-// AxisEngine engine = new AxisEngine(engineContext);
-// mc.setServerSide(false);
-// engine.receive(mc);
-// }
-}
+/*
+ * Copyright 2004,2005 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.axis2.engine;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContextFactory;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.om.OMAbstractFactory;
+import org.apache.axis2.soap.SOAPFactory;
+import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
+import org.apache.wsdl.WSDLConstants;
+import org.apache.wsdl.WSDLService;
+
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+
+public class EngineWithoutPhaseResolvingTest extends AbstractEngineTest {
+ private MessageContext mc;
+ private ArrayList executedHandlers = new ArrayList();
+ private AxisConfiguration engineRegistry;
+ private QName serviceName = new QName("axis/services/NullService");
+ private QName opearationName = new QName("NullOperation");
+ private ServiceDescription service;
+ private ConfigurationContext engineContext;
+ private OperationDescription axisOp;
+
+ public EngineWithoutPhaseResolvingTest() {
+ }
+
+ public EngineWithoutPhaseResolvingTest(String arg0) {
+ super(arg0);
+ }
+
+ protected void setUp() throws Exception {
+
+ engineRegistry = new AxisConfigurationImpl();
+ engineContext = new ConfigurationContext(engineRegistry);
+
+ TransportOutDescription transport = new TransportOutDescription(
+ new QName("null"));
+ transport.setSender(new CommonsHTTPTransportSender());
+
+ TransportInDescription transportIn = new TransportInDescription(
+ new QName("null"));
+ axisOp = new OperationDescription(opearationName);
+
+ service = new ServiceDescription(serviceName);
+ axisOp.setMessageReceiver(new MessageReceiver() {
+ public void receive(MessageContext messgeCtx) throws AxisFault {
+ // TODO Auto-generated method stub
+
+ }
+ });
+ engineRegistry.addService(service);
+ service.setStyle(WSDLService.STYLE_DOC);
+ service.addOperation(axisOp);
+
+// ServiceContext serviceContext = engineContext.createServiceContext(
+// serviceName);
+
+ mc =
+ new MessageContext(engineContext,
+ transportIn,
+ transport);
+
+ mc.setOperationContext(
+ OperationContextFactory.createOperationContext(
+ WSDLConstants.MEP_CONSTANT_IN_OUT,
+ axisOp
+ ));
+ mc.setTransportOut(transport);
+ mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
+ mc.setServerSide(true);
+ SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
+ mc.setEnvelope(omFac.getDefaultEnvelope());
+
+
+ mc.setWSAAction(opearationName.getLocalPart());
+ mc.setSoapAction(opearationName.getLocalPart());
+ System.out.flush();
+ }
+
+// public void testServerSend() throws Exception {
+// AxisEngine engine = new AxisEngine(engineContext);
+// mc.setServerSide(true);
+//
+// mc.setServiceContext(engineContext.createServiceContext(serviceName));
+// engine.send(mc);
+// }
+//
+// public void testClientSend() throws Exception {
+// AxisEngine engine = new AxisEngine(engineContext);
+// mc.setServerSide(false);
+// mc.setServiceContext(engineContext.createServiceContext(serviceName));
+// engine.send(mc);
+// }
+
+ public void testServerReceive() throws Exception {
+ mc.setTo(
+ new EndpointReference("axis/services/NullService"));
+ AxisEngine engine = new AxisEngine(engineContext);
+ mc.setServerSide(true);
+ engine.receive(mc);
+ }
+//
+// public void testClientReceive() throws Exception {
+// mc.setServiceContext(engineContext.createServiceContext(serviceName));
+// mc.setOperationContext(axisOp.findOperationContext(mc,mc.getServiceContext(),false));
+// AxisEngine engine = new AxisEngine(engineContext);
+// mc.setServerSide(false);
+// engine.receive(mc);
+// }
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/MessageContextTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java Thu Sep 15 11:52:11 2005
@@ -1,107 +1,107 @@
-package org.apache.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.deployment.ServiceBuilder;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.ServiceDescription;
-import org.apache.axis2.AxisFault;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-/*
-* Copyright 2004,2005 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.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Sep 1, 2005
- * Time: 3:42:25 PM
- */
-public class ModuleConfigTest extends TestCase {
-
- AxisConfiguration ar;
- String repo ="./test-resources/deployment/moduleConfig";
-
-
-
- public void testModuleConfigAtAxisConfig() {
- try {
- ConfigurationContextFactory builder = new ConfigurationContextFactory();
- ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
- ModuleConfiguration moduleConfiguration =
- ((AxisConfigurationImpl)ar).getModuleConfig(new QName("testModule"));
- assertNotNull(moduleConfiguration);
- Parameter para = moduleConfiguration.getParameter("testModulePara");
- assertNotNull(para);
-
- moduleConfiguration =
- ((AxisConfigurationImpl)ar).getModuleConfig(new QName("testModule2"));
- assertNotNull(moduleConfiguration);
- para = moduleConfiguration.getParameter("testModulePara2");
- assertNotNull(para);
- } catch (DeploymentException e) {
- fail("This can not fail with this DeploymentException " + e) ;
- }
- }
-
-
- public void testModuleConfigAtService() {
- try {
- ConfigurationContextFactory builder = new ConfigurationContextFactory();
- ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
-
-
- ServiceDescription service = new ServiceDescription();
- service.setName(new QName("testService"));
- ar.addService(service);
-// service.setParent(ar);
- InputStream in = new FileInputStream(repo + "/service1.xml");
- ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
- sbuilder.populateService(sbuilder.buildOM());
-
- ModuleConfiguration moduleConfiguration = service.getModuleConfig(new QName("Servie_module"));
- assertNotNull(moduleConfiguration);
- Parameter para = moduleConfiguration.getParameter("Servie_module_para");
- assertNotNull(para);
-
- OperationDescription op = service.getOperation("echoString");
- assertNotNull(op);
-
- moduleConfiguration = op.getModuleConfig(new QName("Op_Module"));
- assertNotNull(moduleConfiguration);
- para = moduleConfiguration.getParameter("Op_Module_para");
- assertNotNull(para);
-
-
- } catch (DeploymentException e) {
- fail("This can not fail with this DeploymentException " + e) ;
- } catch (FileNotFoundException e) {
- fail("This can not fail with this FileNotFoundException " + e) ;
- } catch (AxisFault axisFault) {
- fail("This can not fail with this AxisFault " + axisFault) ;
- } catch (XMLStreamException e) {
- fail("This can not fail with this AxisFault " + e) ;
- }
- }
-}
+package org.apache.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.deployment.DeploymentException;
+import org.apache.axis2.deployment.ServiceBuilder;
+import org.apache.axis2.description.ModuleConfiguration;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+/*
+* Copyright 2004,2005 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.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Sep 1, 2005
+ * Time: 3:42:25 PM
+ */
+public class ModuleConfigTest extends TestCase {
+
+ AxisConfiguration ar;
+ String repo ="./test-resources/deployment/moduleConfig";
+
+
+
+ public void testModuleConfigAtAxisConfig() {
+ try {
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
+ ModuleConfiguration moduleConfiguration =
+ ((AxisConfigurationImpl)ar).getModuleConfig(new QName("testModule"));
+ assertNotNull(moduleConfiguration);
+ Parameter para = moduleConfiguration.getParameter("testModulePara");
+ assertNotNull(para);
+
+ moduleConfiguration =
+ ((AxisConfigurationImpl)ar).getModuleConfig(new QName("testModule2"));
+ assertNotNull(moduleConfiguration);
+ para = moduleConfiguration.getParameter("testModulePara2");
+ assertNotNull(para);
+ } catch (DeploymentException e) {
+ fail("This can not fail with this DeploymentException " + e) ;
+ }
+ }
+
+
+ public void testModuleConfigAtService() {
+ try {
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
+
+
+ ServiceDescription service = new ServiceDescription();
+ service.setName(new QName("testService"));
+ ar.addService(service);
+// service.setParent(ar);
+ InputStream in = new FileInputStream(repo + "/service1.xml");
+ ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
+ sbuilder.populateService(sbuilder.buildOM());
+
+ ModuleConfiguration moduleConfiguration = service.getModuleConfig(new QName("Servie_module"));
+ assertNotNull(moduleConfiguration);
+ Parameter para = moduleConfiguration.getParameter("Servie_module_para");
+ assertNotNull(para);
+
+ OperationDescription op = service.getOperation("echoString");
+ assertNotNull(op);
+
+ moduleConfiguration = op.getModuleConfig(new QName("Op_Module"));
+ assertNotNull(moduleConfiguration);
+ para = moduleConfiguration.getParameter("Op_Module_para");
+ assertNotNull(para);
+
+
+ } catch (DeploymentException e) {
+ fail("This can not fail with this DeploymentException " + e) ;
+ } catch (FileNotFoundException e) {
+ fail("This can not fail with this FileNotFoundException " + e) ;
+ } catch (AxisFault axisFault) {
+ fail("This can not fail with this AxisFault " + axisFault) ;
+ } catch (XMLStreamException e) {
+ fail("This can not fail with this AxisFault " + e) ;
+ }
+ }
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java Thu Sep 15 11:52:11 2005
@@ -1,60 +1,60 @@
-package org.apache.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.ServiceDescription;
-import org.apache.axis2.phaseresolver.PhaseException;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
-/*
-* Copyright 2004,2005 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.
-*
-*
-*/
-
-/**
- * Author : Deepal Jayasinghe
- * Date: Jun 21, 2005
- * Time: 2:09:04 PM
- */
-public class ModuleEngageTest extends TestCase {
- AxisConfiguration ac;
-
- public void testModuleEngageMent() throws PhaseException,
- DeploymentException,
- AxisFault,
- XMLStreamException {
- String filename = "./target/test-resources/deployment";
- ConfigurationContextFactory builder = new ConfigurationContextFactory();
- ac =
- builder.buildConfigurationContext(filename)
- .getAxisConfiguration();
- ModuleDescription module = ac.getModule(new QName("module1"));
- assertNotNull(module);
- ac.engageModule(new QName("module1"));
- ServiceDescription service = ac.getService("service2");
- assertNotNull(service);
- OperationDescription moduleOperation = service.getOperation(
- new QName("creatSeq"));
- assertNotNull(moduleOperation);
- }
-
-}
+package org.apache.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.deployment.DeploymentException;
+import org.apache.axis2.description.ModuleDescription;
+import org.apache.axis2.description.OperationDescription;
+import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.phaseresolver.PhaseException;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+
+/*
+* Copyright 2004,2005 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.
+*
+*
+*/
+
+/**
+ * Author : Deepal Jayasinghe
+ * Date: Jun 21, 2005
+ * Time: 2:09:04 PM
+ */
+public class ModuleEngageTest extends TestCase {
+ AxisConfiguration ac;
+
+ public void testModuleEngageMent() throws PhaseException,
+ DeploymentException,
+ AxisFault,
+ XMLStreamException {
+ String filename = "./target/test-resources/deployment";
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ ac =
+ builder.buildConfigurationContext(filename)
+ .getAxisConfiguration();
+ ModuleDescription module = ac.getModule(new QName("module1"));
+ assertNotNull(module);
+ ac.engageModule(new QName("module1"));
+ ServiceDescription service = ac.getService("service2");
+ assertNotNull(service);
+ OperationDescription moduleOperation = service.getOperation(
+ new QName("creatSeq"));
+ assertNotNull(moduleOperation);
+ }
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleEngageTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterAddTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterAddTest.java?rev=289289&r1=289288&r2=289289&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterAddTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterAddTest.java Thu Sep 15 11:52:11 2005
@@ -1,118 +1,118 @@
-package org.apache.axis2.engine;
-
-import junit.framework.TestCase;
-import org.apache.axis2.description.*;
-import org.apache.axis2.AxisFault;
-
-import javax.xml.namespace.QName;
-/*
-* Copyright 2004,2005 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.
-*
-*
-*/
-
-/**
- * Author: Deepal Jayasinghe
- * Date: Aug 31, 2005
- * Time: 4:28:03 PM
- */
-
-/**
- * To chcek locked is working corrcetly
- */
-
-public class ParamterAddTest extends TestCase {
-
- private AxisConfiguration reg = new AxisConfigurationImpl();
- public void testAddParamterServiceLockedAtAxisConfig(){
- try {
- Parameter para = new ParameterImpl();
- para.setValue(null);
- para.setName("PARA_NAME");
- para.setLocked(true);
- reg.addParameter(para);
-
- ServiceDescription service = new ServiceDescription(new QName("Service1"));
- reg.addService(service);
-// service.setParent(reg);
- service.addParameter(para);
- fail("This should fails with Parmter is locked can not overide");
- } catch (AxisFault axisFault) {
-
- }
- }
-
- public void testAddParamterModuleLockedAtAxisConfig(){
- try {
- Parameter para = new ParameterImpl();
- para.setValue(null);
- para.setName("PARA_NAME");
- para.setLocked(true);
- reg.addParameter(para);
- ModuleDescription module = new ModuleDescription(new QName("Service1"));
- module.setParent(reg);
- module.addParameter(para);
- fail("This should fails with Parmter is locked can not overide");
- } catch (AxisFault axisFault) {
-
- }
- }
-
- public void testAddParamterOpeartionlockedByAxisConfig(){
- try {
- Parameter para = new ParameterImpl();
- para.setValue(null);
- para.setName("PARA_NAME");
- para.setLocked(true);
- reg.addParameter(para);
-
- ServiceDescription service = new ServiceDescription(new QName("Service1"));
- reg.addService(service);
- // service.setParent(reg);
-
- OperationDescription opertion = new OperationDescription();
- opertion.setParent(service);
- opertion.addParameter(para);
- fail("This should fails with Parmter is locked can not overide");
-
-
- } catch (AxisFault axisFault) {
-
- }
- }
-
- public void testAddParamterOpeartionLockebyService(){
- try {
- Parameter para = new ParameterImpl();
- para.setValue(null);
- para.setName("PARA_NAME");
- para.setLocked(true);
-
- ServiceDescription service = new ServiceDescription(new QName("Service1"));
-// service.setParent(reg);
- reg.addService(service);
- service.addParameter(para);
-
- OperationDescription opertion = new OperationDescription();
- opertion.setParent(service);
- opertion.addParameter(para);
- fail("This should fails with Parmter is locked can not overide");
- } catch (AxisFault axisFault) {
-
- }
- }
-
-
-}
+package org.apache.axis2.engine;
+
+import junit.framework.TestCase;
+import org.apache.axis2.description.*;
+import org.apache.axis2.AxisFault;
+
+import javax.xml.namespace.QName;
+/*
+* Copyright 2004,2005 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.
+*
+*
+*/
+
+/**
+ * Author: Deepal Jayasinghe
+ * Date: Aug 31, 2005
+ * Time: 4:28:03 PM
+ */
+
+/**
+ * To chcek locked is working corrcetly
+ */
+
+public class ParamterAddTest extends TestCase {
+
+ private AxisConfiguration reg = new AxisConfigurationImpl();
+ public void testAddParamterServiceLockedAtAxisConfig(){
+ try {
+ Parameter para = new ParameterImpl();
+ para.setValue(null);
+ para.setName("PARA_NAME");
+ para.setLocked(true);
+ reg.addParameter(para);
+
+ ServiceDescription service = new ServiceDescription(new QName("Service1"));
+ reg.addService(service);
+// service.setParent(reg);
+ service.addParameter(para);
+ fail("This should fails with Parmter is locked can not overide");
+ } catch (AxisFault axisFault) {
+
+ }
+ }
+
+ public void testAddParamterModuleLockedAtAxisConfig(){
+ try {
+ Parameter para = new ParameterImpl();
+ para.setValue(null);
+ para.setName("PARA_NAME");
+ para.setLocked(true);
+ reg.addParameter(para);
+ ModuleDescription module = new ModuleDescription(new QName("Service1"));
+ module.setParent(reg);
+ module.addParameter(para);
+ fail("This should fails with Parmter is locked can not overide");
+ } catch (AxisFault axisFault) {
+
+ }
+ }
+
+ public void testAddParamterOpeartionlockedByAxisConfig(){
+ try {
+ Parameter para = new ParameterImpl();
+ para.setValue(null);
+ para.setName("PARA_NAME");
+ para.setLocked(true);
+ reg.addParameter(para);
+
+ ServiceDescription service = new ServiceDescription(new QName("Service1"));
+ reg.addService(service);
+ // service.setParent(reg);
+
+ OperationDescription opertion = new OperationDescription();
+ opertion.setParent(service);
+ opertion.addParameter(para);
+ fail("This should fails with Parmter is locked can not overide");
+
+
+ } catch (AxisFault axisFault) {
+
+ }
+ }
+
+ public void testAddParamterOpeartionLockebyService(){
+ try {
+ Parameter para = new ParameterImpl();
+ para.setValue(null);
+ para.setName("PARA_NAME");
+ para.setLocked(true);
+
+ ServiceDescription service = new ServiceDescription(new QName("Service1"));
+// service.setParent(reg);
+ reg.addService(service);
+ service.addParameter(para);
+
+ OperationDescription opertion = new OperationDescription();
+ opertion.setParent(service);
+ opertion.addParameter(para);
+ fail("This should fails with Parmter is locked can not overide");
+ } catch (AxisFault axisFault) {
+
+ }
+ }
+
+
+}
Propchange: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterAddTest.java
------------------------------------------------------------------------------
svn:eol-style = native