You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by de...@apache.org on 2005/12/21 11:25:26 UTC

svn commit: r358256 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/ core/src/org/apache/axis2/client/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/deployment/repository/util/ ...

Author: deepal
Date: Wed Dec 21 02:25:05 2005
New Revision: 358256

URL: http://svn.apache.org/viewcvs?rev=358256&view=rev
Log:
 1. Modified OneWayRawXMLTest to work with serviceclient (rather that using Message Sender)
 2. Add a way to get the repository location from the system.getProperty("axis2home") in the client side , so if user want to set client side axis repo location set that first (System.setProperty("axis2home", clientHome)). Then by automatically FileSystemBasedConfigurationCreator will take the axishome as system property. 

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.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/repository/util/ArchiveReader.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutOnlyAxisOperation.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=358256&r1=358255&r2=358256&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Wed Dec 21 02:25:05 2005
@@ -72,6 +72,8 @@
      */
     public static final String APPLICATION_SCOPE = "application";
 
+    public static final String AXIS2_HOME = "axis2home";
+
     /**
      * Field TRANSPORT_TCP
      */

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=358256&r1=358255&r2=358256&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 Wed Dec 21 02:25:05 2005
@@ -1,22 +1,9 @@
 package org.apache.axis2.client;
 
-import java.net.URL;
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.client.async.Callback;
-import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.context.ServiceGroupContext;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.OutInAxisOperation;
-import org.apache.axis2.description.OutOnlyAxisOperation;
-import org.apache.axis2.description.RobustOutOnlyAxisOperation;
+import org.apache.axis2.context.*;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.om.OMAbstractFactory;
 import org.apache.axis2.om.OMElement;
@@ -25,6 +12,10 @@
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.axis2.soap.SOAPHeader;
 
+import javax.xml.namespace.QName;
+import java.net.URL;
+import java.util.ArrayList;
+
 /**
  * A ServiceClient class is used to create a client for a service. More details
  * need to be explained here.
@@ -62,53 +53,35 @@
      * If this service is already in the world that's handed in (in the form of
      * a ConfigurationContext) then I will happily work in it. If not I will
      * create a small little virtual world and live there.
-     * 
-     * @param configContext
-     *            The configuration context under which this service lives (may
-     *            be null, in which case a new local one will be created)
-     * @param service
-     *            The AxisService to create a client for. Must not be null; bad
-     *            things will happen if it is.
-     * @throws AxisFault
-     *             if something goes wrong while creating a config context (if
-     *             needed)
+     *
+     * @param configContext The configuration context under which this service lives (may
+     *                      be null, in which case a new local one will be created)
+     * @throws AxisFault if something goes wrong while creating a config context (if
+     *                   needed)
      */
-    public ServiceClient(ConfigurationContext configContext,
-            AxisService axisService) throws AxisFault {
+    public ServiceClient(ConfigurationContext configContext) throws AxisFault {
         // create a config context if needed
         this.configContext = (configContext != null) ? configContext
                 : createDefaultConfigurationContext();
         // add the service to the config context if it isn't in there already
-        AxisConfiguration axisConfig = this.configContext
-                .getAxisConfiguration();
-        if (axisConfig.getService(axisService.getName()) != null) {
-            axisConfig.addService(axisService);
-        }
-        this.axisService = axisService;
-        this.serviceContext = createServiceContext();
     }
 
     /**
      * Create a service client for WSDL service identified by the QName of the
      * wsdl:service element in a WSDL document.
-     * 
-     * @param configContext
-     *            The configuration context under which this service lives (may
-     *            be null, in which case a new local one will be created) *
-     * @param wsdlURL
-     *            The URL of the WSDL document to read
-     * @param wsdlServiceName
-     *            The QName of the WSDL service in the WSDL document to create a
-     *            client for
-     * @param portName
-     *            The name of the WSDL 1.1 port to create a client for. May be
-     *            null (if WSDL 2.0 is used or if only one port is there). .
-     * @throws AxisFault
-     *             if something goes wrong while creating a config context (if
-     *             needed)
+     *
+     * @param configContext   The configuration context under which this service lives (may
+     *                        be null, in which case a new local one will be created) *
+     * @param wsdlURL         The URL of the WSDL document to read
+     * @param wsdlServiceName The QName of the WSDL service in the WSDL document to create a
+     *                        client for
+     * @param portName        The name of the WSDL 1.1 port to create a client for. May be
+     *                        null (if WSDL 2.0 is used or if only one port is there). .
+     * @throws AxisFault if something goes wrong while creating a config context (if
+     *                   needed)
      */
     public ServiceClient(ConfigurationContext configContext, URL wsdlURL,
-            QName wsdlServiceName, String portName) throws AxisFault {
+                         QName wsdlServiceName, String portName) throws AxisFault {
         // TODO: Srinath to write this code :)
         throw new UnsupportedOperationException(
                 "ServiceClient currently does not support direct WSDL construction");
@@ -119,10 +92,19 @@
      * necessary information.
      */
     public ServiceClient() throws AxisFault {
+        this(null);
+    }
+
+    /**
+     * If the AxisService is null this will create an AnonymousService
+     *
+     * @return
+     */
+    private AxisService createAnonymousService() {
         // since I have not been created with real service metadata, let's
         // create an anonymous service and add myself to a newly created default
         // (and lonely) world where I'm the only service around
-        this(null, new AxisService(ANON_SERVICE));
+        axisService = new AxisService(ANON_SERVICE);
         // add anonymous operations as well for use with the shortcut client
         // API. NOTE: We only add the ones we know we'll use later; if you use
         // this constructor then you can't expect any magic!
@@ -130,6 +112,7 @@
                 ANON_ROBUST_OUT_ONLY_OP));
         axisService.addOperation(new OutOnlyAxisOperation(ANON_OUT_ONLY_OP));
         axisService.addOperation(new OutInAxisOperation(ANON_OUT_IN_OP));
+        return axisService;
     }
 
     /**
@@ -145,12 +128,15 @@
     /**
      * Create the service context for myself
      */
-    private ServiceContext createServiceContext() {
+    private void createServiceContext() {
+        if (axisService == null) {
+            axisService = getAxisService();
+        }
         // 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(configContext,
-                axisService.getParent());
-        return sgc.getServiceContext(axisService.getName());
+                getAxisService().getParent());
+        serviceContext = sgc.getServiceContext(getAxisService().getName());
     }
 
     /**
@@ -162,7 +148,7 @@
 
     /**
      * Get the client configuration from this service interaction.
-     * 
+     *
      * @return set of options set earlier.
      */
     public Options getOptions() {
@@ -173,9 +159,8 @@
      * Add an XML element as a header to be sent with interactions. This allows
      * users to go a bit beyond the dirt simple XML in/out pattern using this
      * simplified API. A header
-     * 
-     * @param header
-     *            The header to be added for interactions. Must not be null.
+     *
+     * @param header The header to be added for interactions. Must not be null.
      */
     public void addHeader(OMElement header) {
         if (headers == null) {
@@ -187,10 +172,10 @@
     /**
      * Add a simple header consisting of some text (and a header name; duh) to
      * be sent with interactions.
-     * 
-     * @see addHeader(OMElement)
+     *
      * @param headerName
      * @param headerText
+     * @see addHeader(OMElement)
      */
     public void addStringHeader(QName headerName, String headerText) {
         OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement(
@@ -205,16 +190,14 @@
      * possibly receive a fault. If you need more control over this interaction
      * then you need to create a client (@see createClient()) for the operation
      * and use that instead.
-     * 
-     * @param elem
-     *            The XML to send
-     * @throws AxisFault
-     *             if something goes wrong while sending it or if a fault is
-     *             received in response (per the Robust In-Only MEP).
+     *
+     * @param elem The XML to send
+     * @throws AxisFault if something goes wrong while sending it or if a fault is
+     *                   received in response (per the Robust In-Only MEP).
      */
     public void sendRobust(OMElement elem) throws AxisFault {
         // look up the appropriate axisop and create the client
-        OperationClient mepClient = axisService.getOperation(
+        OperationClient mepClient = getAxisService().getOperation(
                 ANON_ROBUST_OUT_ONLY_OP).createClient(serviceContext, options);
 
         // create a message context with elem as the payload
@@ -234,17 +217,18 @@
      * a service operation who's MEP is In-Only. That is, there is no
      * opportunity to get an error from the service via this API; one may still
      * get client-side errors, such as host unknown etc.
-     * 
-     * @param elem
-     *            The XML element to send to the service
-     * @throws AxisFault
-     *             If something goes wrong trying to send the XML
+     *
+     * @param elem The XML element to send to the service
+     * @throws AxisFault If something goes wrong trying to send the XML
      */
     public void fireAndForget(OMElement elem) throws AxisFault {
         // create a message context and put the payload in there along with any
         // headers
         MessageContext mc = new MessageContext();
-        mc.setServiceContext (serviceContext);
+        if (serviceContext == null) {
+            createServiceContext();
+        }
+        mc.setServiceContext(serviceContext);
         SOAPFactory sf = getSOAPFactory();
         SOAPEnvelope se = sf.getDefaultEnvelope();
         se.getBody().addChild(elem);
@@ -255,9 +239,10 @@
                 sh.addChild(headerBlock);
             }
         }
+        mc.setEnvelope(se);
 
         // look up the appropriate axisop and create the client
-        OperationClient mepClient = axisService.getOperation(ANON_OUT_ONLY_OP)
+        OperationClient mepClient = getAxisService().getOperation(ANON_OUT_ONLY_OP)
                 .createClient(serviceContext, options);
 
         // add the message context there and have it go
@@ -266,8 +251,11 @@
     }
 
     public OMElement sendReceive(OMElement elem) {
+        if (serviceContext == null) {
+            createServiceContext();
+        }
         // look up the appropriate axisop and create the client
-        OperationClient mepClient = axisService.getOperation(ANON_OUT_IN_OP)
+        OperationClient mepClient = getAxisService().getOperation(ANON_OUT_IN_OP)
                 .createClient(serviceContext, options);
         // TODO
         throw new UnsupportedOperationException(
@@ -275,8 +263,11 @@
     }
 
     public void sendReceiveNonblocking(OMElement elem, Callback callback) {
+        if (serviceContext == null) {
+            createServiceContext();
+        }
         // look up the appropriate axisop and create the client
-        OperationClient mepClient = axisService.getOperation(ANON_OUT_IN_OP)
+        OperationClient mepClient = getAxisService().getOperation(ANON_OUT_IN_OP)
                 .createClient(serviceContext, options);
         // TODO
         throw new UnsupportedOperationException(
@@ -290,14 +281,16 @@
      * you're doing and need the full capabilities of Axis2's client
      * architecture. This is meant for people with deep skin and not the light
      * user.
-     * 
-     * @param operation
-     *            The QName of the operation to create a client for.
+     *
+     * @param operation The QName of the operation to create a client for.
      * @return a MEP client configured to talk to the given operation or null if
      *         the operation name is not found.
      */
     public OperationClient createClient(QName operation) {
-        AxisOperation axisOp = axisService.getOperation(operation);
+        AxisOperation axisOp = getAxisService().getOperation(operation);
+        if (serviceContext == null) {
+            createServiceContext();
+        }
         return (axisOp == null) ? null : axisOp.createClient(serviceContext,
                 options);
     }
@@ -305,7 +298,7 @@
     /**
      * Return the SOAP factory to use depending on what options have been set
      * (or default to SOAP 1.1)
-     * 
+     *
      * @return the SOAP factory
      */
     private SOAPFactory getSOAPFactory() {
@@ -316,5 +309,25 @@
             // if its not SOAP 1.2 just assume SOAP 1.1
             return OMAbstractFactory.getSOAP11Factory();
         }
+    }
+
+    private AxisService getAxisService() {
+        if (axisService == null) {
+            axisService = createAnonymousService();
+            AxisConfiguration axisConfig = this.configContext
+                    .getAxisConfiguration();
+            if (axisConfig.getService(getAxisService().getName()) == null) {
+                try {
+                    axisConfig.addService(getAxisService());
+                } catch (AxisFault axisFault) {
+                    //todo : need to log this
+                }
+            }
+        }
+        return axisService;
+    }
+
+    public void setAxisService(AxisService axisService) {
+        this.axisService = axisService;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java?rev=358256&r1=358255&r2=358256&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContextFactory.java Wed Dec 21 02:25:05 2005
@@ -1,6 +1,7 @@
 package org.apache.axis2.context;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.deployment.DeploymentException;
 import org.apache.axis2.deployment.FileSystemConfigurationCreator;
 import org.apache.axis2.description.ModuleDescription;
@@ -49,6 +50,10 @@
      * @throws DeploymentException
      */
     public ConfigurationContext buildClientConfigurationContext(String axis2home) throws AxisFault {
+        if (axis2home == null) {
+            // if user has set the axis2 home variable try to get that from System properties
+            axis2home = System.getProperty(Constants.AXIS2_HOME);
+        }
         AxisConfigurationCreator repoBasedConfigCreator =
                 new FileSystemConfigurationCreator(axis2home, false);
         return getConfigurationContext(repoBasedConfigCreator);

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=358256&r1=358255&r2=358256&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 Dec 21 02:25:05 2005
@@ -202,8 +202,8 @@
     }
 
     public MessageContext(ConfigurationContext configContext,
-            TransportInDescription transportIn,
-            TransportOutDescription transportOut) {
+                          TransportInDescription transportIn,
+                          TransportOutDescription transportOut) {
         this(configContext, null, transportIn, transportOut);
         this.transportInName = transportIn.getName();
         this.transportOutname = transportOut.getName();
@@ -215,8 +215,8 @@
      * @param transportOut
      */
     public MessageContext(ConfigurationContext configContext,
-            SessionContext sessionContext, TransportInDescription transportIn,
-            TransportOutDescription transportOut) {
+                          SessionContext sessionContext, TransportInDescription transportIn,
+                          TransportOutDescription transportOut) {
         super(null);
 
         if (sessionContext == null) {
@@ -324,17 +324,16 @@
      * <p/> and the way of specifing module configuration is as follows
      * <moduleConfig name="addressing"> <parameter name="addressingPara"
      * locked="false">N/A</parameter> </moduleConfig>
-     * 
-     * @param key :
-     *            Parameter Name
+     *
+     * @param key        :
+     *                   Parameter Name
      * @param moduleName :
-     *            Name of the module
-     * @param handler
-     *            <code>HandlerDescription</code>
+     *                   Name of the module
+     * @param handler    <code>HandlerDescription</code>
      * @return Parameter <code>Parameter</code>
      */
     public Parameter getModuleParameter(String key, String moduleName,
-            HandlerDescription handler) {
+                                        HandlerDescription handler) {
         Parameter param;
         ModuleConfiguration moduleConfig;
 
@@ -447,7 +446,7 @@
      * <li> If parameter is not found or if axisService is null, search in
      * AxisConfiguration </li>
      * </ol>
-     * 
+     *
      * @param key
      * @return Parameter <code>Parameter</code>
      */
@@ -505,9 +504,8 @@
      * <li> If ServiceGroupContext is null or if property is not found, search
      * in ConfigurationContext.</li>
      * </ol>
-     * 
-     * @param key
-     *            property Name
+     *
+     * @param key property Name
      * @return Object
      */
     public Object getProperty(String key) {
@@ -771,7 +769,7 @@
      * causes the current handler/phase indexes to reset to 0, since we have new
      * Handlers to execute (this usually only happens at initialization and when
      * a fault occurs).
-     * 
+     *
      * @param executionChain
      */
     public void setExecutionChain(ArrayList executionChain) {
@@ -884,13 +882,17 @@
                 && (operationContext.getParent() != null)) {
             operationContext.setParent(context);
         }
-
+        //setting configcontext using configuration context in service context
+        if (configurationContext == null) {
+            //setting configcontext
+            configurationContext = context.getConfigurationContext();
+        }
         this.setAxisService(context.getAxisService());
     }
 
     /**
      * Sets the service context id.
-     * 
+     *
      * @param serviceContextID
      */
     public void setServiceContextID(String serviceContextID) {

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=358256&r1=358255&r2=358256&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 Wed Dec 21 02:25:05 2005
@@ -70,7 +70,8 @@
     // for parameters
     String ATTRIBUTE_NAME = "name";
     String ATTRIBUTE_LOCKED = "locked";
-    String PROPERTY_USER_HOME = "user.home";
+
+    String PROPERTY_TEMP_DIR = "java.io.tmpdir";
     String DIRECTORY_MODULES = "modules";
     String DIRECTORY_AXIS2_HOME = ".axis2home";
     String RESOURCE_MODULES = "modules/";

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=358256&r1=358255&r2=358256&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 Dec 21 02:25:05 2005
@@ -109,7 +109,7 @@
             int BUFFER = 2048;
 
             if (axis2repository == null) {
-                String userHome = System.getProperty(DeploymentConstants.PROPERTY_USER_HOME);
+                String userHome = System.getProperty(DeploymentConstants.PROPERTY_TEMP_DIR);
                 File userHomedir = new File(userHome);
                 File repository = new File(userHomedir, DIRECTORY_AXIS2_HOME);
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutOnlyAxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutOnlyAxisOperation.java?rev=358256&r1=358255&r2=358256&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutOnlyAxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutOnlyAxisOperation.java Wed Dec 21 02:25:05 2005
@@ -111,7 +111,7 @@
      * call execute() to execute the client. Note that the execute method's
      * block parameter is ignored by this client and also the setMessageReceiver
      * method cannot be used.
-     * 
+     *
      * @param sc
      *            The service context for this client to live within. Cannot be
      *            null.
@@ -155,7 +155,7 @@
      * Sets the options that should be used for this particular client. This
      * resets the entire set of options to use the new options - so you'd lose
      * any option cascading that may have been set up.
-     * 
+     *
      * @param options
      *            the options
      */
@@ -167,7 +167,7 @@
      * Return the options used by this client. If you want to set a single
      * option, then the right way is to do getOptions() and set specific
      * options.
-     * 
+     *
      * @return the options, which will never be null.
      */
     public Options getOptions() {
@@ -178,7 +178,7 @@
      * Add a message context to the client for processing. This method must not
      * process the message - it only records it in the MEP client. Processing
      * only occurs when execute() is called.
-     * 
+     *
      * @param mc
      *            the message context
      * @throws AxisFault
@@ -196,7 +196,7 @@
     /**
      * Return a message from the client - will return null if the requested
      * message is not available.
-     * 
+     *
      * @param messageLabel
      *            the message label of the desired message context
      * @return the desired message context or null if its not available.
@@ -217,7 +217,7 @@
      * notification that a message has been received by it. Exactly when its
      * executed and under what conditions is a function of the specific MEP
      * client.
-     * 
+     *
      * @param mr
      *            the message receiver
      */
@@ -233,7 +233,7 @@
      * MEP, then if the Out message has been set, then executing the client asks
      * it to send the message and get the In message, possibly using a different
      * thread.
-     * 
+     *
      * @param block
      *            Indicates whether execution should block or return ASAP. What
      *            block means is of course a function of the specific MEP
@@ -247,7 +247,7 @@
                     "MEP is already completed- need to reset() before re-executing.");
         }
         ConfigurationContext cc = sc.getConfigurationContext();
-        
+
         // copy interesting info from options to message context.
         ClientUtils.copyInfoFromOptionsToMessageContext(options, mc);
 
@@ -279,7 +279,7 @@
      * Reset the MEP client to a clean status after the MEP has completed. This
      * is how you can reuse a MEP client. NOTE: this does not reset the options;
      * only the internal state so the client can be used again.
-     * 
+     *
      * @throws AxisFault
      *             if reset is called before the MEP client has completed an
      *             interaction.

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java?rev=358256&r1=358255&r2=358256&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java Wed Dec 21 02:25:05 2005
@@ -22,6 +22,9 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.client.MessageSender;
 import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -81,13 +84,18 @@
 
         OMElement payload = TestingUtils.createDummyOMElement();
 
-        MessageSender sender = new MessageSender("target/test-resources/integrationRepo");
+//        MessageSender sender = new MessageSender("target/test-resources/integrationRepo");
+        ConfigurationContextFactory factory = new ConfigurationContextFactory();
+        ConfigurationContext configContext =
+                factory.buildClientConfigurationContext("target/test-resources/integrationRepo");
+        ServiceClient sender = new ServiceClient(configContext);
 
         Options options = new Options();
-        sender.setClientOptions(options);
+        sender.setOptions(options);
+//        sender.setClientOptions(options);
         options.setTo(targetEPR);
-
-        sender.send(operationName.getLocalPart(), payload);
+        sender.fireAndForget(payload);
+//        sender.send(operationName.getLocalPart(), payload);
         int index = 0;
         while (envelope == null) {
             Thread.sleep(4000);