Package javax.xml.soap

Examples of javax.xml.soap.SOAPBody.addFault()


        @Override
        protected SOAPMessage onMessage(SOAPMessage message) throws SOAPException {
            SOAPMessage response = messageFactory.createMessage();
            SOAPBody body = response.getSOAPBody();
            body.addFault(SOAPConstants.SOAP_RECEIVER_FAULT, "Receiver Fault");
            return response;
        }
    }

  @SuppressWarnings("serial")
View Full Code Here


        @Override
        protected SOAPMessage onMessage(SOAPMessage message) throws SOAPException {
            SOAPMessage response = messageFactory.createMessage();
            SOAPBody body = response.getSOAPBody();
            body.addFault(SOAPConstants.SOAP_SENDER_FAULT, "Sender Fault");
            return response;
        }
    }

  @SuppressWarnings("serial")
View Full Code Here

        try {
          getSaajBody().removeContents();
          SOAPBody body = getSaajBody();
          SOAPFault result;
          if (faultStringLocale == null) {
            result = body.addFault(faultCode, faultString);
          }
          else {
            result = body.addFault(faultCode, faultString, faultStringLocale);
          }
          SOAPFault saajFault = result;
View Full Code Here

          SOAPFault result;
          if (faultStringLocale == null) {
            result = body.addFault(faultCode, faultString);
          }
          else {
            result = body.addFault(faultCode, faultString, faultStringLocale);
          }
          SOAPFault saajFault = result;
            return new SaajSoap12Fault(saajFault);
        }
        catch (SOAPException ex) {
View Full Code Here

        try {
          getSaajBody().removeContents();
          SOAPBody body = getSaajBody();
          SOAPFault result;
          if (faultStringLocale == null) {
            result = body.addFault(faultCode, faultString);
          }
          else {
            result = body.addFault(faultCode, faultString, faultStringLocale);
          }
          SOAPFault saajFault = result;
View Full Code Here

          SOAPFault result;
          if (faultStringLocale == null) {
            result = body.addFault(faultCode, faultString);
          }
          else {
            result = body.addFault(faultCode, faultString, faultStringLocale);
          }
          SOAPFault saajFault = result;
            return new SaajSoap11Fault(saajFault);
        }
        catch (SOAPException ex) {
View Full Code Here

            }

            try
            {
                SOAPBody soapResBody = soapRes.getSOAPBody();
                SOAPFault soapFault = soapResBody.addFault();
                if(faultCode == null)
                   faultCode = "Unavailable";
               
                if (faultCode.contains(":") == false)
                {
View Full Code Here

      SOAPMessage soapResponse = messageFactory.createMessage();
      soapBody = soapResponse.getSOAPBody();
     
      if (authResponse == null)
      {
        SOAPFault fault = soapBody.addFault();
        fault.setFaultString("Missing authetication data");
        return soapResponse;
       
      } else if (!authResponse.isReturn())
      {
View Full Code Here

        fault.setFaultString("Missing authetication data");
        return soapResponse;
       
      } else if (!authResponse.isReturn())
      {
        SOAPFault fault = soapBody.addFault();
        fault.setFaultString("Failed authentication");
        return soapResponse;
      }
       
      if (responsePojo != null) {
View Full Code Here

      }
       
      if (responsePojo != null) {
        JAXB.marshal(responsePojo, new SAAJResult(soapBody));
      } else {
        SOAPFault fault = soapBody.addFault();
        fault.setFaultString("Unrecognized SOAP request.");
      }
      return soapResponse;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.