Package org.apache.muse.ws.addressing.soap

Examples of org.apache.muse.ws.addressing.soap.SoapFault


            return setResponse.getTerminationTime();
        }
       
        catch (ParseException error)
        {
            throw new SoapFault(error.getMessage(), error);
        }
    }
View Full Code Here


           
        catch (Exception error)
        {
            Object[] filler = { uri };
            String message = _MESSAGES.get("InvalidAddressURI", filler);
            throw new SoapFault(message, error);
        }
       
        Document doc = _xml.getOwnerDocument();
       
        //
View Full Code Here

                    metrics.put(MuwsConstants.LAST_UPDATED, XsdUtils.getLocalTime(lastUpdated));
            }
           
            catch (Throwable error)
            {
                throw new SoapFault(error.getMessage(), error);
            }
           
            if (duration != null && duration.length() > 0)
                metrics.put(MuwsConstants.DURATION, duration);
        }
View Full Code Here

        throws SoapFault
    {
        Element[] children = XmlUtils.getElements(xml, MuwsConstants.REQUESTED_TYPE_QNAME);
       
        if (children.length == 0)
            throw new SoapFault(_MESSAGES.get("NoRequestedTypes"));
       
        _types = new QName[children.length];
       
        for (int n = 0; n < children.length; ++n)
            _types[n] = XmlUtils.getQName(children[n]);
View Full Code Here

       
        //
        // we have to have a Message element, even if it's empty
        //
        if (messageXML == null)
            throw new SoapFault(_MESSAGES.get("NoMessageContent"));
       
        Element[] children = XmlUtils.getAllElements(messageXML);
       
        for (int n = 0; n < children.length; ++n)
            addMessageContent(children[n]);
View Full Code Here

            XmlUtils.toFile(entryXML, resourceFile);
        }
       
        catch (IOException error)
        {
            throw new SoapFault(error);
        }
    }
View Full Code Here

            XmlUtils.toFile(subXML, resourceFile);
        }
       
        catch (IOException error)
        {
            throw new SoapFault(error);
        }
    }
View Full Code Here

        Capability capability = getCapabilityForAction(action);
       
        // Sanity check : is there a capability for the given action?
        if (capability == null)
        {
            SoapFault wsaFault = new SoapFault(
                String.format(
                    Messages.ACTION_NOT_SUPPORTED,
                    action,getContextPath()));

            wsaFault.setCode(SoapConstants.SENDER_QNAME);
            wsaFault.setSubCode(WsaConstants.ACTION_NOT_SUPPORTED_FAULT_QNAME);
           
            Element detail = XmlUtils.createElement(WsaConstants.PROBLEM_ACTION_QNAME);
            XmlUtils.setElement(detail, WsaConstants.ACTION_QNAME, action);
            wsaFault.setDetail(detail);
           
            LOGGER.error(
                Messages.QMAN_100020_ACTION_NOT_SUPPORTED,
                action,
                getContextPath());

            return wsaFault.toXML();
        }
       
        MessageHandler handler = capability.getMessageHandler(action);
        Method method = handler.getMethod();
       
        try
        {
          Object[]parameters = handler.fromXML(requestBody);
            Object result = method.invoke(capability, parameters);
            return handler.toXML(result);
        }
        catch (Throwable throwable)
        {
          LOGGER.error(
              throwable,
              Messages.QMAN_100037_INVOKE_OPERATION_FAILURE);
         
            SoapFault response = SoapUtils.convertToFault(
                (throwable.getCause()!= null)
                  ? throwable.getCause()
                  : throwable);
            return response.toXML();
        }
    }
View Full Code Here

        {
          LOGGER.error(
              exception,
              Messages.QMAN_100021_RMD_BUID_FAILURE,
              getContextPath());
          throw new SoapFault(exception);
        }
    }   
View Full Code Here

        XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI,
        Names.TYPE);
   
    if (typeAttribute == null)
    {
      throw new SoapFault(
        "No type attribute was found for the current element. " +
        "If you are using this serializer, in order to unmarshal the" +
        " opportune type the xsi:type must be specified.");
    }
   
    Class<?> clazz = xml2Java.get(typeAttribute.getValue());
   
    if (clazz == null)
    {
      throw new SoapFault(
          String.format(
              "No corresponding class was found on this serializer mappings for xsi:type %s.",
              typeAttribute));
    }
   
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.addressing.soap.SoapFault

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.