views:

39

answers:

1

I have generated a java package with the wsdl2java CXF command. Now i want to deploy the wsdl to the tomcat server but I got these errors in logs when i start the server

I use opebEjb.

It looks like the wsdl is not valid. How can i check this?

Log:

Caused by: javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:268) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:202) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:397) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1412) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1373) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333) ... 30 more Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:274) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:371) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:525) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:422) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:190) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:164) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:100) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:117) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:168) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:339) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:252) ... 39 more

Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 48 counts of IllegalAnnotationExceptions

There's no ObjectFactory with an @XmlElementDecl for the element {urn:hl7-org:v3}assignedDevice. this problem is related to the following location: at protected javax.xml.bind.JAXBElement com.santeos.dmp.iheprofiles.hl7.MFMIMT700701UV01AuthorOrPerformer.assignedDevice at com.santeos.dmp.iheprofiles.hl7.MFMIMT700701UV01AuthorOrPerformer at protected java.util.List com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MFMIMT700701UV01ControlActProcess.authorOrPerformer at com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MFMIMT700701UV01ControlActProcess at protected com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MFMIMT700701UV01ControlActProcess com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MCCIMT000100UV01Message.controlActProcess at com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MCCIMT000100UV01Message

There's no ObjectFactory with an @XmlElementDecl for the element {urn:hl7-org:v3}assignedPerson. this problem is related to the following location: at protected javax.xml.bind.JAXBElement com.santeos.dmp.iheprofiles.hl7.MFMIMT700701UV01AuthorOrPerformer.assignedPerson at com.santeos.dmp.iheprofiles.hl7.MFMIMT700701UV01AuthorOrPerformer at protected java.util.List com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MFMIMT700701UV01ControlActProcess.authorOrPerformer at com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MFMIMT700701UV01ControlActProcess at protected com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MFMIMT700701UV01ControlActProcess com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MCCIMT000100UV01Message.controlActProcess at com.santeos.dmp.iheprofiles.hl7.PRPAIN201304UV02MCCIMT000100UV01Message

A: 

What flags are you passing to wsdl2java?

Can you check the generated code for ObjectFactory classes? Check those to see if any methods are annotated with @XmlElementDecl.

Daniel Kulp
It was my wsdl2java command:call wsdl2java -exsh true -autoNameResolution -p %PACKAGE_BASE%.pdq -p "urn:hl7-org:v3"=%PACKAGE_BASE%.hl7 -d %PROJECT_HOME%\src\main\java\ %WSDL_HOME%\PDQSupplier.wsdlObjectFactory had a lot of methods annotated with @XmlElementDeclActually, the problem was that the package "hl7" was common to other packages. So, I have changed in the wsdl command the package name from "hl7" to "pdq.hl7" and it works!
Julien