No idea on the error message. However, one possible solution that may work for you is to add an @XmlSeeAlso annotation onto the JAX-WS SEI interface (and/or the impl class) that points to your jaxb beans that you really would be sending. (or the ObjectFactory for them) That SHOULD then make sure they are added into the JAXBContext that CXF would created. Probably added to the WSDL as well.
Dan On Tue July 21 2009 6:53:39 pm jdmichal wrote: > I am using CXF to transform a WSDL into Java code. My WSDL is defined in > XML namespace "http://my.wsdl.namespace" and the files are generated to the > Java namespace "my.wsdl.namespace". The WSDL uses "xsd:anyType", and the > data elements being sent are in namespace "my.data.namespace". Because the > WSDL does not actually contain the data definitions, I am attempting to use > a JAXBDataBinding in order to allow the backend to unmarshall the elements > into something other than > "com.sun.org.apache.xerces.internal.dom.ElementNSImpl". > > I set a JAXBDataBinding as so in beans.xml: > > <jaxws:dataBinding> > <bean class="org.apache.cxf.jaxb.JAXBDataBinding"> > <constructor-arg index="0"> > <bean class="javax.xml.bind.JAXBContext" > factory-method="newInstance"> > <constructor-arg index="0" > value="my.wsdl.namespace:my.data.namespace"/> > </bean> > </constructor-arg> > </bean> > </jaxws:dataBinding> > > > What I end up seeing in the Tomcat log is this: > > org.springframework.beans.factory.parsing.BeanDefinitionParsingException: > Configuration problem: Unable to locate Spring NamespaceHandler for XML > schema namespace [http://my.wsdl.namespace] > Offending resource: ServletContext resource [/WEB-INF/beans.xml] > > > Note that the namespace indicated is that of my WSDL file. > > Any information is appreciated. Been bashing my head against this one for a > few hours now. Can find very little useful on the web regarding this. -- Daniel Kulp [email protected] http://www.dankulp.com/blog
