Package javax.xml.soap

Examples of javax.xml.soap.SOAPException


        EnvelopeImpl envelope =
            (EnvelopeImpl) EnvelopeFactory.createEnvelope(tmp, this);

        if (!envelope.getNamespaceURI().equals(SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE)) {
            log.severe("SAAJ0304.ver1_1.msg.invalid.SOAP1.1");
            throw new SOAPException("InputStream does not represent a valid SOAP 1.1 Message");
        }

        if (!omitXmlDecl) {
            envelope.setOmitXmlDecl("no");
            envelope.setXmlDecl(parser.getXmlDeclaration());
View Full Code Here


    public SOAPElement setElementQName(QName newName) throws SOAPException {
            log.log(Level.SEVERE,
                    "SAAJ0146.impl.invalid.name.change.requested",
                    new Object[] {elementQName.getLocalPart(),
                                  newName.getLocalPart()});
            throw new SOAPException("Cannot change name for "
                                    + elementQName.getLocalPart() + " to "
                                    + newName.getLocalPart());
    }
View Full Code Here

    }

    public void setParentElement(SOAPElement parent) throws SOAPException {
        if (parent == null) {
            log.severe("SAAJ0145.impl.no.null.to.parent.elem");
            throw new SOAPException("Cannot pass NULL to setParentElement");
        }
        ((ElementImpl) parent).addNode(this);
    }
View Full Code Here

        Source tmp = source;
        source = null;
        EnvelopeImpl envelope = (EnvelopeImpl)EnvelopeFactory.createEnvelope(tmp, this);
        if (!envelope.getNamespaceURI().equals(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE)) {
            log.severe("SAAJ0415.ver1_2.msg.invalid.soap1.2");
            throw new SOAPException("InputStream does not represent a valid SOAP 1.2 Message");
        }

        if (!omitXmlDecl) {
            envelope.setOmitXmlDecl("no");
            envelope.setXmlDecl(parser.getXmlDeclaration());
View Full Code Here

        } else {
            log.log(
                Level.SEVERE,
                "SAAJ0569.soap.unknown.protocol",
                new Object[] {protocol, "MessageFactory"});
            throw new SOAPException("Unknown Protocol: " + protocol +
                                        "  specified for creating MessageFactory");
        }
    }
View Full Code Here

        } else {
            log.log(
                Level.SEVERE,
                "SAAJ0569.soap.unknown.protocol",
                new Object[] {protocol, "SOAPFactory"});
            throw new SOAPException("Unknown Protocol: " + protocol +
                                        "  specified for creating SOAPFactory");
        }
    }
View Full Code Here

   

    public void setParentElement(SOAPElement element) throws SOAPException {
        if (element == null) {
            log.severe("SAAJ0112.impl.no.null.to.parent.elem");
            throw new SOAPException("Cannot pass NULL to setParentElement");
        }
        ((ElementImpl) element).addNode(this);
    }
View Full Code Here

                final Node node = (Node)children.next() ;
                if (node instanceof SOAPElement)
                {
                    if (found)
                    {
                        throw new SOAPException("Found multiple SOAPElements in SOAPBody") ;
                    }
                    final StringWriter sw = new StringWriter() ;
                    final XMLEventWriter writer = XMLHelper.getXMLEventWriter(new StreamResult(sw)) ;
                    XMLHelper.readDomNode(node, writer, true) ;
                    requestProxy.setPayload(esbReq, sw.toString()) ;
                    found = true ;
                }
            }

            if (!found)
            {
                throw new SOAPException("Could not find SOAPElement in SOAPBody") ;
            }

            if (soapIncomingProps != null)
            {
                initialiseWSAProps(esbReq, soapIncomingProps) ;
            }
           
            // Extract security info from SOAPMessage.
            AuthenticationRequest authRequest = extractSecurityDetails(request, esbReq);
          ExtractorUtil.addAuthRequestToMessage(authRequest, esbReq);

            // We should be able to return null here but this causes JBossWS to NPE.
            final Message esbRes = deliverMessage(esbReq) ;
           
            final SOAPMessage response = SOAP_MESSAGE_FACTORY.createMessage();
            if (esbRes != null)
            {
                final Object input = responseProxy.getPayload(esbRes) ;
                if (input == null)
                {
                    throw new SOAPException("Null response from service") ;
                }
                final String soapRes = input.toString();

                final Document root = parseAsDom(soapRes) ;
               
View Full Code Here

                    operation = invocationChain.getSourceOperation();
                    break;
                }
            }
            if (operation == null) {
                throw new SOAPException("Operation not found: " + operationName);
            }

            Message requestMsg = messageFactory.createMessage();
            Object[] body = new Object[]{root};
            requestMsg.setBody(body);
View Full Code Here

         value = soapText.toString(  );
      }

      if ( value == null )
      {
         throw new SOAPException( MSG.getMessage( Keys.TEXT_NODE_IS_NULL) );
      }

      return value;
   }
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.