Package com.sun.xml.ws.api.message

Examples of com.sun.xml.ws.api.message.AttachmentSet


                log.log(Level.SEVERE, LogStringsMessages.WSITPVD_0003_PROBLEM_PRINTING_MSG(), ex);
                throw new XWSSecurityException(LogStringsMessages.WSITPVD_0003_PROBLEM_PRINTING_MSG(), ex);
            }
        }
        LazyStreamBasedMessage lazyStreamMessage = (LazyStreamBasedMessage)message;
        AttachmentSet attachSet = lazyStreamMessage.getAttachments();
        com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient recipient = null;
        if(attachSet == null || attachSet.isEmpty()){
            recipient =
                      new com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient(lazyStreamMessage.readMessage(),soapVersion);
        } else{
            recipient = new com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient(lazyStreamMessage.readMessage(),soapVersion, attachSet);
        }
View Full Code Here


        } catch (XMLStreamException xse) {
            throw new XWSSecurityException(xse);
        }

        Message streamMsg = null;
        AttachmentSet as = securityContext.getDecryptedAttachmentSet();
        if (as == null || as.isEmpty()) {
            as = securityContext.getAttachmentSet();
        }       
        if (!context.getDisablePayloadBuffering() && (!context.isSecure() || "Fault".equals(message.getLocalName()))) {
            if (logger.isLoggable(Level.FINE)) {
                logger.log(Level.FINE, "Buffering Payload from incomming message");
View Full Code Here

   
    protected Message verifyInboundMessage(Message message, ProcessingContext ctx) throws XWSSecurityException{
        JAXBFilterProcessingContext  context = (JAXBFilterProcessingContext)ctx;
        //  context.setJAXWSMessage(message, soapVersion);
        LazyStreamBasedMessage lazyStreamMessage = (LazyStreamBasedMessage)message;
        AttachmentSet attachSet = null;
        if (!lazyStreamMessage.mtomLargeData()) {
            attachSet = lazyStreamMessage.getAttachments();
        }
        SecurityRecipient recipient = null;
        if(attachSet == null || attachSet.isEmpty()){
            recipient = new SecurityRecipient(lazyStreamMessage.readMessage(),soapVersion);
        } else{
            recipient = new SecurityRecipient(lazyStreamMessage.readMessage(),soapVersion, attachSet);
        }
        recipient.setBodyPrologue(lazyStreamMessage.getBodyPrologue());
View Full Code Here

        }
    }
    @SuppressWarnings("unchecked")
    private void handleAttachments(JAXBFilterProcessingContext context, ArrayList edList, Key key,KeyInfo ki,Target target) throws XWSSecurityException {
        SecuredMessage message = context.getSecuredMessage();
        AttachmentSet as = message.getAttachments();
        if(as != null && as.isEmpty()){
            logger.log(Level.WARNING, LogStringsMessages.WSS_1244_NO_ATTACHMENT_FOUND());
            return;
        }
        String dataEncAlg =  SecurityUtil.getDataEncryptionAlgo(context);
        AttachmentSet newAttachmentSet = new AttachmentSetImpl();
        for(Attachment attachment : as){
            SecurityHeaderElement ed = (SecurityHeaderElement)wsf.createEncryptedData(context.generateID(), attachment, dataEncAlg, ki, key, (EncryptionTarget)target);
            context.getSecurityHeader().add(ed);
            edList.add(ed);
            Attachment encryptedAttachment = new EncryptedAttachment(attachment, dataEncAlg, key);
            newAttachmentSet.add(encryptedAttachment);
        }
        message.setAttachments(newAttachmentSet);
    }
View Full Code Here

        if(key.equals(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS) ||
                key.equals(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)){
            Map<String, DataHandler> atts = (Map<String, DataHandler>) value;
            if(atts == null)
                atts = new HashMap<String, DataHandler>();
            AttachmentSet attSet = packet.getMessage().getAttachments();
            for(Attachment att : attSet){
                atts.put(att.getContentId(), att.asDataHandler());
            }
            return atts;
        }
View Full Code Here

                log.log(Level.SEVERE, LogStringsMessages.WSSTUBE_0003_PROBLEM_PRINTING_MSG(), ex);
                throw new XWSSecurityException(LogStringsMessages.WSSTUBE_0003_PROBLEM_PRINTING_MSG(), ex);
            }
        }
        LazyStreamBasedMessage lazyStreamMessage = (LazyStreamBasedMessage) message;
        AttachmentSet attachSet = null;
        if (!lazyStreamMessage.mtomLargeData()) {
            attachSet = lazyStreamMessage.getAttachments();
        }
        com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient recipient;
        if (attachSet == null || attachSet.isEmpty()) {
            recipient =
                    new com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient(lazyStreamMessage.readMessage(), soapVersion);
        } else {
            recipient = new com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient(lazyStreamMessage.readMessage(), soapVersion, attachSet);
        }
View Full Code Here

TOP

Related Classes of com.sun.xml.ws.api.message.AttachmentSet

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.