Examples of RESTUtil


Examples of org.apache.axis2.transport.http.util.RESTUtil

        } else
        if (!disableREST && enableRESTInAxis2MainServlet) { // if the main servlet should handle REST also
            MessageContext messageContext = null;
            try {
                messageContext = createMessageContext(req, resp);
                new RESTUtil(configContext).processGetRequest(messageContext,
                        req,
                        resp);
            } catch (Exception e) {
                log.error(e);
                if (messageContext != null) {
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

        String contentType = req.getContentType();

        if (!disableREST && enableRESTInAxis2MainServlet && isRESTRequest(contentType, req)) {
            msgContext = createMessageContext(req, res);
            try {
                new RESTUtil(configContext).processPostRequest(msgContext,
                        req,
                        res);
            } catch (Exception e) {
                log.error(e);
                if (msgContext != null) {
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

        } else
        if (!disableREST && enableRESTInAxis2MainServlet) { // if the main servlet should handle REST also
            MessageContext messageContext = null;
            try {
                messageContext = createMessageContext(req, resp);
                new RESTUtil(configContext).processGetRequest(messageContext,
                        req,
                        resp);
            } catch (Exception e) {
                log.error(e);
                if (messageContext != null) {
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

        OutputStream out = res.getOutputStream();

        if (!disableREST && enableRESTInAxis2MainServlet && isRESTRequest(req)) {
            msgContext = createMessageContext(req, res);
            try {
                new RESTUtil(configContext).processPostRequest(msgContext,
                        req,
                        res);
            } catch (Exception e) {
                log.error(e);
                if (msgContext != null) {
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

                         HttpServletResponse resp) throws ServletException, IOException {
        if (!disableREST && !disableSeperateEndpointForREST) {
            MessageContext messageContext = null;
            try {
                messageContext = createMessageContext(req, resp);
                new RESTUtil(configContext).processGetRequest(messageContext,
                        req,
                        resp);
            } catch (Exception e) {
                log.error(e);
                if (messageContext != null) {
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

            throws ServletException, IOException {
        if (!disableREST && !disableSeperateEndpointForREST) {
            MessageContext messageContext = null;
            try {
                messageContext = createMessageContext(req, resp);
                new RESTUtil(configContext).processPostRequest(messageContext,
                        req,
                        resp);
            } catch (Exception e) {
                log.error(e);
                if (messageContext != null) {
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

public class AxisRESTServlet extends AxisServlet {

    protected void doGet(HttpServletRequest req,
                         HttpServletResponse resp) throws ServletException, IOException {

        new RESTUtil(configContext).processGetRequest(createMessageContext(req, resp),
                                                      req,
                                                      resp);
    }
View Full Code Here

Examples of org.apache.axis2.transport.http.util.RESTUtil

                                                      resp);
    }

    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
            throws ServletException, IOException {
        new RESTUtil(configContext).processPostRequest(createMessageContext(req, resp),
                                                       req,
                                                       resp);
    }
View Full Code Here

Examples of org.cloudfoundry.client.lib.util.RestUtil

  private ObjectMapper objectMapper;

  private final Map<URL, Map<String, Object>> infoCache = new HashMap<URL, Map<String, Object>>();

  public CloudControllerClientFactory(HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) {
    this.restUtil = new RestUtil();
    this.restTemplate = restUtil.createRestTemplate(httpProxyConfiguration, trustSelfSignedCerts);

    this.httpProxyConfiguration = httpProxyConfiguration;
    this.trustSelfSignedCerts = trustSelfSignedCerts;
View Full Code Here

Examples of org.cloudfoundry.client.lib.util.RestUtil

    // When called directly without a proxy, expect an exception to be thrown due to byteman rules
    assertNetworkCallFails(restTemplate, new HttpComponentsClientHttpRequestFactory());
    // Repeat that with different request factory used in the code as this exercises different byteman rules
    assertNetworkCallFails(restTemplate, new SimpleClientHttpRequestFactory());
    // And with the actual one used by RestUtil, without a proxy configured
    assertNetworkCallFails(restTemplate, new RestUtil().createRequestFactory(null, false));

    // Test with the in-JVM proxy configured
    HttpProxyConfiguration localProxy = new HttpProxyConfiguration("127.0.0.1", inJvmProxyPort);
    ClientHttpRequestFactory requestFactory = new RestUtil().createRequestFactory(localProxy, CCNG_API_SSL);

    restTemplate.setRequestFactory(requestFactory);
    restTemplate.execute(CCNG_API_URL + "/info", HttpMethod.GET, null, null);

    // then executes fine, and the jetty proxy indeed received one request
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.