@Override public void setText(String content) { getSaajHeaderElement().setValue(content); }
@Override public void setText(String content) { getSaajHeaderElement().setValue(content); }
@Override public void setText(String content) { getSaajHeaderElement().setValue(content); }
/** * check for an arjuna context attached to the message context and, if found, install its identifier as the value * of a soap message header element * @param context * @return * @throws ProtocolException */ protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException { try { ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(context); if (arjunaContext != null) { InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier(); // insert a header into the current message containing the instance identifier as a text element final SOAPMessage soapMessage = context.getMessage(); final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); SOAPHeader soapHeader = soapEnvelope.getHeader() ; if (soapHeader == null) { soapHeader = soapEnvelope.addHeader() ; } final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME); headerElement.setValue(instanceIdentifier.getInstanceIdentifier()); headerElement.setMustUnderstand(true); } } catch (Exception se) { throw new ProtocolException(se); } return true; }
/** * check for an arjuna context attached to the message context and, if found, install its identifier as the value * of a soap message header element * @param context * @return * @throws ProtocolException */ protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException { try { ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(context); if (arjunaContext != null) { InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier(); // insert a header into the current message containing the instance identifier as a text element final SOAPMessage soapMessage = context.getMessage(); final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); SOAPHeader soapHeader = soapEnvelope.getHeader() ; if (soapHeader == null) { soapHeader = soapEnvelope.addHeader() ; } final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME); headerElement.setValue(instanceIdentifier.getInstanceIdentifier()); headerElement.setMustUnderstand(true); } } catch (Exception se) { throw new ProtocolException(se); } return true; }
/** * check for an arjuna context attached to the message context and, if found, install its identifier as the value * of a soap message header element * @param context * @return * @throws ProtocolException */ protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException { try { ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(context); if (arjunaContext != null) { InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier(); // insert a header into the current message containing the instance identifier as a text element final SOAPMessage soapMessage = context.getMessage(); final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); SOAPHeader soapHeader = soapEnvelope.getHeader() ; if (soapHeader == null) { soapHeader = soapEnvelope.addHeader() ; } final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME); headerElement.setValue(instanceIdentifier.getInstanceIdentifier()); headerElement.setMustUnderstand(true); } } catch (Exception se) { throw new ProtocolException(se); } return true; }
/** * check for an arjuna context attached to the message context and, if found, install its identifier as the value * of a soap message header element * @param context * @return * @throws ProtocolException */ protected boolean handleMessageOutbound(SOAPMessageContext context) throws ProtocolException { try { ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(context); if (arjunaContext != null) { InstanceIdentifier instanceIdentifier = arjunaContext.getInstanceIdentifier(); // insert a header into the current message containing the instance identifier as a text element final SOAPMessage soapMessage = context.getMessage(); final SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope(); SOAPHeader soapHeader = soapEnvelope.getHeader() ; if (soapHeader == null) { soapHeader = soapEnvelope.addHeader() ; } final SOAPHeaderElement headerElement = soapHeader.addHeaderElement(ArjunaConstants.WSARJ_ELEMENT_INSTANCE_IDENTIFIER_QNAME); headerElement.setValue(instanceIdentifier.getInstanceIdentifier()); headerElement.setMustUnderstand(true); } } catch (Exception se) { throw new ProtocolException(se); } return true; }