Package com.eviware.soapui.config.PartsConfig

Examples of com.eviware.soapui.config.PartsConfig.Part


          List<MIMEContent> contentParts = WsdlUtils.getExtensiblityElements( parts.get( c )
              .getExtensibilityElements(), MIMEContent.class );

          for( MIMEContent content : contentParts )
          {
            Part part = partMap.get( content.getPart() );
            if( part != null )
            {
              if( !part.getContentTypeList().contains( content.getType() ) )
                part.addContentType( content.getType() );
            }
            else
            {
              if( !getConfig().isSetResponseParts() )
                getConfig().addNewResponseParts();

              Part responsePart = getConfig().getResponseParts().addNewPart();
              responsePart.addContentType( content.getType() );
              responsePart.setName( content.getPart() );

              partMap.put( responsePart.getName(), responsePart );
            }
          }
        }
      }
    }

    if( bindingInput != null )
    {
      MIMEMultipartRelated multipartInput = WsdlUtils.getExtensiblityElement(
          bindingInput.getExtensibilityElements(), MIMEMultipartRelated.class );

      getConfig().setSendsAttachments( multipartInput != null );
      if( multipartInput != null )
      {
        List<MIMEPart> parts = multipartInput.getMIMEParts();
        Map<String, Part> partMap = new HashMap<String, Part>();

        for( int c = 0; c < parts.size(); c++ )
        {
          List<MIMEContent> contentParts = WsdlUtils.getExtensiblityElements( parts.get( c )
              .getExtensibilityElements(), MIMEContent.class );

          for( MIMEContent content : contentParts )
          {
            Part part = partMap.get( content.getPart() );
            if( part != null )
            {
              if( !part.getContentTypeList().contains( content.getType() ) )
                part.addContentType( content.getType() );
            }
            else
            {
              if( !getConfig().isSetRequestParts() )
                getConfig().addNewRequestParts();

              Part requestPart = getConfig().getRequestParts().addNewPart();
              requestPart.addContentType( content.getType() );
              requestPart.setName( content.getPart() );

              partMap.put( requestPart.getName(), requestPart );
            }
          }
        }
      }
    }
View Full Code Here


                for (int c = 0; c < parts.size(); c++) {
                    List<MIMEContent> contentParts = WsdlUtils.getExtensiblityElements(parts.get(c)
                            .getExtensibilityElements(), MIMEContent.class);

                    for (MIMEContent content : contentParts) {
                        Part part = partMap.get(content.getPart());
                        if (part != null) {
                            if (!part.getContentTypeList().contains(content.getType())) {
                                part.addContentType(content.getType());
                            }
                        } else {
                            if (!getConfig().isSetResponseParts()) {
                                getConfig().addNewResponseParts();
                            }

                            Part responsePart = getConfig().getResponseParts().addNewPart();
                            responsePart.addContentType(content.getType());
                            responsePart.setName(content.getPart());

                            partMap.put(responsePart.getName(), responsePart);
                        }
                    }
                }
            }
        }

        if (bindingInput != null) {
            MIMEMultipartRelated multipartInput = WsdlUtils.getExtensiblityElement(
                    bindingInput.getExtensibilityElements(), MIMEMultipartRelated.class);

            getConfig().setSendsAttachments(multipartInput != null);
            if (multipartInput != null) {
                List<MIMEPart> parts = multipartInput.getMIMEParts();
                Map<String, Part> partMap = new HashMap<String, Part>();

                for (int c = 0; c < parts.size(); c++) {
                    List<MIMEContent> contentParts = WsdlUtils.getExtensiblityElements(parts.get(c)
                            .getExtensibilityElements(), MIMEContent.class);

                    for (MIMEContent content : contentParts) {
                        Part part = partMap.get(content.getPart());
                        if (part != null) {
                            if (!part.getContentTypeList().contains(content.getType())) {
                                part.addContentType(content.getType());
                            }
                        } else {
                            if (!getConfig().isSetRequestParts()) {
                                getConfig().addNewRequestParts();
                            }

                            Part requestPart = getConfig().getRequestParts().addNewPart();
                            requestPart.addContentType(content.getType());
                            requestPart.setName(content.getPart());

                            partMap.put(requestPart.getName(), requestPart);
                        }
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.PartsConfig.Part

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.