Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlInterface$BindingTuple


                if (attrs != null && attrs.length > 0) {
                    return attrs[0];
                }
            }

            WsdlInterface iface = operation.getInterface();

            Definition definition = iface.getWsdlContext().getDefinition();
            String targetNamespace = WsdlUtils.getTargetNamespace(definition);
            String portTypeName = iface.getBinding().getPortType().getQName().getLocalPart();
            String operationName = operation.getName();
            if (!StringUtils.isNullOrEmpty(operationName)) {
                Operation op = iface.getBinding().getPortType().getOperation(operationName, null, null);
                if (op != null) {
                    attributeExtensible = output ? op.getOutput() : op.getInput();
                    attrs = WsdlUtils.getExentsibilityAttributes(attributeExtensible, new QName(
                            WsaUtils.WS_A_NAMESPACE_200705, "Action"));
                    if (attrs != null && attrs.length > 0) {
View Full Code Here


    @SuppressWarnings("unchecked")
    public WsdlInterface importBinding(WsdlProject project, WsdlContext wsdlContext, Binding binding) throws Exception {
        String name = project.getSettings().getBoolean(WsdlSettings.NAME_WITH_BINDING) ? binding.getQName()
                .getLocalPart() : binding.getPortType().getQName().getLocalPart();

        WsdlInterface iface = (WsdlInterface) project.addNewInterface(name, WsdlInterfaceFactory.WSDL_TYPE);
        iface.setBindingName(binding.getQName());
        iface.setSoapVersion(SoapVersion.Soap12);

        String[] endpoints = WsdlUtils.getEndpointsForBinding(wsdlContext.getDefinition(), binding);
        for (int i = 0; i < endpoints.length; i++) {
            log.info("importing endpoint " + endpoints[i]);
            iface.addEndpoint(endpoints[i]);
        }

        List<BindingOperation> list = binding.getBindingOperations();
        Collections.sort(list, new BindingOperationComparator());

        for (Iterator<BindingOperation> iter = list.iterator(); iter.hasNext(); ) {
            BindingOperation operation = (BindingOperation) iter.next();

            // sanity check
            if (operation.getOperation() == null || operation.getOperation().isUndefined()) {
                log.error("BindingOperation [" + operation.getName() + "] is missing or referring to an invalid operation");
            } else {
                log.info("importing operation " + operation.getName());
                iface.addNewOperation(operation);
            }
        }

        initWsAddressing(binding, iface, wsdlContext.getDefinition());
View Full Code Here

            if (targetProject == null) {
                return;
            }
        }

        WsdlInterface targetIface = (WsdlInterface) targetProject.getInterfaceByTechnicalId(iface.getTechnicalId());
        if (targetIface != null) {
            UISupport.showErrorMessage("Target Project already contains Interface for binding");
        } else {
            boolean importEndpoints = UISupport.confirm("Import endpoint defaults also?", getName());
            UISupport.select(targetProject.importInterface(iface, importEndpoints, true));
View Full Code Here

        if (dialog.show()) {
            String ifaceName = dialog.getValue(Form.INTERFACE);
            String operationName = dialog.getValue(Form.OPERATION);

            WsdlInterface iface = (WsdlInterface) project.getInterfaceByName(ifaceName);
            operation = iface.getOperationByName(operationName);
            target.setOperation(operation);

            String name = dialog.getValue(Form.NAME).trim();
            if (name.length() > 0 && !target.getName().equals(name)) {
                target.setName(name);
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) {
            SoapUI.logError(e1);
View Full Code Here

            fireContentChanged();
        }
    }

    public SchemaTypeSystem getTypeSystem() {
        WsdlInterface iface = request.getOperation().getInterface();
        WsdlContext wsdlContext = iface.getWsdlContext();
        try {
            return wsdlContext.getSchemaTypeSystem();
        } catch (Exception e1) {
            SoapUI.logError(e1);
            return XmlBeans.getBuiltinTypeSystem();
View Full Code Here

            updating = false;
        }
    }

    public SchemaTypeSystem getTypeSystem() {
        WsdlInterface iface = request.getOperation().getInterface();
        WsdlContext wsdlContext = iface.getWsdlContext();
        try {
            return wsdlContext.getSchemaTypeSystem();
        } catch (Exception e1) {
            SoapUI.logError(e1);
            return XmlBeans.getBuiltinTypeSystem();
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) {
            SoapUI.logError(e1);
View Full Code Here

            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());
                }

                String faultName = UISupport.prompt("Select fault detail to generate", "Create Fault", names);
                if (faultName != null) {
                    FaultPart faultPart = (FaultPart) faultParts[names.indexOf(faultName)];
                    mockResponse.setResponseContent(iface.getMessageBuilder().buildFault(faultPart));
                }
            } else {
                mockResponse.setResponseContent(iface.getMessageBuilder().buildEmptyFault());
            }
        }
    }
View Full Code Here

            UISupport.showErrorMessage("Missing operation for this mock response");
            return;
        }

        if (UISupport.confirm("Overwrite current response with empty one?", "Create Empty")) {
            WsdlInterface iface = operation.getInterface();
            mockResponse.setResponseContent(iface.getMessageBuilder().buildEmptyMessage());
        }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlInterface$BindingTuple

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.