/** * What SOAP version is this HeaderBlock? * * @return a SOAPVersion, one of the two singletons. */ public SOAPVersion getVersion() { return SOAP11Version.getSingleton(); }
public SOAPVersion getSOAPVersion() { return SOAP11Version.getSingleton(); }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessageFactory["); if (soapFactory.getSOAPVersion() == SOAP11Version.getSingleton()) { builder.append("SOAP 1.1"); } else if (soapFactory.getSOAPVersion() == SOAP12Version.getSingleton()) { builder.append("SOAP 1.2"); } builder.append(','); if (payloadCaching) { builder.append("PayloadCaching enabled"); } else { builder.append("PayloadCaching disabled"); } builder.append(']'); return builder.toString(); } }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessageFactory["); if (soapFactory.getSOAPVersion() == SOAP11Version.getSingleton()) { builder.append("SOAP 1.1"); } else if (soapFactory.getSOAPVersion() == SOAP12Version.getSingleton()) { builder.append("SOAP 1.2"); } builder.append(','); if (payloadCaching) { builder.append("PayloadCaching enabled"); } else { builder.append("PayloadCaching disabled"); } builder.append(']'); return builder.toString(); } }
public String toString() { StringBuilder builder = new StringBuilder("AxiomSoapMessageFactory["); if (soapFactory.getSOAPVersion() == SOAP11Version.getSingleton()) { builder.append("SOAP 1.1"); } else if (soapFactory.getSOAPVersion() == SOAP12Version.getSingleton()) { builder.append("SOAP 1.2"); } builder.append(','); if (payloadCaching) { builder.append("PayloadCaching enabled"); } else { builder.append("PayloadCaching disabled"); } builder.append(']'); return builder.toString(); } }
public String getRole() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { return this.omTarget.getRole(); } }
public boolean getRelay() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { return this.omTarget.getRelay(); } }
/** * Returns an Iterator over a sequence of String objects containing all of the Reason Text items * for this SOAPFault. * * @throws SOAPException if there is an error in retrieving texts for Reason objects * java.lang.UnsupportedOperationException - if this message does not * support the SOAP 1.2 concept of Fault Reason. */ public Iterator getFaultReasonTexts() throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } Iterator soapTextsItr = this.omTarget.getReason().getAllSoapTexts().iterator(); ArrayList reasonTexts = new ArrayList(); while (soapTextsItr.hasNext()) { SOAPFaultText soapFaultText = (SOAPFaultText)soapTextsItr.next(); reasonTexts.add(soapFaultText.getText()); } return reasonTexts.iterator(); }
/** * 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); } }
if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException("Message does not support the " + "SOAP 1.2 concept of Fault Reason");
/** * 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); } }
/** * Gets the Subcodes for this SOAPFault as an iterator over QNames. * * @return an Iterator that accesses a sequence of QNames. This Iterator should not support the * optional remove method. The order in which the Subcodes are returned reflects the * hierarchy of Subcodes present in the fault from top to bottom. * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Subcode. */ public Iterator getFaultSubcodes() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } ArrayList faultSubcodes = new ArrayList(); SOAPFaultSubCode subCodeElement = this.omTarget.getCode().getSubCode(); while (subCodeElement != null) { faultSubcodes.add(subCodeElement.getValueAsQName()); subCodeElement = subCodeElement.getSubCode(); } return faultSubcodes.iterator(); }
if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException("Message does not support the " + "SOAP 1.2 concept of Fault Reason");
if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { try { URI uri = new URI(encodingStyle);
/** * Removes any Subcodes that may be contained by this SOAPFault. Subsequent calls to * getFaultSubcodes will return an empty iterator until a call to appendFaultSubcode is made. * * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Subcode. */ public void removeAllFaultSubcodes() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { omTarget.getCode().getSubCode().detach(); } }
/** * Creates a new NotUnderstood SOAPHeaderElement object initialized with the specified name and * adds it to this SOAPHeader object. This operation is supported only by SOAP 1.2 * * @param name - a QName object with the name of the SOAPHeaderElement object that was not * understood. * @return the new SOAPHeaderElement object that was inserted into this SOAPHeader object * @throws SOAPException- if a SOAP error occurs. java.lang.UnsupportedOperationException - if * this is a SOAP 1.1 Header. */ public SOAPHeaderElement addNotUnderstoodHeaderElement(QName qname) throws SOAPException { SOAPHeaderBlock soapHeaderBlock = null; OMNamespace ns = omTarget.getOMFactory().createOMNamespace(qname.getNamespaceURI(), qname.getPrefix()); if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException(); } else { soapHeaderBlock = this.omTarget.addHeaderBlock( Constants.ELEM_NOTUNDERSTOOD, this.omTarget.getNamespace()); soapHeaderBlock.addAttribute(qname.getLocalPart(), qname.getPrefix(), ns); } SOAPHeaderElementImpl soapHeaderElementImpl = new SOAPHeaderElementImpl(soapHeaderBlock); return soapHeaderElementImpl; }
/** * Returns the optional Role element value for this SOAPFault object. The Role element is * optional in SOAP 1.2. * * @return Content of the env:Fault/env:Role element as a String or null if none * @throws UnsupportedOperationException * - if this message does not support the SOAP 1.2 concept of Fault Role. * @since SAAJ 1.3 */ public String getFaultRole() { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException("Message does not support the " + "SOAP 1.2 concept of Fault Reason"); } else { if (this.omTarget.getRole() != null) { return this.omTarget.getRole().getText(); } else { return null; } } }
void setDefaults() throws SOAPException { if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { setFaultCode(SOAP11Constants.QNAME_SENDER_FAULTCODE); } else { setFaultCode(SOAP12Constants.QNAME_SENDER_FAULTCODE); } setFaultString("Fault string, and possibly fault code, not set"); defaultsSet = true; }
/** * Creates or replaces any existing Node element value for this SOAPFault object. The Node * element is optional in SOAP 1.2. * * @throws SOAPException - if there was an error in setting the Node for this SOAPFault object. * java.lang.UnsupportedOperationException - if this message does not * support the SOAP 1.2 concept of Fault Node. * @since SAAJ 1.3 */ public void setFaultNode(String s) throws SOAPException { SOAPFactory soapFactory = (SOAPFactory)this.omTarget.getOMFactory(); if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException("message does not support " + "the SOAP 1.2 concept of Fault Node"); } SOAPFaultNode soapFaultNode = soapFactory.createSOAPFaultNode(this.omTarget); soapFaultNode.setText(s); this.omTarget.setNode(soapFaultNode); }
/** * Creates or replaces any existing Role element value for this SOAPFault object. The Role * element is optional in SOAP 1.2. * * @param uri - the URI of the Role * @throws SOAPException - if there was an error in setting the Role for this SOAPFault object * java.lang.UnsupportedOperationException - if this message does not * support the SOAP 1.2 concept of Fault Role. */ public void setFaultRole(String uri) throws SOAPException { SOAPFactory soapFactory = (SOAPFactory)this.omTarget.getOMFactory(); if (((SOAPFactory)this.omTarget.getOMFactory()).getSOAPVersion() == SOAP11Version.getSingleton()) { throw new UnsupportedOperationException("message does not support the " + "SOAP 1.2 concept of Fault Role"); } SOAPFaultRole soapFaultRole = soapFactory.createSOAPFaultRole(this.omTarget); soapFaultRole.setRoleValue(uri); this.omTarget.setRole(soapFaultRole); }