Examples of PrimitiveAssertion


Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

        String local = "UsingAddressing";
        if ("http://www.w3.org/2005/08/addressing".equals(addressingNamespace)) {
            ns = "http://www.w3.org/2007/02/addressing/metadata";
            local = "Addressing";
        }
        return new PrimitiveAssertion(new QName(ns, local), true);
    }
View Full Code Here

Examples of org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion

            if (null != lst && !lst.isEmpty()) {
                assertion = lst.iterator().next().getAssertion();
            }
        }
        if (assertion == null) {
            return new PrimitiveAssertion(MetadataConstants.USING_ADDRESSING_2006_QNAME,
                                          optional);
        } else if (optional) {
            return new PrimitiveAssertion(assertion.getName(),
                                          optional);           
        }
        return assertion;
    }
View Full Code Here

Examples of org.apache.neethi.builders.PrimitiveAssertion

       
       
        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
        PrimitiveAssertion pas = (PrimitiveAssertion)as;
        assertEquals("10", pas.getTextValue());
        assertEquals("blah", pas.getAttribute(new QName("FooAtt")));
       
        StringWriter writer = new StringWriter();
        XMLStreamWriter xwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
        pas.serialize(xwriter);
        xwriter.flush();
       
        Element el = getElementFromString(writer.getBuffer().toString());
        assertEquals("blah", el.getAttribute("FooAtt"));
        assertEquals("10", el.getTextContent());
View Full Code Here

Examples of org.apache.neethi.builders.PrimitiveAssertion

            return new QName(element.getNamespaceURI(), element.getLocalName());
        }
        return new QName(element.getNamespaceURI(), element.getLocalName(), element.getPrefix());
    }
    public Assertion newPrimitiveAssertion(Element element, Map<QName, String> atts) {
        return new PrimitiveAssertion(getQName(element),
                                      isOptional(element), isIgnorable(element),
                                      atts,
                                      element.getTextContent());
    }
View Full Code Here

Examples of org.apache.neethi.builders.PrimitiveAssertion

       
       
        Assertion as = new XMLPrimitiveAssertionBuilder().build(getElementFromString(text),
                                                                policyEngine.getAssertionBuilderFactory());
        assertNotNull(as);
        PrimitiveAssertion pas = (PrimitiveAssertion)as;
        assertEquals("10", pas.getTextValue());
        assertEquals("blah", pas.getAttribute(new QName("FooAtt")));
       
        StringWriter writer = new StringWriter();
        XMLStreamWriter xwriter = XMLOutputFactory.newInstance().createXMLStreamWriter(writer);
        pas.serialize(xwriter);
        xwriter.flush();
       
        Element el = getElementFromString(writer.getBuffer().toString());
        assertEquals("blah", el.getAttribute("FooAtt"));
        assertEquals("10", el.getTextContent());
View Full Code Here

Examples of org.apache.ws.policy.PrimitiveAssertion

          e.printStackTrace();
          return new Boolean(false);
        }
      }
      log.debug(spt.getTokenName());
      PrimitiveAssertion pa = spc.getAssertion();
      String text = pa.getStrValue();
      if (text != null) {
        text = text.trim();
        log.debug("Value: '" + text.toString() + "'");
      }
    case SecurityProcessorContext.COMMIT:
View Full Code Here

Examples of org.apache.ws.policy.PrimitiveAssertion

                /*
                 * We need to pick only the primitive assertions which contain a
                 * WSSecurityPolicy policy assertion. For that we'll check the
                 * namespace of the primitive assertion
                 */
                PrimitiveAssertion pa = (PrimitiveAssertion) assertion;
                if (!(pa.getName().getNamespaceURI()
                        .equals(Constants.SP_NS))) {
                    log.debug("Got a unexpected assertion: "
                            + pa.getName().getLocalPart());
                    continue;
                }
                all = processPrimitiveAssertion((PrimitiveAssertion) assertion);
            }
            /*
 
View Full Code Here

Examples of org.apache.ws.policy.PrimitiveAssertion

                    e.printStackTrace();
                    return new Boolean(false);
                }
            }
            log.debug(spt.getTokenName());
            PrimitiveAssertion pa = spc.getAssertion();
            String text = pa.getStrValue();
            if (text != null) {
                text = text.trim();
                log.debug("Value: '" + text.toString() + "'");
            }
        case SecurityProcessorContext.COMMIT:
View Full Code Here

Examples of org.apache.ws.policy.PrimitiveAssertion

        /*
         * We need to pick only the primitive assertions which contain a
         * v1_0 policy assertion. For that we'll check the namespace of
         * the primitive assertion
         */
        PrimitiveAssertion pa = (PrimitiveAssertion) assertion;
        if (!(pa.getName().getNamespaceURI()
            .equals("http://ws.apache.org/sandesha2/policy"))) {
          logger.debug("Got a unexpected assertion: "
              + pa.getName().getLocalPart());
          continue;
        }
        all = processPrimitiveAssertion((PrimitiveAssertion) assertion);
      }
      /*
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.