ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cha...@apache.org
Subject svn commit: r398955 - /webservices/axis2/trunk/java/xdocs/latest/mail-configuration.html
Date Tue, 02 May 2006 15:04:44 GMT
Author: chamil
Date: Tue May  2 08:03:19 2006
New Revision: 398955

URL: http://svn.apache.org/viewcvs?rev=398955&view=rev
Log:
Fixing the mail configuration document.

Modified:
    webservices/axis2/trunk/java/xdocs/latest/mail-configuration.html

Modified: webservices/axis2/trunk/java/xdocs/latest/mail-configuration.html
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/xdocs/latest/mail-configuration.html?rev=398955&r1=398954&r2=398955&view=diff
==============================================================================
--- webservices/axis2/trunk/java/xdocs/latest/mail-configuration.html (original)
+++ webservices/axis2/trunk/java/xdocs/latest/mail-configuration.html Tue May  2 08:03:19
2006
@@ -97,14 +97,29 @@
 <h2>Using Mail Transport in the Client Side</h2>
 
 <p>Following code segment shows how to send a oneway SOAP message using the
-mail transport, this need the Transport Sender configured.</p>
-<source><pre>OMElement payload = ....
+mail transport, this needs the Transport Sender configured.</p>
+<source><pre>        OMElement payload = ....
 
-MessageSender sender = new MessageSender(serviceContext);
-sender.setTo(targetEPR);
-sender.setSenderTransport(Constants.TRANSPORT_MAIL);
+        AxisService service = new AxisService(serviceName.getLocalPart());
+        AxisOperation axisOperation = new OutOnlyAxisOperation(
+        );
+        axisOperation.setName(operationName);
+        axisOperation.setMessageReceiver(new MessageReceiver() {
+            public void receive(MessageContext messageCtx) {
+                envelope = messageCtx.getEnvelope();
+            }
+        });
+        service.addOperation(axisOperation);
+        //configContext.getAxisConfiguration().addService(service);
 
-sender.send(operationName.getLocalPart(), payload);</pre>
+        ServiceClient servicClient = new ServiceClient(clientConfigContext, service);
+
+        Options options = new Options();
+        options.setTo(targetEPR);
+
+        servicClient.setOptions(options);
+
+        servicClient.fireAndForget(operationName, payload);</pre>
 </source><a name="james"></a>
 
 <h2>Configure James as SMTP and POP Server</h2>



Mime
View raw message