You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2006/07/07 19:07:10 UTC

svn commit: r419925 - in /incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis: PXEService.java epr/WSDL11Endpoint.java

Author: mriou
Date: Fri Jul  7 10:07:09 2006
New Revision: 419925

URL: http://svn.apache.org/viewvc?rev=419925&view=rev
Log:
Cleaning up.

Modified:
    incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/PXEService.java
    incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/epr/WSDL11Endpoint.java

Modified: incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/PXEService.java
URL: http://svn.apache.org/viewvc/incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/PXEService.java?rev=419925&r1=419924&r2=419925&view=diff
==============================================================================
--- incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/PXEService.java (original)
+++ incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/PXEService.java Fri Jul  7 10:07:09 2006
@@ -63,6 +63,7 @@
         Message pxeRequest = pxeMex.createMessage(pxeMex.getOperation().getInput().getMessage().getQName());
         convertMessage(msgdef, pxeRequest, msgContext.getEnvelope().getBody().getFirstElement());
 
+        // Preparing a callback just in case we would need one.
         ResponseCallback callback = null;
         if (pxeMex.getOperation().getOutput() != null) {
           callback = new ResponseCallback();
@@ -70,25 +71,24 @@
         }
 
         if (__log.isDebugEnabled())
-          __log.debug("Invoking PXE.");
+          __log.debug("Invoking PXE using MEX " + pxeMex);
         pxeMex.invoke(pxeRequest);
 
-        // Handle the response if necessary.
-        if (pxeMex.getOperation().getOutput() != null) {
-          __log.debug("PXE MEX "  + pxeMex  + " completed SYNCHRONOUSLY.");
-          SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
-          outMsgContext.setEnvelope(envelope);
-          // Waiting for a callback
-          if (_waitingCallbacks.get(pxeMex.getMessageExchangeId()) != null
-                  && pxeMex.getStatus() == MessageExchange.Status.ASYNC)
-            pxeMex = callback.getResponse(TIMEOUT);
-          
-          // Hopefully we have a response
-          __log.debug("Handling response for MEX " + pxeMex);
-          onResponse(pxeMex, envelope);
+        // Invocation response could be delayed, if so we have to wait for it.
+        if (pxeMex.getStatus() == MessageExchange.Status.ASYNC) {
+          pxeMex = callback.getResponse(TIMEOUT);
         } else {
-          __log.debug("PXE MEX " + pxeMex + " completed ASYNCHRONOUSLY.");
+          // Callback wasn't necessary, cleaning up
+          _waitingCallbacks.remove(pxeMex.getMessageExchangeId());
         }
+
+        SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
+        outMsgContext.setEnvelope(envelope);
+
+        // Hopefully we have a response
+        __log.debug("Handling response for MEX " + pxeMex);
+        onResponse(pxeMex, envelope);
+
         success = true;
       } else {
         __log.error("PXE MEX " + pxeMex + " was unroutable.");

Modified: incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/epr/WSDL11Endpoint.java
URL: http://svn.apache.org/viewvc/incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/epr/WSDL11Endpoint.java?rev=419925&r1=419924&r2=419925&view=diff
==============================================================================
--- incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/epr/WSDL11Endpoint.java (original)
+++ incubator/ode/scratch/pxe-iapi/axis/src/main/java/com/fs/pxe/axis/epr/WSDL11Endpoint.java Fri Jul  7 10:07:09 2006
@@ -21,7 +21,6 @@
   }
 
   public String getUrl() {
-    System.out.println("### Getting endpoint " + DOMUtils.domToString(_serviceElmt));
     Element port = (Element) _serviceElmt.getElementsByTagNameNS(Namespaces.WSDL_11, "port").item(0);
     Element address = (Element) port.getElementsByTagNameNS(Namespaces.SOAP_NS, "address").item(0);
     return address.getAttribute("location");