Package org.jboss.ws.core.soap

Examples of org.jboss.ws.core.soap.SOAPFaultImpl


      boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
      if (isActor && !headerSource.getHeaders().contains(name))
      {
         // How do we pass NotUnderstood blocks? They are not in the fault element
         QName faultCode = SOAPConstants.SOAP_MUSTUNDERSTAND_FAULT;
         SOAPFaultImpl fault = new SOAPFaultImpl();
         fault.setFaultCode(faultCode);
         fault.setFaultString("SOAP header blocks not understood");
         throwFaultException(fault);
      }
   }
View Full Code Here


      boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
      if (isActor && !headerSource.getHeaders().contains(name))
      {
         QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
         String faultString = "Unprocessed 'mustUnderstand' header element: " + element.getElementName();
         SOAPFaultImpl fault = new SOAPFaultImpl();
         fault.setFaultCode(faultCode);
         fault.setFaultString(faultString);
         throwFaultException(fault);
      }
   }
View Full Code Here

      boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
      if (isActor && !headerSource.getHeaders().contains(name))
      {
         QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
         String faultString = "Unprocessed 'mustUnderstand' header element: " + element.getElementName();
         SOAPFaultImpl fault = new SOAPFaultImpl();
         fault.setFaultCode(faultCode);
         fault.setFaultString(faultString);
         throwFaultException(fault);
      }
   }
View Full Code Here

            // R1109 The value of the SOAPAction HTTP header field in a HTTP request MESSAGE MUST be a quoted string.
            if (!soapAction.equals(wsaAction) && !soapAction.equals("\"" + wsaAction + "\""))
            {
               try
               {
                  SOAPFault fault = new SOAPFaultImpl();
                  fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ActionMismatch"));
                  fault.setFaultString("Mismatch between soap action:" + soapAction + " and wsa action:\""
                        + addrProps.getAction().getURI() + "\"");
                  Detail detail = fault.addDetail();
                  detail.addDetailEntry(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ProblemAction"));
                  throw new SOAPFaultException(fault);
               }
               catch (SOAPException e)
               {
View Full Code Here

      boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
      if (isActor && !headerSource.getHeaders().contains(name))
      {
         // How do we pass NotUnderstood blocks? They are not in the fault element
         QName faultCode = SOAPConstants.SOAP_MUSTUNDERSTAND_FAULT;
         SOAPFaultImpl fault = new SOAPFaultImpl();
         fault.setFaultCode(faultCode);
         fault.setFaultString("SOAP header blocks not understood");
         throwFaultException(fault);
      }
   }
View Full Code Here

      boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
      if (isActor && !headerSource.getHeaders().contains(name))
      {
         QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
         String faultString = "Unprocessed 'mustUnderstand' header element: " + element.getElementName();
         SOAPFaultImpl fault = new SOAPFaultImpl();
         fault.setFaultCode(faultCode);
         fault.setFaultString(faultString);
         throwFaultException(fault);
      }
   }
View Full Code Here

      boolean isActor = actor == null || actor.length() == 0 || Constants.URI_SOAP11_NEXT_ACTOR.equals(actor) || roles.contains(actor);
      if (isActor && !headerSource.getHeaders().contains(name))
      {
         // How do we pass NotUnderstood blocks? They are not in the fault element
         QName faultCode = SOAPConstants.SOAP_MUSTUNDERSTAND_FAULT;
         SOAPFaultImpl fault = new SOAPFaultImpl();
         fault.setFaultCode(faultCode);
         fault.setFaultString("SOAP header blocks not understood");
         throwFaultException(fault);
      }
   }
View Full Code Here

            // R1109 The value of the SOAPAction HTTP header field in a HTTP request MESSAGE MUST be a quoted string.
            if (!soapAction.equals(wsaAction) && !soapAction.equals("\"" + wsaAction + "\""))
            {
               try
               {
                  SOAPFault fault = new SOAPFaultImpl();
                  fault.setFaultCode(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ActionMismatch"));
                  fault.setFaultString("Mismatch between soap action:" + soapAction + " and wsa action:\""
                        + addrProps.getAction().getURI() + "\"");
                  Detail detail = fault.addDetail();
                  detail.addDetailEntry(new QName(ADDR_CONSTANTS.getNamespaceURI(), "ProblemAction"));
                  throw new SOAPFaultException(fault);
               }
               catch (SOAPException e)
               {
View Full Code Here

      chopStackTrace(e);
      log.error("Original WSSecurityException: ", e);

      if(isSOAP12())
      {
         SOAPFaultImpl fault = new SOAPFaultImpl(
            org.jboss.ws.Constants.PREFIX_ENV,
            org.jboss.ws.Constants.NS_SOAP12_ENV
         );

         if(e.isInternalError())
            fault.setFaultCode(SOAPConstants.SOAP_RECEIVER_FAULT);
         else
            fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT);

         fault.appendFaultSubcode(e.getFaultCode());
         fault.setFaultString(e.getFaultString());

         return new SOAPFaultException(fault);
      }
      else
      {
View Full Code Here

/* 80 */     boolean isActor = (actor == null) || (actor.length() == 0) || ("http://schemas.xmlsoap.org/soap/actor/next".equals(actor)) || (roles.contains(actor));
/* 81 */     if ((isActor) && (!this.headerSource.getHeaders().contains(name)))
/*    */     {
/* 83 */       QName faultCode = Constants.SOAP11_FAULT_CODE_MUST_UNDERSTAND;
/* 84 */       String faultString = "Unprocessed 'mustUnderstand' header element: " + element.getElementName();
/* 85 */       SOAPFaultImpl fault = new SOAPFaultImpl();
/* 86 */       fault.setFaultCode(faultCode);
/* 87 */       fault.setFaultString(faultString);
/* 88 */       throwFaultException(fault);
/*    */     }
/*    */   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.soap.SOAPFaultImpl

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.