Package org.apache.xmlrpc

Examples of org.apache.xmlrpc.XmlRpcException


      throws XmlRpcException {
        final Throwable error = convertThrowable(pError);
        final int code;
    final String message;
    if (error instanceof XmlRpcException) {
      XmlRpcException ex = (XmlRpcException) error;
      code = ex.code;
    } else {
      code = 0;
    }
    message = error.getMessage();
    try {
      getXmlRpcWriter(pConfig, pStream).write(pConfig, code, message, error);
    } catch (SAXException e) {
      throw new XmlRpcException("Failed to write XML-RPC response: " + e.getMessage(), e);
    }
  }
View Full Code Here


        }
      }
            pConnection.close();
      pConnection = null;
    } catch (IOException e) {
      throw new XmlRpcException("I/O error while processing request: "
          + e.getMessage(), e);
    } finally {
      if (pConnection != null) { try { pConnection.close(); } catch (Throwable ignore) {} }
    }
    log.debug("execute: <-");
View Full Code Here

            log.error( "Can't load component.", e );
        }

        if ( obj == null )
        {
            throw new XmlRpcException( "Handler bean not found for: " + cls );
        }

        return obj;
    }
View Full Code Here

                    }
                    return invoke( instance, methodData.method, args );
                }
            }
        }
        throw new XmlRpcException( "No method matching arguments: " + Util.getSignature( args ) );
    }
View Full Code Here

        {
            return pMethod.invoke( pInstance, pArgs );
        }
        catch ( IllegalAccessException e )
        {
            throw new XmlRpcException( "Illegal access to method " + pMethod.getName() + " in class " + clazz.getName(),
                                       e );
        }
        catch ( IllegalArgumentException e )
        {
            throw new XmlRpcException(
                "Illegal argument for method " + pMethod.getName() + " in class " + clazz.getName(), e );
        }
        catch ( InvocationTargetException e )
        {
            Throwable t = e.getTargetException();
            if ( t instanceof XmlRpcException )
            {
                throw (XmlRpcException) t;
            }
            throw new XmlRpcException(
                "Failed to invoke method " + pMethod.getName() + " in class " + clazz.getName() + ": " + t.getMessage(),
                t );
        }
        finally
        {
View Full Code Here

       
            if( amm.login( m_context.getWikiSession(), m_context.getHttpRequest(), username, password ) )
            {
                if( !mgr.checkPermission( m_context.getWikiSession(), PermissionFactory.getPagePermission( page, permission ) ))
                {
                    throw new XmlRpcException( 1, "No permission" );
                }  
            }
            else
            {
                throw new XmlRpcException( 1, "Unknown login" );
            }
        }
        catch( WikiSecurityException e )
        {
            throw new XmlRpcException( 1, e.getMessage(), e );
        }
        return;
    }
View Full Code Here

        }
        catch( ProviderException e )
        {
            log.error( "Failed to list recent posts", e );

            throw new XmlRpcException( 0, e.getMessage() );
        }

        return result;
    }
View Full Code Here

            engine.saveText( context, text.toString() );
        }
        catch( Exception e )
        {
            log.error("Failed to create weblog entry",e);
            throw new XmlRpcException( 0, "Failed to create weblog entry: "+e.getMessage() );
        }

        return ""; // FIXME:
    }
View Full Code Here

            url = engine.getURL( WikiContext.ATTACH, att.getName(), null, true );
        }
        catch( Exception e )
        {
            log.error( "Failed to upload attachment", e );
            throw new XmlRpcException( 0, "Failed to upload media object: "+e.getMessage() );
        }

        Hashtable<String, Object> result = new Hashtable<String, Object>();
        result.put("url", url);
View Full Code Here

            engine.saveText( context, text.toString() );
        }
        catch( Exception e )
        {
            log.error("Failed to create weblog entry",e);
            throw new XmlRpcException( 0, "Failed to update weblog entry: "+e.getMessage() );
        }

        return true;
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlrpc.XmlRpcException

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.