Package org.apache.ws.commons.om

Examples of org.apache.ws.commons.om.OMException


            return;
        }
        if (node instanceof ChildNode) {
            this.nextSibling = (ChildNode) node;
        } else {
            throw new OMException("The node is not a " + ChildNode.class);
        }
    }
View Full Code Here


            return;
        }
        if (node instanceof ChildNode) {
            this.previousSibling = (ChildNode) node;
        } else {
            throw new OMException("The node is not a " + ChildNode.class);
        }
    }
View Full Code Here

    public void setParent(OMContainer element) {
        if (element instanceof ParentNode) {
            this.parentNode = (ParentNode) element;
        } else {
            throw new OMException("The given parent is not of the type "
                                  + ParentNode.class);
        }

    }
View Full Code Here

    }

    public OMNode detach() throws OMException {
        if (this.parentNode == null) {
            throw new OMException("Parent level elements cannot be detached");
        } else {
            if (previousSibling == null) { // This is the first child
                if (nextSibling != null) {
                    this.parentNode.setFirstChild(nextSibling);
                } else {
View Full Code Here

            }
            domSibling.nextSibling = this.nextSibling;
            this.nextSibling = domSibling;

        } else {
            throw new OMException("The given child is not of type "
                                  + ChildNode.class);
        }
    }
View Full Code Here

                siblingImpl.setPreviousOMSibling(previousSibling);
            }
            previousSibling = siblingImpl;

        } else {
            throw new OMException("The given child is not of type "
                                  + ChildNode.class);
        }

    }
View Full Code Here

        super(envelope, builder, factory);
    }

    public SOAPHeaderBlock addHeaderBlock(String localName, OMNamespace ns) throws OMException {
        if (ns == null || ns.getName() == null || "".equals(ns.getName())) {
            throw new OMException(
                    "All the SOAP Header blocks should be namespace qualified");
        }

        OMNamespace namespace = findNamespace(ns.getName(), ns.getPrefix());
        if (namespace != null) {
            ns = namespace;
        }

        SOAPHeaderBlock soapHeaderBlock = null;
        try {
            soapHeaderBlock = new SOAP12HeaderBlockImpl(localName, ns, this,
                    (SOAPFactory)this.factory);
        } catch (SOAPProcessingException e) {
            throw new OMException(e);
        }
        ((OMNodeEx)soapHeaderBlock).setComplete(true);
        return soapHeaderBlock;
    }
View Full Code Here

    public OMNode getNextOMSibling() throws OMException {
        while (!done) {
            int token = builder.next();
            if (token == XMLStreamConstants.END_DOCUMENT) {
                throw new OMException();
            }
        }
        return super.getNextOMSibling();
    }
View Full Code Here

   * Method detach
   *
   * @throws OMException
   */
  public OMNode detach() throws OMException {
    throw new OMException("Root Element can not be detached");
  }
View Full Code Here

                    }

                } while (inStream.available() > 0);
                return text.toString();
            } catch (Exception e) {
                throw new OMException(e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.commons.om.OMException

Copyright © 2018 www.massapicom. 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.