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

Examples of com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder


        }

        final MessagePart[] faultParts = wsdlOperation.getFaultParts();
        final Map<String, List<XMLEvent>> faultEventsMap = new HashMap<String, List<XMLEvent>>() ;
       
        final SoapMessageBuilder soapMessageBuilder = wsdlOperation.getInterface().getMessageBuilder();
        final XmlObject detail = XmlObject.Factory.newInstance();
        for(MessagePart messagePart: faultParts)
        {
            final MessagePart.FaultPart faultPart = (MessagePart.FaultPart)messagePart ;
            final String faultName = faultPart.getName() ;
            final SampleXmlUtil generator = new SampleXmlUtil(false) ;
            generator.setExampleContent(false) ;
            generator.setTypeComment(false) ;
            final XmlCursor cursor = detail.newCursor();
            cursor.toFirstContentToken() ;
            generator.setTypeComment(true) ;
            generator.setIgnoreOptional(wsdlOperation.getInterface().getSettings().getBoolean( WsdlSettings.XML_GENERATION_ALWAYS_INCLUDE_OPTIONAL_ELEMENTS ) );
            for(Part part: faultPart.getWsdlParts())
            {
                try
                {
                    soapMessageBuilder.createElementForPart(part, cursor, generator);
                }
                catch (final Exception ex)
                {
                    throw new XMLStreamException("Unexpected exception creating fault template", ex) ;
                }
View Full Code Here


  {
    if( soapMessageBuilder == null )
    {
      try
      {
        soapMessageBuilder = new SoapMessageBuilder( this );
      }
      catch( Exception e )
      {
        SoapUI.logError( e );
      }
View Full Code Here

      return null;
    }

    try
    {
      SoapMessageBuilder builder = iface.getMessageBuilder();
      BindingOperation bindingOperation = findBindingOperation( iface.getWsdlContext().getDefinition() );

      if( bindingOperation == null )
      {
        UISupport.showErrorMessage( "Failed to find bindingOperation, please try to refresh "
            + "Interface\nfor request generation to work correctly" );
        return null;
      }

      OperationType type = bindingOperation.getOperation().getStyle();
      if( OperationType.ONE_WAY.equals( type ) || OperationType.REQUEST_RESPONSE.equals( type ) )
      {
        return builder.buildSoapMessageFromInput( bindingOperation, buildOptional );
      }
      else
      {
        return builder.buildSoapMessageFromOutput( bindingOperation, buildOptional );
      }
    }
    catch( Exception e )
    {
      SoapUI.logError( e );
View Full Code Here

      return null;
    }

    try
    {
      SoapMessageBuilder builder = iface.getMessageBuilder();
      BindingOperation bindingOperation = findBindingOperation( iface.getWsdlContext().getDefinition() );

      if( bindingOperation == null )
      {
        UISupport.showErrorMessage( "Failed to find bindingOperation, please try to refresh "
            + "Interface\nfor request generation to work correctly" );
        return null;
      }

      if( isRequestResponse() )
      {
        return builder.buildSoapMessageFromOutput( bindingOperation, buildOptional );
      }
      else
      {
        return builder.buildSoapMessageFromInput( bindingOperation, buildOptional );
      }
    }
    catch( Exception e )
    {
      SoapUI.logError( e );
View Full Code Here

                    + "Interface\nfor request generation to work correctly");
            return null;
        }

        try {
            SoapMessageBuilder builder = iface.getMessageBuilder();
            BindingOperation bindingOperation = findBindingOperation(iface.getWsdlContext().getDefinition());

            if (bindingOperation == null) {
                UISupport.showErrorMessage("Failed to find bindingOperation, please try to refresh "
                        + "Interface\nfor request generation to work correctly");
                return null;
            }

            OperationType type = bindingOperation.getOperation().getStyle();
            if (OperationType.ONE_WAY.equals(type) || OperationType.REQUEST_RESPONSE.equals(type)) {
                return builder.buildSoapMessageFromInput(bindingOperation, buildOptional);
            } else {
                return builder.buildSoapMessageFromOutput(bindingOperation, buildOptional);
            }
        } catch (Exception e) {
            SoapUI.logError(e);
            return null;
        }
View Full Code Here

                    + "Interface\nfor request generation to work correctly");
            return null;
        }

        try {
            SoapMessageBuilder builder = iface.getMessageBuilder();
            BindingOperation bindingOperation = findBindingOperation(iface.getWsdlContext().getDefinition());

            if (bindingOperation == null) {
                UISupport.showErrorMessage("Failed to find bindingOperation, please try to refresh "
                        + "Interface\nfor request generation to work correctly");
                return null;
            }

            if (isRequestResponse()) {
                return builder.buildSoapMessageFromOutput(bindingOperation, buildOptional);
            } else {
                return builder.buildSoapMessageFromInput(bindingOperation, buildOptional);
            }
        } catch (Exception e) {
            SoapUI.logError(e);
            return null;
        }
View Full Code Here

    }

    public SoapMessageBuilder getMessageBuilder() {
        if (soapMessageBuilder == null) {
            try {
                soapMessageBuilder = new SoapMessageBuilder(this);
            } catch (Exception e) {
                SoapUI.logError(e);
            }
        }
        return soapMessageBuilder;
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.support.soap.SoapMessageBuilder

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.