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

Examples of org.eclipse.wst.wsi.internal.core.util.TypesRegistry


    throws WSIException
  {
    result = AssertionResult.RESULT_FAILED;

    registry =
      new TypesRegistry(
        entryContext.getWSDLDocument().getDefinitions(),
        validator);

    // collect all types from messages to checkedParts map
    WSDLTraversal traversal = new WSDLTraversal();
View Full Code Here


      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,
View Full Code Here

      // Get the binding that is being processed               
      Binding binding = validator.analyzerContext.getCandidateInfo().getBindings()[0];

      //Create the types registry
      TypesRegistry registry =
        new TypesRegistry(
          this.validator.getWSDLDocument().getDefinitions(),
          validator);

      // Find an operation match       
      OperationSignature.OperationMatch match =
View Full Code Here

      // Get the binding that is being processed               
      Binding binding = validator.analyzerContext.getCandidateInfo().getBindings()[0];

      //Create the types registry
      TypesRegistry registry =
        new TypesRegistry(
          this.validator.getWSDLDocument().getDefinitions(),
          validator);

      // Find an operation match       
      OperationSignature.OperationMatch match =
View Full Code Here

      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,
View Full Code Here

      return;

    //Part faultPart = WSDLUtil.getPart(m, faultName);
    Part faultPart = (Part) m.getParts().values().iterator().next();

    TypesRegistry tReg = (TypesRegistry) ctx.getParameter("TypesRegistry");
    QName elemQName = faultPart.getElementName();
    QName typeQName = faultPart.getTypeName();
    if (typeQName == null)
      typeQName = tReg.getType(faultPart.getElementName());
    if (typeQName == null)
      throw new IllegalArgumentException("Part type can not be null.");

    // for all faults; if it presents in the definition remove it from list
    for (int i = 0; i < faults.size();)
View Full Code Here

        OperationSignature.OperationMatch match =
          OperationSignature.matchOperation(
            docRequest,
            this.validator.getSoapAction(entryContext.getRequest().getHTTPHeaders()),
            validator.analyzerContext.getCandidateInfo().getBindings()[0],
            new TypesRegistry(
                validator.analyzerContext
                .getCandidateInfo()
                .getWsdlDocument()
                .getDefinitions(),
                validator));

        result = AssertionResult.RESULT_NOT_APPLICABLE;

        if (match != null)
        {
          // MOVED: Parse response message
          //doc = entryContext.getMessageEntryDocument();

          responseSig = new OperationSignature(docResponse);
          if (WSIConstants
            .ATTRVAL_SOAP_BIND_STYLE_RPC
            .equals(match.getOperationStyle()))
            responseSig.createRPCSignature();

          WSDLTraversal traversal = new WSDLTraversal();
          //VisitorAdaptor.adapt(this);
          traversal.setVisitor(this);
          traversal.visitSOAPFault(true);
          traversal.ignoreBindingInput();
          traversal.ignoreBindingOutput();

          if (responseSig == null || !responseSig.isFault())
          {
            result = AssertionResult.RESULT_NOT_APPLICABLE;
          }
          else if (responseSig != null && responseSig.isFault())
          {
            // extract all faults and try find them in the definition
            // extracts only faults with namespace
            Element body =
              XMLUtils.findChildElement(
                docResponse.getDocumentElement(),
                WSITag.ELEM_SOAP_BODY);
            Element fault =
              XMLUtils.findChildElement(body, WSITag.ELEM_SOAP_FAULT);
            Element detail = XMLUtils.getElement("detail", fault);
            if (detail == null)
            {
              result = AssertionResult.RESULT_NOT_APPLICABLE;
            }
            else
            {
              result = AssertionResult.RESULT_PASSED;

              faults = XMLUtils.getChildElements(detail);

              // REMOVE: Why do the faults have to be namespaced qualified?
              //XMLUtils.removeAllElementsWithoutNS(faults);

              // if faults exist try to validate it
              if (faults.size() > 0)
              {
                Map m = new HashMap();
                WSDLUtil.expandDefinition(
                    validator.analyzerContext
                    .getCandidateInfo()
                    .getWsdlDocument()
                    .getDefinitions());
                m.put(
                  "definition",
                  validator.analyzerContext
                    .getCandidateInfo()
                    .getWsdlDocument()
                    .getDefinitions());
                TypesRegistry tReg =
                  new TypesRegistry(
                      validator.analyzerContext
                      .getCandidateInfo()
                      .getWsdlDocument()
                      .getDefinitions(),
                      validator);
View Full Code Here

    // create the signature of this operation
    OperationSignature op =
      new OperationSignature(
        parts,
        null,
        new TypesRegistry(
            validator.analyzerContext
            .getCandidateInfo()
            .getWsdlDocument()
            .getDefinitions(),
            validator),
        false);
    if (additionalName != null)
      op.getSignature().add(0, additionalName);

    if (op.getSignature().equals(responseSig.getSignature()))
    {
      //            ctx.cancelBindingOperationProcessing();
    }
    else
    {
      // create the signature of this operation
      op =
        new OperationSignature(
          parts,
          null,
          new TypesRegistry(
              validator.analyzerContext
              .getCandidateInfo()
              .getWsdlDocument()
              .getDefinitions(),
              validator),
View Full Code Here

    if (header.getRequired() != null
      && header.getRequired().booleanValue() == true)
      return;
    // find headr part
    Definition d = (Definition) ctx.getParameter("definition");
    TypesRegistry tReg = (TypesRegistry) ctx.getParameter("TypesRegistry");
    Part mesPart =
      WSDLUtil.getPart(d.getMessage(header.getMessage()), header.getPart());

    // test this part and parts from header       
    QName partQName = mesPart.getTypeName();
    if (partQName == null)
      partQName = tReg.getType(mesPart.getElementName());
    if (partQName == null)
      throw new IllegalArgumentException(
        "Part type can not be null." + mesPart.getElementName().toString());
    String local = partQName.getLocalPart();
    String ns = partQName.getNamespaceURI();
View Full Code Here

    Object parent,
    WSDLTraversalContext ctx)
  {
    // find headr part
    Definition d = (Definition) ctx.getParameter("definition");
    TypesRegistry tReg = (TypesRegistry) ctx.getParameter("TypesRegistry");
    Part mesPart =
      WSDLUtil.getPart(
        d.getMessage(headerFault.getMessage()),
        headerFault.getPart());

    // test this part and parts from headerfault
    QName partQName = mesPart.getTypeName();
    if (partQName == null)
      partQName = tReg.getType(mesPart.getElementName());
    if (partQName == null)
      throw new IllegalArgumentException(
        "Part type can not be null." + mesPart.getElementName().toString());
    String local = partQName.getLocalPart();
    String ns = partQName.getNamespaceURI();
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsi.internal.core.util.TypesRegistry

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.