Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPHeaderBlock.addAttribute()


        // We can't add the element directly to the SOAPHeader. Instead, we need to copy the
        // information over to a SOAPHeaderBlock.
        SOAPHeaderBlock headerBlock = header.addHeaderBlock(element.getLocalName(),
                element.getNamespace());
        for (Iterator it = element.getAllAttributes(); it.hasNext(); ) {
            headerBlock.addAttribute((OMAttribute)it.next());
        }
        headerBlock.setMustUnderstand(mustUnderstand);
        OMNode child = element.getFirstOMChild();
        while (child != null) {
            // Get the next child before addChild will detach the node from its original place.
View Full Code Here


                      } else {
                        header = soapHeader.addHeaderBlock(element.getLocalName(), element.getNamespace());
                        Iterator attrIter = element.getAllAttributes();
                        while (attrIter.hasNext()) {
                          OMAttribute attr = (OMAttribute)attrIter.next();
                          header.addAttribute(attr.getLocalName(), attr.getAttributeValue(), attr.getNamespace());
                        }
                        Iterator nsIter  = element.getAllDeclaredNamespaces();
                        while (nsIter.hasNext()) {
                          OMNamespace ns =  (OMNamespace) nsIter.next();
                          header.declareNamespace(ns);
View Full Code Here

            SOAPHeaderBlock notUnderstood =
                    getAxiomHeader().addHeaderBlock("NotUnderstood", getAxiomHeader().getNamespace());
          OMNamespace headerNamespace =
                    notUnderstood.declareNamespace(headerName.getNamespaceURI(),
                        headerName.getPrefix());
            notUnderstood.addAttribute("qname", headerNamespace.getPrefix() + ":" + headerName.getLocalPart(), null);
            return new AxiomSoapHeaderElement(notUnderstood, getAxiomFactory());
        }
        catch (SOAPProcessingException ex) {
            throw new AxiomSoapHeaderException(ex);
        }
View Full Code Here

    OMNamespace namespace = factory.createOMNamespace(namespaceValue,Sandesha2Constants.WSRM_COMMON.NS_PREFIX_RM);
   
    SOAPHeaderBlock headerBlock = header.addHeaderBlock(Sandesha2Constants.WSRM_COMMON.MESSAGE_PENDING,namespace);
   
    OMAttribute attribute = factory.createOMAttribute(Sandesha2Constants.WSRM_COMMON.PENDING,null,new Boolean (pending).toString());
    headerBlock.addAttribute(attribute);
   
    return headerElement;
  }

  public boolean isNamespaceSupported(String namespaceName) {
View Full Code Here

    OMNamespace namespace = factory.createOMNamespace(namespaceValue,Sandesha2Constants.WSRM_COMMON.NS_PREFIX_RM);
   
    SOAPHeaderBlock headerBlock = header.addHeaderBlock(Sandesha2Constants.WSRM_COMMON.MESSAGE_PENDING,namespace);
   
    OMAttribute attribute = factory.createOMAttribute(Sandesha2Constants.WSRM_COMMON.PENDING,null,new Boolean (pending).toString());
    headerBlock.addAttribute(attribute);
   
    return headerElement;
  }

  public boolean isNamespaceSupported(String namespaceName) {
View Full Code Here

        OMAttribute omatribute = null;
        // add attributes
        for (Iterator iter = omElementToadd.getAllAttributes(); iter.hasNext();){
             omatribute = (OMAttribute) iter.next();
             soapHeaderBlock.addAttribute(omatribute);
        }

    }

    protected void addHeader(OMElement omElementToadd,
View Full Code Here

                      } else {
                        header = soapHeader.addHeaderBlock(element.getLocalName(), element.getNamespace());
                        Iterator attrIter = element.getAllAttributes();
                        while (attrIter.hasNext()) {
                          OMAttribute attr = (OMAttribute)attrIter.next();
                          header.addAttribute(attr.getLocalName(), attr.getAttributeValue(), attr.getNamespace());
                        }
                        Iterator nsIter  = element.getAllDeclaredNamespaces();
                        while (nsIter.hasNext()) {
                          OMNamespace ns =  (OMNamespace) nsIter.next();
                          header.declareNamespace(ns);
View Full Code Here

        // We can't add the element directly to the SOAPHeader. Instead, we need to copy the
        // information over to a SOAPHeaderBlock.
        SOAPHeaderBlock headerBlock = header.addHeaderBlock(element.getLocalName(),
                element.getNamespace());
        for (Iterator it = element.getAllAttributes(); it.hasNext(); ) {
            headerBlock.addAttribute((OMAttribute)it.next());
        }
        headerBlock.setMustUnderstand(mustUnderstand);
        OMNode child = element.getFirstOMChild();
        while (child != null) {
            // Get the next child before addChild will detach the node from its original place.
View Full Code Here

    this.pending = pending;
  }

  public void toHeader(SOAPHeader header){   
    SOAPHeaderBlock headerBlock = header.addHeaderBlock(Sandesha2Constants.WSRM_COMMON.MESSAGE_PENDING,Sandesha2Constants.SPEC_2007_02.OM_MC_NS_URI);
    headerBlock.addAttribute(Sandesha2Constants.WSRM_COMMON.PENDING, Boolean.valueOf (pending).toString(), null);
 
}
View Full Code Here

                    OMAttribute omatribute = null;
                    // add attributes
                    for (Iterator iter = omHeaderNode.getAllAttributes(); iter.hasNext();) {
                        omatribute = (OMAttribute) iter.next();
                        hb.addAttribute(omatribute);
                    }
                }
            } else {
                throw new AxisFault("SOAP Header Must be an Element");
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.