Java Code Examples for javax.xml.soap.MimeHeaders#removeHeader()
The following examples show how to use
javax.xml.soap.MimeHeaders#removeHeader() .
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: UserAgentHandler.java From freehealth-connector with GNU Affero General Public License v3.0 | 6 votes |
public boolean handleOutbound(SOAPMessageContext context) { if (context.getMessage() != null) { MimeHeaders mimeHeaders = context.getMessage().getMimeHeaders(); if (mimeHeaders != null) { String[] agents = mimeHeaders.getHeader("User-Agent"); if (ArrayUtils.isNotEmpty(agents)) { LOG.info("Removing MIME header [User-Agent] with value [" + StringUtils.join(agents, ",") + "]"); mimeHeaders.removeHeader("User-Agent"); } String value = this.config.getProperty("be.ehealth.technicalconnector.handler.user-agent.value", "Ehealth Technical") + " (" + applicationProps.getProperty("application.version", "unknown") + ")"; LOG.debug("Adding MIME header [User-Agent] with value [" + value + "]"); mimeHeaders.addHeader("User-Agent", value); } } return true; }
Example 2
Source File: UserAgentHandler.java From freehealth-connector with GNU Affero General Public License v3.0 | 6 votes |
public boolean handleOutbound(SOAPMessageContext context) { if (context.getMessage() != null) { MimeHeaders mimeHeaders = context.getMessage().getMimeHeaders(); if (mimeHeaders != null) { String[] agents = mimeHeaders.getHeader("User-Agent"); if (ArrayUtils.isNotEmpty(agents)) { LOG.info("Removing MIME header [User-Agent] with value [" + StringUtils.join(agents, ",") + "]"); mimeHeaders.removeHeader("User-Agent"); } String value = this.config.getProperty("be.ehealth.technicalconnector.handler.user-agent.value", "Ehealth Technical") + " (" + applicationProps.getProperty("application.version", "unknown") + ")"; LOG.debug("Adding MIME header [User-Agent] with value [" + value + "]"); mimeHeaders.addHeader("User-Agent", value); } } return true; }
Example 3
Source File: UserAgentHandler.java From freehealth-connector with GNU Affero General Public License v3.0 | 6 votes |
public boolean handleOutbound(SOAPMessageContext context) { if (context.getMessage() != null) { MimeHeaders mimeHeaders = context.getMessage().getMimeHeaders(); if (mimeHeaders != null) { String[] agents = mimeHeaders.getHeader("User-Agent"); if (ArrayUtils.isNotEmpty(agents)) { LOG.info("Removing MIME header [User-Agent] with value [" + StringUtils.join(agents, ",") + "]"); mimeHeaders.removeHeader("User-Agent"); } String value = this.config.getProperty("be.ehealth.technicalconnector.handler.user-agent.value", "Ehealth Technical") + " (" + applicationProps.getProperty("application.version", "unknown") + ")"; LOG.debug("Adding MIME header [User-Agent] with value [" + value + "]"); mimeHeaders.addHeader("User-Agent", value); } } return true; }
Example 4
Source File: UserAgentHandler.java From freehealth-connector with GNU Affero General Public License v3.0 | 6 votes |
public boolean handleOutbound(SOAPMessageContext context) { if (context.getMessage() != null) { MimeHeaders mimeHeaders = context.getMessage().getMimeHeaders(); if (mimeHeaders != null) { String[] agents = mimeHeaders.getHeader("User-Agent"); if (ArrayUtils.isNotEmpty(agents)) { LOG.info("Removing MIME header [User-Agent] with value [" + StringUtils.join(agents, ",") + "]"); mimeHeaders.removeHeader("User-Agent"); } String value = this.config.getProperty("be.ehealth.technicalconnector.handler.user-agent.value", "Ehealth Technical") + " (" + applicationProps.getProperty("application.version", "unknown") + ")"; LOG.debug("Adding MIME header [User-Agent] with value [" + value + "]"); mimeHeaders.addHeader("User-Agent", value); } } return true; }
Example 5
Source File: UserAgentHandler.java From freehealth-connector with GNU Affero General Public License v3.0 | 6 votes |
public boolean handleOutbound(SOAPMessageContext context) { if (context.getMessage() != null) { MimeHeaders mimeHeaders = context.getMessage().getMimeHeaders(); if (mimeHeaders != null) { String[] agents = mimeHeaders.getHeader("User-Agent"); if (ArrayUtils.isNotEmpty(agents)) { LOG.info("Removing MIME header [User-Agent] with value [" + StringUtils.join(agents, ",") + "]"); mimeHeaders.removeHeader("User-Agent"); } String value = this.config.getProperty("org.taktik.connector.technical.handler.user-agent.value", "Ehealth Technical") + " (" + applicationProps.getProperty("application.version", "unknown") + ")"; LOG.debug("Adding MIME header [User-Agent] with value [" + value + "]"); mimeHeaders.addHeader("User-Agent", value); } } return true; }