You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by ip...@apache.org on 2005/03/08 22:40:21 UTC

cvs commit: ws-fx/addressing/src/org/apache/ws/addressing/handler ServerSideAddressingHandler.java

ips         2005/03/08 13:40:21

  Modified:    addressing/src/org/apache/axis/message/addressing
                        AddressingHeaders.java
               addressing/src/org/apache/axis/message/addressing/handler
                        AddressingHandler.java
               addressing/src/org/apache/ws/addressing/handler
                        ServerSideAddressingHandler.java
  Log:
  modified server-side handler code to not modify responses for non-WSA requests; i didn't make any changes to the client-side handler code, but we might want to make a similar mod there
  
  Revision  Changes    Path
  1.16      +5 -5      ws-fx/addressing/src/org/apache/axis/message/addressing/AddressingHeaders.java
  
  Index: AddressingHeaders.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/addressing/src/org/apache/axis/message/addressing/AddressingHeaders.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- AddressingHeaders.java	14 Feb 2005 23:51:32 -0000	1.15
  +++ AddressingHeaders.java	8 Mar 2005 21:40:21 -0000	1.16
  @@ -34,7 +34,7 @@
   import java.util.List;
   
   /**
  - * Class AddressingHeaders
  + * Represents a set of message addressing headers as defined by the WS-Addressing spec.
    * 
    * @author Davanum Srinivas (dims@yahoo.com)
    */
  @@ -152,6 +152,7 @@
        * @param actorURI  The SOAP Actor URI
        * @param process   Should the headers be marked as processed
        * @param remove    Should the headers be removed after processing
  +     * @param setMustUnderstand whether or not to set mustUnderstand="true" on the headers
        * @param refPropsQNames A list of QNames for reference properties. If null
        *                       all non-WSA headers will be added as reference
        *                       properties. If an empty list is passed
  @@ -328,11 +329,10 @@
       }
   
       /**
  -     * Method toEnvelope
  +     * Adds these addressing headers to the specified SOAP envelope.
        * 
        * @param env 
  -     * @throws SOAPException                
  -     * @throws ParserConfigurationException 
  +     * @throws Exception
        */
       public void toEnvelope(SOAPEnvelope env)
           throws Exception {
  @@ -341,7 +341,7 @@
   
   
       /**
  -     * Method toEnvelope
  +     * Adds these addressing headers to the specified SOAP envelope.
        * 
        * @param env 
        * @throws javax.xml.soap.SOAPException
  
  
  
  1.31      +11 -0     ws-fx/addressing/src/org/apache/axis/message/addressing/handler/AddressingHandler.java
  
  Index: AddressingHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/addressing/src/org/apache/axis/message/addressing/handler/AddressingHandler.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- AddressingHandler.java	14 Feb 2005 23:51:32 -0000	1.30
  +++ AddressingHandler.java	8 Mar 2005 21:40:21 -0000	1.31
  @@ -333,6 +333,17 @@
                                     false,
                                     this.refPropQNames);
   
  +        if (headers.getTo()==null)
  +        {
  +            // not a WS-A request; let it pass thru w/out doing anything
  +            return;
  +        }
  +        if (headers.getAction()==null)
  +        {
  +            // should we throw a SOAPFaultException here?
  +            log.debug("WS-A request to endpoint " + headers.getTo() + " is missing the required wsa:Action header.");
  +        }
  +
           msgContext.setProperty(Constants.ENV_ADDRESSING_REQUEST_HEADERS,
                                  headers);
   
  
  
  
  1.4       +12 -2     ws-fx/addressing/src/org/apache/ws/addressing/handler/ServerSideAddressingHandler.java
  
  Index: ServerSideAddressingHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-fx/addressing/src/org/apache/ws/addressing/handler/ServerSideAddressingHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerSideAddressingHandler.java	14 Feb 2005 23:51:32 -0000	1.3
  +++ ServerSideAddressingHandler.java	8 Mar 2005 21:40:21 -0000	1.4
  @@ -92,6 +92,16 @@
                        false,
                        getReferencePropertyQNames() );
   
  +         if (headers.getTo()==null)
  +         {
  +            // not a WS-A request; let it pass thru w/out doing anything
  +            return CONTINUE_HANDLER_CHAIN_PROCESSING;
  +         }
  +         if (headers.getAction()==null)
  +         {
  +            // should we throw a SOAPFaultException here?
  +            LOG.debug("WS-A request to endpoint " + headers.getTo() + " is missing the required wsa:Action header.");
  +         }
            msgContext.setProperty( Constants.ENV_ADDRESSING_REQUEST_HEADERS,
                  headers );
   
  @@ -126,7 +136,7 @@
   
            if ( reqHeaders == null )
            {
  -            // error?
  +            // not a WS-A response; let it pass thru w/out doing anything
               return CONTINUE_HANDLER_CHAIN_PROCESSING;
            }
            AddressingHeaders resHeaders =
  @@ -160,7 +170,7 @@
                  (AddressingHeaders) msgContext.getProperty( Constants.ENV_ADDRESSING_REQUEST_HEADERS );
            if ( reqHeaders == null )
            {
  -            // error?
  +            // not a WS-A fault; let it pass thru w/out doing anything
               return CONTINUE_HANDLER_CHAIN_PROCESSING;
            }
            AddressingHeaders resHeaders =