Package org.apache.muse.core.proxy

Examples of org.apache.muse.core.proxy.ReflectionProxyHandler


        return method;
    }
   
    private ProxyHandler createReflectionHandler(JavaMethod method)
    {
        ProxyHandler handler = new ReflectionProxyHandler();
//      TODO why was this here?
//        String action = method.getName().getNamespaceURI();             
       
//        if (!action.endsWith("/"))
//            action += '/';
//       
//        action += method.getName().getLocalPart();
//        handler.setAction(action);
       
        handler.setAction(method.getActionURI());
       
        handler.setRequestName(method.getName());
        handler.setRequestParameterNames(method.getParameterTypeNames());
        handler.setRequestParameterSchemaTypes(method.getParameterSchemaTypes());
        handler.setRequestParameterTypes(method.getParameterTypes());
        handler.setResponseName(method.getReturnName());
        handler.setReturnSchemaType(method.getReturnSchemaType());
        handler.setReturnType(method.getReturnType());
       
        return handler;
    }
View Full Code Here


        return method;
    }
   
    private ProxyHandler createReflectionHandler(JavaMethod method)
    {
        ProxyHandler handler = new ReflectionProxyHandler();
       
        handler.setAction(method.getActionURI());
       
        handler.setRequestName(method.getName());
        handler.setRequestParameterNames(method.getParameterTypeNames());
        handler.setRequestParameterSchemaTypes(method.getParameterSchemaTypes());
        handler.setRequestParameterTypes(method.getParameterTypes());
        handler.setResponseName(method.getReturnName());
        handler.setReturnSchemaType(method.getReturnSchemaType());
        handler.setReturnType(method.getReturnType());
       
        return handler;
    }
View Full Code Here

  private URI resourceUri;
   
  @Override
  public void init() throws ServletException
  {
    proxyHandler  = new ReflectionProxyHandler();
    proxyHandler.setAction(WsxConstants.GET_METADATA_URI);
    proxyHandler.setRequestName(WsxConstants.GET_METADATA_QNAME);
    proxyHandler.setRequestParameterNames(new QName[]{
        new QName(
            WsxConstants.NAMESPACE_URI,
View Full Code Here

   *
   * @return a proxy handler.
   */
  private ProxyHandler getProxyHandler()
  {
        ProxyHandler handler = new ReflectionProxyHandler();
        handler.setAction("http://amqp.apache.org/qpid/management/qman/Connect");
        handler.setRequestName(new QName("http://amqp.apache.org/qpid/management/qman", "Connect", PREFIX));
        handler.setRequestParameterNames(new QName[]{
            new QName("http://amqp.apache.org/qpid/management/qman", "host", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "port", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "username", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "password", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "virtualHost", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "initialPoolCapacity", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "maxPoolCapacity", PREFIX),
                new QName("http://amqp.apache.org/qpid/management/qman", "maxWaitTimeout", PREFIX)});
        handler.setResponseName(new QName("http://amqp.apache.org/qpid/management/qman", "ConnectResponse", PREFIX));
        handler.setReturnType(null);
        return handler;
  }
View Full Code Here

    adapters.put(Map.class.getName(), mapAdapter);
    adapters.put(HashMap.class.getName(),mapAdapter);
    adapters.put(Properties.class.getName(),mapAdapter);
    adapters.put(Hashtable.class.getName(),mapAdapter);
   
    proxyHandler  = new ReflectionProxyHandler();
    proxyHandler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
    proxyHandler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", Names.PREFIX));
    proxyHandler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", Names.PREFIX)});
    proxyHandler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", Names.PREFIX));
    proxyHandler.setReturnType(Element[].class);
View Full Code Here

  private URI resourceUri;
   
  @Override
  public void init() throws ServletException
  {
    proxyHandler  = new ReflectionProxyHandler();
    proxyHandler.setAction(WsxConstants.GET_METADATA_URI);
    proxyHandler.setRequestName(WsxConstants.GET_METADATA_QNAME);
    proxyHandler.setRequestParameterNames(new QName[]{
        new QName(
            WsxConstants.NAMESPACE_URI,
View Full Code Here

    adapters.put(Map.class.getName(), mapAdapter);
    adapters.put(HashMap.class.getName(),mapAdapter);
    adapters.put(Properties.class.getName(),mapAdapter);
    adapters.put(Hashtable.class.getName(),mapAdapter);
   
    proxyHandler  = new ReflectionProxyHandler();
    proxyHandler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
    proxyHandler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", Names.PREFIX));
    proxyHandler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", Names.PREFIX)});
    proxyHandler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", Names.PREFIX));
    proxyHandler.setReturnType(Element[].class);
View Full Code Here

 
  private Map<String,ProxyHandler> createInvocationHandlers()
  {
    Map<String, ProxyHandler> handlers = new HashMap<String, ProxyHandler>();
   
    ProxyHandler handler = new ReflectionProxyHandler();
        handler.setAction(Names.NAMESPACE_URI+"/"+"voidWithoutArguments");
        handler.setRequestName(
            new QName(
                Names.NAMESPACE_URI,
                "voidWithoutArgumentsRequest",
                Names.PREFIX));
        handler.setRequestParameterNames(new QName[]{});      
        handler.setResponseName(
            new QName(
                Names.NAMESPACE_URI,
                "voidWithoutArgumentsResponse"
                Names.PREFIX));
        handler.setReturnType(Result.class);
       
        ProxyHandler exceptionHandler = new ReflectionProxyHandler();
        exceptionHandler.setAction(Names.NAMESPACE_URI+"/"+"throwsException");
        exceptionHandler.setRequestName(
            new QName(
                Names.NAMESPACE_URI,
                "throwsExceptionRequest",
                Names.PREFIX));
       
        exceptionHandler.setRequestParameterNames(new QName[]{});       
        exceptionHandler.setResponseName(
            new QName(
                Names.NAMESPACE_URI,
                "throwsExceptionResponse"
                Names.PREFIX));
       
        exceptionHandler.setReturnType(Result.class);
       
        ProxyHandler echoWithWrapperTypesHandler = new ReflectionProxyHandler();
        echoWithWrapperTypesHandler.setAction(Names.NAMESPACE_URI+"/"+"echoWithSimpleTypes");
        echoWithWrapperTypesHandler.setRequestName(
            new QName(
                Names.NAMESPACE_URI,
                "echoWithSimpleTypesRequest",
                Names.PREFIX));
       
        echoWithWrapperTypesHandler.setRequestParameterNames(new QName[]{
            new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p7",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p8",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p9",Names.PREFIX),
        });       
       
        echoWithWrapperTypesHandler.setResponseName(
            new QName(
                Names.NAMESPACE_URI,
                "echoWithSimpleTypesResponse",
                Names.PREFIX));
       
        echoWithWrapperTypesHandler.setReturnType(Result.class);
       
        ProxyHandler echoWithArrayOfWrapperTypes = new ReflectionProxyHandler();
        echoWithArrayOfWrapperTypes.setAction(Names.NAMESPACE_URI+"/"+"echoWithArrays");
        echoWithArrayOfWrapperTypes.setRequestName(
            new QName(
                Names.NAMESPACE_URI,
                "echoWithArraysRequest"
                Names.PREFIX));
       
        echoWithArrayOfWrapperTypes.setRequestParameterNames(new QName[]{
            new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p7",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p8",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p9",Names.PREFIX),
        });       
       
        echoWithArrayOfWrapperTypes.setResponseName(
            new QName(
                Names.NAMESPACE_URI,
                "echoWithArraysResponse",
                Names.PREFIX));
       
        echoWithArrayOfWrapperTypes.setReturnType(Result.class);
       
        ProxyHandler echoWithArrayOfPrimitiveTypes = new ReflectionProxyHandler();
        echoWithArrayOfPrimitiveTypes.setAction(Names.NAMESPACE_URI+"/"+"echoWithSimpleTypeArrays");
        echoWithArrayOfPrimitiveTypes.setRequestName(
            new QName(
                Names.NAMESPACE_URI,
                "echoWithSimpleTypeArraysRequest"
                Names.PREFIX));
       
        echoWithArrayOfPrimitiveTypes.setRequestParameterNames(new QName[]{
            new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
            new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX)});       
       
        echoWithArrayOfPrimitiveTypes.setResponseName(
            new QName(
                Names.NAMESPACE_URI,
                "echoWithSimpleTypeArraysResponse",
                Names.PREFIX));
       
        echoWithArrayOfPrimitiveTypes.setReturnType(Result.class);
       
        ProxyHandler echoWithByteArray = new EnhancedReflectionProxyHandler();
        echoWithByteArray.setAction(Names.NAMESPACE_URI+"/"+"echoWithByteArray");
        echoWithByteArray.setRequestName(
            new QName(
View Full Code Here

   *
   * @return a proxy handler.
   */
  private ProxyHandler createProxyHandler()
  {
        ProxyHandler handler = new ReflectionProxyHandler();
        handler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
        handler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", PREFIX));
        handler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", PREFIX)});
        handler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", PREFIX));
        handler.setReturnType(Element[].class);
        return handler;
  }
View Full Code Here

   *
   * @return a proxy handler.
   */
  private ProxyHandler createProxyHandler()
  {
        ProxyHandler handler = new ReflectionProxyHandler();
        handler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
        handler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", PREFIX));
        handler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", PREFIX)});
        handler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", PREFIX));
        handler.setReturnType(Element[].class);
        return handler;
  }
View Full Code Here

TOP

Related Classes of org.apache.muse.core.proxy.ReflectionProxyHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.