com.alipay.api.internal.parser.xml.ObjectXmlParser Java Examples

The following examples show how to use com.alipay.api.internal.parser.xml.ObjectXmlParser. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractAlipayClient.java    From alipay-sdk-java-all with Apache License 2.0 6 votes vote down vote up
public <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken,
                                            String appAuthToken, String targetAppId) throws AlipayApiException {

    //如果根证书序列号非空,抛异常提示开发者使用certificateExecute
    if (!StringUtils.isEmpty(this.alipayRootCertSN)) {
        throw new AlipayApiException("检测到证书相关参数已初始化,证书模式下请改为调用certificateExecute");
    }

    AlipayParser<T> parser = null;
    if (AlipayConstants.FORMAT_XML.equals(this.format)) {
        parser = new ObjectXmlParser<T>(request.getResponseClass());
    } else {
        parser = new ObjectJsonParser<T>(request.getResponseClass());
    }

    return _execute(request, parser, accessToken, appAuthToken, targetAppId);
}
 
Example #2
Source File: DefaultAlipayClient.java    From alipay-sdk with Apache License 2.0 5 votes vote down vote up
public <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken,
                                            String appAuthToken) throws AlipayApiException {

    AlipayParser<T> parser = null;
    if (AlipayConstants.FORMAT_XML.equals(this.format)) {
        parser = new ObjectXmlParser<T>(request.getResponseClass());
    } else {
        parser = new ObjectJsonParser<T>(request.getResponseClass());
    }

    return _execute(request, parser, accessToken, appAuthToken);
}
 
Example #3
Source File: DefaultAlipayClient.java    From pay with Apache License 2.0 5 votes vote down vote up
public <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken,
                                            String appAuthToken) throws AlipayApiException {

    AlipayParser<T> parser = null;
    if (AlipayConstants.FORMAT_XML.equals(this.format)) {
        parser = new ObjectXmlParser<T>(request.getResponseClass());
    } else {
        parser = new ObjectJsonParser<T>(request.getResponseClass());
    }

    return _execute(request, parser, accessToken, appAuthToken);
}