PolicyWSDLParserExtensionTestpublic class PolicyWSDLParserExtensionTest extends TestCase
Fields Summary |
---|
private static final XMLInputFactory | XML_INPUT_FACTORY |
Constructors Summary |
---|
public PolicyWSDLParserExtensionTest(String testName)
super(testName);
|
Methods Summary |
---|
public static junit.framework.Test | suite()
TestSuite suite = new TestSuite(PolicyWSDLParserExtensionTest.class);
return suite;
| public void | testBindingAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrBinding-invalid.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testBindingElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemBinding.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testBindingHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocBinding.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testBindingOpFaultAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrBindingOpFault-invalid.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testBindingOpFaultElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemBindingOpFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testBindingOpFaultExternalFromAnonymousPolicyAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtExternalFromAnonBindingOpFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testBindingOpFaultExternalPolicyAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtExternalBindingOpFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testBindingOpFaultHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocBindingOpFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testBindingOpInAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrBindingOpIn-invalid.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOpInElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemBindingOpIn.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOpInHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocBindingOpIn.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOpOutAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrBindingOpOut-invalid.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOpOutElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemBindingOpOut.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOpOutHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocBindingOpOut.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOperationAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrBindingOperation-invalid.wsdl");
assertNotNull(policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOperationElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemBindingOperation.wsdl");
assertNotNull(policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testBindingOperationHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocBindingOperation.wsdl");
assertNotNull(policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testCircularReference()
try {
PolicyMap policyMap = getPolicyMap("parser/testPolicyCircularReferences.wsdl", false);
fail("Parsing WSDL containing circular policy references should fail");
} catch (WebServiceException e) {
// ok - exception thrown as expected
}
| public void | testClientParsingWithDifferentlyCreatedSDDocumentSource()
InputStream configFileIS = null;
final URL configFileUrl = PolicyResourceLoader.getResourceUrl("parser/wsit-client.xml");
try {
WSDLModel model = null;
configFileIS = configFileUrl.openStream();
final XMLStreamBuffer buffer = XMLStreamBuffer.createNewBufferFromXMLStreamReader(XML_INPUT_FACTORY.createXMLStreamReader(configFileIS));
final SDDocumentSource doc = SDDocumentSource.create(configFileUrl, buffer);
final XMLEntityResolver.Parser parser = new XMLEntityResolver.Parser(doc);
model = WSDLModel.WSDLParser.parse(
parser,
new PolicyConfigResolver(),
true,
new WSDLParserExtension[] { new PolicyWSDLParserExtension(true) }
);
assertNotNull(model);
} finally {
PolicyUtils.IO.closeResource(configFileIS);
}
// What about when document source is created in a different way:
WSDLModel model = null;
final SDDocumentSource doc = SDDocumentSource.create(configFileUrl);
final XMLEntityResolver.Parser parser = new XMLEntityResolver.Parser(doc);
model = WSDLModel.WSDLParser.parse(
parser,
new PolicyConfigResolver(),
true,
new WSDLParserExtension[] { new PolicyWSDLParserExtension(true) }
);
assertNotNull(model);
| public void | testComprehensive()
PolicyMap policyMap = getPolicyMap("parser/testComprehensive.wsdl");
// Test service scope
Collection<PolicyMapKey> keys = policyMap.getAllServiceScopeKeys();
assertEquals(1, keys.size());
Policy policy = policyMap.getServiceEffectivePolicy(policyMap.createWsdlServiceScopeKey(
new QName("http://wsit.test/","FaultServiceService")));
assertEquals(1, policy.getNumberOfAssertionSets());
AssertionSet assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "ServiceMarker")));
// Test endpoint scope
keys = policyMap.getAllEndpointScopeKeys();
assertEquals(1, keys.size());
policy = policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingMarker")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "PortMarker")));
// Test operation scope
keys = policyMap.getAllOperationScopeKeys();
assertEquals(3, keys.size());
policy = policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","echo")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingOperationEcho")));
policy = policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","hello")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingOperationHello")));
policy = policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","ping")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingOperationPing")));
// Test input message scope
keys = policyMap.getAllInputMessageScopeKeys();
assertEquals(3, keys.size());
policy = policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","echo")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "MessageEcho")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingEchoInput")));
policy = policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","hello")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "MessageHello")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingHelloInput")));
policy = policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","ping")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "MessagePing")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingPingInput")));
// Test output message scope
keys = policyMap.getAllOutputMessageScopeKeys();
assertEquals(3, keys.size());
policy = policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","echo")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "MessageEchoResponse")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingEchoOutput")));
policy = policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","hello")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "MessageHelloResponse")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingHelloOutput")));
policy = policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://wsit.test/","FaultServiceService"),
new QName("http://wsit.test/","FaultServicePort"),
new QName("http://wsit.test/","ping")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingPingOutput")));
// Test fault message scope
keys = policyMap.getAllFaultMessageScopeKeys();
assertEquals(6, keys.size());
policy = policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://wsit.test/", "FaultServiceService"),
new QName("http://wsit.test/", "FaultServicePort"),
new QName("http://wsit.test/", "echo"),
new QName("http://wsit.test/", "EchoException")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingEchoException")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "EchoException")));
policy = policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://wsit.test/", "FaultServiceService"),
new QName("http://wsit.test/", "FaultServicePort"),
new QName("http://wsit.test/", "echo"),
new QName("http://wsit.test/", "Echo2Exception")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingEcho2Exception")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "Echo2Exception")));
policy = policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://wsit.test/", "FaultServiceService"),
new QName("http://wsit.test/", "FaultServicePort"),
new QName("http://wsit.test/", "hello"),
new QName("http://wsit.test/", "HelloException")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingHelloException")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "HelloException")));
policy = policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://wsit.test/", "FaultServiceService"),
new QName("http://wsit.test/", "FaultServicePort"),
new QName("http://wsit.test/", "hello"),
new QName("http://wsit.test/", "Hello2Exception")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingHello2Exception")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "Hello2Exception")));
policy = policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://wsit.test/", "FaultServiceService"),
new QName("http://wsit.test/", "FaultServicePort"),
new QName("http://wsit.test/", "ping"),
new QName("http://wsit.test/", "EchoException")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingPingException")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingEchoException")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingEcho2Exception")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "EchoException")));
assertFalse(assertionSet.contains(new QName("http://wsit.test/", "Echo2Exception")));
policy = policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://wsit.test/", "FaultServiceService"),
new QName("http://wsit.test/", "FaultServicePort"),
new QName("http://wsit.test/", "ping"),
new QName("http://wsit.test/", "Echo2Exception")));
assertEquals(1, policy.getNumberOfAssertionSets());
assertionSet = policy.iterator().next();
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "BindingPing2Exception")));
assertFalse(assertionSet.contains(new QName("http://wsit.test/", "EchoException")));
assertTrue(assertionSet.contains(new QName("http://wsit.test/", "Echo2Exception")));
| public void | testInvalidAssertionShouldCauseException()
try {
PolicyMap policyMap = getPolicyMap("parser/testInvalidAssertionError.wsdl", false);
fail("WSDL validation should fail");
} catch (WebServiceException e) {
// ok - exception thrown as expected
}
| public void | testMessageFaultAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrMessageFault-invalid.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testMessageFaultElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemMessageFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testMessageFaultHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocMessageFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testMessageInAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrMessageIn-invalid.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testMessageInElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemMessageIn.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testMessageInHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocMessageIn.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testMessageOutAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrMessageOut-invalid.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testMessageOutElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemMessageOut.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testMessageOutHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocMessageOut.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPolicyReferences()
PolicyMap map = getPolicyMap("parser/testPolicyReferences.wsdl");
assertNotNull("PolicyMap can not be null", map);
map = PolicyConfigParser.parse(PolicyResourceLoader.getResourceUrl("parser/testPolicyReferences.wsdl"), false);
assertNotNull("PolicyMap can not be null", map);
| public void | testPortAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrPort-invalid.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testPortElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemPort.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(PolicyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testPortHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocPort.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testPortTypeAttrAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrPortType.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testPortTypeElementAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemPortType-invalid.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testPortTypeHeredocAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocPortType-invalid.wsdl");
assertNotNull(policyMap.getEndpointEffectivePolicy(policyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
| public void | testPortTypeOpFaultAttrAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrPortTypeOpFault.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testPortTypeOpFaultElementAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemPortTypeOpFault-invalid.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testPortTypeOpFaultHeredocAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocPortTypeOpFault-invalid.wsdl");
assertNotNull(policyMap.getFaultMessageEffectivePolicy(policyMap.createWsdlFaultMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation")
,new QName("http://example.org","Fault"))));
| public void | testPortTypeOpInAttrAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrPortTypeOpIn.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOpInElementAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemPortTypeOpIn-invalid.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOpInHeredocAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocPortTypeOpIn-invalid.wsdl");
assertNotNull(policyMap.getInputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOpOutAttrAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrPortTypeOpOut.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOpOutElementAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemPortTypeOpOut-invalid.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOpOutHeredocAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocPortTypeOpOut-invalid.wsdl");
assertNotNull(policyMap.getOutputMessageEffectivePolicy(policyMap.createWsdlMessageScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOperationAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrPortTypeOperation-invalid.wsdl");
assertNotNull(policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOperationElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemPortTypeOperation.wsdl");
assertNotNull(policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testPortTypeOperationHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocPortTypeOperation.wsdl");
assertNotNull(policyMap.getOperationEffectivePolicy(policyMap.createWsdlOperationScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish")
,new QName("http://example.org","TranslateOperation"))));
| public void | testServiceAttrAttachment()invalid wsdl on input
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtAttrService-invalid.wsdl");
assertNotNull(policyMap.getServiceEffectivePolicy(policyMap.createWsdlServiceScopeKey(
new QName("http://example.org","DictionaryService"))));
| public void | testServiceElementAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtElemService.wsdl");
assertNotNull(policyMap.getServiceEffectivePolicy(PolicyMap.createWsdlServiceScopeKey(
new QName("http://example.org","DictionaryService"))));
| public void | testServiceHeredocAttachment()
PolicyMap policyMap = getPolicyMap("parser/testRuntimeWSExtHeredocService.wsdl");
assertNotNull(policyMap.getServiceEffectivePolicy(policyMap.createWsdlServiceScopeKey(
new QName("http://example.org","DictionaryService"))));
| public void | testWsdlParserBasics()
assertNotNull("PolicyMap can not be null", getPolicyMap("parser/testWsdlParserBasics.wsdl"));
| public void | testWsdlParserImport()
PolicyMap policyMap = getPolicyMap("parser/testWsdlImportMain.wsdl");
Policy policy;
assertNotNull("PolicyMap can not be null", policyMap);
assertNotNull(policy = policyMap.getEndpointEffectivePolicy(PolicyMap.createWsdlEndpointScopeKey(
new QName("http://example.org","DictionaryService")
,new QName("http://example.org","CzechToEnglish"))));
assertTrue(policy.contains(new QName("http://example.org","dummyAssertion")));
|
|