Java Code Examples for com.sun.xml.internal.ws.transport.Headers#put()
The following examples show how to use
com.sun.xml.internal.ws.transport.Headers#put() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RequestContext.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 2
Source File: RequestContext.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 3
Source File: RequestContext.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 4
Source File: RequestContext.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 5
Source File: RequestContext.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 6
Source File: RequestContext.java From hottub with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 7
Source File: RequestContext.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }
Example 8
Source File: RequestContext.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@SuppressWarnings("unchecked") private void mergeRequestHeaders(Packet packet) { //for bug 12883765 //retrieve headers which is set in soap message Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); //retrieve headers from request context Map<String, List<String>> myHeaders = (Map<String, List<String>>) asMap().get(HTTP_REQUEST_HEADERS); if ((packetHeaders != null) && (myHeaders != null)) { //update the headers set in soap message with those in request context for (Entry<String, List<String>> entry : myHeaders.entrySet()) { String key = entry.getKey(); if (key != null && key.trim().length() != 0) { List<String> listFromPacket = packetHeaders.get(key); //if the two headers contain the same key, combine the value if (listFromPacket != null) { listFromPacket.addAll(entry.getValue()); } else { //add the headers in request context to those set in soap message packetHeaders.put(key, myHeaders.get(key)); } } } // update headers in request context with those set in soap message since it may contain other properties.. asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); } }