protected void removeSessionID(OMElement header, QName keyQName) { OMElement sgcIDElm = getHeaderBlock(header, keyQName); if (sgcIDElm != null) { sgcIDElm.detach(); } }
public void onMessage(org.apache.axis2.context.MessageContext messageContext) { System.out.println("Response received to the callback"); OMElement result = messageContext.getEnvelope().getBody().getFirstElement(); // Detach the result to make sure that the element we return to the sample client // is completely built result.detach(); StockQuoteClient.InnerStruct.RESULT = result; }
public void setFromProperties(Properties props) { for (Iterator it = target.getChildElements(); it.hasNext();) { OMElement child = (OMElement) it.next(); child.detach(); } String key; String value; for (Iterator i = props.keySet().iterator(); i.hasNext(); setString(key, value)) { key = (String) i.next(); value = props.getProperty(key); } }
public void toSOAPEnvelope(SOAPEnvelope envelope) { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(namespaceValue, Sandesha2Constants.WSRM_COMMON.TERMINATE_SEQUENCE)); if (elem!=null) elem.detach(); toOMElement(body); }
public void toSOAPEnvelope(SOAPEnvelope envelope) throws AxisFault { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.CREATE_SEQUENCE)); if (elem!=null) elem.detach(); toOMElement(body); }
public void toSOAPEnvelope(SOAPEnvelope envelope) { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(namespaceValue, Sandesha2Constants.WSRM_COMMON.CLOSE_SEQUENCE_RESPONSE)); if (elem!=null) elem.detach(); toOMElement(body); }
public void toSOAPEnvelope(SOAPEnvelope envelope) { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(namespaceValue, Sandesha2Constants.WSRM_COMMON.TERMINATE_SEQUENCE_RESPONSE)); if (elem!=null) elem.detach(); toOMElement(body); }
public void toSOAPEnvelope(SOAPEnvelope envelope) { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(namespaceValue, Sandesha2Constants.WSRM_COMMON.CLOSE_SEQUENCE)); if (elem!=null) elem.detach(); toOMElement(body); }
public void toSOAPEnvelope(SOAPEnvelope envelope) throws AxisFault { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.CREATE_SEQUENCE_RESPONSE)); if (elem!=null) elem.detach(); toOMElement(body); }
public void toSOAPEnvelope(SOAPEnvelope envelope) { SOAPBody body = envelope.getBody(); //detach if already exist. OMElement elem = body.getFirstChildWithName(new QName(Sandesha2Constants.SPEC_2007_02.MC_NS_URI, Sandesha2Constants.WSRM_COMMON.MAKE_CONNECTION)); if (elem!=null) elem.detach(); toOMElement(body); }
public void rmObject(OMElement ele) { if (ele.getParent() != null) ele.detach(); List<List<OMElement>> containers = this.get_metadata_containers(); for (List<OMElement> container : containers) container.remove(ele); }
public static void preparePayload(MessageContext messageContext, OMElement element) { SOAPBody soapBody = messageContext.getEnvelope().getBody(); for (Iterator itr = soapBody.getChildElements(); itr.hasNext();) { OMElement child = (OMElement) itr.next(); child.detach(); } for (Iterator itr = element.getChildElements(); itr.hasNext();) { OMElement child = (OMElement) itr.next(); soapBody.addChild(child); } }
public OMElement getDocumentElement(boolean discardDocument) { OMElement documentElement = getDocument().getOMDocumentElement(); if (discardDocument) { documentElement.detach(); } return documentElement; }
public OMElement getDocumentElement(boolean discardDocument) { OMElement documentElement = getDocument().getOMDocumentElement(); if (discardDocument) { documentElement.detach(); } return documentElement; }
private void buildLibraries(OMElement ele, boolean detach) { for (OMElement child : AxiomUtils.getElements(ele, "library")) { String className = child.getText().trim(); if (StringUtils.isNotBlank(className)) { Class<? extends ITagLibrary> clazz = (Class<? extends ITagLibrary>) ReflectUtils.loadClassStrict( className, null); model.getConfig().getTagLibs().add(clazz); } if (detach) { child.detach(); } } }
private void handleFirstChild(OMElement firstChild, OMElement result, ResourceDescription description) { if (!firstChild.getQName().equals(description.getParentElementQName())) { firstChild.insertSiblingAfter(result); firstChild.detach(); } else { firstChild.addChild(result); } } }
@Override public void removeHeaderElement(QName name) throws SoapHeaderException { try { OMElement element = getAxiomHeader().getFirstChildWithName(name); if (element != null) { element.detach(); } } catch (OMException ex) { throw new AxiomSoapHeaderException(ex); } }
private void refreshReport() throws JaxenException { AXIOMXPath xpathExpression = new AXIOMXPath("//a:title"); xpathExpression.addNamespace("a", "http://jasperreports.sourceforge.net/jasperreports"); OMElement documentElement = document.getOMDocumentElement(); List nodeList = xpathExpression.selectNodes(documentElement); OMElement element = (OMElement) nodeList.get(0); element.detach(); }
public void removeHeaderElement(QName name) throws SoapHeaderException { try { OMElement element = getAxiomHeader().getFirstChildWithName(name); if (element != null) { element.detach(); } } catch (OMException ex) { throw new AxiomSoapHeaderException(ex); } }
public static void setFaultPayload(MessageContext messageContext, OMElement payload) { OMElement firstChild = messageContext.getEnvelope().getBody().getFirstElement(); if (firstChild != null) { firstChild.insertSiblingAfter(payload); firstChild.detach(); } else { messageContext.getEnvelope().getBody().addChild(payload); } }