gpt4 book ai didi

org.apache.xmlrpc.parser.XmlRpcRequestParser类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 17:55:05 25 4
gpt4 key购买 nike

本文整理了Java中org.apache.xmlrpc.parser.XmlRpcRequestParser类的一些代码示例,展示了XmlRpcRequestParser类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlRpcRequestParser类的具体详情如下:
包路径:org.apache.xmlrpc.parser.XmlRpcRequestParser
类名称:XmlRpcRequestParser

XmlRpcRequestParser介绍

[英]A SAX parser for an org.apache.xmlrpc.client.XmlRpcClient's request.
[中]组织的SAX解析器。阿帕奇。xmlrpc。客户XmlRpcClient的请求。

代码示例

代码示例来源:origin: apache/ofbiz-framework

public String getMethodName() {
  return parser.getMethodName();
}
public int getParameterCount() {

代码示例来源:origin: apache/ofbiz-framework

protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig, InputStream pStream)
    throws XmlRpcException {
  final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory());
  final XMLReader xr = SAXParsers.newXMLReader();
  xr.setContentHandler(parser);
  try {
    xr.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
    xr.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
    xr.setFeature("http://xml.org/sax/features/external-general-entities", false);
    xr.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
    xr.parse(new InputSource(pStream));
  } catch (SAXException | IOException e) {
    throw new XmlRpcException("Failed to parse / read XML-RPC request: " + e.getMessage(), e);
  }
  final List<?> params = parser.getParams();
  return new XmlRpcRequest() {
    public XmlRpcRequestConfig getConfig() {
      return pConfig;
    }
    public String getMethodName() {
      return parser.getMethodName();
    }
    public int getParameterCount() {
      return params == null ? 0 : params.size();
    }
    public Object getParameter(int pIndex) {
      return params.get(pIndex);
    }
  };
}

代码示例来源:origin: rosjava/rosjava_core

throw new SAXParseException("Expected /methodName, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
    throw new SAXParseException("Expected /params, got "
        + new QName(pURI, pLocalName),
        getDocumentLocator());
    throw new SAXParseException("Expected /param, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
    throw new SAXParseException("Expected /value, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
  endValueTag();
  break;
default:

代码示例来源:origin: org.apache.xmlrpc/xmlrpc-common

throw new SAXParseException("Expected root element 'methodCall', got "
        + new QName(pURI, pLocalName),
        getDocumentLocator());
      throw new SAXParseException("Expected methodName element, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
      throw new SAXParseException("Expected params element, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
                  getDocumentLocator());
    throw new SAXParseException("Expected param element, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
    throw new SAXParseException("Expected value element, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
  startValueTag();
  break;
default:

代码示例来源:origin: rosjava/rosjava_core

protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig,
                  InputStream pStream) throws XmlRpcException {
  final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory());
  final XMLReader xr = SAXParsers.newXMLReader();
  xr.setContentHandler(parser);
  try {
    xr.parse(new InputSource(pStream));
  } catch (SAXException e) {
    Exception ex = e.getException();
    if (ex != null  &&  ex instanceof XmlRpcException) {
      throw (XmlRpcException) ex;
    }
    throw new XmlRpcException("Failed to parse XML-RPC request: " + e.getMessage(), e);
  } catch (IOException e) {
    throw new XmlRpcException("Failed to read XML-RPC request: " + e.getMessage(), e);
  }
  final List params = parser.getParams();
  return new XmlRpcRequest(){
    public XmlRpcRequestConfig getConfig() { return pConfig; }
    public String getMethodName() { return parser.getMethodName(); }
    public int getParameterCount() { return params == null ? 0 : params.size(); }
    public Object getParameter(int pIndex) { return params.get(pIndex); }
  };
}

代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-common

throw new SAXParseException("Expected /methodName, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
    throw new SAXParseException("Expected /params, got "
        + new QName(pURI, pLocalName),
        getDocumentLocator());
    throw new SAXParseException("Expected /param, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
    throw new SAXParseException("Expected /value, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
  endValueTag();
  break;
default:

代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-common

throw new SAXParseException("Expected root element 'methodCall', got "
        + new QName(pURI, pLocalName),
        getDocumentLocator());
      throw new SAXParseException("Expected methodName element, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
      throw new SAXParseException("Expected params element, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
                  getDocumentLocator());
    throw new SAXParseException("Expected param element, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
    throw new SAXParseException("Expected value element, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
  startValueTag();
  break;
default:

代码示例来源:origin: org.apache.xmlrpc/xmlrpc-server

protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig,
                  InputStream pStream) throws XmlRpcException {
  final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory());
  final XMLReader xr = SAXParsers.newXMLReader();
  xr.setContentHandler(parser);
  try {
    xr.parse(new InputSource(pStream));
  } catch (SAXException e) {
    Exception ex = e.getException();
    if (ex != null  &&  ex instanceof XmlRpcException) {
      throw (XmlRpcException) ex;
    }
    throw new XmlRpcException("Failed to parse XML-RPC request: " + e.getMessage(), e);
  } catch (IOException e) {
    throw new XmlRpcException("Failed to read XML-RPC request: " + e.getMessage(), e);
  }
  final List params = parser.getParams();
  return new XmlRpcRequest(){
    public XmlRpcRequestConfig getConfig() { return pConfig; }
    public String getMethodName() { return parser.getMethodName(); }
    public int getParameterCount() { return params == null ? 0 : params.size(); }
    public Object getParameter(int pIndex) { return params.get(pIndex); }
  };
}

代码示例来源:origin: org.apache.xmlrpc/xmlrpc-common

throw new SAXParseException("Expected /methodName, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
    throw new SAXParseException("Expected /params, got "
        + new QName(pURI, pLocalName),
        getDocumentLocator());
    throw new SAXParseException("Expected /param, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
    throw new SAXParseException("Expected /value, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
  endValueTag();
  break;
default:

代码示例来源:origin: rosjava/rosjava_core

throw new SAXParseException("Expected root element 'methodCall', got "
        + new QName(pURI, pLocalName),
        getDocumentLocator());
      throw new SAXParseException("Expected methodName element, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
      throw new SAXParseException("Expected params element, got "
                    + new QName(pURI, pLocalName),
                    getDocumentLocator());
                  getDocumentLocator());
    throw new SAXParseException("Expected param element, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
    throw new SAXParseException("Expected value element, got "
                  + new QName(pURI, pLocalName),
                  getDocumentLocator());
  startValueTag();
  break;
default:

代码示例来源:origin: rosjava/rosjava_core

public String getMethodName() { return parser.getMethodName(); }
public int getParameterCount() { return params == null ? 0 : params.size(); }

代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-server

protected XmlRpcRequest getRequest(final XmlRpcStreamRequestConfig pConfig,
                  InputStream pStream) throws XmlRpcException {
  final XmlRpcRequestParser parser = new XmlRpcRequestParser(pConfig, getTypeFactory());
  final XMLReader xr = SAXParsers.newXMLReader();
  xr.setContentHandler(parser);
  try {
    xr.parse(new InputSource(pStream));
  } catch (SAXException e) {
    Exception ex = e.getException();
    if (ex != null  &&  ex instanceof XmlRpcException) {
      throw (XmlRpcException) ex;
    }
    throw new XmlRpcException("Failed to parse XML-RPC request: " + e.getMessage(), e);
  } catch (IOException e) {
    throw new XmlRpcException("Failed to read XML-RPC request: " + e.getMessage(), e);
  }
  final List params = parser.getParams();
  return new XmlRpcRequest(){
    public XmlRpcRequestConfig getConfig() { return pConfig; }
    public String getMethodName() { return parser.getMethodName(); }
    public int getParameterCount() { return params == null ? 0 : params.size(); }
    public Object getParameter(int pIndex) { return params.get(pIndex); }
  };
}

代码示例来源:origin: org.apache.xmlrpc/xmlrpc-server

public String getMethodName() { return parser.getMethodName(); }
public int getParameterCount() { return params == null ? 0 : params.size(); }

代码示例来源:origin: org.sonatype.sisu/sisu-xmlrpc-server

public String getMethodName() { return parser.getMethodName(); }
public int getParameterCount() { return params == null ? 0 : params.size(); }

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com