src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.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
45 import javax.xml.ws.WebServiceException; 45 import javax.xml.ws.WebServiceException;
46 import javax.activation.DataHandler; 46 import javax.activation.DataHandler;
47 import java.util.List; 47 import java.util.List;
48 import java.util.ArrayList; 48 import java.util.ArrayList;
49 import java.util.Map; 49 import java.util.Map;
50 import java.util.Map.Entry;
50 51
51 /** 52 /**
52 * 53 *
53 * @author WS Development Team 54 * @author WS Development Team
54 */ 55 */
154 155
155 void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) { 156 void callHandlersOnResponse(MessageUpdatableContext context, boolean handleFault) {
156 //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message 157 //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message
157 Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); 158 Map<String, DataHandler> atts = (Map<String, DataHandler>) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS);
158 AttachmentSet attSet = context.packet.getMessage().getAttachments(); 159 AttachmentSet attSet = context.packet.getMessage().getAttachments();
159 for(String cid : atts.keySet()){ 160 for (Entry<String, DataHandler> entry : atts.entrySet()) {
161 String cid = entry.getKey();
160 Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); 162 Attachment att = new DataHandlerAttachment(cid, atts.get(cid));
161 attSet.add(att); 163 attSet.add(att);
162 } 164 }
163 165
164 try { 166 try {

mercurial