src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java

changeset 368
0989ad8c0860
parent 286
f50545b5e2f1
child 637
9c07ef4934dd
equal deleted inserted replaced
366:8c0b6bccfe47 368:0989ad8c0860
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
136 void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) { 136 void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
137 137
138 //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message 138 //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
139 Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); 139 Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
140 AttachmentSet attSet = context.packet.getMessage().getAttachments(); 140 AttachmentSet attSet = context.packet.getMessage().getAttachments();
141 for(String cid : atts.keySet()){ 141 for (Map.Entry<String, DataHandler> entry : atts.entrySet()) {
142 String cid = entry.getKey();
142 if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice 143 if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice
143 Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); 144 Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
144 attSet.add(att); 145 attSet.add(att);
145 } 146 }
146 } 147 }

mercurial