Author: dkulp Date: Mon Jul 15 18:03:57 2013 New Revision: 1503376 URL: http://svn.apache.org/r1503376 Log: Merged revisions 1503344 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
........ r1503344 | dkulp | 2013-07-15 13:11:53 -0400 (Mon, 15 Jul 2013) | 10 lines Merged revisions 1502883 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1502883 | dkulp | 2013-07-13 17:29:22 -0400 (Sat, 13 Jul 2013) | 2 lines Different JAXB impls use different default namespace prefixes which can cause some of our tests to fail. Stop checking the prefixes ........ ........ Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SEIWithJAXBAnnoTest.java cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java?rev=1503376&r1=1503375&r2=1503376&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java (original) +++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstTest.java Mon Jul 15 18:03:57 2013 @@ -67,6 +67,8 @@ import org.apache.cxf.service.model.Bind import org.apache.cxf.service.model.InterfaceInfo; import org.apache.cxf.transport.local.LocalTransportFactory; import org.apache.cxf.wsdl11.ServiceWSDLBuilder; +import org.apache.ws.commons.schema.constants.Constants; + import org.junit.Test; @@ -389,9 +391,11 @@ public class CodeFirstTest extends Abstr Server server = null; server = factory.create(); Document doc = getWSDLDocument(server); - //org.apache.cxf.helpers.XMLUtils.printDOM(doc); - assertValid("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/xsd:element[@type='xs:int']", - doc); + + + assertXPathEquals("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/xsd:element/@type", + Constants.XSD_INT, + doc); factory = new JaxWsServerFactoryBean(); factory.setServiceBean(new GenericsService2<Float, Double>() { @@ -406,9 +410,9 @@ public class CodeFirstTest extends Abstr factory.setAddress("local://localhost/test2"); server = factory.create(); Document doc2 = getWSDLDocument(server); - //org.apache.cxf.helpers.XMLUtils.printDOM(doc2); - assertValid("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/" - + "xsd:element[@type='xs:float']", + assertXPathEquals("//xsd:schema/xsd:complexType[@name='convert']/xsd:sequence/" + + "xsd:element/@type", + Constants.XSD_FLOAT, doc2); QName serviceName = new QName("http://service.jaxws.cxf.apache.org/", "Generics2"); Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java?rev=1503376&r1=1503375&r2=1503376&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java (original) +++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/CodeFirstWSDLTest.java Mon Jul 15 18:03:57 2013 @@ -208,7 +208,8 @@ public class CodeFirstWSDLTest extends A Document d = bus.getExtension(WSDLManager.class).getWSDLFactory().newWSDLWriter().getDocument(def); this.addNamespace("http://www.example.org/contract/DoubleIt", "tns"); //org.apache.cxf.helpers.XMLUtils.printDOM(d); - assertValid("//xsd:element[@ref='tns:CustomMessageBean']", d); + assertXPathEquals("//xsd:element/@ref", new QName("http://www.example.org/contract/DoubleIt", + "CustomMessageBean"), d); } Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SEIWithJAXBAnnoTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SEIWithJAXBAnnoTest.java?rev=1503376&r1=1503375&r2=1503376&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SEIWithJAXBAnnoTest.java (original) +++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/SEIWithJAXBAnnoTest.java Mon Jul 15 18:03:57 2013 @@ -42,13 +42,10 @@ public class SEIWithJAXBAnnoTest extends AddNumbersImpl serviceImpl = new AddNumbersImpl(); Endpoint.publish("local://localhost:9000/Hello", serviceImpl); - - JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean(); factory.setBus(SpringBusFactory.getDefaultBus()); factory.setServiceClass(AddNumbers.class); - factory.setAddress(address); AddNumbers proxy = (AddNumbers)factory.create(); @@ -61,8 +58,7 @@ public class SEIWithJAXBAnnoTest extends args.add("str2"); args.add("str3"); List<Integer> result = proxy.addNumbers(args); - String expected = "<ns2:addNumbers xmlns:ns2=\"http://service.jaxws.cxf.apache.org/\">" - + "<arg0>str1 str2 str3</arg0></ns2:addNumbers>"; + String expected = "<arg0>str1 str2 str3</arg0>"; assertTrue("Client does not use the generated wrapper class to marshal request parameters", strWriter.toString().indexOf(expected) > -1); assertEquals("Get the wrong result", 100, (int)result.get(0)); Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java?rev=1503376&r1=1503375&r2=1503376&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java (original) +++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/WrapperClassGeneratorTest.java Mon Jul 15 18:03:57 2013 @@ -105,20 +105,16 @@ public class WrapperClassGeneratorTest e //check marshall wrapper marshaller.marshal(requestObj, bout); - String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" - + "<ns2:addNumbers xmlns:ns2=\"http://service.jaxws.cxf.apache.org/\">" - + "<arg0>str1 str2 str3</arg0></ns2:addNumbers>"; + String expected = "<arg0>str1 str2 str3</arg0>"; - assertEquals("The generated request wrapper class does not contain the correct annotations", - expected, bout.toString()); + assertTrue("The generated request wrapper class does not contain the correct annotations", + bout.toString().contains(expected)); bout.reset(); marshaller.marshal(responseObj, bout); - expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" - + "<ns2:addNumbersResponse xmlns:ns2=\"http://service.jaxws.cxf.apache.org/\">" - + "<return>1</return><return>2</return><return>3</return></ns2:addNumbersResponse>"; - assertEquals("The generated response wrapper class is not correct", expected, bout.toString()); + expected = "<return>1</return><return>2</return><return>3</return>"; + assertTrue("The generated response wrapper class is not correct", bout.toString().contains(expected)); } Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java?rev=1503376&r1=1503375&r2=1503376&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java (original) +++ cxf/branches/2.6.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spi/ProviderImplTest.java Mon Jul 15 18:03:57 2013 @@ -52,7 +52,7 @@ public class ProviderImplTest extends or String expected = "<wsdl:definitions"; assertTrue("Embeded wsdl element is not generated", sw.toString().indexOf(expected) > -1); assertTrue("wsdlLocation attribute has the wrong value", - sw.toString().contains("wsdli:wsdlLocation=\"http://cxf.apache.org wsdlLoc\"")); + sw.toString().contains(":wsdlLocation=\"http://cxf.apache.org wsdlLoc\"")); } @org.junit.Test
