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 de...@apache.org on 2005/09/14 11:26:58 UTC
svn commit: r280806 - in /webservices/axis2/trunk/java/modules:
core/src/org/apache/axis2/context/
core/src/org/apache/axis2/deployment/repository/util/
core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/
core/src/org/apache/axis2/...
Author: deepal
Date: Wed Sep 14 02:25:32 2005
New Revision: 280806
URL: http://svn.apache.org/viewcvs?rev=280806&view=rev
Log:
serviceGroup functionalities are completed , only build has to fix
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceGroupContext.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceGroupDescription.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java
webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadServiceXMLTest.java
webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ModuleConfigTest.java
webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterLocked.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunckedTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java Wed Sep 14 02:25:32 2005
@@ -19,6 +19,7 @@
*/
import org.apache.axis2.AxisFault;
+import org.apache.axis2.description.ServiceGroupDescription;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.storage.AxisStorage;
import org.apache.axis2.util.UUIDGenerator;
@@ -200,22 +201,34 @@
serviceGroupContext = (ServiceGroupContext) serviceGroupContextMap.get(serviceGroupContextId);
// check service context is there or not
+
+ //todo Chinthka : I think we do not need to do this
+ // ckecking here , inside ServiceGropContext I have done that , please take a look at taht
+
serviceContext = serviceGroupContext.getServiceContext(messageContext.getServiceDescription().getName().
getLocalPart());
- if (serviceContext == null) {
- serviceContext = new ServiceContext(messageContext.getServiceDescription(), serviceGroupContext);
- serviceGroupContext.registerServiceContext(serviceContext);
- }
+// if (serviceContext == null) {
+// serviceContext = new ServiceContext(messageContext.getServiceDescription(), serviceGroupContext);
+// serviceGroupContext.registerServiceContext(serviceContext);
+// }
} else {
// either the key is null or no SGC is found from the give key
if (isNull(serviceGroupContextId)) {
serviceGroupContextId = UUIDGenerator.getUUID();
messageContext.setServiceGroupContextId(serviceGroupContextId);
}
- serviceGroupContext = new ServiceGroupContext(this);
- this.registerServiceGroupContext(serviceGroupContext);
- serviceContext = new ServiceContext(messageContext.getServiceDescription(), serviceGroupContext);
- serviceGroupContext.registerServiceContext(serviceContext);
+ if(messageContext.getServiceDescription() !=null){
+ String servicName = messageContext.getServiceDescription().getName().getLocalPart();
+ ServiceGroupDescription servicGroupDescription =
+ this.getAxisConfiguration().getServiceGroup(servicName);
+ serviceGroupContext = servicGroupDescription.getServiceGroupContext(this);
+ serviceContext = serviceGroupContext.getServiceContext(
+ messageContext.getServiceDescription().getName().
+ getLocalPart());
+ this.registerServiceGroupContext(serviceGroupContext);
+ } else {
+ throw new AxisFault("ServiceDescription Not found yet");
+ }
}
// when you come here operation context MUST already been assigned to the message context
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java Wed Sep 14 02:25:32 2005
@@ -575,6 +575,9 @@
if (param == null && serviceContext != null) {
ServiceDescription serviceDesc = serviceContext.getServiceConfig();
param = serviceDesc.getParameter(key);
+ } if (param == null && serviceGroupContext != null) {
+ ServiceGroupDescription serviceDesc = serviceGroupContext.getDescription();
+ param = serviceDesc.getParameter(key);
}
if (param == null && configurationContext != null) {
AxisConfiguration baseConfig =
@@ -629,6 +632,17 @@
param = serviceDesc.getParameter(key);
}
}
+
+ if (param == null && serviceGroupContext != null) {
+ ServiceGroupDescription serviceDesc = serviceGroupContext.getDescription();
+ moduleConfig = serviceDesc.getModuleConfig(new QName(moduleName));
+ if(moduleConfig != null){
+ param = moduleConfig.getParameter(key);
+ }
+ if(param == null){
+ param = serviceDesc.getParameter(key);
+ }
+ }
if (param == null) {
AxisConfiguration baseConfig =
configurationContext.getAxisConfiguration();
@@ -680,6 +694,9 @@
//Search in ServiceContext
if(serviceContext != null && obj == null ){
obj = serviceContext.getProperty(key, persistent);
+ }
+ if(serviceGroupContext != null && obj == null ){
+ obj = serviceGroupContext.getProperty(key, persistent);
}
if(obj == null) {
// search in Configuration Context
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceGroupContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceGroupContext.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceGroupContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceGroupContext.java Wed Sep 14 02:25:32 2005
@@ -1,9 +1,13 @@
package org.apache.axis2.context;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.engine.AxisConfigurationImpl;
+import org.apache.axis2.description.ServiceGroupDescription;
+import org.apache.axis2.description.ServiceDescription;
import java.util.HashMap;
import java.util.Map;
+import java.util.Iterator;
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
@@ -30,9 +34,12 @@
private String id;
private Map serviceContextMap;
+ private ServiceGroupDescription description;
- public ServiceGroupContext(ConfigurationContext parent) {
+
+ public ServiceGroupContext(ConfigurationContext parent ,ServiceGroupDescription description) {
super(parent);
+ this.description = description;
serviceContextMap = new HashMap();
}
@@ -44,17 +51,40 @@
this.id = id;
}
+ //if the servic name is foo:bar , you should pass only bar
public ServiceContext getServiceContext(String serviceName) {
return (ServiceContext) serviceContextMap.get(serviceName);
}
- public void registerServiceContext(ServiceContext serviceContext) throws AxisFault {
- String serviceName = serviceContext.getServiceConfig().
- getName().getLocalPart();
- ServiceContext serviceContextAlreadyRegistered = (ServiceContext) serviceContextMap.get(serviceName);
- if (serviceContextAlreadyRegistered == null) {
- serviceContextMap.put(serviceName, serviceContext);
- serviceContext.setParent(this);
+ /**
+ * This will create one ServiceContext per each serviceDesc in descrpition
+ * if serviceGroup desc has 2 service init , then two serviceContext will be
+ * created
+ */
+ public void fillServiceContexts(){
+ Iterator services = description.getServices();
+ while (services.hasNext()) {
+ ServiceDescription serviceDescription = (ServiceDescription) services.next();
+ ServiceContext serviceContext = new ServiceContext(serviceDescription,this);
+ String [] servicNams = AxisConfigurationImpl.splitServiceName(
+ serviceDescription.getName().getLocalPart());
+ serviceContextMap.put(servicNams[1],serviceContext);
}
+ }
+
+
+
+// public void registerServiceContext(ServiceContext serviceContext) throws AxisFault {
+// String serviceName = serviceContext.getServiceConfig().
+// getName().getLocalPart();
+// ServiceContext serviceContextAlreadyRegistered = (ServiceContext) serviceContextMap.get(serviceName);
+// if (serviceContextAlreadyRegistered == null) {
+// serviceContextMap.put(serviceName, serviceContext);
+// serviceContext.setParent(this);
+// }
+// }
+
+ public ServiceGroupDescription getDescription() {
+ return description;
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Wed Sep 14 02:25:32 2005
@@ -195,6 +195,7 @@
if (entry.getName().equals(SERVICEXML)) {
foundServiceXML = true;
buildServiceGroup(zin, engine, serviceGroupDesc);
+ serviceGroupDesc.setServiceGroupName(engine.getCurrentFileItem().getName());
}
}
zin.close();
@@ -212,6 +213,7 @@
try {
in = new FileInputStream(file);
buildServiceGroup(in,engine,serviceGroupDesc);
+ serviceGroupDesc.setServiceGroupName(engine.getCurrentFileItem().getName());
} catch (FileNotFoundException e) {
throw new DeploymentException("FileNotFound : " + e);
} catch (XMLStreamException e) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceGroupDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceGroupDescription.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceGroupDescription.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ServiceGroupDescription.java Wed Sep 14 02:25:32 2005
@@ -2,6 +2,7 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.AxisEvent;
import org.apache.axis2.phaseresolver.PhaseResolver;
@@ -205,8 +206,9 @@
services.remove(name);
}
- public ServiceGroupContext getServiceGroupContext(){
- //TODO Deepal
- return null;
+ public ServiceGroupContext getServiceGroupContext(ConfigurationContext parent){
+ ServiceGroupContext serviceGroupContext = new ServiceGroupContext(parent,this) ;
+ serviceGroupContext.fillServiceContexts();
+ return serviceGroupContext;
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java Wed Sep 14 02:25:32 2005
@@ -349,7 +349,8 @@
}
public ServiceGroupDescription getServiceGroup(String serviceNameAndGroupString) {
- return (ServiceGroupDescription)serviceGroups.get(serviceNameAndGroupString);
+ String serviceGroup [] = splitServiceName(serviceNameAndGroupString);
+ return (ServiceGroupDescription)serviceGroups.get(serviceGroup[0]);
}
public Iterator getServiceGroups() {
@@ -371,20 +372,20 @@
/**
-<<<<<<< .mine
+ <<<<<<< .mine
* @return ArrayList
-=======
->>>>>>> .r280753
+ =======
+ >>>>>>> .r280753
*/
public ArrayList getInFaultFlow() {
return inFaultPhases;
}
/**
-<<<<<<< .mine
+ <<<<<<< .mine
* @return ArrayList
-=======
->>>>>>> .r280753
+ =======
+ >>>>>>> .r280753
*/
public ArrayList getOutFaultFlow() {
return outFaultPhases;
@@ -419,10 +420,10 @@
* Method getParameter
*
* @param name
-<<<<<<< .mine
+ <<<<<<< .mine
* @return Parameter
-=======
->>>>>>> .r280753
+ =======
+ >>>>>>> .r280753
*/
public Parameter getParameter(String name) {
return paramInclude.getParameter(name);
@@ -448,10 +449,10 @@
/**
* Method getEngadgedModules
*
-<<<<<<< .mine
+ <<<<<<< .mine
* @return Collection
-=======
->>>>>>> .r280753
+ =======
+ >>>>>>> .r280753
*/
public Collection getEngadgedModules() {
return engagedModules;
@@ -552,7 +553,7 @@
* @param serviceName
* @return String [] <code>String</code>
*/
- private String [] splitServiceName(String serviceName){
+ public static String [] splitServiceName(String serviceName){
String namePart [] = new String[2];
int index = serviceName.indexOf(Constants.SERVICE_NAME_SPLIT_CHAR);
if(index > 0){
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=280806&r1=280805&r2=280806&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 Wed Sep 14 02:25:32 2005
@@ -197,11 +197,11 @@
private static ServiceContext fillServiceContextAndServiceGroupContext(ServiceDescription serviceDesc, ConfigurationContext configurationContext) throws AxisFault {
String serviceGroupContextId = UUIDGenerator.getUUID();
- ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext);
+ ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext,serviceDesc.getParent());
+ serviceGroupContext.fillServiceContexts();
serviceGroupContext.setId(serviceGroupContextId);
configurationContext.registerServiceGroupContext(serviceGroupContext);
ServiceContext serviceContext = new ServiceContext(serviceDesc, serviceGroupContext);
- serviceGroupContext.registerServiceContext(serviceContext);
return serviceContext;
}
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/context/ContextHierarchyTest.java Wed Sep 14 02:25:32 2005
@@ -52,7 +52,7 @@
ConfigurationContext configurationContext =
new ConfigurationContext(axisConfiguration);
ServiceContext serviceCOntext =
- serviceDescription.getParent().getServiceGroupContext().getServiceContext(serviceDescription.getName().getLocalPart());
+ serviceDescription.getParent().getServiceGroupContext(configurationContext).getServiceContext(serviceDescription.getName().getLocalPart());
MessageContext msgctx =
new MessageContext(configurationContext);
OperationContext opContext =
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadServiceXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadServiceXMLTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadServiceXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/BadServiceXMLTest.java Wed Sep 14 02:25:32 2005
@@ -39,7 +39,7 @@
// DeploymentParser parser = new DeploymentParser(in, null);
ServiceDescription axisService = new ServiceDescription();
ServiceBuilder builder = new ServiceBuilder(in,null,axisService);
- builder.populateService();
+ builder.populateService(builder.buildOM());
// parser.parseServiceXML(axisService);
fail(
"this must failed gracefully with DeploymentException or FileNotFoundException");
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=280806&r1=280805&r2=280806&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 Wed Sep 14 02:25:32 2005
@@ -11,6 +11,7 @@
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;
@@ -76,7 +77,7 @@
// service.setParent(ar);
InputStream in = new FileInputStream(repo + "/service1.xml");
ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
- sbuilder.populateService();
+ sbuilder.populateService(sbuilder.buildOM());
ModuleConfiguration moduleConfiguration = service.getModuleConfig(new QName("Servie_module"));
assertNotNull(moduleConfiguration);
@@ -98,6 +99,8 @@
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) ;
}
}
}
Modified: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterLocked.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterLocked.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterLocked.java (original)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/engine/ParamterLocked.java Wed Sep 14 02:25:32 2005
@@ -9,6 +9,7 @@
import org.apache.axis2.description.ModuleDescription;
import org.apache.axis2.AxisFault;
+import javax.xml.stream.XMLStreamException;
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
@@ -55,7 +56,7 @@
// service.setParent(ar);
InputStream in = new FileInputStream(repo + "/service_overide_non_locked_para.xml");
ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
- sbuilder.populateService();
+ sbuilder.populateService(sbuilder.buildOM());
assertNotNull(sbuilder);
}catch (FileNotFoundException e) {
@@ -64,6 +65,8 @@
fail("This can not fail with this DeploymentException " + 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) ;
}
}
@@ -75,7 +78,7 @@
// service.setParent(ar);
InputStream in = new FileInputStream(repo + "/service_overide_locked_para.xml");
ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
- sbuilder.populateService();
+ sbuilder.populateService(sbuilder.buildOM());
assertNotNull(sbuilder);
fail("Parmter is locked can not overide" ) ;
}catch (FileNotFoundException e) {
@@ -84,6 +87,8 @@
} catch (AxisFault axisFault) {
fail("This can not fail with this AxisFault " + axisFault) ;
+ } catch (XMLStreamException e) {
+ fail("This can not fail with this AxisFault " + e) ;
}
}
@@ -95,7 +100,7 @@
// service.setParent(ar);
InputStream in = new FileInputStream(repo + "/op_overide_global_para.xml");
ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
- sbuilder.populateService();
+ sbuilder.populateService(sbuilder.buildOM());
assertNotNull(sbuilder);
fail("Parmter is locked can not overide" ) ;
}catch (FileNotFoundException e) {
@@ -104,6 +109,8 @@
} catch (AxisFault axisFault) {
fail("This can not fail with this AxisFault " + axisFault) ;
+ } catch (XMLStreamException e) {
+ fail("This can not fail with this AxisFault " + e) ;
}
}
@@ -115,7 +122,7 @@
// service.setParent(ar);
InputStream in = new FileInputStream(repo + "/Op_overide_Service_para.xml");
ServiceBuilder sbuilder = new ServiceBuilder(in,null,service);
- sbuilder.populateService();
+ sbuilder.populateService(sbuilder.buildOM());
fail("Parmter is locked can not overide" ) ;
}catch (FileNotFoundException e) {
fail("This can not fail with this FileNotFoundException " + e) ;
@@ -123,6 +130,8 @@
} catch (AxisFault axisFault) {
fail("This can not fail with this AxisFault " + axisFault) ;
+ } catch (XMLStreamException e) {
+ fail("This can not fail with this AxisFault " + e) ;
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunckedTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunckedTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunckedTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunckedTest.java Wed Sep 14 02:25:32 2005
@@ -23,6 +23,7 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.integration.TestingUtils;
import org.apache.axis2.integration.UtilServer;
@@ -54,6 +55,7 @@
private ServiceDescription service;
private boolean finish = false;
+ private ConfigurationContext config;
public EchoRawXMLChunckedTest() {
super(EchoRawXMLChunckedTest.class.getName());
@@ -64,14 +66,14 @@
}
protected void setUp() throws Exception {
- UtilServer.start(Constants.TESTING_PATH + "chuncked-enabledRepository");
+ config = UtilServer.start(Constants.TESTING_PATH + "chuncked-enabledRepository");
service =
Utils.createSimpleService(serviceName,
Echo.class.getName(),
operationName);
UtilServer.deployService(service);
serviceContext =
- service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java Wed Sep 14 02:25:32 2005
@@ -21,6 +21,7 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.integration.TestingUtils;
import org.apache.axis2.integration.UtilServer;
@@ -54,6 +55,8 @@
private boolean finish = false;
+ private ConfigurationContext config;
+
public EchoRawXMLOnTwoChannelsSyncTest() {
super(EchoRawXMLOnTwoChannelsSyncTest.class.getName());
}
@@ -63,7 +66,7 @@
}
protected void setUp() throws Exception {
- UtilServer.start();
+ config = UtilServer.start();
UtilServer.getConfigurationContext().getAxisConfiguration()
.engageModule(new QName("addressing"));
@@ -72,7 +75,7 @@
Echo.class.getName(),
operationName);
UtilServer.deployService(service);
- serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ serviceContext = service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java Wed Sep 14 02:25:32 2005
@@ -27,6 +27,7 @@
import org.apache.axis2.clientapi.Callback;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.integration.TestingUtils;
import org.apache.axis2.integration.UtilServer;
@@ -52,6 +53,7 @@
protected AxisConfiguration engineRegistry;
protected MessageContext mc;
+ private ConfigurationContext config;
//private Thread thisThread;
// private SimpleHTTPServer sas;
protected ServiceContext serviceContext;
@@ -68,14 +70,14 @@
}
protected void setUp() throws Exception {
- UtilServer.start();
+ config = UtilServer.start();
service =
Utils.createSimpleService(serviceName,
Echo.class.getName(),
operationName);
UtilServer.deployService(service);
serviceContext =
- service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/SOAPversionTest.java Wed Sep 14 02:25:32 2005
@@ -6,6 +6,7 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.util.MyInOutMEPClient;
import org.apache.axis2.integration.UtilServer;
@@ -55,6 +56,7 @@
"NullTransport");
private AxisConfiguration engineRegistry;
+ private ConfigurationContext config;
private MessageContext mc;
//private Thread thisThread;
// private SimpleHTTPServer sas;
@@ -64,14 +66,14 @@
private boolean finish = false;
protected void setUp() throws Exception {
- UtilServer.start();
+ config = UtilServer.start();
service =
Utils.createSimpleService(serviceName,
Echo.class.getName(),
operationName);
UtilServer.deployService(service);
serviceContext =
- service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java Wed Sep 14 02:25:32 2005
@@ -35,6 +35,7 @@
private static SimpleHTTPServer receiver;
public static final int TESTING_PORT = 5555;
public static final String FAILURE_MESSAGE = "Intentional Failure";
+ public static ConfigurationContext er ;
public static synchronized void deployService(ServiceDescription service) throws AxisFault {
receiver.getSystemContext().getAxisConfiguration().addService(service);
@@ -47,20 +48,20 @@
service.getLocalPart());
}
- public static synchronized void start() throws Exception {
- start(org.apache.axis2.Constants.TESTING_REPOSITORY);
+ public static synchronized ConfigurationContext start() throws Exception {
+ return start(org.apache.axis2.Constants.TESTING_REPOSITORY);
}
- public static synchronized void start(String repositry) throws Exception {
+ public static synchronized ConfigurationContext start(String repositry) throws Exception {
if (count == 0) {
ConfigurationContextFactory erfac = new ConfigurationContextFactory();
File file = new File(repositry);
if (!file.exists()) {
throw new Exception(
"repository directory " + file.getAbsolutePath() +
- " does not exists");
+ " does not exists");
}
- ConfigurationContext er = erfac.buildConfigurationContext(
+ er = erfac.buildConfigurationContext(
file.getAbsolutePath());
receiver = new SimpleHTTPServer(er, Constants.TESTING_PORT);
@@ -69,7 +70,7 @@
receiver.start();
System.out.print(
"Server started on port " + Constants.TESTING_PORT +
- ".....");
+ ".....");
} finally {
}
@@ -82,6 +83,7 @@
}
count++;
+ return er;
}
public static synchronized void stop() {
@@ -110,7 +112,7 @@
DeploymentEngine deploymentEngine = new DeploymentEngine();
File file = new File(
org.apache.axis2.Constants.TESTING_REPOSITORY +
- "/modules/addressing.mar");
+ "/modules/addressing.mar");
TestCase.assertTrue(file.exists());
ModuleDescription moduleDesc = deploymentEngine.buildModule(file);
@@ -123,9 +125,9 @@
sysContext.getAxisConfiguration().addService(service);
- return service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ return service.getParent().getServiceGroupContext(er).getServiceContext(service.getName().getLocalPart());
+
-
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java Wed Sep 14 02:25:32 2005
@@ -62,6 +62,7 @@
private SOAPEnvelope envelope;
private boolean finish = false;
+ private ConfigurationContext config;
public MailRequestResponseRawXMLTest() {
super(MailRequestResponseRawXMLTest.class.getName());
@@ -89,7 +90,7 @@
operationName);
configContext.getAxisConfiguration().addService(service);
Utils.resolvePhases(configContext.getAxisConfiguration(), service);
- ServiceContext serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ ServiceContext serviceContext = service.getParent().getServiceGroupContext(configContext).getServiceContext(service.getName().getLocalPart());
}
protected void tearDown() throws Exception {
@@ -122,7 +123,7 @@
service.addOperation(operation);
configContext.getAxisConfiguration().addService(service);
Utils.resolvePhases(configContext.getAxisConfiguration(), service);
- ServiceContext serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ ServiceContext serviceContext = service.getParent().getServiceGroupContext(configContext).getServiceContext(service.getName().getLocalPart());
org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(
serviceContext);
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMCommonsChunkingTest.java Wed Sep 14 02:25:32 2005
@@ -25,6 +25,7 @@
import org.apache.axis2.attachments.utils.ImageDataSource;
import org.apache.axis2.attachments.utils.ImageIO;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.Echo;
import org.apache.axis2.integration.UtilServer;
@@ -42,8 +43,8 @@
public class EchoRawMTOMCommonsChunkingTest extends TestCase {
private EndpointReference targetEPR = new EndpointReference("http://127.0.0.1:"
- + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
+ + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
private Log log = LogFactory.getLog(getClass());
@@ -58,6 +59,7 @@
private OMElement data;
private boolean finish = false;
+ private ConfigurationContext config;
public EchoRawMTOMCommonsChunkingTest() {
super(EchoRawMTOMCommonsChunkingTest.class.getName());
@@ -68,11 +70,11 @@
}
protected void setUp() throws Exception {
- UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
+ config = UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
service = Utils.createSimpleService(serviceName, Echo.class.getName(),
operationName);
UtilServer.deployService(service);
- serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ serviceContext = service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
protected void tearDown() throws Exception {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheLoadTest.java Wed Sep 14 02:25:32 2005
@@ -18,6 +18,7 @@
import org.apache.axis2.Constants;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.Echo;
import org.apache.axis2.integration.UtilServer;
@@ -37,6 +38,7 @@
private ServiceContext serviceContext;
private ServiceDescription service;
+ private ConfigurationContext config;
public EchoRawMTOMFileCacheLoadTest() {
super(EchoRawMTOMFileCacheLoadTest.class.getName());
@@ -47,11 +49,11 @@
}
protected void setUp() throws Exception {
- UtilServer.start(Constants.TESTING_PATH + "MTOM-fileCache-enabledRepository");
+ config = UtilServer.start(Constants.TESTING_PATH + "MTOM-fileCache-enabledRepository");
service = Utils.createSimpleService(serviceName, Echo.class.getName(),
operationName);
UtilServer.deployService(service);
- serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ serviceContext = service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
protected void tearDown() throws Exception {
@@ -59,7 +61,7 @@
UtilServer.stop();
}
-
+
public void testEchoXMLSync() throws Exception {
super.testEchoXMLSync();
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFileCacheTest.java Wed Sep 14 02:25:32 2005
@@ -18,6 +18,7 @@
import org.apache.axis2.Constants;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.Echo;
import org.apache.axis2.integration.UtilServer;
@@ -37,6 +38,8 @@
private ServiceContext serviceContext;
private ServiceDescription service;
+
+ private ConfigurationContext config;
public EchoRawMTOMFileCacheTest() {
super(EchoRawMTOMFileCacheTest.class.getName());
@@ -47,11 +50,11 @@
}
protected void setUp() throws Exception {
- UtilServer.start(Constants.TESTING_PATH + "MTOM-fileCache-enabledRepository");
+ config =UtilServer.start(Constants.TESTING_PATH + "MTOM-fileCache-enabledRepository");
service = Utils.createSimpleService(serviceName, Echo.class.getName(),
operationName);
UtilServer.deployService(service);
- serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ serviceContext = service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
protected void tearDown() throws Exception {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java Wed Sep 14 02:25:32 2005
@@ -24,6 +24,7 @@
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.Echo;
import org.apache.axis2.integration.UtilServer;
@@ -52,11 +53,12 @@
private ServiceContext serviceContext;
private ServiceDescription service;
-
+
private OMText textData;
-
+
byte[] expectedByteArray;
+ private ConfigurationContext config;
public EchoRawMTOMLoadTest() {
super(EchoRawMTOMLoadTest.class.getName());
@@ -67,11 +69,11 @@
}
protected void setUp() throws Exception {
- UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
+ config = UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
service = Utils.createSimpleService(serviceName, Echo.class.getName(),
operationName);
UtilServer.deployService(service);
- serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ serviceContext = service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
protected void tearDown() throws Exception {
@@ -86,15 +88,15 @@
OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs);
OMElement data = fac.createOMElement("data", omNs);
expectedByteArray = new byte[]{13, 56, 65, 32, 12, 12, 7, -3, -2, -1,
- 98};
+ 98};
for (int i = 0; i < 4; i++) {
OMElement subData = fac.createOMElement("subData", omNs);
DataHandler dataHandler = new DataHandler("Thilina","text/plain");
- //new ByteArrayDataSource(expectedByteArray));
+ //new ByteArrayDataSource(expectedByteArray));
textData = new OMTextImpl(dataHandler, true);
subData.addChild(textData);
data.addChild(subData);
-
+
}
rpcWrapEle.addChild(data);
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/processingModel/SoapProcessingModelTest.java Wed Sep 14 02:25:32 2005
@@ -25,6 +25,7 @@
import org.apache.axis2.clientapi.InOutMEPClient;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.ServiceDescription;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.Echo;
@@ -44,9 +45,9 @@
public class SoapProcessingModelTest extends TestCase {
private EndpointReference targetEPR =
- new EndpointReference("http://127.0.0.1:"
- + (UtilServer.TESTING_PORT)
- + "/axis/services/EchoXMLService/echoOMElement");
+ new EndpointReference("http://127.0.0.1:"
+ + (UtilServer.TESTING_PORT)
+ + "/axis/services/EchoXMLService/echoOMElement");
private Log log = LogFactory.getLog(getClass());
private QName serviceName = new QName("EchoXMLService");
private QName operationName = new QName("echoOMElement");
@@ -57,6 +58,8 @@
private ServiceContext serviceContext;
private ServiceDescription service;
+ private ConfigurationContext config;
+
private boolean finish = false;
public SoapProcessingModelTest() {
@@ -68,11 +71,11 @@
}
protected void setUp() throws Exception {
- UtilServer.start();
+ config= UtilServer.start();
service = Utils.createSimpleService(serviceName, Echo.class.getName(), operationName);
UtilServer.deployService(service);
serviceContext =
- service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}
@@ -80,12 +83,12 @@
UtilServer.unDeployService(serviceName);
UtilServer.stop();
}
-
-
+
+
public void sendMessageWithHeader(SOAPEnvelope envelope) throws AxisFault{
InOutMEPClient inOutMC;
ServiceContext serviceContext =
- service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
inOutMC = new InOutMEPClient(serviceContext);
try{
MessageContext msgctx = new MessageContext(serviceContext.getEngineContext());
@@ -96,9 +99,9 @@
inOutMC.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
MessageContext result =
- inOutMC.invokeBlocking(
- serviceContext.getServiceConfig().getOperation(operationName),
- msgctx);
+ inOutMC.invokeBlocking(
+ serviceContext.getServiceConfig().getOperation(operationName),
+ msgctx);
}finally{
inOutMC.close();
}
@@ -125,7 +128,7 @@
SOAPEnvelope envelope = fac.getDefaultEnvelope();
OMNamespace headerNs = fac.createOMNamespace("http://dummyHeader", "dh");
SOAPHeaderBlock h1 =
- fac.createSOAPHeaderBlock("DummyHeader", headerNs, envelope.getHeader());
+ fac.createSOAPHeaderBlock("DummyHeader", headerNs, envelope.getHeader());
h1.setMustUnderstand(true);
h1.addChild(fac.createText("Dummy String"));
h1.setRole("http://myOwnRole");
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rest/RESTBasedEchoRawXMLTest.java Wed Sep 14 02:25:32 2005
@@ -22,6 +22,7 @@
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.ParameterImpl;
import org.apache.axis2.description.ServiceDescription;
@@ -65,6 +66,7 @@
private Thread thread;
private final MessageInformation messageInfo = new MessageInformation();
+ private ConfigurationContext config;
public RESTBasedEchoRawXMLTest() {
super(RESTBasedEchoRawXMLTest.class.getName());
@@ -75,7 +77,7 @@
}
protected void setUp() throws Exception {
- UtilServer.start();
+ config = UtilServer.start();
Parameter parameter = new ParameterImpl(
Constants.Configuration.ENABLE_REST, "true");
UtilServer.getConfigurationContext()
@@ -86,7 +88,7 @@
operationName);
UtilServer.deployService(service);
serviceContext =
- service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
//
// Runnable runnable = new Runnable() {
// public void run() {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java?rev=280806&r1=280805&r2=280806&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java Wed Sep 14 02:25:32 2005
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
import org.apache.axis2.Constants;
import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.description.OperationDescription;
import org.apache.axis2.description.ParameterImpl;
import org.apache.axis2.description.ServiceDescription;
@@ -50,7 +51,7 @@
private QName serviceName = new QName("EchoSwAService");
private QName operationName = new QName("echoAttachment");
-
+
private ServiceContext serviceContext;
private ServiceDescription service;
@@ -58,6 +59,7 @@
private boolean finish = false;
private OMTextImpl expectedTextData;
+ private ConfigurationContext config;
public EchoRawSwATest() {
super(EchoRawSwATest.class.getName());
@@ -68,7 +70,7 @@
}
protected void setUp() throws Exception {
- UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
+ config = UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
service = new ServiceDescription(serviceName);
service.setClassLoader(Thread.currentThread().getContextClassLoader());
service.addParameter(new ParameterImpl(
@@ -79,7 +81,7 @@
axisOp.setStyle(WSDLService.STYLE_DOC);
service.addOperation(axisOp);
UtilServer.deployService(service);
- serviceContext = service.getParent().getServiceGroupContext().getServiceContext(service.getName().getLocalPart());
+ serviceContext = service.getParent().getServiceGroupContext(config).getServiceContext(service.getName().getLocalPart());
}