Package javax.wsdl.extensions.mime

Examples of javax.wsdl.extensions.mime.MIMEMultipartRelated


        if ( bIn != null ) {
            list = bIn.getExtensibilityElements();
            for ( int i = 0 ; list != null && i < list.size() ; i++ ) {
                Object obj = list.get(i);
                if( obj instanceof MIMEMultipartRelated){
                  MIMEMultipartRelated mpr=(MIMEMultipartRelated) obj;
                  Object part= null;
                  List l=  mpr.getMIMEParts();
                  for(int j=0; l!= null && j< l.size() && part== null; j++){
                     MIMEPart mp = (MIMEPart)l.get(j);
                     List ll= mp.getExtensibilityElements();
                     for(int k=0; ll != null && k < ll.size() && part == null;
                           k++){
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

                partsList = soapBody.getParts();
            } else if (extElement instanceof SOAP12Body) {
                SOAP12Body soapBody = (SOAP12Body) extElement;
                partsList = soapBody.getParts();
            } else if (extElement instanceof MIMEMultipartRelated) {
                MIMEMultipartRelated minMimeMultipartRelated = (MIMEMultipartRelated) extElement;
                List mimePartsList = minMimeMultipartRelated.getMIMEParts();
                MIMEPart mimePart = null;
                Object object;
                List mimePartElements;
                ExtensibilityElement mimePartExtensibilityElement;
                for (Iterator mimePartsIter = mimePartsList.iterator(); mimePartsIter.hasNext();) {
View Full Code Here

            QName portTypeName = getDefinedPortType(srcBinding).getQName();

            if (log.isTraceEnabled())
               log.trace("SWA found on portType" + portTypeName);

            MIMEMultipartRelated mrel = (MIMEMultipartRelated)o;
            Iterator mimePartIt = mrel.getMIMEParts().iterator();
            while (mimePartIt.hasNext())
            {
               MIMEPart mimePartDesc = (MIMEPart)mimePartIt.next();
               List mimePartExt = mimePartDesc.getExtensibilityElements();
               if (!mimePartExt.isEmpty() && (mimePartExt.get(0) instanceof MIMEContent))
View Full Code Here

               callback.removeRPCPart(headerPartName);
            }
         }
         else if (extElement instanceof MIMEMultipartRelated)
         {
            MIMEMultipartRelated related = (MIMEMultipartRelated)extElement;
            Iterator i = related.getMIMEParts().iterator();
            while (i.hasNext())
            {
               MIMEPart part = (MIMEPart)i.next();
               Iterator j = part.getExtensibilityElements().iterator();
               String name = null;
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)
                            .getExtensibilityElements(), MIMEContent.class);
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

        if ( bIn != null ) {
            list = bIn.getExtensibilityElements();
            for ( int i = 0 ; list != null && i < list.size() ; i++ ) {
                Object obj = list.get(i);
                if( obj instanceof MIMEMultipartRelated){
                  MIMEMultipartRelated mpr=(MIMEMultipartRelated) obj;
                  Object part= null;
                  List l=  mpr.getMIMEParts();
                  for(int j=0; l!= null && j< l.size() && part== null; j++){
                     MIMEPart mp = (MIMEPart)l.get(j);
                     List ll= mp.getExtensibilityElements();
                     for(int k=0; ll != null && k < ll.size() && part == null;
                           k++){
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.