List of usage examples for javax.xml.ws.handler.soap SOAPMessageContext getHeaders
public Object[] getHeaders(QName header, JAXBContext context, boolean allRoles);
From source file:be.agiv.security.handler.WSAddressingHandler.java
private void handleInboundMessage(SOAPMessageContext context) { String messageId = (String) context.get(MESSAGE_ID_CONTEXT_ATTRIBUTE); LOG.debug("checking RelatesTo message id: " + messageId); Object[] headers = context.getHeaders(new QName(WSConstants.WS_ADDR_NAMESPACE, "RelatesTo"), this.jaxbContext, false); for (Object headerObject : headers) { JAXBElement<RelatesToType> element = (JAXBElement<RelatesToType>) headerObject; RelatesToType relatesTo = element.getValue(); if (false == messageId.equals(relatesTo.getValue())) { throw new ProtocolException("incorrect a:RelatesTo value"); }/*from w w w.j a va 2s.c o m*/ } }