Hi all,
I have updated the userguide - client samples. Please someone apply this
patch.
1. EchoBlockingClinent
2. EchoNonBlockingClient
3. EchoBlockingDuelClient
4. EchoNonBlockingDuelClient
5. ClientForWebServiceWithModule
In addtion to this, added new sample for Client side module engagement.
1. ClientSideModuleEngagement
Thanks
Saminda
Index: clients/EchoNonBlockingClient.java
===================================================================
--- clients/EchoNonBlockingClient.java (revision 226955)
+++ clients/EchoNonBlockingClient.java (working copy)
@@ -21,7 +21,7 @@
* Time: 5:08:44 PM
*/
public class EchoNonBlockingClient {
- private static EndpointReference targetEPR = new
EndpointReference("http://127.0.0.1:8080/axis2/services/MyService/echo");
+ private static EndpointReference targetEPR = new
EndpointReference("http://127.0.0.1:8070/axis2/services/MyService/echo");
public static void main(String[] args) {
try {
@@ -41,6 +41,7 @@
result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance()
.createXMLStreamWriter(writer));
writer.flush();
+ System.out.println(writer.toString());
} catch (XMLStreamException e) {
Index: clients/ClientForWebServiceWithModule.java
===================================================================
--- clients/ClientForWebServiceWithModule.java (revision 226955)
+++ clients/ClientForWebServiceWithModule.java (working copy)
@@ -48,6 +48,7 @@
result.serializeWithCache(XMLOutputFactory.newInstance()
.createXMLStreamWriter(writer));
writer.flush();
+ System.out.println(writer.toString());
} catch (AxisFault axisFault) {
Index: clients/EchoBlockingClient.java
===================================================================
--- clients/EchoBlockingClient.java (revision 226955)
+++ clients/EchoBlockingClient.java (working copy)
@@ -48,6 +48,7 @@
.createXMLStreamWriter(writer));
writer.flush();
+ System.out.println(writer.toString());
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
Index: clients/EchoNonBlockingDualClient.java
===================================================================
--- clients/EchoNonBlockingDualClient.java (revision 226955)
+++ clients/EchoNonBlockingDualClient.java (working copy)
@@ -46,6 +46,7 @@
result.getResponseEnvelope().serializeWithCache(XMLOutputFactory.newInstance()
.createXMLStreamWriter(writer));
writer.flush();
+ System.out.println(writer.toString());
} catch (XMLStreamException e) {
Index: clients/EchoBlockingDualClient.java
===================================================================
--- clients/EchoBlockingDualClient.java (revision 226955)
+++ clients/EchoBlockingDualClient.java (working copy)
@@ -42,6 +42,7 @@
result.serializeWithCache(XMLOutputFactory.newInstance()
.createXMLStreamWriter(writer));
writer.flush();
+ System.out.println(writer.toString());
//Need to close the Client Side Listener.
package userguide.clients;
import org.apache.axis2.clientapi.Call;
import javax.xml.namespace.QName;
import java.io.File;
import java.io.FileNotFoundException;
/**
* Created by IntelliJ IDEA.
* User: saminda
* Date: Aug 1, 2005
* Time: 1:40:23 PM
* To change this template use File | Settings | File Templates.
*/
public class ClientSideModuleEngagement {
public static void main(String[] args) throws Exception{
String home = System.getProperty("user.home");
// create this folder at your home. This folder could be anything
//then create the "modules" folder
File repository = new File(home+File.separator+"client-repository");
if (!repository.exists()) {
throw new FileNotFoundException("Repository Doesnot Exist");
}
//copy the LoggingModule.mar to "modules" folder.
//then modify the axis2.xml that is generating there according to
//phases that being included in the "module.xml"
Call call = new Call(repository.getAbsolutePath());
call.engageModule(new QName("LoggingModule"));
}
}