Hello,
When deploying a web service without including the wsdlLocation explicitly with
the endpoint configuration, I see that the web service does not expose the
contract the WSDL specifies. It is exposes a different contract. Not sure from
where it is coming from. Maybe from the annotations I have on the service.
When trying to specify the WSDL location at the endpoint configuration I'm
getting a strange exception. See below exception.
Here is how the endpoint is configured (located at the cxf-servlet.xml):
<jaxws:endpoint xmlns:scada="com.X.Y"
xmlns:enmac="enmac.fdir"
id="scadaTrigger"
wsdlLocation="/WEB-INF/mywsdl.wsdl"
address="http://localhost:9090/fdirScadaTriggerEvt"
serviceName="scada:DPAPollingAgentProcessor"
endpointName="enmac:DPAPollingAgentProcessor"
implementor="#pollingAgentProcessor"
implementorClass="com.X.Y.DPAPollingAgentProcessor">
</jaxws:endpoint>
If I remove the wsdlLocation property from the cxf-servlet.xml I don't have any
problems deploying the war, but the service does not expose the contract
specified in the WSDL. The funny thing is I do specify the WSDL location
explicitly within the service implementation constructor, so I don't understand
why the deploy process fails.
Any idea what is going on?
Tnx
Shay Hassidim
The Exception:
[gsc][1/10456] javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
definition for service {com.X.Y}DPAPollingAgentProcessor.
[gsc][1/10456] at
org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
[gsc][1/10456] at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
[gsc][1/10456] at
org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
[gsc][1/10456] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[gsc][1/10456] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[gsc][1/10456] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[gsc][1/10456] at java.lang.reflect.Method.invoke(Method.java:597)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$7.run(AbstractAutowireCapableBeanFactory.java:1531)
[gsc][1/10456] at java.security.AccessController.doPrivileged(Native
Method)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1529)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
[gsc][1/10456] at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSi
ngletonBeanRegistry.java:222)[gsc][1/10456] at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.j