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/11/11 11:28:54 UTC
svn commit: r332508 - in /webservices/axis2/trunk/java/modules/core:
src/org/apache/axis2/deployment/
src/org/apache/axis2/deployment/repository/util/
src/org/apache/axis2/engine/ src/org/apache/axis2/util/
test-resources/deployment/hostConfigrepo/ tes...
Author: deepal
Date: Fri Nov 11 02:28:21 2005
New Revision: 332508
URL: http://svn.apache.org/viewcvs?rev=332508&view=rev
Log:
Improved axis2.xml to give host configuration , so that Axis2 will start Listners on depending on giving configuration
And fixing problems in JSPs
Added:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/HostConfiguration.java
webservices/axis2/trunk/java/modules/core/test-resources/deployment/hostConfigrepo/
webservices/axis2/trunk/java/modules/core/test-resources/deployment/hostConfigrepo/axis2.xml
webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml
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/engine/AxisConfiguration.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
webservices/axis2/trunk/java/modules/core/webapp/EngageToServiceGroup.jsp
webservices/axis2/trunk/java/modules/core/webapp/ListServiceGroup.jsp
webservices/axis2/trunk/java/modules/core/webapp/RemoveService.jsp
webservices/axis2/trunk/java/modules/core/webapp/ServiceParaEdit.jsp
webservices/axis2/trunk/java/modules/core/webapp/ViewServiceHandlers.jsp
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java Fri Nov 11 02:28:21 2005
@@ -17,6 +17,7 @@
package org.apache.axis2.deployment;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.HostConfiguration;
import org.apache.axis2.deployment.util.PhasesInfo;
import org.apache.axis2.description.ModuleConfiguration;
import org.apache.axis2.description.ParameterInclude;
@@ -36,7 +37,8 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
-public class AxisConfigBuilder extends DescriptionBuilder{
+
+public class AxisConfigBuilder extends DescriptionBuilder {
private AxisConfiguration axisConfiguration;
@@ -54,61 +56,64 @@
//Processing service level paramters
Iterator itr = config_element.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(itr,axisConfiguration,axisConfiguration);
+ processParameters(itr, axisConfiguration, axisConfiguration);
//process MessageReciver
Iterator msgRecives = config_element.getChildrenWithName(new QName(MESSAGERECEIVER));
while (msgRecives.hasNext()) {
OMElement msgRev = (OMElement) msgRecives.next();
- MessageReceiver msgrecivere= loadMessageReceiver(
- Thread.currentThread().getContextClassLoader(),msgRev);
+ MessageReceiver msgrecivere = loadMessageReceiver(
+ Thread.currentThread().getContextClassLoader(), msgRev);
OMAttribute mepAtt = msgRev.getAttribute(new QName(MEP));
- ((AxisConfigurationImpl)axisConfiguration).addMessageReceiver(
- mepAtt.getAttributeValue(),msgrecivere);
+ ((AxisConfigurationImpl) axisConfiguration).addMessageReceiver(
+ mepAtt.getAttributeValue(), msgrecivere);
}
//processing Dispatching Order
OMElement dispatch_order = config_element.getFirstChildWithName(
new QName(DIPSTCH_ORDER));
- if(dispatch_order !=null){
+ if (dispatch_order != null) {
processDispatchingOrder(dispatch_order);
log.info("found the custom disptaching order and continue with that order");
} else {
- ((AxisConfigurationImpl)axisConfiguration).setDefaultDispatchers();
+ ((AxisConfigurationImpl) axisConfiguration).setDefaultDispatchers();
log.info("no custom diaptching order found continue with default dispatcing order");
}
-
//Process Module refs
Iterator moduleitr = config_element.getChildrenWithName(
new QName(DeploymentConstants.MODULEST));
processModuleRefs(moduleitr);
// Proccessing Transport Sennders
- Iterator trs_senders = config_element.getChildrenWithName(new QName(TRANSPORTSENDER)) ;
+ Iterator trs_senders = config_element.getChildrenWithName(new QName(TRANSPORTSENDER));
processTransportSenders(trs_senders);
// Proccessing Transport Recivers
- Iterator trs_Reivers = config_element.getChildrenWithName(new QName(TRANSPORTRECEIVER)) ;
+ Iterator trs_Reivers = config_element.getChildrenWithName(new QName(TRANSPORTRECEIVER));
processTransportReceivers(trs_Reivers);
// Process Observers
- Iterator obs_ittr=config_element.getChildrenWithName(new QName(LISTENERST)) ;
+ Iterator obs_ittr = config_element.getChildrenWithName(new QName(LISTENERST));
processObservers(obs_ittr);
//processing Phase orders
- Iterator phaserders =config_element.getChildrenWithName(new QName(PHASE_ORDER)) ;
+ Iterator phaserders = config_element.getChildrenWithName(new QName(PHASE_ORDER));
processPhaseOrders(phaserders);
//processing Axis Storages
- OMElement storages = config_element.getFirstChildWithName(new QName(AXIS_STORAGE)) ;
+ OMElement storages = config_element.getFirstChildWithName(new QName(AXIS_STORAGE));
processAxisStorage(storages);
Iterator moduleConfigs = config_element.getChildrenWithName(new QName(MODULECONFIG));
- processModuleConfig(moduleConfigs,axisConfiguration,axisConfiguration);
-
+ processModuleConfig(moduleConfigs, axisConfiguration, axisConfiguration);
+ // setting host configuration
+ OMElement hostElement = config_element.getFirstChildWithName(new QName(HOST_CONFIG));
+ if (hostElement != null) {
+ processHostCongiguration(hostElement, axisConfiguration);
+ }
} catch (XMLStreamException e) {
throw new DeploymentException(e);
}
@@ -117,9 +122,9 @@
private void processDispatchingOrder(OMElement dispatch_order) throws DeploymentException {
Iterator dispatchers = dispatch_order.getChildrenWithName(new QName(DIPSTCHER));
- boolean foundDiaptcher= false;
+ boolean foundDiaptcher = false;
Phase dispatchPhae = new Phase(PhaseMetadata.PHASE_DISPATCH);
- int count =0;
+ int count = 0;
while (dispatchers.hasNext()) {
foundDiaptcher = true;
OMElement dispchter = (OMElement) dispatchers.next();
@@ -128,8 +133,8 @@
Class classInstance;
try {
classInstance = Class.forName(
- clssName,true,Thread.currentThread().getContextClassLoader());
- disptachClas =(AbstractDispatcher)classInstance.newInstance();
+ clssName, true, Thread.currentThread().getContextClassLoader());
+ disptachClas = (AbstractDispatcher) classInstance.newInstance();
disptachClas.initDispatcher();
disptachClas.getHandlerDesc().setParent(axisConfiguration);
dispatchPhae.addHandler(disptachClas, count);
@@ -143,27 +148,27 @@
}
}
- if(!foundDiaptcher){
+ if (!foundDiaptcher) {
throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.NO_DISPATCHER_FOUND));
- } else {
- ((AxisConfigurationImpl)axisConfiguration).setDispatchPhase(dispatchPhae);
+ } else {
+ ((AxisConfigurationImpl) axisConfiguration).setDispatchPhase(dispatchPhae);
}
}
private void processAxisStorage(OMElement storageElement) throws DeploymentException {
AxisStorage axisStorage;
- if(storageElement !=null){
- OMAttribute className = storageElement.getAttribute(new QName(CLASSNAME));
- if(className== null){
+ if (storageElement != null) {
+ OMAttribute className = storageElement.getAttribute(new QName(CLASSNAME));
+ if (className == null) {
throw new DeploymentException(Messages.getMessage(
DeploymentErrorMsgs.INVALID_STORGE_CLASS));
- } else {
- String classNameStr =className.getAttributeValue();
- Class stoarge ;
- if (classNameStr != null &&!"".equals(classNameStr)) {
+ } else {
+ String classNameStr = className.getAttributeValue();
+ Class stoarge;
+ if (classNameStr != null && !"".equals(classNameStr)) {
try {
- stoarge = Class.forName(classNameStr,true,
+ stoarge = Class.forName(classNameStr, true,
Thread.currentThread().getContextClassLoader());
axisStorage = (AxisStorage) stoarge.newInstance();
axisConfiguration.setAxisStorage(axisStorage);
@@ -171,7 +176,7 @@
// adding storage paramters
Iterator paramters = storageElement.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(paramters,axisStorage,axisConfiguration);
+ processParameters(paramters, axisStorage, axisConfiguration);
} catch (ClassNotFoundException e) {
@@ -194,14 +199,14 @@
}
- } else {
+ } else {
try {
//Default Storeg : org.apache.axis2.storage.impl.AxisMemoryStorage
- Class stoarge = Class.forName("org.apache.axis2.storage.impl.AxisMemoryStorage",true,
+ Class stoarge = Class.forName("org.apache.axis2.storage.impl.AxisMemoryStorage", true,
Thread.currentThread().getContextClassLoader());
axisStorage = (AxisStorage) stoarge.newInstance();
axisConfiguration.setAxisStorage(axisStorage);
- }catch (ClassNotFoundException e) {
+ } catch (ClassNotFoundException e) {
throw new DeploymentException
(Messages.getMessage(DeploymentErrorMsgs.CLASS_NOT_FOUND,
e.getMessage()));
@@ -220,20 +225,21 @@
/**
* To process all the phase orders which are defined in axis2.xml
+ *
* @param phaserders
*/
- private void processPhaseOrders(Iterator phaserders){
+ private void processPhaseOrders(Iterator phaserders) {
PhasesInfo info = engine.getPhasesinfo();
while (phaserders.hasNext()) {
OMElement phaseOrders = (OMElement) phaserders.next();
String flowType = phaseOrders.getAttribute(new QName(TYPE)).getAttributeValue();
- if(INFLOWST.equals(flowType)){
+ if (INFLOWST.equals(flowType)) {
info.setINPhases(getPhaseList(phaseOrders));
- } else if (IN_FAILTFLOW.equals(flowType)){
+ } else if (IN_FAILTFLOW.equals(flowType)) {
info.setIN_FaultPhases(getPhaseList(phaseOrders));
- } else if (OUTFLOWST.equals(flowType)){
+ } else if (OUTFLOWST.equals(flowType)) {
info.setOUTPhases(getPhaseList(phaseOrders));
- } else if (OUT_FAILTFLOW.equals(flowType)){
+ } else if (OUT_FAILTFLOW.equals(flowType)) {
info.setOUT_FaultPhases(getPhaseList(phaseOrders));
}
@@ -241,9 +247,9 @@
}
- private ArrayList getPhaseList(OMElement phaseOrders){
+ private ArrayList getPhaseList(OMElement phaseOrders) {
ArrayList phaselist = new ArrayList();
- Iterator phases = phaseOrders.getChildrenWithName(new QName(PHASE));
+ Iterator phases = phaseOrders.getChildrenWithName(new QName(PHASE));
while (phases.hasNext()) {
OMElement phase = (OMElement) phases.next();
phaselist.add(phase.getAttribute(new QName(ATTNAME)).getAttributeValue());
@@ -260,38 +266,37 @@
// getting trsnport Name
OMAttribute trsName = transport.getAttribute(
new QName(ATTNAME));
- if(trsName !=null){
+ if (trsName != null) {
String name = trsName.getAttributeValue();
transportout = new TransportOutDescription(new QName(name));
//tranport impl class
OMAttribute trsClas = transport.getAttribute(
new QName(CLASSNAME));
- if(trsClas == null){
+ if (trsClas == null) {
throw new DeploymentException(Messages.getMessage(
- DeploymentErrorMsgs.TRANSPORT_SENDER_ERROR,name));
+ DeploymentErrorMsgs.TRANSPORT_SENDER_ERROR, name));
}
String clasName = trsClas.getAttributeValue();
Class sender;
try {
- sender =Class.forName(clasName,true,
+ sender = Class.forName(clasName, true,
Thread.currentThread()
.getContextClassLoader());
TransportSender transportSender = (TransportSender) sender.newInstance();
transportout.setSender(transportSender);
-
//process Parameters
//processing Paramters
//Processing service level paramters
Iterator itr = transport.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(itr,transportout,axisConfiguration);
+ processParameters(itr, transportout, axisConfiguration);
//process INFLOW
OMElement inFlow = transport.getFirstChildWithName(
new QName(INFLOWST));
- if(inFlow !=null){
+ if (inFlow != null) {
throw new DeploymentException(
Messages.getMessage(
DeploymentErrorMsgs.INFLOW_NOT_ALLOWED_IN_TRS_OUT, name));
@@ -299,13 +304,13 @@
OMElement outFlow = transport.getFirstChildWithName(
new QName(OUTFLOWST));
- if(outFlow !=null){
- transportout.setOutFlow(processFlow(outFlow,axisConfiguration));
+ if (outFlow != null) {
+ transportout.setOutFlow(processFlow(outFlow, axisConfiguration));
}
OMElement inFaultFlow = transport.getFirstChildWithName(
new QName(IN_FAILTFLOW));
- if(inFaultFlow !=null){
+ if (inFaultFlow != null) {
throw new DeploymentException(
Messages.getMessage(
DeploymentErrorMsgs.INFLOW_NOT_ALLOWED_IN_TRS_OUT, name));
@@ -313,8 +318,8 @@
OMElement outFaultFlow = transport.getFirstChildWithName(
new QName(OUT_FAILTFLOW));
- if(outFaultFlow !=null){
- transportout.setFaultFlow(processFlow(outFaultFlow,axisConfiguration));
+ if (outFaultFlow != null) {
+ transportout.setFaultFlow(processFlow(outFaultFlow, axisConfiguration));
}
//adding to axis config
@@ -343,16 +348,16 @@
// getting trsnport Name
OMAttribute trsName = transport.getAttribute(
new QName(ATTNAME));
- if(trsName !=null){
+ if (trsName != null) {
String name = trsName.getAttributeValue();
transportIN = new TransportInDescription(new QName(name));
//tranport impl class
OMAttribute trsClas = transport.getAttribute(new QName(CLASSNAME));
- if(trsClas !=null) {
+ if (trsClas != null) {
try {
String clasName = trsClas.getAttributeValue();
- Class receiverClass =Class.forName(clasName,true,
+ Class receiverClass = Class.forName(clasName, true,
Thread.currentThread()
.getContextClassLoader());
TransportListener receiver = (TransportListener) receiverClass.newInstance();
@@ -372,12 +377,12 @@
//Processing service level paramters
Iterator itr = transport.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(itr,transportIN,axisConfiguration);
+ processParameters(itr, transportIN, axisConfiguration);
//process INFLOW
OMElement inFlow = transport.getFirstChildWithName(
new QName(INFLOWST));
- if(inFlow !=null){
+ if (inFlow != null) {
throw new DeploymentException(
Messages.getMessage(
DeploymentErrorMsgs.INFLOW_NOT_ALLOWED_IN_TRS_OUT, name));
@@ -385,19 +390,19 @@
OMElement outFlow = transport.getFirstChildWithName(
new QName(OUTFLOWST));
- if(outFlow !=null){
- transportIN.setInFlow( processFlow(outFlow,axisConfiguration));
+ if (outFlow != null) {
+ transportIN.setInFlow(processFlow(outFlow, axisConfiguration));
}
OMElement inFaultFlow = transport.getFirstChildWithName(
new QName(IN_FAILTFLOW));
- if(inFaultFlow !=null){
- transportIN.setFaultFlow(processFlow(inFaultFlow,axisConfiguration));
+ if (inFaultFlow != null) {
+ transportIN.setFaultFlow(processFlow(inFaultFlow, axisConfiguration));
}
OMElement outFaultFlow = transport.getFirstChildWithName(
new QName(OUT_FAILTFLOW));
- if(outFaultFlow !=null){
+ if (outFaultFlow != null) {
throw new DeploymentException(Messages.getMessage(
DeploymentErrorMsgs.OUTFLOW_NOT_ALLOWED_IN_TRS_IN, name));
}
@@ -413,8 +418,25 @@
}
}
+
+ private void processHostCongiguration(OMElement element, AxisConfiguration config) {
+ OMElement ipele = element.getFirstChildWithName(new QName("ip"));
+ String ip = null;
+ int port = -1;
+ if (ipele != null) {
+ ip = ipele.getText().trim();
+ }
+ OMElement portele = element.getFirstChildWithName(new QName("port"));
+ if (portele != null) {
+ port = Integer.parseInt(portele.getText().trim());
+ }
+ HostConfiguration hostconfig = new HostConfiguration(ip, port);
+ config.setHostConfiguration(hostconfig);
+ }
+
/**
* To process AxisObservers
+ *
* @param oservers
*/
private void processObservers(Iterator oservers) throws DeploymentException {
@@ -424,7 +446,7 @@
OMAttribute trsClas = observerelement.getAttribute(
new QName(CLASSNAME));
String clasName;
- if (trsClas !=null) {
+ if (trsClas != null) {
clasName = trsClas.getAttributeValue();
} else {
throw new DeploymentException(Messages.getMessage(
@@ -438,11 +460,11 @@
//Processing service level paramters
Iterator itr = observerelement.getChildrenWithName(
new QName(PARAMETERST));
- processParameters(itr,observer,axisConfiguration);
+ processParameters(itr, observer, axisConfiguration);
// initilization
observer.init();
- ((AxisConfigurationImpl)axisConfiguration).addObservers(observer);
+ ((AxisConfigurationImpl) axisConfiguration).addObservers(observer);
} catch (ClassNotFoundException e) {
throw new DeploymentException(e);
@@ -457,7 +479,8 @@
/**
* To get the list og modules that is requird to be engage globally
- * @param moduleRefs <code>java.util.Iterator</code>
+ *
+ * @param moduleRefs <code>java.util.Iterator</code>
*/
protected void processModuleRefs(Iterator moduleRefs) {
while (moduleRefs.hasNext()) {
@@ -469,22 +492,22 @@
}
}
- protected void processModuleConfig(Iterator moduleConfigs ,
+ protected void processModuleConfig(Iterator moduleConfigs,
ParameterInclude parent, AxisConfiguration config)
throws DeploymentException {
while (moduleConfigs.hasNext()) {
OMElement moduleConfig = (OMElement) moduleConfigs.next();
OMAttribute moduleName_att = moduleConfig.getAttribute(
new QName(ATTNAME));
- if(moduleName_att == null){
+ if (moduleName_att == null) {
throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
ModuleConfiguration moduleConfiguration =
- new ModuleConfiguration(new QName(module),parent);
- Iterator paramters= moduleConfig.getChildrenWithName(new QName(PARAMETERST));
- processParameters(paramters,moduleConfiguration,parent);
- ((AxisConfigurationImpl)config).addModuleConfig(moduleConfiguration);
+ new ModuleConfiguration(new QName(module), parent);
+ Iterator paramters = moduleConfig.getChildrenWithName(new QName(PARAMETERST));
+ processParameters(paramters, moduleConfiguration, parent);
+ ((AxisConfigurationImpl) config).addModuleConfig(moduleConfiguration);
}
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentConstants.java Fri Nov 11 02:28:21 2005
@@ -33,6 +33,7 @@
String HANDERST = "handler";
String MODULEST = "module";
String MODULECONFIG = "moduleConfig";
+ String HOST_CONFIG = "hostConfiguration";
String PHASEST = "phase";
String PHASE_ORDER = "phaseOrder";
String TYPEMAPPINGST = "typeMapping";// typeMapping start tag
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2.xml Fri Nov 11 02:28:21 2005
@@ -13,6 +13,10 @@
<parameter name="password" locked="false">axis2</parameter>
<parameter name="seralizeLocation" locked="false">.</parameter>
+ <hostConfiguration>
+ <ip>127.0.0.1</ip>
+ <port>5555</port>
+ </hostConfiguration>
@@ -22,10 +26,10 @@
<!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
-<!-- The way of adding listener to the system-->
-<!-- <listener class="org.apache.axis2.ObserverIMPL">-->
-<!-- <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
-<!-- </listener>-->
+ <!-- The way of adding listener to the system-->
+ <!-- <listener class="org.apache.axis2.ObserverIMPL">-->
+ <!-- <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+ <!-- </listener>-->
<!--Registering Axis Storage Class if you comment this default one will -->
<!--does the job (org.apache.axis2.storage.impl.AxisMemoryStorage) , if you-->
@@ -94,9 +98,9 @@
<!--Configuring module , providing paramters for modules whether they refer or not-->
<!--<moduleConfig name="addressing">-->
- <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+ <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
<!--</moduleConfig>-->
-
+
<!-- ================================================= -->
<!-- Phases -->
<!-- ================================================= -->
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=332508&r1=332507&r2=332508&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 Fri Nov 11 02:28:21 2005
@@ -101,13 +101,13 @@
WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
//removing binding
- Map bindings = wsdlVersionWrapper.getDefinition().getBindings();
- Iterator binfingIterator = bindings.keySet().iterator();
- while (binfingIterator.hasNext()) {
- Object o = binfingIterator.next();
- bindings.remove(o) ;
-
- }
+// Map bindings = wsdlVersionWrapper.getDefinition().getBindings();
+// Iterator binfingIterator = bindings.keySet().iterator();
+// while (binfingIterator.hasNext()) {
+// Object o = binfingIterator.next();
+// bindings.remove(o) ;
+//
+// }
Iterator iterator = womDescription.getServices().keySet()
.iterator();
if (iterator.hasNext()) {
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java Fri Nov 11 02:28:21 2005
@@ -17,6 +17,7 @@
package org.apache.axis2.engine;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.HostConfiguration;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.AxisServiceGroup;
import org.apache.axis2.description.ModuleDescription;
@@ -162,4 +163,8 @@
// the class loder that become the paranet of all the moduels
public ClassLoader getModuleClassLoader();
public void setModuleClassLoader(ClassLoader classLoader);
+
+ //to set and get host configuration
+ void setHostConfiguration(HostConfiguration hostConfiguration);
+ HostConfiguration getHostConfiguration();
}
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=332508&r1=332507&r2=332508&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 Fri Nov 11 02:28:21 2005
@@ -18,6 +18,7 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.InstanceDispatcher;
+import org.apache.axis2.util.HostConfiguration;
import org.apache.axis2.deployment.DeploymentEngine;
import org.apache.axis2.deployment.repository.util.ArchiveReader;
import org.apache.axis2.deployment.util.PhasesInfo;
@@ -53,6 +54,9 @@
private Hashtable faultyModules;
private Log log = LogFactory.getLog(getClass());
+ //to store hots configuration if any
+ HostConfiguration hostConfiguration;
+
/**
* Field modules
@@ -546,6 +550,15 @@
public void setModuleClassLoader(ClassLoader classLoader) {
this.moduleClassLoader = classLoader;
+ }
+
+ //to set and get host configuration
+ public void setHostConfiguration(HostConfiguration hostConfiguration) {
+ this.hostConfiguration = hostConfiguration;
+ }
+
+ public HostConfiguration getHostConfiguration() {
+ return this.hostConfiguration;
}
public void addObservers(AxisObserver axisObserver){
Added: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/HostConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/HostConfiguration.java?rev=332508&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/HostConfiguration.java (added)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/HostConfiguration.java Fri Nov 11 02:28:21 2005
@@ -0,0 +1,40 @@
+package org.apache.axis2.util;
+/*
+* 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 (deepal@apache.org)
+*
+*/
+
+
+//to keep infor getting from axis2.xml
+public class HostConfiguration {
+
+ private String ip;
+ private int port;
+
+ public HostConfiguration(String ip, int port) {
+ this.ip = ip;
+ this.port = port;
+ }
+
+ public String getIp() {
+ return ip;
+ }
+
+ public int getPort() {
+ return port;
+ }
+}
Added: webservices/axis2/trunk/java/modules/core/test-resources/deployment/hostConfigrepo/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/hostConfigrepo/axis2.xml?rev=332508&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/hostConfigrepo/axis2.xml (added)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/hostConfigrepo/axis2.xml Fri Nov 11 02:28:21 2005
@@ -0,0 +1,128 @@
+<axisconfig name="AxisJava2.0">
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <parameter name="hotdeployment" locked="false">true</parameter>
+ <parameter name="hotupdate" locked="false">false</parameter>
+ <parameter name="enableMTOM" locked="false">true</parameter>
+ <!-- Uncomment this to enable REST support -->
+ <!-- <parameter name="enableREST" locked="false">true</parameter>-->
+
+
+ <parameter name="userName" locked="false">admin</parameter>
+ <parameter name="password" locked="false">axis2</parameter>
+
+ <parameter name="seralizeLocation" locked="false">.</parameter>
+ <hostConfiguration>
+ <ip>127.0.0.1</ip>
+ <port>5555</port>
+ </hostConfiguration>
+
+
+
+ <!--if you want to extract the service archive file and work with that please uncomment this-->
+ <!--else , it wont extract archive file or does not take into consideration if someone drop-->
+ <!--exploded directory into /service directory-->
+ <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
+
+
+ <!-- The way of adding listener to the system-->
+ <!-- <listener class="org.apache.axis2.ObserverIMPL">-->
+ <!-- <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+ <!-- </listener>-->
+
+ <!--Registering Axis Storage Class if you comment this default one will -->
+ <!--does the job (org.apache.axis2.storage.impl.AxisMemoryStorage) , if you-->
+ <!--want to register new one write a class by extanding AbastractStorage-->
+ <!--and put that name here-->
+ <axisStorage class="org.apache.axis2.storage.impl.AxisMemoryStorage">
+ <parameter name="StoreLocation" locked="false">N:S</parameter>
+ </axisStorage>
+
+
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!-- This is the Deafult Message Receiver for the Request Response style Operations -->
+ <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+ <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
+ <parameter name="port" locked="false">6060</parameter>
+ </transportReceiver>
+
+ <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
+ <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
+ <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>
+ <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>
+ <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>
+ <parameter name="transport.mail.pop3.port" locked="false">110</parameter>
+ <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>
+ </transportReceiver> -->
+
+ <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+ <parameter name="port" locked="false">6060</parameter>
+ </transportReceiver>
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+ <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
+ <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ </transportSender>
+ <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ </transportSender>
+
+ <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
+ <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
+ <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
+ <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>
+ <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>
+ <parameter name="transport.mail.smtp.port" locked="false">25</parameter>
+ </transportSender>
+ -->
+
+ <!-- ================================================= -->
+ <!-- Global Modules -->
+ <!-- ================================================= -->
+
+
+ <!--Configuring module , providing paramters for modules whether they refer or not-->
+ <!--<moduleConfig name="addressing">-->
+ <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+ <!--</moduleConfig>-->
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="inflow">
+ <!-- System pre defined phases -->
+ <phase name="TransportIn"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch"/>
+ <phase name="PostDispatch"/>
+ <!-- System pre defined phases -->
+ <!-- After Postdispatch phase module author or or service author can add any phase he want -->
+ <phase name="userphase1"/>
+ </phaseOrder>
+ <phaseOrder type="outflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="userphase1"/>
+ </phaseOrder>
+ <phaseOrder type="INfaultflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="userphase1"/>
+ </phaseOrder>
+ <phaseOrder type="Outfaultflow">
+ <!-- user can add his own phases to this area -->
+ <phase name="userphase1"/>
+ </phaseOrder>
+</axisconfig>
+
Added: webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java?rev=332508&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java (added)
+++ webservices/axis2/trunk/java/modules/core/test/org/apache/axis2/deployment/HostCongigurationTest.java Fri Nov 11 02:28:21 2005
@@ -0,0 +1,51 @@
+package org.apache.axis2.deployment;
+
+import org.apache.axis2.AbstractTestCase;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.util.HostConfiguration;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.Flow;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisServiceGroup;
+import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+/*
+* 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 (deepal@apache.org)
+*
+*/
+
+public class HostCongigurationTest extends TestCase {
+ AxisConfiguration ar;
+ String repo ="./test-resources/deployment/hostConfigrepo";
+
+
+
+ protected void setUp() throws Exception {
+ ConfigurationContextFactory builder = new ConfigurationContextFactory();
+ ar = builder.buildConfigurationContext(repo).getAxisConfiguration();
+ }
+
+ public void testHostConfig() throws AxisFault {
+ HostConfiguration hc = ar.getHostConfiguration();
+ assertNotNull(hc);
+ assertEquals(5555,hc.getPort());
+ }
+}
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/core/webapp/EngageToServiceGroup.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/EngageToServiceGroup.jsp?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/EngageToServiceGroup.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/EngageToServiceGroup.jsp Fri Nov 11 02:28:21 2005
@@ -3,6 +3,7 @@
java.util.Collection,
java.util.HashMap" errorPage="" %>
<%@ page import="java.util.Iterator"%>
+<%@ page import="org.apache.axis2.description.ModuleDescription"%>
<jsp:include page="include/adminheader.jsp"></jsp:include>
<%
String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
Modified: webservices/axis2/trunk/java/modules/core/webapp/ListServiceGroup.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/ListServiceGroup.jsp?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/ListServiceGroup.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/ListServiceGroup.jsp Fri Nov 11 02:28:21 2005
@@ -5,8 +5,7 @@
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Iterator" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<jsp:include page="include/adminheader.jsp">
-</jsp:include>
+<jsp:include page="include/adminheader.jsp"/>
<h1>Available Service Groups</h1>
<%
Iterator axisServiceGroupIter = (Iterator) request.getSession().getAttribute(
@@ -44,5 +43,4 @@
}
}
%>
-<jsp:include page="include/adminfooter.jsp">
-</jsp:include>
\ No newline at end of file
+<jsp:include page="include/adminfooter.jsp"/>
\ No newline at end of file
Modified: webservices/axis2/trunk/java/modules/core/webapp/RemoveService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/RemoveService.jsp?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/RemoveService.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/RemoveService.jsp Fri Nov 11 02:28:21 2005
@@ -24,9 +24,9 @@
HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
Collection col = services.values();
for (Iterator iterator = col.iterator(); iterator.hasNext();) {
- AxisService axisServicesService) iterator.next();
- %> <option value="<%=axisServicee().getLocalPart()%>">
- <%=axisServicee().getLocalPart()%></option> <%
+ AxisService axisServices = (AxisService) iterator.next();
+ %> <option value="<%=axisServices.getName().getLocalPart()%>">
+ <%=axisServices.getName().getLocalPart()%></option> <%
}
%>
</td>
Modified: webservices/axis2/trunk/java/modules/core/webapp/ServiceParaEdit.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/ServiceParaEdit.jsp?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/ServiceParaEdit.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/ServiceParaEdit.jsp Fri Nov 11 02:28:21 2005
@@ -4,6 +4,8 @@
java.util.Collection,
java.util.HashMap,
java.util.Iterator"%>
+<%@ page import="org.apache.axis2.description.AxisService"%>
+<%@ page import="org.apache.axis2.description.Parameter"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="include/adminheader.jsp"></jsp:include>
<h1>Edit Service Parameters</h1>
Modified: webservices/axis2/trunk/java/modules/core/webapp/ViewServiceHandlers.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/webapp/ViewServiceHandlers.jsp?rev=332508&r1=332507&r2=332508&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/webapp/ViewServiceHandlers.jsp (original)
+++ webservices/axis2/trunk/java/modules/core/webapp/ViewServiceHandlers.jsp Fri Nov 11 02:28:21 2005
@@ -6,6 +6,7 @@
java.util.Collection,
java.util.HashMap,
java.util.Iterator"%>
+<%@ page import="org.apache.axis2.description.AxisService"%>
<%
/*
* Copyright 2004,2005 The Apache Software Foundation.