Package javax.xml.soap

Examples of javax.xml.soap.MimeHeader


      // First, transfer MIME headers of SOAPMessage to HTTP headers.
      // Some of these might be overridden later.
      MimeHeaders mimeHeaders = msg.getMimeHeaders();
      if (mimeHeaders != null) {
        for (Iterator i = mimeHeaders.getAllHeaders(); i.hasNext(); ) {
          MimeHeader mimeHeader = (MimeHeader) i.next();
          method.addHeader(mimeHeader.getName(),
            mimeHeader.getValue());
        }
      }

      method.setHeader(new BasicHeader(HTTPConstants.HEADER_CONTENT_TYPE,
        msg.getContentType(msgContext.getSOAPConstants())));
View Full Code Here


                                AttachmentPart part = it.next();
                                AttachmentImpl att = new AttachmentImpl(part.getContentId());
                                att.setDataHandler(part.getDataHandler());
                                Iterator<MimeHeader> it2 = CastUtils.cast(part.getAllMimeHeaders());
                                while (it2.hasNext()) {
                                    MimeHeader header = it2.next();
                                    att.setHeader(header.getName(), header.getValue());
                                }
                                message.getAttachments().add(att);
                            }
                        }
                    } catch (SOAPException e) {
View Full Code Here

                } catch (SOAPException e) {
                    throw new Fault(e);
                }
                Iterator<MimeHeader> it2 = CastUtils.cast(part.getAllMimeHeaders());
                while (it2.hasNext()) {
                    MimeHeader header = it2.next();
                    att.setHeader(header.getName(), header.getValue());
                }
                message.getAttachments().add(att);
            }
        }
        return source;
View Full Code Here

                        } catch (SOAPException e) {
                            throw new Fault(e);
                        }
                        Iterator<MimeHeader> it2 = CastUtils.cast(part.getAllMimeHeaders());
                        while (it2.hasNext()) {
                            MimeHeader header = it2.next();
                            att.setHeader(header.getName(), header.getValue());
                        }
                        message.getAttachments().add(att);
                    }
                }
               
View Full Code Here

                    }
                   
                    soapMessage.saveChanges();
                    Iterator<MimeHeader> smh = CastUtils.cast(soapMessage.getMimeHeaders().getAllHeaders());
                    while (smh.hasNext()) {
                        MimeHeader head = smh.next();
                        if ("Content-Type".equals(head.getName())) {
                            message.put(Message.CONTENT_TYPE, head.getValue());
                        } else if (!"Content-Length".equals(head.getName())) {
                            if (!heads.containsKey(head.getName())) {
                                heads.put(head.getName(), new ArrayList<String>());
                            }
                            List<String>l = heads.get(head.getName());
                            l.add(head.getValue());
                        }
                    }
                    OutputStream os = message.getContent(OutputStream.class);
                    soapMessage.writeTo(os);
                    os.flush();
View Full Code Here

      // First, transfer MIME headers of SOAPMessage to HTTP headers.
      // Some of these might be overridden later.
      MimeHeaders mimeHeaders = msg.getMimeHeaders();
      if (mimeHeaders != null) {
        for (Iterator i = mimeHeaders.getAllHeaders(); i.hasNext(); ) {
          MimeHeader mimeHeader = (MimeHeader) i.next();
          method.addHeader(mimeHeader.getName(),
            mimeHeader.getValue());
        }
      }

      method.setHeader(new BasicHeader(HTTPConstants.HEADER_CONTENT_TYPE,
        msg.getContentType(msgContext.getSOAPConstants())));
View Full Code Here

                        } catch (SOAPException e) {
                            throw new Fault(e);
                        }
                        Iterator<MimeHeader> it2 = CastUtils.cast(part.getAllMimeHeaders());
                        while (it2.hasNext()) {
                            MimeHeader header = it2.next();
                            att.setHeader(header.getName(), header.getValue());
                        }
                        message.getAttachments().add(att);
                    }
                }
               
View Full Code Here

      // First, transfer MIME headers of SOAPMessage to HTTP headers.
      // Some of these might be overridden later.
      MimeHeaders mimeHeaders = msg.getMimeHeaders();
      if (mimeHeaders != null) {
        for (Iterator i = mimeHeaders.getAllHeaders(); i.hasNext(); ) {
          MimeHeader mimeHeader = (MimeHeader) i.next();
          method.addHeader(mimeHeader.getName(),
            mimeHeader.getValue());
        }
      }

      method.setHeader(new BasicHeader(HTTPConstants.HEADER_CONTENT_TYPE,
        msg.getContentType(msgContext.getSOAPConstants())));
View Full Code Here

                                AttachmentPart part = it.next();
                                AttachmentImpl att = new AttachmentImpl(part.getContentId());
                                att.setDataHandler(part.getDataHandler());
                                Iterator<MimeHeader> it2 = CastUtils.cast(part.getAllMimeHeaders());
                                while (it2.hasNext()) {
                                    MimeHeader header = it2.next();
                                    att.setHeader(header.getName(), header.getValue());
                                }
                                message.getAttachments().add(att);
                            }
                        }
                    } catch (SOAPException e) {
View Full Code Here

                } catch (SOAPException e) {
                    throw new Fault(e);
                }
                Iterator<MimeHeader> it2 = CastUtils.cast(part.getAllMimeHeaders());
                while (it2.hasNext()) {
                    MimeHeader header = it2.next();
                    att.setHeader(header.getName(), header.getValue());
                }
                message.getAttachments().add(att);
            }
        }
        return source;
View Full Code Here

TOP

Related Classes of javax.xml.soap.MimeHeader

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.