Package com.ibm.wsdl.extensions.soap

Examples of com.ibm.wsdl.extensions.soap.SOAPHeaderFaultImpl


   * @param parents A list of parents of the SOAP header fault element.
   * @param valInfo The validation info for this validation.
   */
  protected void validateHeaderFault(Object element, List parents, IWSDL11ValidationInfo valInfo)
  {
    SOAPHeaderFaultImpl soapHeaderFault = (SOAPHeaderFaultImpl)element;

    QName messageQName = soapHeaderFault.getMessage();
    Message message = ((Definition)parents.get(parents.size() - 1)).getMessage(messageQName);
    if (message == null)
    {
      // message undefined
      valInfo.addError(
        messagegenerator.getString(_ERROR_HEADERFAULT_MESSAGE_UNDEFINED, QUOTE + messageQName.getLocalPart() + QUOTE), soapHeaderFault);
    }
    else
    {
      String partname = soapHeaderFault.getPart();
      Part part = message.getPart(partname);
      if (part == null)
      {
        // part undefined
        valInfo.addError(
          messagegenerator.getString(
            _ERROR_HEADERFAULT_PART_UNDEFINED,
            QUOTE + partname + QUOTE,
            QUOTE + messageQName.getLocalPart() + QUOTE), soapHeaderFault);
      }
    }

    String use = soapHeaderFault.getUse();
    if (use != null && !use.equalsIgnoreCase(LITERAL) && !use.equalsIgnoreCase(ENCODED))
    {
      // use undefined
      valInfo.addError(
        messagegenerator.getString(_ERROR_HEADERFAULT_USE_UNDEFINED, QUOTE + use + QUOTE), soapHeaderFault);
    }

    if (use.equalsIgnoreCase(ENCODED))
    {
      List encodingStyles = soapHeaderFault.getEncodingStyles();
      if (encodingStyles == null || encodingStyles.isEmpty())
      {
        // no encodingStyle defined
        valInfo.addError(
          messagegenerator.getString(_ERROR_HEADERFAULT_ENCODINGSTYLE_UNDEFINED), soapHeaderFault);
      }

      String namespace = soapHeaderFault.getNamespaceURI();
      if (namespace == null || namespace.equalsIgnoreCase(EMPTY_STRING))
      {
        // no namespace defined
        valInfo.addError(
          messagegenerator.getString(_ERROR_HEADERFAULT_NAMESPACE_UNDEFINED), soapHeaderFault);
View Full Code Here

TOP

Related Classes of com.ibm.wsdl.extensions.soap.SOAPHeaderFaultImpl

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.