axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/client Call.java Service.java
Date Thu, 04 Nov 2004 12:54:20 GMT
dims        2004/11/04 04:54:20

  Modified:    java/src/org/apache/axis/client Call.java Service.java
  Log:
  Fixes for:
  AXIS-1639 - Call.setPortType and getPortType marked deprecated. Not conformant with JAX-RPC
  AXIS-1638 - Service.createCall(QName, QName) ignores the operationName's namespace
  
  from:
  Chelliah Thirunavukkarasu (chelliah@versai.com)
  
  Revision  Changes    Path
  1.234     +27 -45    ws-axis/java/src/org/apache/axis/client/Call.java
  
  Index: Call.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/Call.java,v
  retrieving revision 1.233
  retrieving revision 1.234
  diff -u -r1.233 -r1.234
  --- Call.java	22 Sep 2004 20:49:25 -0000	1.233
  +++ Call.java	4 Nov 2004 12:54:19 -0000	1.234
  @@ -134,6 +134,7 @@
       private boolean            parmAndRetReq   = true ;
       private Service            service         = null ;
       private QName              portName        = null;
  +    private QName              portTypeName    = null;
       private QName              operationName   = null ;
   
       private MessageContext     msgContext      = null ;
  @@ -1300,7 +1301,8 @@
               throw new JAXRPCException( Messages.getMessage("noPortType00", "" +
                                                              portName) );
           }
  -
  +        this.setPortTypeName(portType.getQName());
  +        
           List operations = portType.getOperations();
           if ( operations == null ) {
               throw new JAXRPCException( Messages.getMessage("noOperation01",
  @@ -1532,6 +1534,24 @@
        * @param  opName          Operation(method) that's going to be invoked
        */
       public void setOperation(QName portName, String opName) {
  +    	setOperation(portName, new QName(opName));
  +    }
  +
  +    
  +    /**
  +     * prefill as much info from the WSDL as it can.
  +     * Right now it's target URL, SOAPAction, Parameter types,
  +     * and return type of the Web Service.
  +     *
  +     * If wsdl is not present, this function set port name and operation name
  +     * and does not modify target endpoint address.
  +     *
  +     * Note: Not part of JAX-RPC specification.
  +     *
  +     * @param  portName        PortName in the WSDL doc to search for
  +     * @param  opName          Operation(method) that's going to be invoked
  +     */
  +    public void setOperation(QName portName, QName opName) {
           if ( service == null )
               throw new JAXRPCException( Messages.getMessage("noService04") );
   
  @@ -1557,13 +1577,6 @@
                                                              portName) );
           }
   
  -        Binding   binding  = port.getBinding();
  -        PortType  portType = binding.getPortType();
  -        if ( portType == null ) {
  -            throw new JAXRPCException( Messages.getMessage("noPortType00", "" +
  -                                                           portName) );
  -        }
  -
           // Get the URL
           ////////////////////////////////////////////////////////////////////
           List list = port.getExtensibilityElements();
  @@ -1582,32 +1595,7 @@
               }
           }
   
  -        // Get the SOAPAction
  -        ////////////////////////////////////////////////////////////////////
  -        BindingOperation bop = binding.getBindingOperation(opName,
  -                                                           null, null);
  -        if ( bop == null ) {
  -            throw new JAXRPCException( Messages.getMessage("noOperation02",
  -                                                            opName ));
  -        }
  -        list = bop.getExtensibilityElements();
  -        for ( int i = 0 ; list != null && i < list.size() ; i++ ) {
  -            Object obj = list.get(i);
  -            if ( obj instanceof SOAPOperation ) {
  -                SOAPOperation sop = (SOAPOperation) obj ;
  -                String action = sop.getSoapActionURI();
  -                if ( action != null ) {
  -                    setUseSOAPAction(true);
  -                    setSOAPActionURI(action);
  -                }
  -                else {
  -                    setUseSOAPAction(false);
  -                    setSOAPActionURI(null);
  -                }
  -                break ;
  -            }
  -        }
  -        setOperation(opName);
  +        setOperation(opName.getLocalPart());
       }
   
       /**
  @@ -1632,30 +1620,24 @@
       } // setPortName
   
       /**
  -     * Returns the fully qualified name of the port for this Call object
  +     * Returns the fully qualified name of the port type for this Call object
        * (if there is one).
        *
  -     * @return QName Fully qualified name of the port
  -     *
  -     * @deprecated This is really the service's port name, not portType name.
  -     *            Use getPortName instead.
  +     * @return QName Fully qualified name of the port type
        */
       public QName getPortTypeName() {
  -        return portName == null ? new QName("") : portName;
  +        return portTypeName == null ? new QName("") : portTypeName;
       }
   
       /**
  -     * Sets the port name of this Call object.  This call will not set
  +     * Sets the port type name of this Call object.  This call will not set
        * any additional fields, nor will it do any checking to verify that
        * this port type is actually defined in the WSDL - for now anyway.
        *
        * @param portType Fully qualified name of the portType
  -     *
  -     * @deprecated This is really the service's port name, not portType name.
  -     *            Use setPortName instead.
        */
       public void setPortTypeName(QName portType) {
  -        setPortName(portType);
  +        this.portTypeName = portType;
       }
   
       /**
  
  
  
  1.100     +1 -1      ws-axis/java/src/org/apache/axis/client/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/client/Service.java,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- Service.java	13 Jun 2004 13:12:29 -0000	1.99
  +++ Service.java	4 Nov 2004 12:54:19 -0000	1.100
  @@ -531,7 +531,7 @@
               throws ServiceException {
   
           Call call = (org.apache.axis.client.Call) createCall();
  -        call.setOperation(portName, operationName.getLocalPart());
  +        call.setOperation(portName, operationName);
           return (call);
       }
   
  
  
  

Mime
View raw message