Package com.eviware.soapui.impl.wsdl

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


    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


      dialog.getFormField( CreateForm.INTERFACE ).addFormFieldListener( new XFormFieldListener()
      {

        public void valueChanged( XFormField sourceField, String newValue, String oldValue )
        {
          WsdlInterface iface = ( WsdlInterface )project.getInterfaceByName( newValue );
          dialog.setOptions( CreateForm.OPERATION,
              new ModelItemNames<Operation>( iface.getOperationList() ).getNames() );
        }
      } );

      dialog.setBooleanValue( CreateForm.CREATE_RESPONSE, true );
      dialog.setValue( CreateForm.PATH, "/" );
View Full Code Here

      config.addNewResponse();
      config.getResponse().addNewResponseContent();

      if( dialog.getBooleanValue( CreateForm.CREATE_RESPONSE ) )
      {
        WsdlInterface iface = ( WsdlInterface )project.getInterfaceByName( config.getInterface() );
        String response = iface.getOperationByName( config.getOperation() ).createResponse(
            project.getSettings().getBoolean( WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );

        CompressedStringSupport.setString( config.getResponse().getResponseContent(), response );
      }
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 );
      WsdlOperation 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

        {
          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" ) );
View Full Code Here

  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();
      ( ( WsdlContext )definitionContext ).loadIfNecessary();
    }
    else
    {
      if( definitionContext == null || !def.equals( wsdlContextDef ) )
      {
        definitionContext = getContext( def, iface.getSoapVersion() );
        // ( (WsdlContext) definitionContext ).load();
        ( ( WsdlContext )definitionContext ).setInterface( iface );
        wsdlContextDef = def;
      }
    }
View Full Code Here

    }
  }

  private void updateOperations( String interfaceName )
  {
    WsdlInterface iface = ( WsdlInterface )project.getInterfaceByName( interfaceName );
    dialog.setOptions( CreateForm.OPERATION, new ModelItemNames<Operation>( iface.getOperationList() ).getNames() );
  }
View Full Code Here

  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

      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

  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

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.