Package javax.xml.soap

Examples of javax.xml.soap.SOAPException


        if(!(parent instanceof SOAPHeader))
            throw new IllegalArgumentException(JavaUtils.getMessage("illegalArgumentException00"));
        try {
            super.setParentElement((SOAPHeader)parent);
        } catch (Throwable t) {
            throw new SOAPException(t);
        }
    }
View Full Code Here


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

     * @throws  SOAPException  if there is
     *     no data in this <CODE>AttachmentPart</CODE> object
     */
    public DataHandler getDataHandler() throws SOAPException {
        if(datahandler == null) {
            throw new SOAPException(JavaUtils.getMessage("noContent"));
        }
        return datahandler;
    }
View Full Code Here

    public Object getContent() throws SOAPException {
        if(contentObject != null)
            return contentObject;

        if(datahandler == null) {
            throw new SOAPException(JavaUtils.getMessage("noContent"));
        }

        javax.activation.DataSource ds = datahandler.getDataSource();
        if (ds instanceof ManagedMemoryDataSource) {
            ManagedMemoryDataSource mds = (ManagedMemoryDataSource) ds;
View Full Code Here

        ByteBuffer bout = new ByteBuffer();
        try {
            datahandler.writeTo(bout);
        } catch (java.io.IOException ex) {
            log.error(JavaUtils.getMessage("javaIOException00"), ex);
            throw new SOAPException(JavaUtils.getMessage("javaIOException01", ex.getMessage()), ex);
        }
        byte bytes[] = bout.getBytes();
        if (bytes != null)
            return bytes.length;
        return -1;
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(JavaUtils.getMessage("bodyPresent"));
        }
    }
View Full Code Here

    public javax.xml.soap.SOAPHeader addHeader() throws SOAPException {
        if (header == null) {
            header = new SOAPHeader(this, soapConstants);
            return header;
        } else {
            throw new SOAPException(JavaUtils.getMessage("headerPresent"));
        }
    }
View Full Code Here

            throw new IllegalArgumentException(JavaUtils.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(JavaUtils.
                                                  getMessage("valuePresent"));
            log.error(JavaUtils.getMessage("valuePresent"), exc);
            throw exc;
        }
        if (children == null)
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(JavaUtils.
                                                  getMessage("childPresent"));
            log.error(JavaUtils.getMessage("childPresent"), exc);
            throw exc;
        }
        if (elementRep != null) {
            SOAPException exc = new SOAPException(JavaUtils.
                                                  getMessage("xmlPresent"));
            log.error(JavaUtils.getMessage("xmlPresent"), exc);
            throw exc;
        }
        if (textRep != null) {
            SOAPException exc = new SOAPException(JavaUtils.
                                                  getMessage("xmlPresent"));
            log.error(JavaUtils.getMessage("xmlPresent"), exc);
            throw exc;
        }
        this.objectValue = newValue;
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.