Package org.apache.ws.resource.faults

Examples of org.apache.ws.resource.faults.FaultException


      }
      else
      {
         LOG.error( MSG.getMessage( Keys.UNEXPECTED_ERROR ),
                    e );
         throw new FaultException( Soap1_1Constants.FAULT_SERVER,
                                   MSG.getMessage( Keys.INTERNAL_SERVER_ERROR ) );
      }
   }
View Full Code Here


               strBuf.append( errorList.get( i ) );
               strBuf.append( "\n" );
            }

            strBuf.append( "\n" );
            throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                      strBuf.toString(  ) );
         }
      }
   }
View Full Code Here

         SOAPHeader soapHeader          = context.getSOAPMessage(  ).getSOAPHeader(  );
         Iterator   resourceIdElemsIter =
            soapHeader.getChildElements( NameUtils.toName( getResourceIdentifierReferenceParameterQName(  ) ) );
         if ( !resourceIdElemsIter.hasNext(  ) )
         {
            throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                      "The expected resource identifier reference parameter named "
                                      + getResourceIdentifierReferenceParameterName(  )
                                      + " was not found in the SOAP header." );
         }

         SOAPHeaderElement resourceIdElem = (SOAPHeaderElement) resourceIdElemsIter.next(  );
         if ( resourceIdElemsIter.hasNext(  ) )
         {
            throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                      "More than one resource identifier reference parameter named "
                                      + getResourceIdentifierReferenceParameterName(  )
                                      + " was found in the SOAP header. Exactly one is expected." );
         }
View Full Code Here

            }
         }

         if ( resourceId == null )
         {
            throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                      "The expected resource identifier reference parameter named "
                                      + getResourceIdentifierReferenceParameterName(  )
                                      + " was not found in the SOAP header." );
         }
      }
View Full Code Here

      {
         msgXBean = XmlBeanUtils.toXmlObject( currentMsg );
      }
      catch ( Exception e )
      {
         throw new FaultException( Soap1_1Constants.FAULT_SERVER, "Internal server error." );
      }

      GetCurrentMessageResponseDocument                           responseDoc =
         GetCurrentMessageResponseDocument.Factory.newInstance(  );
      GetCurrentMessageResponseDocument.GetCurrentMessageResponse response =
View Full Code Here

            return new URL( addressingTo );
         }
         catch ( MalformedURLException murle )
         {
            LOG.debug( MSG.getMessage( Keys.INVALID_WSA_TO, addressingTo ) );
            throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                      "The WS-Addressing destination specified in the SOAP header (i.e. wsa:To header element) is not a valid URI." );
         }
      }

      return null; // should an exception be thrown here instead of returning null?
View Full Code Here

                                           new QName( getAddressingNamespaceURI( msgContext ),
                                                      "Action" ) );
      if ( actionHeaderElem == null )
      {
         LOG.debug( MSG.getMessage( Keys.NO_WSA_ACTION ) );
         throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                   "A WS-Addressing Action SOAP header element is required by this endpoint." );
      }

      String action = actionHeaderElem.getValue(  );
      try
      {
         new URI( action );
      }
      catch ( URISyntaxException urise )
      {
         LOG.debug( MSG.getMessage( Keys.INVALID_WSA_ACTION, action ) );
         throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                   "The WS-Addressing Action specified in the SOAP header is not a valid URI." );
      }

      LOG.debug( MSG.getMessage( Keys.FOUND_WSA_ACTION, action ) );
      return action;
View Full Code Here

                                                      "To" ) );
      String            addressingTo;
      if ( toHeaderElem == null )
      {
         LOG.debug( MSG.getMessage( Keys.NO_WSA_TO ) );
         throw new FaultException( Soap1_1Constants.FAULT_CLIENT,
                                   "A WS-Addressing To SOAP header element is required by this endpoint." );
      }

      addressingTo = toHeaderElem.getValue(  );
View Full Code Here

      }
      catch ( SOAPException e )
      {
         LOG.error( MSG.getMessage( Keys.INTERNAL_SERVER_ERROR ),
                    e );
         throw new FaultException( Soap1_1Constants.FAULT_SERVER,
                                   "An exception occurred while adding the required WS-Addressing fields to the response." );
      }

      return true;
   }
View Full Code Here

    * @return AnyXmlType response document.
    */
   public AnyXmlType get(  )
   {
      //todo spec says may use WS-Addressing ActionNotSupported
      throw new FaultException( Soap1_1Constants.FAULT_SERVER, "Unimplemented Operation." );
   }
View Full Code Here

TOP

Related Classes of org.apache.ws.resource.faults.FaultException

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.