Glen: The point of that part of the test is to find an endpoint in the spring context which has had an id auto-generated. The EndpointDefinitionParser generate spring ids of the form " org.apache.cxf.jaxws.EndpointImpl" + hashCode(). So that part of the test is looking for a spring id which starts with EndpointImpl (we don't know the hashcode so we can't search for that).
Cheers, - Dan On 7/31/07, Glen Mazza <[EMAIL PROTECTED]> wrote: > > Am Dienstag, den 31.07.2007, 15:03 +0000 schrieb [EMAIL PROTECTED]: > > Author: dandiep > > Date: Tue Jul 31 08:03:43 2007 > > New Revision: 561354 > > > > Modified: > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java > > URL: > http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java?view=diff&rev=561354&r1=561353&r2=561354 > > > ============================================================================== > > --- > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java > (original) > > +++ > incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/spring/SpringBeansTest.java > Tue Jul 31 08:03:43 2007 > > @@ -85,6 +85,12 @@ > > ep = (EndpointImpl) bean; > > assertTrue(ep.getInvoker() instanceof NullInvoker); > > assertTrue(ep.getService().getInvoker() instanceof > NullInvoker); > > + > > + bean = ctx.getBean("implementorClass"); > > + assertNotNull(bean); > > + ep = (EndpointImpl) bean; > > + assertEquals(Hello.class, ep.getImplementorClass()); > > + assertTrue(ep.getImplementor().getClass() == Object.class); > > > > bean = ctx.getBean("epWithProps"); > > assertNotNull(bean); > > @@ -109,6 +115,21 @@ > > bean = ctx.getBean("wsdlLocation"); > > assertNotNull(bean); > > > > + // test for existence of Endpoint without an id element > > + boolean found = false; > > + String[] names = ctx.getBeanNamesForType(EndpointImpl.class); > > + for (String n : names) { > > + if (n.startsWith(EndpointImpl.class.getName())) { > > + found = true; > > + } > > + } > > If there is a bean named "FooBar" and I'm searching for an Endpoint > named "Foo", wouldn't the above incorrectly set found = true because of > the startWith() (instead of equals())? > > Thanks, > Glen > > > -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
