public boolean getRelay() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { throw new UnsupportedOperationException(); } else { return this.omTarget.getRelay(); } }
public String getRole() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { throw new UnsupportedOperationException(); } else { return this.omTarget.getRole(); } }
/** * Sets the Role associated with this SOAPHeaderElement object to the specified Role. * * @param uri - the URI of the Role * @throws SOAPException - if there is an error in setting the role java.lang.UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Fault Role. */ public void setRole(String uri) throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { throw new UnsupportedOperationException(); } else { this.omTarget.setRole(uri); } }
public String getRole() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { return this.omTarget.getRole(); } }
/** * Sets the relay attribute for this SOAPHeaderElement to be either true or false. The SOAP * relay attribute is set to true to indicate that the SOAP header block must be relayed by any * node that is targeted by the header block but not actually process it. This attribute is * ignored on header blocks whose mustUnderstand attribute is set to true or that are targeted * at the ultimate reciever (which is the default). The default value of this attribute is * false. * * @param relay - the new value of the relay attribute * @throws SOAPException - if there is a problem in setting the relay attribute. * java.lang.UnsupportedOperationException - if this message does not * support the SOAP 1.2 concept of Relay attribute. */ public void setRelay(boolean flag) throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAPVersion.SOAP11) { throw new UnsupportedOperationException(); } else { this.omTarget.setRelay(flag); } }
public boolean getRelay() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { return this.omTarget.getRelay(); } }
/** * Sets the Role associated with this SOAPHeaderElement object to the specified Role. * * @param uri - the URI of the Role * @throws SOAPException - if there is an error in setting the role java.lang.UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Fault Role. */ public void setRole(String uri) throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { this.omTarget.setRole(uri); } }
private OMElement createSOAPHeaderBlock(String value, String headerName, ArrayList<OMAttribute> attributes) { if (LoggingControl.debugLoggingAllowed && log.isTraceEnabled()) { log.trace("createSOAPHeaderBlock: value=" + value + " headerName=" + headerName); } if (value != null && value.length()!=0) { SOAPHeaderBlock soapHeaderBlock = header.addHeaderBlock(headerName, addressingNamespaceObject); soapHeaderBlock.addChild(factory.createOMText(value)); if (attributes != null && !attributes.isEmpty()) { Iterator<OMAttribute> attrIterator = attributes.iterator(); while (attrIterator.hasNext()) { soapHeaderBlock.addAttribute( (OMAttribute)soapHeaderBlock.getOMFactory().importInformationItem(attrIterator.next())); } } addRoleToHeader(soapHeaderBlock); return soapHeaderBlock; } return null; }
private static ArrayList<Object> cloneArrayList(ArrayList<Object> originalArrayList) { ArrayList<Object> clonedArrayList = null; if (originalArrayList != null) { clonedArrayList = new ArrayList<Object>(); for (Object obj : originalArrayList) { if (obj instanceof SOAPHeaderBlock) { SOAPFactory fac = (SOAPFactory) ((SOAPHeaderBlock) obj).getOMFactory(); obj = ((SOAPHeaderBlock) obj).cloneOMElement(); try { obj = ElementHelper.toSOAPHeaderBlock((OMElement) obj, fac); } catch (Exception e) { handleException(e.getLocalizedMessage()); } } else if (obj instanceof SOAPEnvelope) { SOAPEnvelope env = (SOAPEnvelope) obj; obj = MessageHelper.cloneSOAPEnvelope(env); } else if (obj instanceof OMElement) { obj = ((OMElement) obj).cloneOMElement(); } else { if (log.isDebugEnabled()) { log.debug("Array List deep clone not implemented for Class type : " + obj.getClass().getName()); } } clonedArrayList.add(obj); } } return clonedArrayList; }
/** * Sets the relay attribute for this SOAPHeaderElement to be either true or false. The SOAP * relay attribute is set to true to indicate that the SOAP header block must be relayed by any * node that is targeted by the header block but not actually process it. This attribute is * ignored on header blocks whose mustUnderstand attribute is set to true or that are targeted * at the ultimate reciever (which is the default). The default value of this attribute is * false. * * @param relay - the new value of the relay attribute * @throws SOAPException - if there is a problem in setting the relay attribute. * java.lang.UnsupportedOperationException - if this message does not * support the SOAP 1.2 concept of Relay attribute. */ public void setRelay(boolean flag) throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { this.omTarget.setRelay(flag); } }
public static ArrayList<Object> cloneArrayList(ArrayList<Object> arrayList) { ArrayList<Object> newArrayList = null; if (arrayList != null) { newArrayList = new ArrayList<Object>(); for (Object obj : arrayList) { if (obj instanceof SOAPHeaderBlock) { SOAPFactory fac = (SOAPFactory) ((SOAPHeaderBlock) obj).getOMFactory(); obj = ((SOAPHeaderBlock) obj).cloneOMElement(); try { obj = ElementHelper.toSOAPHeaderBlock((OMElement) obj, fac); } catch (Exception e) { handleException(e); } } else if (obj instanceof SOAPEnvelope) { SOAPEnvelope enve = (SOAPEnvelope) obj; obj = MessageHelper.cloneSOAPEnvelope(enve); } else if (obj instanceof OMElement) { obj = ((OMElement) obj).cloneOMElement(); } else { if (log.isDebugEnabled()) { log.error("Array List deep clone not implemented for Class type : " + obj.getClass().getName()); } } newArrayList.add(obj); } } return newArrayList; }
public void toHeader(SOAPHeader header){ if (identifier == null) throw new OMException(SandeshaMessageHelper.getMessage( SandeshaMessageKeys.nullMsgId)); if (messageNumber <= 0 ){ throw new OMException(SandeshaMessageHelper.getMessage( SandeshaMessageKeys.setAValidMsgNumber, Long.toString(messageNumber))); } SOAPHeaderBlock sequenceHeaderBlock = header.addHeaderBlock( Sandesha2Constants.WSRM_COMMON.SEQUENCE, omNamespace); // Always set the MustUnderstand to true for Sequence messages sequenceHeaderBlock.setMustUnderstand(true); identifier.toOMElement(sequenceHeaderBlock, omNamespace); OMElement messageNoElement = sequenceHeaderBlock.getOMFactory().createOMElement(Sandesha2Constants.WSRM_COMMON.MSG_NUMBER,omNamespace); messageNoElement.setText(Long.toString(messageNumber)); sequenceHeaderBlock.addChild(messageNoElement); if (lastMessage){ OMElement lastMessageElement = sequenceHeaderBlock.getOMFactory().createOMElement(Sandesha2Constants.WSRM_COMMON.LAST_MSG, omNamespace); sequenceHeaderBlock.addChild(lastMessageElement); } } }
ackRange.upperValue + ":" + ackRange.lowerValue)); OMFactory factory = sequenceAcknowledgementHeaderBlock.getOMFactory(); SandeshaMessageKeys.nackDoesNotContainValidLongValue)); OMElement nackElement = sequenceAcknowledgementHeaderBlock.getOMFactory().createOMElement(Sandesha2Constants.WSRM_COMMON.NACK,omNamespace); nackElement.setText(nack.toString()); sequenceAcknowledgementHeaderBlock.addChild(nackElement); SandeshaMessageKeys.noneNotAllowedNackPresent)); OMElement noneElement = sequenceAcknowledgementHeaderBlock.getOMFactory().createOMElement(Sandesha2Constants.WSRM_COMMON.NONE, omNamespace); sequenceAcknowledgementHeaderBlock.addChild(noneElement); SandeshaMessageKeys.cannotHaveFinalWithNack)); OMElement finalElement = sequenceAcknowledgementHeaderBlock.getOMFactory().createOMElement(Sandesha2Constants.WSRM_COMMON.FINAL, omNamespace); sequenceAcknowledgementHeaderBlock.addChild(finalElement);