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 2006/03/22 06:30:26 UTC
svn commit: r387732 - in
/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2:
client/Options.java client/ServiceClient.java
deployment/ServiceBuilder.java engine/ListenerManager.java
Author: deepal
Date: Tue Mar 21 21:30:24 2006
New Revision: 387732
URL: http://svn.apache.org/viewcvs?rev=387732&view=rev
Log:
-fixing groovy test failier
-fixing addressing enable/disable using option property
-synchronize few methods in ListenerManager
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java?rev=387732&r1=387731&r2=387732&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java Tue Mar 21 21:30:24 2006
@@ -285,16 +285,6 @@
}
public void setAction(String action) {
- // setting addressing back on. This does not mean anything if addressing is engaged.
- // this is working only if addressing is engaged, as one might already set this off.
- // see ServiceClient(ConfigurationContext,AxisService).
-
- // first check whether this is a "probable" URI. Well the best thing to do is to use the URI
- // class itself. But its kinda slow, using a lazy method here
- if (action != null && action.indexOf(":") != -1) {
- this.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.FALSE);
- }
-
this.action = action;
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=387732&r1=387731&r2=387732&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java Tue Mar 21 21:30:24 2006
@@ -80,32 +80,34 @@
public ServiceClient(ConfigurationContext configContext,
AxisService axisService) throws AxisFault {
// create a config context if needed
+
initializeTransports(configContext);
// save the axisConfig and service
this.axisConfig = this.configContext.getAxisConfiguration();
this.axisService = (axisService != null) ? axisService
: createAnonymousService();
-
// add the service to the config context if it isn't in there already
if (this.axisConfig.getService(this.axisService.getName()) == null) {
this.axisConfig.addService(this.axisService);
}
+ // create a service context for myself: create a new service group
+ // context and then get the service context for myself as I'll need that
+ // later for stuff that I gotta do
+ ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
+ (AxisServiceGroup) this.axisService.getParent());
+ this.serviceContext = sgc.getServiceContext(this.axisService);
- // create a service context for myself: create a new service group
- // context and then get the service context for myself as I'll need that
- // later for stuff that I gotta do
- ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
- (AxisServiceGroup) this.axisService.getParent());
- this.serviceContext = sgc.getServiceContext(this.axisService);
-
- // if we are using anon case then we can not use addressing, as WS-A requires both
- // Action and To address to be present. In anon case, we might not have the action.
- // so switching addressing off now. But will be setting back on, if some one sets the action.
- // @see Options.setAction()
- if (axisService == null) serviceContext.setProperty(
- Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
+ // if we are using anon case then we can not use addressing, as WS-A requires both
+ // Action and To address to be present. In anon case, we might not have the action.
+ // so switching addressing off now. But will be setting back on, if some one sets the action.
+ // @see Options.setAction()
+ if (axisService == null) serviceContext.setProperty(
+ Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
}
+
+
+
/**
* This is WOM based constructor to configure the Service Client/
* We are going to make this policy aware
@@ -241,6 +243,17 @@
* Set the client configuration related to this service interaction.
*/
public void setOptions(Options options) {
+// setting addressing back on. This does not mean anything if addressing is engaged.
+ // this is working only if addressing is engaged, as one might already set this off.
+ // see ServiceClient(ConfigurationContext,AxisService).
+
+ // first check whether this is a "probable" URI. Well the best thing to do is to use the URI
+ // class itself. But its kinda slow, using a lazy method here
+ String action = options.getAction();
+ if (action != null && action.indexOf(":") != -1) {
+ options.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.FALSE);
+ }
+
this.options = options;
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=387732&r1=387731&r2=387732&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Tue Mar 21 21:30:24 2006
@@ -70,10 +70,15 @@
try {
Utils.fillAxisService(service, axisConfig);
} catch (Exception e) {
- //log.error(Messages.getMessage("errorinscheamgen", e.getMessage()),e);
- throw new DeploymentException(Messages.getMessage(
- "errorinscheamgen",
- e.getMessage()), e);
+ /**
+ * I have log here if some error occours , since service impl
+ * class can alos be non-java class , so in that case
+ * it is not posible to generate scheam, so no pint of throwing that
+ * error , I know we have to handle this , untill that I have
+ * to log this
+ * TODO : Pls fix this , you are doing worng this here : Deepal
+ */
+ log.error(Messages.getMessage("errorinscheamgen", e.getMessage()),e);
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java?rev=387732&r1=387731&r2=387732&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/ListenerManager.java Tue Mar 21 21:30:24 2006
@@ -100,7 +100,7 @@
try {
TransportInDescription tranportIn = (TransportInDescription) tranportNames.next();
TransportListener listener = tranportIn.getReceiver();
- if (listener != null) {
+ if (listener != null && startedTranports.get(tranportIn.getName().getLocalPart()) == null) {
listener.init(configctx, tranportIn);
listener.start();
if (startedTranports.get(tranportIn.getName().getLocalPart()) == null) {