On Friday 28 March 2008, Philipp Leitner wrote:
> Hi,
>
> thanks for your prompt reply ... I was using the latest release
> version.

Yea.  Hopefully 2.0.5 will be officially released on monday.

> Just for curiosity - how is the 'fix' in the latest version? Is it
> just throwing a more senseful exception, or is it deploying
> successfully?

It deploys successfully.  That said, it provides a relatively 
ugly "http://nonamespace"; targetnamespace in the wsdl.   You probably 
will want to add a targetNamespace="" attribute to the @WebService 
annotation.

Dan



>
> /philipp
>
> Daniel Kulp schrieb:
> > On Friday 28 March 2008, Daniel Kulp wrote:
> >> Well, while not "expected" or "ideal", I'm not completely surprised
> >> either.  This isn't exactly a "normal" or well tested usecase.  
> >> There are a lot of things in the spec that force us to use the
> >> package name to map to various things like namespaces and such.  
> >> Thus, if the package name isn't there, I'm not really sure what
> >> it's supposed to do.  NPE is definitely not correct, but I'm not
> >> sure what is.  I'll need to research more.
> >
> > Actually, I just tested this with CXF 2.0.5 and it's fixed.  :-)
> >
> >
> > Dan
> >
> >> Dan
> >>
> >> On Friday 28 March 2008, Philipp Leitner wrote:
> >>> Hi list,
> >>>
> >>>
> >>> I have tried to create simple CXF test service using JAX-WS
> >>> annotations, and start it using Endpoint.publish:
> >>>
> >>> import javax.jws.WebMethod;
> >>> import javax.jws.WebService;
> >>> import javax.xml.ws.Endpoint;
> >>>
> >>> @WebService
> >>> public class TestService {
> >>>
> >>>   @WebMethod
> >>>   public String helloWorld() {
> >>>           return "Hello World!";
> >>>   }
> >>>
> >>>   public static void main(String[] args) {
> >>>           Endpoint.publish("http://localhost/test";,
> >>>                   new TestService());
> >>>   }
> >>> }
> >>>
> >>> However, if this test class resides in the default package (i.e.,
> >>> no explicit package declaration) then Endpoint.publish throws a
> >>> NPE. Everything works as expected if I move TestService to e.g.,
> >>> test.TestService.
> >>>
> >>> Is this a known bug (didn't find a bug entry for it) or even the
> >>> expected behavior, or should I file a bug with JIRA?
> >>>
> >>> Here's the exception trace I get:
> >>>
> >>> <snip>
> >>> INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor'
> >>> is not eligible for getting processed by all BeanPostProcessors
> >>> (for example: not eligible for auto-proxying) 28.03.2008 09:58:26
> >>> org.springframework.beans.factory.support.DefaultListableBeanFacto
> >>>ry preInstantiateSingletons INFO: Pre-instantiating singletons in
> >>> org.springframework.beans.factory.support.DefaultListableBeanFacto
> >>>ry @2 c03ff: defining beans
> >>> [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.
> >>>cx f.
> >>> bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.Resou
> >>>rc eMa
> >>> nager,org.apache.cxf.configuration.Configurer,org.apache.cxf.bindi
> >>>ng .Bi
> >>> ndingFactoryManager,org.apache.cxf.transport.DestinationFactoryMan
> >>>ag er,
> >>> org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.ws
> >>>dl .WS
> >>> DLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workque
> >>>ue .Wo
> >>> rkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org
> >>>.a pac
> >>> he.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeC
> >>>yc leM
> >>> anager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.c
> >>>xf .tr
> >>> ansports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.Endpoin
> >>>tR eso
> >>> lverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.c
> >>>at alo
> >>> g.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResol
> >>>ve rRe gistry,or
> >>> g.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.a
> >>>pa ch
> >>> e.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.x
> >>>ml .XM
> >>> LBindingFactory,org.apache.cxf.transport.http.policy.HTTPClientAss
> >>>er tio
> >>> nBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionB
> >>>ui lde
> >>> r,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org
> >>>.a pac
> >>> he.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.
> >>>cx f.w
> >>> s.addressing.policy.AddressingPolicyInterceptorProvider,org.apache
> >>>.c xf.
> >>> ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cx
> >>>f. bin
> >>> ding.http.HttpBindingFactory,org.apache.cxf.binding.object.ObjectB
> >>>in din
> >>> gFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.
> >>>ap ach
> >>> e.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.binding.soa
> >>>p. Soa
> >>> pBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,o
> >>>rg .ap
> >>> ache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transp
> >>>or t.h
> >>> ttp_jetty.JettyHTTPTransportFactory,org.apache.cxf.ws.rm.RMManager
> >>>,
> >>> org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache
> >>>.c xf
> >>> .ws.rm.RMAssertionBuilder,org.apache.cxf.management.jmx.Instrument
> >>>at ion
> >>> ManagerImpl,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.
> >>>ap ach
> >>> e.cxf.ws.policy.PolicyConstants,org.apache.cxf.ws.policy.PolicyInt
> >>>er cep
> >>> torProviderRegistry,org.apache.cxf.ws.policy.attachment.external.D
> >>>om ain
> >>> ExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.exte
> >>>rn al.
> >>> EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.
> >>>Po lic
> >>> yBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.p
> >>>ol icy
> >>> .attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.w
> >>>s. pol
> >>> icy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy
> >>>.m tom
> >>> .MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInte
> >>>rc ept orProvider]; root of factory hierarchy Exception in thread
> >>> "main" java.lang.NullPointerException
> >>>   at
> >>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initConfigura
> >>>ti on (JaxWsServiceFactoryBean.java:317) at
> >>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.setJaxWsImple
> >>>me nt orInfo(JaxWsServiceFactoryBean.java:301) at
> >>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.setServiceCla
> >>>ss (J axWsServiceFactoryBean.java:107) at
> >>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.initializ
> >>>eS er viceFactory(AbstractWSDLBasedEndpointFactory.java:142) at
> >>> org.apache.cxf.frontend.ServerFactoryBean.initializeServiceFactory
> >>>(S er verFactoryBean.java:144) at
> >>> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEnd
> >>>po in t(AbstractWSDLBasedEndpointFactory.java:73) at
> >>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean
> >>>.j av a:108) at
> >>> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFact
> >>>or yB ean.java:147) at
> >>> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:299)
> >>> at
> >>> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:230)
> >>> at
> >>> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:181)
> >>> at
> >>> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(Pro
> >>>vi de rImpl.java:74) at
> >>> javax.xml.ws.Endpoint.publish(Endpoint.java:156) at
> >>> TestService.main(TestService.java:15)
> >>> </snip>
> >>>
> >>> regards, philipp



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to