cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <eoghan.gl...@iona.com>
Subject RE: svn commit: r442861 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/endpoint/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/core/src/main/java/org/apache/cxf/endpoint/ rt/frontend/jaxws/src/main/java/org/apache
Date Wed, 13 Sep 2006 10:13:35 GMT

Hi Tom,

Your change to ClientImpl conflicted with some changes I'd made in my
working copy, around setting the Method property on the OperationInfo on
the client side.

Not a problem, I've resolved the conflict but I did notice you commented
out newly redundant code in ClientImpl & EndpointInvocationHandler. IMO
this practice should this avoided for reasons of code readability. Just
remove the dead code ... if we ever need to restore it, it can be
reconstructed from the version log maintained by SVN.

Cheers,
Eoghan 

> -----Original Message-----
> From: tli@apache.org [mailto:tli@apache.org] 
> Sent: 13 September 2006 07:17
> To: cxf-commits@incubator.apache.org
> Subject: svn commit: r442861 - in /incubator/cxf/trunk: 
> api/src/main/java/org/apache/cxf/endpoint/ 
> rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/int
> erceptor/ rt/core/src/main/java/org/apache/cxf/endpoint/ 
> rt/frontend/jaxws/src/main/java/org/apache/...
> 
> Author: tli
> Date: Tue Sep 12 23:17:02 2006
> New Revision: 442861
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=442861
> Log:
> rollback api change of Endpoint, using method set in the 
> OperationInfo, change the client side using method set in 
> OperationInfo instead of method set in Message
> 
> Modified:
>     
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/
> Endpoint.java
>     
> incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/
> cxf/binding/soap/interceptor/RPCInInterceptor.java
>     
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpo
> int/ClientImpl.java
>     
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpo
> int/EndpointImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointInvocationHandler.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/ServiceImpl.java
>     
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/interceptors/WrapperClassInInterceptor.java
>     
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxw
> s/ClientServerRPCLitTest.java
> 
> Modified: 
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/
> Endpoint.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/
> java/org/apache/cxf/endpoint/Endpoint.java?view=diff&rev=44286
> 1&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/
> Endpoint.java (original)
> +++ 
> incubator/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/Endpoi
> +++ nt.java Tue Sep 12 23:17:02 2006
> @@ -44,8 +44,5 @@
>      Executor getExecutor();
>      
>      Interceptor getFaultInterceptor();
> -    
> -    Object getImplementor();
> -    
> -    void setImplementor(Object impl);
> +
>  }
> 
> Modified: 
> incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/
> cxf/binding/soap/interceptor/RPCInInterceptor.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/s
> oap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCI
> nInterceptor.java?view=diff&rev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/
> cxf/binding/soap/interceptor/RPCInInterceptor.java (original)
> +++ 
> incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/bi
> +++ nding/soap/interceptor/RPCInInterceptor.java Tue Sep 12 23:17:02 
> +++ 2006
> @@ -26,7 +26,6 @@
>  import javax.xml.namespace.QName;
>  
>  import org.apache.cxf.databinding.DataReader;
> -import org.apache.cxf.endpoint.Endpoint;  import 
> org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
>  import org.apache.cxf.message.Message;
>  import org.apache.cxf.phase.Phase;
> @@ -36,7 +35,6 @@
>  import org.apache.cxf.service.model.ServiceModelUtil;
>  import org.apache.cxf.staxutils.DepthXMLStreamReader;
>  import org.apache.cxf.staxutils.StaxUtils;
> -import org.apache.cxf.tools.util.ProcessorUtil;
>  
>  public class RPCInInterceptor extends 
> AbstractInDatabindingInterceptor {
>  
> @@ -68,19 +66,20 @@
>  
>          BindingOperationInfo operation = null;
>          if 
> (message.getExchange().get(BindingOperationInfo.class) == null) {
> -            operation = getOperation(message, xmlReader);            
> +            operation = getOperation(message, xmlReader);
>              // Store operation into the message.
>              
> message.getExchange().put(BindingOperationInfo.class, operation);
>          } else {
>              operation = 
> message.getExchange().get(BindingOperationInfo.class);
>          }
> -        findMethod(message);
>          MessageInfo msg;
>          DataReader<Message> dr = getMessageDataReader(message);
>  
>          if (!isRequestor(message)) {
> +            System.out.println("Server");
>              msg = operation.getInput().getMessageInfo();
>          } else {
> +            System.out.println("Client");
>              msg = operation.getOutput().getMessageInfo();
>          }
>  
> @@ -101,44 +100,11 @@
>                  String expMessage = "Parameter " + name + " 
> does not equal to the name in the servicemodel!";
>                  message.setContent(Exception.class, new 
> RuntimeException(expMessage));
>              }
> -            Object param = dr.read(elName, message, 
> getParameterTypeClass(message, idx));
> +            Method meth = (Method) 
> operation.getOperationInfo().getProperty(Method.class.getName());
> +            System.out.println("meth is null = " + (meth == null));
> +            Object param = dr.read(elName, message, 
> + meth.getParameterTypes()[idx]);
>              parameters.add(param);
>          }
>          message.setContent(List.class, parameters);
> -    }
> -
> -    private void findMethod(Message message) {
> -        Endpoint ep = message.getExchange().get(Endpoint.class);
> -        BindingOperationInfo boi = 
> message.getExchange().get(BindingOperationInfo.class);
> -        Class implementorClass = null;
> -        if (!isRequestor(message)) {
> -            implementorClass = ep.getImplementor().getClass();
> -        } else {
> -            implementorClass = (Class)ep.getImplementor();
> -        }
> -        for (Method meth : implementorClass.getDeclaredMethods()) {
> -            String opName = 
> boi.getOperationInfo().getName().getLocalPart();
> -            if 
> (ProcessorUtil.mangleNameToVariableName(meth.getName()).equals
> (opName)) {
> -                message.put(Method.class, meth);
> -                break;
> -            }
> -        }
> -    }
> -
> -    private Class getParameterTypeClass(Message message, int idx) {
> -        Method method = message.get(Method.class);
> -        BindingOperationInfo boi = 
> message.getExchange().get(BindingOperationInfo.class);
> -        MessageInfo mi;
> -        if (!isRequestor(message)) {
> -            mi = boi.getOperationInfo().getInput();
> -        } else {
> -            mi = boi.getOperationInfo().getOutput();
> -        }
> -        MessagePartInfo mpi = mi.getMessagePartByIndex(idx);
> -        if (!mpi.isElement()) {
> -            return method.getParameterTypes()[idx];
> -        } else {
> -            return null;
> -        }
>      }
>  }
> 
> Modified: 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpo
> int/ClientImpl.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/m
> ain/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev
> =442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpo
> int/ClientImpl.java (original)
> +++ 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Cl
> +++ ientImpl.java Tue Sep 12 23:17:02 2006
> @@ -78,7 +78,8 @@
>              LOG.fine("Invoke, operation info: " + oi + ", 
> params: " + params);
>          }
>          Message message = endpoint.getBinding().createMessage();
> -        setMethod(ctx, message);
> +        
> +        //setMethod(ctx, message);
>          setParameters(params, message);
>          Exchange exchange = new ExchangeImpl();
>          if (null != ctx) {
> @@ -182,12 +183,12 @@
>          }
>      }
>  
> -    private void setMethod(Map<String, Object> ctx, Message 
> message) {
> -        if (ctx != null) {
> -            message.setContent(Method.class, 
> ctx.get(Method.class.getName()));
> -            methd = (Method)ctx.get(Method.class.getName());
> -        }
> -    }
> +//    private void setMethod(Map<String, Object> ctx, 
> Message message) {
> +//        if (ctx != null) {
> +//            message.setContent(Method.class, 
> ctx.get(Method.class.getName()));
> +//            methd = (Method)ctx.get(Method.class.getName());
> +//        }
> +//    }
>  
>      
>  
> 
> Modified: 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpo
> int/EndpointImpl.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/m
> ain/java/org/apache/cxf/endpoint/EndpointImpl.java?view=diff&r
> ev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpo
> int/EndpointImpl.java (original)
> +++ 
> incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/En
> +++ dpointImpl.java Tue Sep 12 23:17:02 2006
> @@ -47,7 +47,6 @@
>      private Executor executor;
>      private Bus bus;
>      private Interceptor faultInterceptor;
> -    private Object implementor;
>      
>      public EndpointImpl(Bus bus, Service s, EndpointInfo ei) 
> throws EndpointException {
>          this.bus = bus;
> @@ -105,14 +104,6 @@
>              Message msg = new Message("NO_BINDING_FACTORY", 
> BUNDLE, namespace);
>              throw new EndpointException(msg);
>          }
> -    }
> -
> -    public Object getImplementor() {
> -        return implementor;
> -    }
> -
> -    public void setImplementor(Object implementor) {
> -        this.implementor = implementor;
>      }
>  
>  }
> 
> Modified: 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointImpl.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/j
> axws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java?view
> =diff&rev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointImpl.java (original)
> +++ 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/j
> +++ axws/EndpointImpl.java Tue Sep 12 23:17:02 2006
> @@ -84,8 +84,7 @@
>          }
>          //      TODO: use bindigURI     
>          try {
> -            endpoint = new JaxwsEndpointImpl(bus, service, ei);
> -            endpoint.setImplementor(implementor);
> +            endpoint = new JaxwsEndpointImpl(bus, service, 
> ei);            
>          } catch (EndpointException e) {
>              throw new WebServiceException(e);
>          }
> 
> Modified: 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointInvocationHandler.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/j
> axws/src/main/java/org/apache/cxf/jaxws/EndpointInvocationHand
> ler.java?view=diff&rev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/EndpointInvocationHandler.java (original)
> +++ 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/j
> +++ axws/EndpointInvocationHandler.java Tue Sep 12 23:17:02 2006
> @@ -95,7 +95,7 @@
>  
>          Object[] paramsWithOutHolder = handleHolder(params);
>          Map<String, Object> context = new HashMap<String, Object>();
> -        context.put(Method.class.getName(), method);
> +        //context.put(Method.class.getName(), method);
>          
>          
>          boolean isAsync = method.getName().endsWith("Async");
> @@ -200,6 +200,7 @@
>                              
> oi.setProperty(WrapperClassOutInterceptor.SINGLE_WRAPPED_PART,
>  requestWrapper);
>                              
> boi2.getOperationInfo().setProperty(WrappedInInterceptor.SINGL
> E_WRAPPED_PART,
>                                              Boolean.TRUE);
> +                            
> + boi3.getOperationInfo().setProperty(Method.class.getName(), method);
>                              infoMap.put(method, boi3);
>                              return boi3;
>                          }
> @@ -208,7 +209,8 @@
>                          // TODO - exception
>                      }
>                  }
> -                infoMap.put(method, boi2);
> +                
> boi2.getOperationInfo().setProperty(Method.class.getName(), method);
> +                infoMap.put(method, boi2);                
>                  return boi2;
>              }
>          }
> 
> Modified: 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/ServiceImpl.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/j
> axws/src/main/java/org/apache/cxf/jaxws/ServiceImpl.java?view=
> diff&rev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/ServiceImpl.java (original)
> +++ 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/j
> +++ axws/ServiceImpl.java Tue Sep 12 23:17:02 2006
> @@ -203,8 +203,7 @@
>  
>          JaxwsEndpointImpl jaxwsEndpoint;
>          try {
> -            jaxwsEndpoint = new JaxwsEndpointImpl(bus, service, ei);
> -            jaxwsEndpoint.setImplementor(serviceEndpointInterface);
> +            jaxwsEndpoint = new JaxwsEndpointImpl(bus, 
> service, ei);            
>          } catch (EndpointException e) {
>              throw new WebServiceException(e);
>          }
> 
> Modified: 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/interceptors/WrapperClassInInterceptor.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/j
> axws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperCl
> assInInterceptor.java?view=diff&rev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache
> /cxf/jaxws/interceptors/WrapperClassInInterceptor.java (original)
> +++ 
> incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/j
> +++ axws/interceptors/WrapperClassInInterceptor.java Tue Sep 
> 12 23:17:02 
> +++ 2006
> @@ -37,8 +37,6 @@
>  import org.apache.cxf.service.model.MessagePartInfo;
>  import org.apache.cxf.service.model.OperationInfo;
>  
> -
> -
>  public class WrapperClassInInterceptor extends 
> AbstractPhaseInterceptor<Message> {
>  
>      public WrapperClassInInterceptor() { @@ -52,8 +50,8 @@
>              return;
>          }
>          Method method = 
> (Method)boi.getOperationInfo().getProperty(Method.class.getName());
> -        if (method == null) {
> -            method = message.getContent(Method.class);
> +        if (method == null) {             
> +            method = 
> + (Method)boi.getOperationInfo().getProperty(Method.class.getName());
>          }
>          if (method != null && method.getName().endsWith("Async")) {
>              return;
> @@ -113,7 +111,7 @@
>                          
>                              CastUtils.cast(lst, 
> Object.class).add(obj);
>                          } catch (Exception e) {
> -                            //TODO - fault
> +                            // TODO - fault
>                              throw new Fault(e);
>                          }
>                      }
> @@ -124,5 +122,4 @@
>          }
>      }
>  
> -    
>  }
> 
> Modified: 
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxw
> s/ClientServerRPCLitTest.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/
> test/java/org/apache/cxf/jaxws/ClientServerRPCLitTest.java?vie
> w=diff&rev=442861&r1=442860&r2=442861
> ==============================================================
> ================
> --- 
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxw
> s/ClientServerRPCLitTest.java (original)
> +++ 
> incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/jaxws/Clie
> +++ ntServerRPCLitTest.java Tue Sep 12 23:17:02 2006
> @@ -71,7 +71,6 @@
>      }
>      
>      public void testBasicConnection() throws Exception {
> -
>          SOAPServiceRPCLit service = new SOAPServiceRPCLit();
>          assertNotNull(service);
>  
> 
> 
> 

Mime
View raw message