ws-wsrf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i..@apache.org
Subject svn commit: r280395 - in /webservices/wsrf/trunk/src: java/org/apache/ws/resource/handler/ResourceHandler.java sandbox/was-ejb.xml
Date Mon, 12 Sep 2005 19:09:45 GMT
Author: ips
Date: Mon Sep 12 12:09:41 2005
New Revision: 280395

URL: http://svn.apache.org/viewcvs?rev=280395&view=rev
Log:
fixed NPE in handleResponse() that was occurring for one-way operations

Added:
    webservices/wsrf/trunk/src/sandbox/was-ejb.xml
Modified:
    webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java

Modified: webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java?rev=280395&r1=280394&r2=280395&view=diff
==============================================================================
--- webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java (original)
+++ webservices/wsrf/trunk/src/java/org/apache/ws/resource/handler/ResourceHandler.java Mon
Sep 12 12:09:41 2005
@@ -216,13 +216,14 @@
       try
       {
          LOG.debug( MSG.getMessage( Keys.HANDLING_RESPONSE ) );
-         SOAPEnvelope responseEnvelope  = getResponseEnvelope( (SOAPMessageContext) msgContext
);
-         addWsaHeaderElementsToResponse( msgContext, responseEnvelope );
-         List         responseBodyElems = (List) msgContext.getProperty( WSRF_RESPONSE_XMLOBJECT_LIST
);
-         LOG.debug( MSG.getMessage( Keys.FOUND_RESP_ELEMS,
-                                    Integer.toString( responseBodyElems.size(  ) ) ) );
+         List responseBodyElems = (List) msgContext.getProperty( WSRF_RESPONSE_XMLOBJECT_LIST
);
          if ( responseBodyElems != null )
          {
+             SOAPEnvelope responseEnvelope  = getResponseEnvelope( (SOAPMessageContext) msgContext
);
+             addWsaHeaderElementsToResponse( msgContext, responseEnvelope );
+
+             LOG.debug( MSG.getMessage( Keys.FOUND_RESP_ELEMS,
+                                        Integer.toString( responseBodyElems.size(  ) ) )
);
             SOAPBody responseBody = responseEnvelope.getBody(  );
             for ( int i = 0; i < responseBodyElems.size(  ); i++ )
             {
@@ -234,10 +235,15 @@
                   responseBody.addChildElement( soapBodyElement );
                }
             }
+             if ( LOG.isDebugEnabled(  ) )
+             {
+                LOG.debug( "Sending SOAP response: \n" + responseEnvelope );
+             }
          }
-         if ( LOG.isDebugEnabled(  ) )
+         else  // one-way MEP
          {
-            LOG.debug( "Sending SOAP response: \n" + responseEnvelope );
+             // a null message tells the SOAP engine to return an empty HTTP response with
a 202 status code
+             ((SOAPMessageContext)msgContext).setMessage( null );
          }
       }
       catch ( Exception e )

Added: webservices/wsrf/trunk/src/sandbox/was-ejb.xml
URL: http://svn.apache.org/viewcvs/webservices/wsrf/trunk/src/sandbox/was-ejb.xml?rev=280395&view=auto
==============================================================================
--- webservices/wsrf/trunk/src/sandbox/was-ejb.xml (added)
+++ webservices/wsrf/trunk/src/sandbox/was-ejb.xml Mon Sep 12 12:09:41 2005
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<project name="was-ejb" default="compile" basedir=".">
+
+   <property environment="env" />   
+   <property file="build.properties" />
+
+   <property name="was.home" location="C:/Program Files/IBM/WebSphere/AppServer/lib"/>
+   
+   <target name="compile">  
+      <javac srcdir="."
+             destdir="."           
+             debug="on">
+         <classpath>
+            <fileset dir="C:/Program Files/IBM/WebSphere/AppServer/lib" includes="j2ee.jar,
webservices.jar, wsaddressing.jar" />
+         </classpath> 
+      </javac>
+   </target>
+              
+</project>



Mime
View raw message