Author: klape
Date: 2014-02-21 20:49:07 -0500 (Fri, 21 Feb 2014)
New Revision: 18408
Modified:
stack/native/branches/jbossws-native-3.1.2.SP15-patch-01_JBPAPP-10869/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
Log:
[JBPAPP-11003] Fixing schema validation test cases
Modified:
stack/native/branches/jbossws-native-3.1.2.SP15-patch-01_JBPAPP-10869/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java
===================================================================
---
stack/native/branches/jbossws-native-3.1.2.SP15-patch-01_JBPAPP-10869/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2014-02-21
19:17:52 UTC (rev 18407)
+++
stack/native/branches/jbossws-native-3.1.2.SP15-patch-01_JBPAPP-10869/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1172/JBWS1172TestCase.java 2014-02-22
01:49:07 UTC (rev 18408)
@@ -63,7 +63,7 @@
public void testSchemaValidationPositive() throws Exception
{
URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ Map<String, byte[]> xsdStreams = new
SchemaExtractor(wsdlURL).getSchemasFromWsdl();
String inxml = "<tns:performTest
xmlns:tns='http://www.my-company.it/ws/my-test'><Code>1000</Code></tns:performTest>";
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
}
@@ -71,7 +71,7 @@
public void testSchemaValidationNegative() throws Exception
{
URL wsdlURL =
getResourceURL("jaxws/jbws1172/WEB-INF/wsdl/TestService.wsdl");
- Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ Map<String, byte[]> xsdStreams = new
SchemaExtractor(wsdlURL).getSchemasFromWsdl();
String inxml = "<tns:performTest
xmlns:tns='http://www.my-company.it/ws/my-test'><Code>2000</Code></tns:performTest>";
try
{
@@ -80,14 +80,14 @@
catch (SAXException ex)
{
String msg = ex.getMessage();
- assertTrue("Unexpectd message: " + msg, msg.indexOf("Value
'2000' is not facet-valid with respect to maxInclusive '1000'") >
0);
+ assertTrue("Unexpected message: " + msg, msg.indexOf("Value
'2000' is not facet-valid with respect to maxInclusive '1000'") >
0);
}
}
public void testEndpointWsdlValidation() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() +
":8080/jaxws-jbws1172/noval?wsdl");
- Map<String, byte[]> xsdStreams = new SchemaExtractor().getSchemas(wsdlURL);
+ Map<String, byte[]> xsdStreams = new
SchemaExtractor(wsdlURL).getSchemasFromWsdl();
String inxml = "<tns:performTest
xmlns:tns='http://www.my-company.it/ws/my-test'><Code>1000</Code></tns:performTest>";
new SchemaValidationHelper(xsdStreams).validateDocument(inxml);
}