Package org.eclipse.wst.wsi.internal.core.analyzer

Examples of org.eclipse.wst.wsi.internal.core.analyzer.AssertionNotApplicableException


  {
    try
    {
      if (this.validator.isOneWayResponse(entryContext))
      {
        throw new AssertionNotApplicableException();
      }

      // Parse message
      Document doc = entryContext.getMessageEntryDocument();

      // Parse request message
      Document docRequest = entryContext.getRequestDocument();

      if (doc == null || docRequest == null)
        throw new AssertionNotApplicableException();

      // Check if there is a soap body element
      if (!this.validator.containsSoapBodyWithChild(doc))
      {
        throw new AssertionNotApplicableException();
      }

      if (this.validator.isFault(doc))
      {
        throw new AssertionFailException(
          AssertionResult.RESULT_NOT_APPLICABLE);
      }

      // get SOAPAction
      String headers = entryContext.getRequest().getHTTPHeaders();
      String action = null;
      if (headers != null)
        action = (String) HTTPUtils.getHttpHeaderTokens(headers, ":").get("SOAPAction".toUpperCase());

      Binding binding = validator.analyzerContext.getCandidateInfo().getBindings()[0];
      TypesRegistry registry =
        new TypesRegistry(
          this.validator.getWSDLDocument().getDefinitions(),
          validator);
      OperationSignature.OperationMatch match =
        OperationSignature.matchOperation(
          docRequest,
          action,
          binding,
          registry);

      if (match == null)
      {
        throw new AssertionNotApplicableException();
      }

      BindingOperation bindingOperation = match.getOperation();

      // If this is a one-way operation and we are processing a response, then set result to notApplicable
      if (bindingOperation
        .getOperation()
        .getStyle()
        .equals(OperationType.ONE_WAY)
        && (entryContext
          .getMessageEntry()
          .getType()
          .equals(MessageEntry.TYPE_RESPONSE)))
      {
        throw new AssertionNotApplicableException();
      }

      // find body
      NodeList soapBodyList =
        doc.getElementsByTagNameNS(
View Full Code Here


      headers = entryContext.getRequest().getHTTPHeaders();
      if (headers != null)
        action = (String) HTTPUtils.getHttpHeaderTokens(headers, ":").get("SOAPAction".toUpperCase());

      if (action == null)
        throw new AssertionNotApplicableException();

      if (action.length() > 1
        && action.charAt(0) == '"'
        && action.charAt(action.length() - 1) == '"')
      {
View Full Code Here

      }
      // If the binding does not contain a mime:part with multiple
      // mime:content elements, the assertion is not applicable
      if (!multipleContentFound)
        throw new AssertionNotApplicableException();
    }
    catch (AssertionNotApplicableException anae)
    {
      result = AssertionResult.RESULT_NOT_APPLICABLE;
    }
View Full Code Here

      }

      // If the binding contains no mime:content elements,
      // the assertion is not applicable
      if (!mimeContentsFound)
        throw new AssertionNotApplicableException();
    }
    catch (AssertionNotApplicableException anae)
    {
      result = AssertionResult.RESULT_NOT_APPLICABLE;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsi.internal.core.analyzer.AssertionNotApplicableException

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.