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

Examples of com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext


    public WsdlInterface createWsdlInterface() throws Exception {
        WsdlInterface wsdlInterface = mock(WsdlInterface.class);
        when(wsdlInterface.getSoapVersion()).thenReturn(SoapVersion.Soap12);

        WsdlContext wsdlContext = createWsdlContext();
        when(wsdlInterface.getWsdlContext()).thenReturn(wsdlContext);

        return wsdlInterface;
    }
View Full Code Here


        return wsdlInterface;
    }

    public WsdlContext createWsdlContext() throws Exception {
        WsdlContext wsdlContext = mock(WsdlContext.class);
        when(wsdlContext.hasSchemaTypes()).thenReturn(true);

        Definition definition = mock(Definition.class);
        when(wsdlContext.getDefinition()).thenReturn(definition);

        return wsdlContext;
    }
View Full Code Here

        return "Schema compliance OK";
    }

    private String assertWsdlResponse(WsdlMessageExchange messageExchange, SubmitContext context)
            throws AssertionException {
        WsdlContext wsdlContext;
        try {
            wsdlContext = (WsdlContext) getWsdlContext(messageExchange, context);
        } catch (Exception e1) {
            throw new AssertionException(new AssertionError(e1.getMessage()));
        }
View Full Code Here

    private synchronized WsdlContext getContext(String wsdlLocation, SoapVersion soapVersion) throws Exception {
        if (wsdlContextMap.containsKey(wsdlLocation)) {
            return wsdlContextMap.get(wsdlLocation);
        } else {
            WsdlContext newWsdlContext = new WsdlContext(wsdlLocation, soapVersion);
            newWsdlContext.load();
            wsdlContextMap.put(wsdlLocation, newWsdlContext);
            return newWsdlContext;
        }
    }
View Full Code Here

        return true;
    }

    private boolean canLoadDefinitionFrom(String definitionURL) {
        try {
            new WsdlContext(definitionURL).load();
            return true;
        } catch (Exception e) {
            try {
                new WadlDefinitionContext(definitionURL).load();
                return true;
View Full Code Here

        return builder.add("definition", definition).finish();
    }

    protected String internalAssertRequest(MessageExchange messageExchange, SubmitContext context)
            throws AssertionException {
        WsdlContext wsdlContext;
        try {
            wsdlContext = (WsdlContext) getWsdlContext((WsdlMessageExchange) messageExchange, context);
        } catch (Exception e1) {
            throw new AssertionException(new AssertionError(e1.getMessage()));
        }
View Full Code Here

        return true;
    }

    public synchronized WsdlContext getWsdlContext() {
        if (wsdlContext == null) {
            wsdlContext = new WsdlContext(PathUtils.expandPath(getDefinition(), this), this);
        }

        return wsdlContext;
    }
View Full Code Here

    }

    public boolean updateDefinition(String url, boolean createRequests) throws Exception {
        WsdlContext.uncache(url);

        WsdlContext newContext = new WsdlContext(url, (WsdlInterface) null);
        if (!newContext.load()) {
            return false;
        }

        BindingTuple tuple = findBinding(newContext);
        if (tuple == null) {
View Full Code Here

            }
        }
    }

    public BindingTuple prepareUpdateDefinition(String url) throws Exception {
        WsdlContext newContext = new WsdlContext(url, getSoapVersion());
        if (!newContext.load()) {
            return null;
        }

        BindingTuple tuple = findBinding(newContext);
        return tuple;
View Full Code Here

        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

TOP

Related Classes of com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext

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.