Package javax.xml.soap

Examples of javax.xml.soap.SOAPException


     *     <CODE>SOAPFaultException</CODE> object already contains a valid
     *     <CODE>Detail</CODE> object
     */
    public javax.xml.soap.Detail addDetail() throws SOAPException {
        if(getDetail()!=null){
            throw new SOAPException(Messages.getMessage("valuePresent"));
        }
        Detail detail = new Detail(fault);
        addChildElement(detail);
        return detail;
    }
View Full Code Here


            throw new IllegalArgumentException(Messages.getMessage("nullParent00"));
        try {
            // cast to force exception if wrong type
            super.setParentElement((SOAPEnvelope)parent);
        } catch (Throwable t) {
            throw new SOAPException(t);
        }
    }
View Full Code Here

     * a value (set using setObjectValue) in the MessageElement.
     */
    public void addChild(MessageElement el) throws SOAPException
    {
        if (objectValue != null) {
            SOAPException exc = new SOAPException(Messages.getMessage("valuePresent"));
            log.error(Messages.getMessage("valuePresent"), exc);
            throw exc;
        }
        if (children == null)
            children = new ArrayList();
View Full Code Here

     * constructed from XML.
     * @param newValue node's value or null.
     */
    public void setObjectValue(Object newValue) throws SOAPException {
        if (children != null && !children.isEmpty()) {
            SOAPException exc = new SOAPException(Messages.getMessage("childPresent"));
            log.error(Messages.getMessage("childPresent"), exc);
            throw exc;
        }
        if (elementRep != null) {
            SOAPException exc = new SOAPException(Messages.getMessage("xmlPresent"));
            log.error(Messages.getMessage("xmlPresent"), exc);
            throw exc;
        }
        if (textRep != null) {
            SOAPException exc = new SOAPException(Messages.getMessage("xmlPresent"));
            log.error(Messages.getMessage("xmlPresent"), exc);
            throw exc;
        }
        this.objectValue = newValue;
    }
View Full Code Here

        if(parent == null)
            throw new IllegalArgumentException(Messages.getMessage("nullParent00"));
        try {
            setParent((MessageElement)parent);
        } catch (Throwable t) {
            throw new SOAPException(t);
        }
    }
View Full Code Here

        throws SOAPException {
        try {
            addChild((MessageElement)element);
            return element;
        } catch (ClassCastException e) {
            throw new SOAPException(e);
        }
    }
View Full Code Here

        org.apache.axis.message.Text text = new org.apache.axis.message.Text(s);
        try {
            addChild((MessageElement)text);
            return this;
        } catch (ClassCastException e) {
            throw new SOAPException(e);
        }
    }
View Full Code Here

    public SOAPElement addAttribute(Name name, String value)
        throws SOAPException {
        try {
            addAttribute(name.getURI(), name.getLocalName(), value);
        } catch (RuntimeException t) {
            throw new SOAPException(t);
        }
        return this;
    }
View Full Code Here

        throws SOAPException {
        try {
            Mapping map = new Mapping(uri, prefix);
            addMapping(map);
        } catch (RuntimeException t) {
            throw new SOAPException(t);
        }
        return this;
    }
View Full Code Here

    public javax.xml.soap.SOAPBody addBody() throws SOAPException {
        if (body == null) {
            body = new SOAPBody(this, soapConstants);
            return body;
        } else {
            throw new SOAPException(Messages.getMessage("bodyPresent"));
        }
    }
View Full Code Here

TOP

Related Classes of javax.xml.soap.SOAPException

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.