Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlProject


    }

    if( PathUtils.isAbsolutePath( path ) )
      return prefix + path;

    WsdlProject project = ( WsdlProject )ModelSupport.getModelItemProject( modelItem );
    if( project == null )
      return prefix + path;

    String resourceRoot = getExpandedResourceRoot( modelItem );
View Full Code Here


  public static String getExpandedResourceRoot( ModelItem modelItem, PropertyExpansionContext context )
  {
    if( !( modelItem instanceof AbstractWsdlModelItem<?> ) )
      return null;

    WsdlProject project = ( WsdlProject )ModelSupport.getModelItemProject( modelItem );
    if( project == null )
      return null;

    String docroot = project.getResourceRoot();
    if( !StringUtils.hasContent( docroot ) )
      return new File( "" ).getAbsolutePath();

    docroot = context == null ? PropertyExpander.expandProperties( modelItem, docroot ) : PropertyExpander
        .expandProperties( context, docroot );
View Full Code Here

        "\nBad jms alias! \nFor JMS please use this endpont pattern:\nfor sending 'jms://sessionName::queue_myqueuename' \nfor receive  'jms://sessionName::-::queue_myqueuename'\nfor send-receive 'jms://sessionName::queue_myqueuename1::queue_myqueuename2'" );
  }

  protected Hermes getHermes( String sessionName, Request request ) throws NamingException
  {
    WsdlProject project = ( WsdlProject )ModelSupport.getModelItemProject( request );
    return HermesUtils.getHermes( project, sessionName );
  }
View Full Code Here

          httpMethod.addRequestHeader( header, headerValue );
        }
      }

      // do request
      WsdlProject project = ( WsdlProject )ModelSupport.getModelItemProject( httpRequest );
      WssCrypto crypto = null;
      if( project != null && project.getWssContainer() != null )
      {
        crypto = project.getWssContainer().getCryptoByName(
            PropertyExpander.expandProperties( submitContext, httpRequest.getSslKeystore() ) );
      }

      if( crypto != null && WssCrypto.STATUS_OK.equals( crypto.getStatus() ) )
      {
View Full Code Here

     *
     * @param soapUITestSuite specify it like for example: System.getProperty("resources.dir") + "/src/test/resources/SoapUITestSuite.xml"
     * @throws Exception any exception
     */
    protected void run(String soapUITestSuite) throws Exception {
        run(new WsdlProject(soapUITestSuite));
    }
View Full Code Here

    public final static Logger log = Logger.getLogger(TestOnDemandCallerTest.class);

    @Before
    public void setUp() throws Exception {
        WsdlProject project = new WsdlProject(TestOnDemandCallerTest.class.getResource(
                "/soapui-projects/sample-soapui-project.xml").getPath());
        WsdlTestSuite testSuite = project.getTestSuiteByName("Test Suite");
        testCase = testSuite.getTestCaseByName("Test Conversions");
        caller = new TestOnDemandCaller();
    }
View Full Code Here

public class WsdlProjectTestCaseTest extends JettyTestCaseBase {

    @Test
    public void testComplexLoad() throws Exception {
        replaceInFile("wsdls/test8/TestService.wsdl", "8082", "" + getPort());
        WsdlProject project = new WsdlProject();
        WsdlInterface[] wsdls = WsdlImporter.importWsdl(project, "http://localhost:" + getPort() + "/wsdls/test8/TestService.wsdl");

        assertEquals(1, wsdls.length);
    }
View Full Code Here

    @Test
    public void testClasspathLoad() throws Exception {
        String str = SoapUI.class.getResource("/soapui-projects/sample-soapui-project.xml").toURI().toString();

        assertNotNull(new WsdlProject(str));
    }
View Full Code Here

        assertNotNull(new WsdlProject(str));
    }

    public void testInit() throws Exception {
        assertTrue(new WsdlProject().isCacheDefinitions());
    }
View Full Code Here

        testLoader("http://localhost:" + getPort() + "/wsdls/test8/TestService.wsdl");
        testLoader("http://localhost:" + getPort() + "/wsdls/testonewayop/TestService.wsdl");
    }

    private void testLoader(String wsdlUrl) throws Exception {
        WsdlProject project = new WsdlProject();
        project.getSettings().setBoolean(WsdlSettings.CACHE_WSDLS, true);
        WsdlInterface wsdlInterface = WsdlImporter.importWsdl(project, wsdlUrl)[0];

        assertTrue(wsdlInterface.isCached());

        WsdlDefinitionExporter exporter = new WsdlDefinitionExporter(wsdlInterface);

        String root = exporter.export(OUTPUT_FOLDER_BASE_PATH + "test" + File.separatorChar + "output");

        WsdlProject project2 = new WsdlProject();
        WsdlInterface wsdl2 = WsdlImporter.importWsdl(project2, new File(root).toURI().toURL().toString())[0];

        assertEquals(wsdlInterface.getBindingName(), wsdl2.getBindingName());
        assertEquals(wsdlInterface.getOperationCount(), wsdl2.getOperationCount());
        assertEquals(wsdlInterface.getWsdlContext().getInterfaceDefinition().getDefinedNamespaces(), wsdl2
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlProject

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.