You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Daniel Lipofsky <Da...@bricsnet.com> on 2008/02/27 00:27:54 UTC
java2wsdl yeilds WSDL file that causes NullPointerException
I was using WSDLToJava but now I am trying to use JavaToWSDL.
I have a bunch of web-services with the same signature
and they all inherit from a common abstract impl class,
so it seems best to generate the WSDL.
I am trying to deploy on JBoss 4.2.2 / JDK 1.5.0 / CXF 2.0.4
Using the generated WSDL in the WAR file gives the
following exception. Switching back to the handwritten
WSDL makes it work fine.
there are 2 things that might be contributing factors
* I am using a mix of "wrapper-style" and "non-wrapper style"
* My concrete impl classes inherit from an abstract impl
class which contain most of the methods. The generated WSDL
seems to contain a schema section for both with much
repeating.
Any ideas how to get this to work?
2008-02-26 15:16:58,400 ERROR [[/ws2]] - Servlet /ws2 threw load()
exception
java.lang.NullPointerException
at
org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.getInParameterNam
e(JaxWsServiceConfiguration.java:195)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getInParamet
erName(ReflectionServiceFactoryBean.java:1678)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.getInPartNam
e(ReflectionServiceFactoryBean.java:1658)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializePa
rameter(ReflectionServiceFactoryBean.java:586)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeCl
assInfo(ReflectionServiceFactoryBean.java:563)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOpera
tion(JaxWsServiceFactoryBean.java:165)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWS
DLOperations(ReflectionServiceFactoryBean.java:476)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOpera
tions(JaxWsServiceFactoryBean.java:174)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
FromWSDL(ReflectionServiceFactoryBean.java:274)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionServiceFactoryBean.java:360)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean.java:156)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
FactoryBean.java:89)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
AbstractWSDLBasedEndpointFactory.java:74)
at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
108)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
n.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.EndpointImpl.publish(EndpointImpl.java:352)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1240
)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1205)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
tory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObjec
t(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.g
etSingleton(DefaultSingletonBeanRegistry.java:156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.pre
InstantiateSingletons(DefaultListableBeanFactory.java:287)
at
org.springframework.context.support.AbstractApplicationContext.refresh(A
bstractApplicationContext.java:352)
at
org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServ
let.java:145)
at
org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.jav
a:113)
at
org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:63)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServ
let.java:86)
Re: java2wsdl yeilds WSDL file that causes NullPointerException
Posted by Glen Mazza <gl...@verizon.net>.
Am Mittwoch, den 27.02.2008, 16:27 -0500 schrieb Daniel Kulp:
> On Tuesday 26 February 2008, Daniel Lipofsky wrote:
> > OK, I solved this original problem but I have more questions:
> >
> > How do you control the soap location.
> > Right now it is outputing
> > <soap:address location="http://localhost:9090/hello"/>
> > which is not correct.
>
> Hmm.... I don't see a way to do it with the 2.0.x java2wsdl tooling.
> With the 2.1 tooling, there is a "-address" flag that looks like it
> would be for that pupose.
>
>
> > Also, can I override this programmatically in the client?
>
> That's the easy part.
> ((BindingProvider)proxy).getRequestContext().put(
> BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
> "http://blah/blah/blah");
>
Part 7 of [1] gives a fuller example if it would help you.
Glen
[1] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1
Re: java2wsdl yeilds WSDL file that causes NullPointerException
Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 26 February 2008, Daniel Lipofsky wrote:
> OK, I solved this original problem but I have more questions:
>
> How do you control the soap location.
> Right now it is outputing
> <soap:address location="http://localhost:9090/hello"/>
> which is not correct.
Hmm.... I don't see a way to do it with the 2.0.x java2wsdl tooling.
With the 2.1 tooling, there is a "-address" flag that looks like it
would be for that pupose.
> Also, can I override this programmatically in the client?
That's the easy part.
((BindingProvider)proxy).getRequestContext().put(
BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://blah/blah/blah");
Dan
>
> Thanks,
> Dan
>
> p.s. I solved it by removing package-info.java and also
> BasePortType.java and BaseService.java which were hanging around
> from when I generated things for the abstract class; I also
> removed a reference to targetNamespace=".../Base.wsdl" that was
> hanging around in WSException.java. Not sure what really did it.
--
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog
RE: java2wsdl yeilds WSDL file that causes NullPointerException
Posted by Daniel Lipofsky <Da...@bricsnet.com>.
OK, I solved this original problem but I have more questions:
How do you control the soap location.
Right now it is outputing
<soap:address location="http://localhost:9090/hello"/>
which is not correct.
Also, can I override this programmatically in the client?
Thanks,
Dan
p.s. I solved it by removing package-info.java and also
BasePortType.java and BaseService.java which were hanging around
from when I generated things for the abstract class; I also
removed a reference to targetNamespace=".../Base.wsdl" that was
hanging around in WSException.java. Not sure what really did it.