Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlOperation$WsdlFaultPart


        mockOperation.setOperation(createWsdlOperation());
        return mockOperation;
    }

    public WsdlOperation createWsdlOperation() throws Exception {
        WsdlOperation operation = mock(WsdlOperation.class);

        BindingOperation bindingOperation = mock(BindingOperation.class);
        when(operation.getBindingOperation()).thenReturn(bindingOperation);

        WsdlInterface wsdlInterface = createWsdlInterface();
        when(operation.getInterface()).thenReturn(wsdlInterface);
        return operation;
    }
View Full Code Here


        restTestRequestStep.getConfig().setConfig(ModelItemFactory.makeRestRequest().getConfig());
        return restTestRequestStep;
    }

    public static WsdlOperation makeWsdlOperation() throws SoapUIException {
        return new WsdlOperation(makeWsdlInterface(), OperationConfig.Factory.newInstance());
    }
View Full Code Here

        return "Schema compliance OK";
    }

    private DefinitionContext<?> getWsdlContext(WsdlMessageExchange messageExchange, SubmitContext context)
            throws Exception {
        WsdlOperation operation = messageExchange.getOperation();
        WsdlInterface iface = operation.getInterface();
        String def = PathUtils.expandPath(definition, iface, context);
        if (StringUtils.isNullOrEmpty(def) || def.equals(iface.getDefinition())) {
            definitionContext = (iface).getWsdlContext();
            definitionContext.loadIfNecessary();
        } else {
View Full Code Here

    public WsdlInterface[] getMockedInterfaces() {
        Set<WsdlInterface> result = new HashSet<WsdlInterface>();

        for (MockOperation mockOperation : getMockOperationList()) {
            WsdlOperation operation = (WsdlOperation) mockOperation.getOperation();
            if (operation != null) {
                result.add(operation.getInterface());
            }
        }

        return result.toArray(new WsdlInterface[result.size()]);
    }
View Full Code Here

            getConfig().setInterface(arg0.getNewValue().toString());
        }
    }

    public void setOperation(WsdlOperation operation) {
        WsdlOperation oldOperation = getOperation();

        if (operation == null) {
            getConfig().unsetInterface();
            getConfig().unsetOperation();
        } else {
View Full Code Here

        // {
        // throw new AssertionException( new AssertionError( "WS-A not enabled" )
        // );
        // }

        WsdlOperation operation = messageExchange.getOperation();

        if (wsaAssertionConfiguration.isAssertAction()) {
            assertProperty("Wsa:Action", "Action");
        }
        validateWsAddressingCommon(content);
        if (operation.isRequestResponse()) {
            if (wsaAssertionConfiguration.isAssertMessageId()) {
                // MessageId is Mandatory
                assertProperty("Wsa:MessageId", "MessageId");
            }
            if (wsaAssertionConfiguration.isAssertReplyTo()) {
View Full Code Here

    public OpenRequestForMockOperationAction() {
        super("Open Request", "Opens/Creates a request for this MockOperation with correct endpoint");
    }

    public void perform(WsdlMockOperation mockOperation, Object param) {
        WsdlOperation operation = mockOperation.getOperation();
        if (operation == null) {
            UISupport.showErrorMessage("Missing operation for this mock response");
            return;
        }

        String[] names = ModelSupport.getNames(operation.getRequestList(), new String[]{"-> Create New"});

        String name = (String) UISupport.prompt("Select Request for Operation [" + operation.getName() + "] "
                + "to open or create", "Open Request", names);
        if (name != null) {
            WsdlRequest request = operation.getRequestByName(name);
            if (request == null) {
                name = UISupport.prompt("Specify name of new request", "Open Request",
                        "Request " + (operation.getRequestCount() + 1));
                if (name == null) {
                    return;
                }

                boolean createOptional = operation.getSettings().getBoolean(
                        WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS);
                if (!createOptional) {
                    createOptional = UISupport.confirm("Create optional elements from schema?", "Create Request");
                }

                request = operation.addNewRequest(name);
                String requestContent = operation.createRequest(createOptional);
                if (requestContent != null) {
                    request.setRequestContent(requestContent);
                }
            }
View Full Code Here

    }

    public SchemaTypeSystem getTypeSystem() {
        try {
            if (mockResponse instanceof WsdlMockResponse) {
                WsdlOperation operation = (WsdlOperation) mockResponse.getMockOperation().getOperation();
                if (operation != null) {
                    WsdlInterface iface = operation.getInterface();
                    WsdlContext wsdlContext = iface.getWsdlContext();
                    return wsdlContext.getSchemaTypeSystem();
                }
            }
        } catch (Exception e1) {
View Full Code Here

    }

    public SchemaTypeSystem getTypeSystem() {
        try {
            if (mockResponse instanceof WsdlMockResponse) {
                WsdlOperation operation = (WsdlOperation) mockResponse.getMockOperation().getOperation();
                if (operation != null) {
                    WsdlInterface iface = operation.getInterface();
                    WsdlContext wsdlContext = iface.getWsdlContext();
                    return wsdlContext.getSchemaTypeSystem();
                }
            }
        } catch (Exception e1) {
View Full Code Here

        putValue(Action.SMALL_ICON, UISupport.createImageIcon("/create_empty_fault.gif"));
        putValue(Action.SHORT_DESCRIPTION, "Creates an SOAP Fault response");
    }

    public void actionPerformed(ActionEvent e) {
        WsdlOperation operation = (WsdlOperation) mockResponse.getMockOperation().getOperation();
        if (operation == null) {
            UISupport.showErrorMessage("Missing operation for this mock response");
            return;
        }

        if (UISupport.confirm("Overwrite current response with a fault message?", "Create Fault")) {
            WsdlInterface iface = operation.getInterface();
            MessagePart[] faultParts = operation.getFaultParts();

            if (faultParts != null && faultParts.length > 0) {
                List<String> names = new ArrayList<String>();
                for (int c = 0; c < faultParts.length; c++) {
                    names.add(faultParts[c].getName());
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlOperation$WsdlFaultPart

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.