Package javax.wsdl.extensions.mime

Examples of javax.wsdl.extensions.mime.MIMEMultipartRelated


        SoapBodyInfo bodyInfo = new SoapBodyInfo();
        SoapBody soapBody = SOAPBindingUtil.getSoapBody(bmsg.getExtensors(ExtensibilityElement.class));
        List parts = null;
        if (soapBody == null) {
            MIMEMultipartRelated mmr = bmsg.getExtensor(MIMEMultipartRelated.class);
            if (mmr != null) {
                parts = mmr.getMIMEParts();
            }
        } else {
            bodyInfo.setUse(soapBody.getUse());
            parts = soapBody.getParts();
        }
View Full Code Here


        SoapBodyInfo bodyInfo = new SoapBodyInfo();
        SoapBody soapBody = SOAPBindingUtil.getSoapBody(bmsg.getExtensors(ExtensibilityElement.class));
       
        List parts = null;
        if (soapBody == null) {
            MIMEMultipartRelated mmr = bmsg.getExtensor(MIMEMultipartRelated.class);
            if (mmr != null) {
                parts = mmr.getMIMEParts();
            }
        } else {
            bmsg.addExtensor(soapBody);
            bodyInfo.setUse(soapBody.getUse());
            parts = soapBody.getParts();
View Full Code Here

        SoapBodyInfo bodyInfo = new SoapBodyInfo();
        SoapBody soapBody = SOAPBindingUtil.getSoapBody(bmsg.getExtensors(ExtensibilityElement.class));
        List parts = null;
        if (soapBody == null) {
            MIMEMultipartRelated mmr = bmsg.getExtensor(MIMEMultipartRelated.class);
            if (mmr != null) {
                parts = mmr.getMIMEParts();
            }
        } else {
            bodyInfo.setUse(soapBody.getUse());
            parts = soapBody.getParts();
        }
View Full Code Here

        SoapBodyInfo bodyInfo = new SoapBodyInfo();
        SoapBody soapBody = SOAPBindingUtil.getSoapBody(bmsg.getExtensors(ExtensibilityElement.class));
       
        List<?> parts = null;
        if (soapBody == null) {
            MIMEMultipartRelated mmr = bmsg.getExtensor(MIMEMultipartRelated.class);
            if (mmr != null) {
                parts = mmr.getMIMEParts();
            }
        } else {
            bmsg.addExtensor(soapBody);
            bodyInfo.setUse(soapBody.getUse());
            parts = soapBody.getParts();
View Full Code Here

      if((extElems == null) || (extElems.size() == 0) ||
         !(extElems.get(0) instanceof MIMEMultipartRelated))
        throw new AssertionNotApplicableException();
     
      // get list mime parts from definition
      MIMEMultipartRelated mime = (MIMEMultipartRelated) extElems.get(0);
      List parts = mime.getMIMEParts();
     
      // skip root part
      for (int i = 1; i < parts.size(); i++)
      {
        String partName = getMIMEContentPart((MIMEPart) parts.get(i));
View Full Code Here

      if((extElems == null) || (extElems.size() == 0) ||
         !(extElems.get(0) instanceof MIMEMultipartRelated))
        throw new AssertionNotApplicableException();
     
      // get list mime parts from definition
      MIMEMultipartRelated mime = (MIMEMultipartRelated) extElems.get(0);
      List parts = mime.getMIMEParts();
      // if parts count is more than one, than assertion is notApplicable
      if(parts.size() <= 1)
        throw new AssertionNotApplicableException();
      String contentType = HTTPUtils.getHttpHeaderAttribute(
          entryContext.getMessageEntry().getHTTPHeaders(),
View Full Code Here

      if((extElems == null) || (extElems.size() == 0) ||
         !(extElems.get(0) instanceof MIMEMultipartRelated))
        throw new AssertionNotApplicableException();
     
      // get list mime parts from definition
      MIMEMultipartRelated mime = (MIMEMultipartRelated) extElems.get(0);
      List parts = mime.getMIMEParts();

      if(mimeParts.getRootPart() == null || mimeParts.count()==0)
        throw new AssertionNotApplicableException();
      // skip root part
      for (int i = 1; i < parts.size(); i++)
View Full Code Here

    BindingOutput bindingOutput = operation.getBindingOutput();
    BindingInput bindingInput = operation.getBindingInput();

    if( bindingOutput != null )
    {
      MIMEMultipartRelated multipartOutput = WsdlUtils.getExtensiblityElement(
          bindingOutput.getExtensibilityElements(), MIMEMultipartRelated.class );

      getConfig().setReceivesAttachments( multipartOutput != null );
      if( multipartOutput != null )
      {
        List<MIMEPart> parts = multipartOutput.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().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 )
View Full Code Here

  {
    BindingOutput output = operation.getBindingOutput();
    if( output == null )
      return new MIMEContent[0];

    MIMEMultipartRelated multipartOutput = WsdlUtils.getExtensiblityElement( output.getExtensibilityElements(),
        MIMEMultipartRelated.class );

    return getContentParts( part, multipartOutput );
  }
View Full Code Here

  {
    BindingInput bindingInput = operation.getBindingInput();
    if( bindingInput == null )
      return new MIMEContent[0];

    MIMEMultipartRelated multipartInput = WsdlUtils.getExtensiblityElement( bindingInput.getExtensibilityElements(),
        MIMEMultipartRelated.class );

    return getContentParts( part, multipartInput );
  }
View Full Code Here

TOP

Related Classes of javax.wsdl.extensions.mime.MIMEMultipartRelated

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.