You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2003/08/10 02:57:30 UTC

cvs commit: xml-axis/java/test/functional build.xml

gdaniels    2003/08/09 17:57:30

  Modified:    java/src/org/apache/axis/deployment/wsdd
                        WSDDUndeployment.java
               java/src/org/apache/axis/handlers JWSHandler.java
               java/src/org/apache/axis/handlers/soap SOAPService.java
               java/test/functional build.xml
  Log:
  The main purpose of this checkin is to move the special handler in SOAPService back to the correct place *before* the pivot point when executing a service.  This makes SOAP 1.1/1.2 semantics much clearer, in that Handlers on the request chain should have already marked all MU headers as processed before you perform the "meat" of your service work.
  
  Along the way fix a few bugs which were preventing me from building all-tests.
  
  * SOAPResponseHandler -> MustUnderstandChecker (since that's what it does),
    and it executes before the pivot
  
  * JWS services are now named for their class name; this prevents an NPE
    when calling SOAPService.addSession() (since JWS services are now session
    scoped by default (when did *that* happen?))
  
  * Make sure to deploy test/rpc/deploy.wsdd before running the test which
    uses it in test/functional - NOTE: why is test/rpc there at all?  There
    aren't any tests in there!
  
  * Check for null currentContext in WSDDUndeployment - this was crashing
    the test/wsdl/jaxrpchandler tests with an NPE.
  
  Revision  Changes    Path
  1.15      +8 -6      xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java
  
  Index: WSDDUndeployment.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDUndeployment.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- WSDDUndeployment.java	1 Aug 2003 22:21:57 -0000	1.14
  +++ WSDDUndeployment.java	10 Aug 2003 00:57:30 -0000	1.15
  @@ -202,13 +202,15 @@
               qname = (QName)services.get(n);
    
               try {
  -              String sname = qname.getLocalPart();
  -              SOAPService service = MessageContext.getCurrentContext()
  -                                                  .getAxisEngine()
  -                                                  .getService(sname);
  -              if ( service != null ) service.clearSessions();
  +                String sname = qname.getLocalPart();
  +                MessageContext messageContext = MessageContext.getCurrentContext();
  +                if (messageContext != null) {
  +                    SOAPService service = messageContext.getAxisEngine()
  +                            .getService(sname);
  +                    if ( service != null ) service.clearSessions();
  +                }
               } catch(Exception exp) {
  -              throw new ConfigurationException(exp);
  +                throw new ConfigurationException(exp);
               }
               registry.undeployService(qname);
           }
  
  
  
  1.34      +1 -0      xml-axis/java/src/org/apache/axis/handlers/JWSHandler.java
  
  Index: JWSHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/JWSHandler.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- JWSHandler.java	22 Jul 2003 15:45:16 -0000	1.33
  +++ JWSHandler.java	10 Aug 2003 00:57:30 -0000	1.34
  @@ -300,6 +300,7 @@
               SOAPService rpc = (SOAPService)soapServices.get(clsName);
               if (rpc == null) {
                   rpc = new SOAPService(new RPCProvider());
  +                rpc.setName(clsName);
                   rpc.setOption(RPCProvider.OPTION_CLASSNAME, clsName );
                   rpc.setEngine(msgContext.getAxisEngine());
                   
  
  
  
  1.103     +5 -5      xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java
  
  Index: SOAPService.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/handlers/soap/SOAPService.java,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- SOAPService.java	1 Aug 2003 22:21:57 -0000	1.102
  +++ SOAPService.java	10 Aug 2003 00:57:30 -0000	1.103
  @@ -199,11 +199,11 @@
       
   
       /**
  -     * SOAPResponseHandler is used to inject SOAP semantics just before
  +     * MustUnderstandChecker is used to inject SOAP semantics just before
        * the pivot handler.
        */
  -    private class SOAPResponseHandler extends BasicHandler {
  -        public SOAPResponseHandler() {}
  +    private class MustUnderstandChecker extends BasicHandler {
  +        public MustUnderstandChecker() {}
   
           public void invoke(MessageContext msgContext) throws AxisFault {
               // Do SOAP semantics here
  @@ -291,7 +291,7 @@
       public SOAPService(Handler reqHandler, Handler pivHandler,
                          Handler respHandler) {
           this();
  -        init(reqHandler, null, pivHandler, new SOAPResponseHandler(), respHandler);
  +        init(reqHandler, new MustUnderstandChecker(), pivHandler, null, respHandler);
       }
   
       public TypeMappingRegistry getTypeMappingRegistry()
  @@ -304,7 +304,7 @@
        */
       public SOAPService(Handler serviceHandler)
       {
  -        init(null, null, serviceHandler, new SOAPResponseHandler(), null);
  +        init(null, new MustUnderstandChecker(), serviceHandler, null, null);
       }
       
       /** Tell this service which engine it's deployed to.
  
  
  
  1.17      +1 -0      xml-axis/java/test/functional/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/build.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- build.xml	13 Mar 2003 15:34:17 -0000	1.16
  +++ build.xml	10 Aug 2003 00:57:30 -0000	1.17
  @@ -68,6 +68,7 @@
      <path id="deploy.xml.files">
          <fileset dir="${build.dir}">
             <include name="work/samples/**/deploy.wsdd"/>
  +          <include name="work/test/rpc/deploy.wsdd"/>
          </fileset>
      </path>