axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jal...@apache.org
Subject svn commit: r188774 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/clientapi/ samples/src/userguide/clients/ samples/src/userguide/example1/ samples/src/userguide/example2/
Date Tue, 07 Jun 2005 14:05:06 GMT
Author: jaliya
Date: Tue Jun  7 07:05:03 2005
New Revision: 188774

URL: http://svn.apache.org/viewcvs?rev=188774&view=rev
Log: (empty)

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
    webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
    webservices/axis/trunk/java/modules/samples/src/userguide/example1/MyService.java
    webservices/axis/trunk/java/modules/samples/src/userguide/example2/MyService.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java?rev=188774&r1=188773&r2=188774&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Call.java Tue Jun
 7 07:05:03 2005
@@ -67,10 +67,19 @@
 
         OperationDescription axisConfig =
             serviceContext.getServiceConfig().getOperation(new QName(axisop));
-        if (axisConfig == null) {
+         if (axisConfig == null) {
             axisConfig = new OperationDescription(new QName(axisop));
+            axisConfig.setRemainingPhasesInFlow(opreationTemplate.getRemainingPhasesInFlow());
+            axisConfig.setPhasesOutFlow(opreationTemplate.getPhasesOutFlow());
+            axisConfig.setPhasesInFaultFlow(opreationTemplate.getPhasesInFaultFlow());
+            axisConfig.setPhasesOutFaultFlow(opreationTemplate.getPhasesOutFaultFlow());
             serviceContext.getServiceConfig().addOperation(axisConfig);
         }
+
+//        if (axisConfig == null) {
+//            axisConfig = new OperationDescription(new QName(axisop));
+//            serviceContext.getServiceConfig().addOperation(axisConfig);
+//        }
         MessageContext msgctx = prepareTheSystem(toSend);
 
         MessageContext responseContext = super.invokeBlocking(axisConfig, msgctx);

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java?rev=188774&r1=188773&r2=188774&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/InOutMEPClient.java
Tue Jun  7 07:05:03 2005
@@ -120,7 +120,7 @@
             SyncCallBack callback = new SyncCallBack();
             invokeNonBlocking(axisop, msgctx, callback);
             int index = 0;
-            while (!callback.hasResult()) {
+            while (!callback.isComplete()) {
                 if (index < 20) {
                     try {
                         Thread.sleep(100);
@@ -385,9 +385,9 @@
         public void reportError(Exception e) {
             error = e;
         }
-        public boolean hasResult() {
-            return envelope != null || error != null;
-        }
+//        public boolean hasResult() {
+//            return envelope != null || error != null;
+//        }
     }
 
     public void engageModule(QName moduleName) throws AxisFault {

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java?rev=188774&r1=188773&r2=188774&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
(original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/ClientForWebServiceWithModule.java
Tue Jun  7 07:05:03 2005
@@ -29,7 +29,7 @@
 
 public class ClientForWebServiceWithModule {
     private static EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO,
-            "http://127.0.0.1:8080/axis2/services/WebServiceWithModule/echo");
+            "http://127.0.0.1:8080/axis2/services/MyServiceWithModule/echo");
 
     public static void main(String[] args) {
         try {

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java?rev=188774&r1=188773&r2=188774&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
(original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/clients/EchoBlockingDualClient.java
Tue Jun  7 07:05:03 2005
@@ -8,6 +8,8 @@
 import org.apache.axis.om.OMElement;
 
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+import java.io.StringWriter;
 
 /**
  * Created by IntelliJ IDEA.
@@ -31,8 +33,14 @@
             call.engageModule(new QName(Constants.MODULE_ADDRESSING));
             call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, true);
 
-            //Non-Blocking Invocation
-            call.invokeBlocking("echo", payload);
+            //Blocking Invocation
+            OMElement result = (OMElement) call.invokeBlocking("echo", payload);
+
+            StringWriter writer = new StringWriter();
+            result.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
+            writer.flush();
+
+            System.out.println(writer.toString());
 
             //Need to close the Client Side Listener.
             call.close();

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/example1/MyService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/example1/MyService.java?rev=188774&r1=188773&r2=188774&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/example1/MyService.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/example1/MyService.java Tue
Jun  7 07:05:03 2005
@@ -14,23 +14,17 @@
  */
 public class MyService {
     public OMElement echo(OMElement element) throws XMLStreamException {
-
-        StringWriter writer = new StringWriter();
-        element.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
-        writer.flush();
-
-        System.out.println(writer.toString());
-
-        element.getNextSibling();
+        //Praparing the OMElement so that it can be attached to another OM Tree.
+        //First the OMElement should be completely build in case it is not fully built and
still
+        //some of the xml is in the stream.
+        element.build();
+        //Secondly the OMElement should be detached from the current OMTree so that it can
be attached
+        //some other OM Tree. Once detached the OmTree will remove its connections to this
OMElement.
         element.detach();
         return element;
     }
 
     public void ping(OMElement element) throws XMLStreamException {
-        StringWriter writer = new StringWriter();
-        element.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
-        writer.flush();
-
-        System.out.println(writer.toString());
+    //Do some processing
     }
 }

Modified: webservices/axis/trunk/java/modules/samples/src/userguide/example2/MyService.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/userguide/example2/MyService.java?rev=188774&r1=188773&r2=188774&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/userguide/example2/MyService.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/userguide/example2/MyService.java Tue
Jun  7 07:05:03 2005
@@ -14,23 +14,17 @@
  */
 public class MyService {
     public OMElement echo(OMElement element) throws XMLStreamException {
-
-        StringWriter writer = new StringWriter();
-        element.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
-        writer.flush();
-
-        System.out.println(writer.toString());
-
-        element.getNextSibling();
+        //Praparing the OMElement so that it can be attached to another OM Tree.
+        //First the OMElement should be completely build in case it is not fully built and
still
+        //some of the xml is in the stream.
+        element.build();
+        //Secondly the OMElement should be detached from the current OMTree so that it can
be attached
+        //some other OM Tree. Once detached the OmTree will remove its connections to this
OMElement.
         element.detach();
         return element;
     }
 
     public void ping(OMElement element) throws XMLStreamException {
-        StringWriter writer = new StringWriter();
-        element.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
-        writer.flush();
-
-        System.out.println(writer.toString());
+    //Do some processing
     }
 }



Mime
View raw message