Package com.eviware.soapui.impl.wsdl.support.soap

Examples of com.eviware.soapui.impl.wsdl.support.soap.SoapVersion


    }

    public static String getFaultCode(WsdlMessageExchange messageExchange) {
        try {
            XmlObject xmlObject = XmlUtils.createXmlObject(messageExchange.getResponseContent());
            SoapVersion soapVersion = messageExchange.getOperation().getInterface().getSoapVersion();

            Element body = (Element) SoapUtils.getBodyElement(xmlObject, soapVersion).getDomNode();
            Element soapenvFault = XmlUtils.getFirstChildElementNS(body, "http://schemas.xmlsoap.org/soap/envelope/",
                    "Fault");
            Element faultCode = XmlUtils.getFirstChildElement(soapenvFault, "faultcode");
View Full Code Here


        }
    }

    public void validateWsAddressingRequest() throws AssertionException, XmlException {
        String content = messageExchange.getRequestContent();
        SoapVersion soapVersion = messageExchange.getOperation().getInterface().getSoapVersion();

        // XmlObject xmlObject = XmlObject.Factory.parse( content );
        XmlObject xmlObject = XmlUtils.createXmlObject(content);
        header = (Element) SoapUtils.getHeaderElement(xmlObject, soapVersion, true).getDomNode();
View Full Code Here

        }
    }

    public void validateWsAddressingResponse() throws AssertionException, XmlException {
        String content = messageExchange.getResponseContent();
        SoapVersion soapVersion = messageExchange.getOperation().getInterface().getSoapVersion();

        // XmlObject requestXmlObject = XmlObject.Factory.parse(
        // messageExchange.getRequestContent() );
        XmlObject requestXmlObject = XmlUtils.createXmlObject(messageExchange.getRequestContent());
        // XmlObject xmlObject = XmlObject.Factory.parse( content );
View Full Code Here

            if (wsrmMap == null) {
                wsrmMap = new HashMap<String, WsrmSequence>();
            }
            WsdlTestRequestStep requestStep = (WsdlTestRequestStep) testStep;
            String endpoint = requestStep.getHttpRequest().getEndpoint();
            SoapVersion soapVersion = requestStep.getOperation().getInterface().getSoapVersion();
            if (!wsrmMap.containsKey(endpoint)) {

                WsrmUtils utils = new WsrmUtils(soapVersion);
                WsrmSequence sequence = utils.createSequence(endpoint, soapVersion, testCase.getWsrmVersionNamespace(),
                        testCase.getWsrmAckTo(), testCase.getWsrmExpires(), requestStep.getOperation(), null, null);
View Full Code Here

        this.requestContent = requestContent;
        this.isXOP = isXOP;
    }

    public String getContentType() {
        SoapVersion soapVersion = wsdlRequest.getOperation().getInterface().getSoapVersion();

        if (isXOP) {
            return AttachmentUtils.buildRootPartContentType(wsdlRequest.getOperation().getName(), soapVersion);
        } else {
            return soapVersion.getContentType() + "; charset=UTF-8";
        }
    }
View Full Code Here

        }
    }

    public Header getContentType() {
        try {
            SoapVersion soapVersion = wsdlRequest.getOperation().getInterface().getSoapVersion();

            if (isXOP) {
                String header = message.getHeader("Content-Type")[0];

                return new BasicHeader("Content-Type", AttachmentUtils.buildMTOMContentType(header,
                        wsdlRequest.getAction(), soapVersion));
            } else {
                String header = message.getHeader("Content-Type")[0];
                int ix = header.indexOf("boundary");

                return new BasicHeader("Content-Type", "multipart/related; type=\"" + soapVersion.getContentType()
                        + "\"; " + "start=\"" + AttachmentUtils.ROOTPART_SOAPUI_ORG + "\"; " + header.substring(ix));
            }
        } catch (MessagingException e) {
            SoapUI.logError(e);
        }
View Full Code Here

        this.isXOP = isXOP;
    }

    public String getContentType() {
        if (mockResponse instanceof WsdlMockResponse) {
            SoapVersion soapVersion = ((WsdlMockResponse) mockResponse).getSoapVersion();

            if (isXOP) {
                return AttachmentUtils.buildRootPartContentType(mockResponse.getMockOperation().getOperation().getName(),
                        soapVersion);
            } else {
                return soapVersion.getContentType() + "; charset=UTF-8";
            }
        } else {
            throw new IllegalStateException("Multipart support is only available for SOAP");
        }
    }
View Full Code Here

    }

    public Header getContentType() {
        try {
            if (mockResponse instanceof WsdlMockResponse) {
                SoapVersion soapVersion = ((WsdlMockResponse) mockResponse).getSoapVersion();

                if (isXOP) {
                    String header = message.getHeader("Content-Type")[0];
                    return new BasicHeader("Content-Type", AttachmentUtils.buildMTOMContentType(header, null, soapVersion));
                } else {
                    String header = message.getHeader("Content-Type")[0];
                    int ix = header.indexOf("boundary");
                    return new BasicHeader("Content-Type", "multipart/related; type=\"" + soapVersion.getContentType()
                            + "\"; start=\"" + AttachmentUtils.ROOTPART_SOAPUI_ORG + "\"; " + header.substring(ix));
                }
            } else {
                throw new IllegalStateException("Multipart support is only available for SOAP");
            }
View Full Code Here

        WsdlMockResult result = null;

        try {
            long timestamp = System.currentTimeMillis();

            SoapVersion soapVersion = mockRequest.getSoapVersion();
            if (soapVersion == null) {
                throw new DispatchException("Unrecognized SOAP Version");
            }

            String soapAction = mockRequest.getSoapAction();
View Full Code Here

    public Attachment[] getAttachments() {
        return attachments.toArray(new Attachment[attachments.size()]);
    }

    protected String getContentType(Operation operation, String encoding) {
        SoapVersion soapVersion = ((WsdlOperation) operation).getInterface().getSoapVersion();
        return soapVersion.getContentTypeHttpHeader(encoding, null);
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.support.soap.SoapVersion

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.