Search in sources :

Example 6 with PolicyReference

use of org.apache.neethi.PolicyReference in project cxf by apache.

the class PolicyBuilderTest method testGetPolicyReference.

@Test
public void testGetPolicyReference() throws Exception {
    String name = "/samples/test26.xml";
    InputStream is = PolicyBuilderTest.class.getResourceAsStream(name);
    PolicyReference pr = builder.getPolicyReference(is);
    assertEquals("#PolicyA", pr.getURI());
    name = "/samples/test27.xml";
    is = PolicyBuilderTest.class.getResourceAsStream(name);
    pr = builder.getPolicyReference(is);
    assertEquals("http://sample.org/test.wsdl#PolicyA", pr.getURI());
}
Also used : InputStream(java.io.InputStream) PolicyReference(org.apache.neethi.PolicyReference) Test(org.junit.Test)

Aggregations

PolicyReference (org.apache.neethi.PolicyReference)6 Policy (org.apache.neethi.Policy)4 QName (javax.xml.namespace.QName)3 InputStream (java.io.InputStream)2 Assertion (org.apache.neethi.Assertion)2 Test (org.junit.Test)2 Element (org.w3c.dom.Element)2 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 StringTokenizer (java.util.StringTokenizer)1 UnknownExtensibilityElement (javax.wsdl.extensions.UnknownExtensibilityElement)1 DescriptionInfo (org.apache.cxf.service.model.DescriptionInfo)1 PolicyException (org.apache.cxf.ws.policy.PolicyException)1 PrimitiveAssertion (org.apache.cxf.ws.policy.builder.primitive.PrimitiveAssertion)1 PolicyComponent (org.apache.neethi.PolicyComponent)1 PolicyOperator (org.apache.neethi.PolicyOperator)1 Document (org.w3c.dom.Document)1 Node (org.w3c.dom.Node)1