Package com.eviware.soapui.support.types

Examples of com.eviware.soapui.support.types.StringToStringsMap


    private TestCaseConfig getTestCaseConfig(AMFRequest amfRequest) {
        return amfRequest.getTestStep().getTestCase().getConfig();
    }

    private void addHttpHeaders(AMFRequest amfRequest, SoapUIAMFConnection amfConnection) {
        StringToStringsMap httpHeaders = amfRequest.getHttpHeaders();
        if (httpHeaders != null) {
            for (String key : httpHeaders.getKeys()) {
                for (String value : httpHeaders.get(key)) {
                    amfConnection.addHttpRequestHeader(key, context.expand(value));
                }
            }
        }
    }
View Full Code Here


    public void setTimeTolive(long timeTolive) {
        this.timeTolive = timeTolive;
    }

    public static StringToStringsMap getMessageHeadersAndProperties(Message message) {
        StringToStringsMap headermap = new StringToStringsMap();
        try {
            headermap.put(JMSDELIVERYMODE, String.valueOf(message.getJMSDeliveryMode()));
            headermap.put(JMSEXPIRATION, String.valueOf(message.getJMSExpiration()));
            headermap.put(JMSPRIORITY, String.valueOf(message.getJMSPriority()));
            headermap.put(JMSTIMESTAMP, String.valueOf(message.getJMSTimestamp()));
            headermap.put(JMSREDELIVERED, String.valueOf(message.getJMSRedelivered()));

            if (message.getJMSDestination() != null) {
                headermap.put(JMSDESTINATION, String.valueOf(message.getJMSDestination()));
            }

            if (message.getJMSMessageID() != null) {
                headermap.put(JMSMESSAGEID, message.getJMSMessageID());
            }

            if (message.getJMSCorrelationID() != null) {
                headermap.put(JMSCORRELATIONID, message.getJMSCorrelationID());
            }

            if (message.getJMSReplyTo() != null) {
                headermap.put(JMSREPLYTO, String.valueOf(message.getJMSReplyTo()));
            }

            if (message.getJMSType() != null) {
                headermap.put(JMSTYPE, message.getJMSType());
            }

            Enumeration<?> properties = message.getPropertyNames();
            while (properties.hasMoreElements()) {
                String key = (String) properties.nextElement();
                headermap.put(key, message.getStringProperty(key));
            }

        } catch (JMSException e) {
            SoapUI.logError(e);
        }
View Full Code Here

    public PropertyExpansion[] getPropertyExpansions() {
        PropertyExpansionsResult result = new PropertyExpansionsResult(this, this);
        result.addAll(super.getPropertyExpansions());

        StringToStringsMap requestHeaders = getRequestHeaders();
        for (Map.Entry<String, List<String>> headerEntry : requestHeaders.entrySet()) {
            for (String value : headerEntry.getValue()) {
                result.addAll(PropertyExpansionUtils.extractPropertyExpansions(this,
                        new HttpTestRequestStep.RequestHeaderHolder(headerEntry.getKey(), value, this), "value"));
            }
        }
View Full Code Here

    public StringToStringsMap getRequestHeaders() {
        if (messageSend != null) {
            return JMSHeader.getMessageHeadersAndProperties(messageSend);
        } else {
            return new StringToStringsMap();
        }

    }
View Full Code Here

    public StringToStringsMap getResponseHeaders() {
        if (messageReceive != null) {
            return JMSHeader.getMessageHeadersAndProperties(messageReceive);
        } else {
            return new StringToStringsMap();
        }
    }
View Full Code Here

        capturedData.setRawResponseData(getResponseToBytes(response.toString(), postMethod,
                capturedData.getRawResponseBody()));

        listenerCallBack.fireAfterProxy(project, request, response, postMethod, capturedData);

        StringToStringsMap responseHeaders = capturedData.getResponseHeaders();
        // copy headers to response
        HttpServletResponse httpServletResponse = (HttpServletResponse) response;
        for (Map.Entry<String, List<String>> headerEntry : responseHeaders.entrySet()) {
            for (String header : headerEntry.getValue()) {
                httpServletResponse.addHeader(headerEntry.getKey(), header);
            }

        }
View Full Code Here

        fireTableRowsDeleted(row, row);
    }

    public StringToStringsMap getData() {
        return new StringToStringsMap(data);
    }
View Full Code Here

    public StringToStringsMap getData() {
        return new StringToStringsMap(data);
    }

    public synchronized void setData(StringToStringsMap newData) {
        data = newData == null ? new StringToStringsMap() : new StringToStringsMap(newData);

        keyList.clear();
        for (String key : data.keySet()) {
            for (String value : data.get(key)) {
                keyList.add(new NameValuePair(key, value));
View Full Code Here

        }
    }

    private void cleanUpAcceptEncoding() {
        if (StringUtils.hasContent(getAccept())) {
            StringToStringsMap requestHeaders = getRequestHeaders();
            requestHeaders.add(ACCEPT_HEADER_NAME, getAccept());
            setRequestHeaders(requestHeaders);
            setAccept(null);
        }
    }
View Full Code Here

    public PropertyExpansion[] getPropertyExpansions() {
        List<PropertyExpansion> result = new ArrayList<PropertyExpansion>();

        result.addAll(PropertyExpansionUtils.extractPropertyExpansions(this, mockResponse, "responseContent"));

        StringToStringsMap responseHeaders = mockResponse.getResponseHeaders();
        for (Map.Entry<String, List<String>> headerEntry : responseHeaders.entrySet()) {
            for (String value : headerEntry.getValue()) {
                result.addAll(PropertyExpansionUtils.extractPropertyExpansions(this,
                        new ResponseHeaderHolder(headerEntry.getKey(), value, mockResponse), "value"));
            }
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.types.StringToStringsMap

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.